Migrate to .NET Core 3.0.

This commit is contained in:
2019-11-02 21:01:25 +00:00
parent 6ee30d2d13
commit f653af2059
118 changed files with 7366 additions and 4733 deletions

1
.gitignore vendored
View File

@@ -537,3 +537,4 @@ MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
public.asc

View File

@@ -0,0 +1,17 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Server" type="LaunchSettings" factoryName=".NET Launch Settings Profile">
<option name="LAUNCH_PROFILE_PROJECT_FILE_PATH" value="$PROJECT_DIR$/DiscImageChef.Server/DiscImageChef.Server.csproj" />
<option name="LAUNCH_PROFILE_TFM" value=".NETCoreApp,Version=v3.0" />
<option name="LAUNCH_PROFILE_NAME" value="DiscImageChef.Server" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="USE_MONO" value="0" />
<option name="RUNTIME_ARGUMENTS" value="" />
<option name="GENERATE_APPLICATIONHOST_CONFIG" value="1" />
<option name="SHOW_IIS_EXPRESS_OUTPUT" value="0" />
<option name="SEND_DEBUG_REQUEST" value="1" />
<option name="ADDITIONAL_IIS_EXPRESS_ARGUMENTS" value="" />
<method v="2">
<option name="Build" enabled="true" />
</method>
</configuration>
</component>

View File

@@ -0,0 +1,20 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Server task" type="DotNetProject" factoryName=".NET Project">
<option name="EXE_PATH" value="$PROJECT_DIR$/DiscImageChef.Server.Task/bin/Debug/netcoreapp3.0/DiscImageChef.Server.Task.dll" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/DiscImageChef.Server.Task/bin/Debug/netcoreapp3.0" />
<option name="PASS_PARENT_ENVS" value="1" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="USE_MONO" value="0" />
<option name="RUNTIME_ARGUMENTS" value="" />
<option name="PROJECT_PATH" value="$PROJECT_DIR$/DiscImageChef.Server.Task/DiscImageChef.Server.Task.csproj" />
<option name="PROJECT_EXE_PATH_TRACKING" value="1" />
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
<option name="PROJECT_KIND" value="DotNetCore" />
<option name="PROJECT_TFM" value=".NETCoreApp,Version=v3.0" />
<method v="2">
<option name="Build" enabled="true" />
</method>
</configuration>
</component>

View File

@@ -1,29 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
https://go.microsoft.com/fwlink/?LinkId=301879
-->
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<connectionStrings>
<add name="DicServerContext" connectionString="server=localhost;port=3306;database=discimagechef;uid=dic;password=dicpass"
providerName="MySql.Data.MySqlClient" />
</connectionStrings>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework"/>
<providers>
<provider invariantName="MySql.Data.MySqlClient"
type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.EntityFramework"/>
</providers>
</entityFramework>
<system.data>
<DbProviderFactories>
<remove invariant="MySql.Data.MySqlClient" />
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL"
type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=8.0.13.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
</system.data>
</configuration>

View File

@@ -1,105 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{79D6A54E-47B6-4D0A-ABEB-4FA7B5ADF4B2}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DiscImageChef.Server.Task</RootNamespace>
<AssemblyName>DiscImageChef.Server.Task</AssemblyName>
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<FileAlignment>512</FileAlignment>
<TargetFramework>netcoreapp3.0</TargetFramework>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PropertyGroup>
<ReleaseVersion>$(Version)</ReleaseVersion>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<Version>4.5.99.1693</Version>
<Company>Claunia.com</Company>
<Copyright>Copyright © 2011-2019 Natalia Portillo</Copyright>
<Product>The Disc Image Chef</Product>
<Title>DiscImageChef.Server</Title>
<ApplicationVersion>$(Version)</ApplicationVersion>
<RuntimeIdentifiers>linux-x64</RuntimeIdentifiers>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PropertyGroup>
<NrtRevisionFormat>$(Version)-{chash:8} built by {mname} in $(Configuration){!:, modified}</NrtRevisionFormat>
<NrtResolveSimpleAttributes>true</NrtResolveSimpleAttributes>
<NrtShowRevision>true</NrtShowRevision>
</PropertyGroup>
<ItemGroup>
<Reference Include="DiscImageChef.CommonTypes, Version=4.5.99.1693, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\..\..\..\tmp\claunia-temp-aspnet-0\e277a754\assembly\shadow\34ef13c2\840cc539_b0e3d6fb_00000001\DiscImageChef.CommonTypes.dll</HintPath>
</Reference>
<Reference Include="DiscImageChef.Decoders, Version=4.5.99.1693, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\..\..\..\tmp\claunia-temp-aspnet-0\e277a754\assembly\shadow\3a88f867\8a6b2e9c_b0e3d6fb_00000001\DiscImageChef.Decoders.dll</HintPath>
</Reference>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<HintPath>..\..\..\.nuget\packages\entityframework\6.2.0\lib\net45\EntityFramework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<PackageReference Include="HtmlAgilityPack" Version="1.11.16" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.0.0" />
<PackageReference Include="Unclassified.NetRevisionTask" Version="0.3.0" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<ProjectReference Include="..\DiscImageChef.Helpers\DiscImageChef.Helpers.csproj" />
<ProjectReference Include="..\DiscImageChef.Server\DiscImageChef.Server.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DiscImageChef.Helpers\DiscImageChef.Helpers.csproj">
<Project>{f8bdf57b-1571-4cd0-84b3-b422088d359a}</Project>
<Name>DiscImageChef.Helpers</Name>
</ProjectReference>
<ProjectReference Include="..\DiscImageChef.Server\DiscImageChef.Server.csproj">
<Project>{911addf5-e5fa-445d-88cd-c7f8ffdbe645}</Project>
<Name>DiscImageChef.Server</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="EntityFramework" Version="6.2.0" />
<PackageReference Include="HtmlAgilityPack" Version="1.11.12" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="..\LICENSE.LGPL">
<Link>LICENSE.LGPL</Link>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4')) and '$(OS)' == 'Unix'">
<!-- When compiling .NET SDK 2.0 projects targeting .NET 4.x on Mono using 'dotnet build' you -->
<!-- have to teach MSBuild where the Mono copy of the reference asssemblies is -->
<!-- Look in the standard install locations -->
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/Library/Frameworks/Mono.framework/Versions/Current/lib/mono')">/Library/Frameworks/Mono.framework/Versions/Current/lib/mono</BaseFrameworkPathOverrideForMono>
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/usr/lib/mono')">/usr/lib/mono</BaseFrameworkPathOverrideForMono>
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/usr/local/lib/mono')">/usr/local/lib/mono</BaseFrameworkPathOverrideForMono>
<!-- If we found Mono reference assemblies, then use them -->
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net40'">$(BaseFrameworkPathOverrideForMono)/4.0-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net45'">$(BaseFrameworkPathOverrideForMono)/4.5-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net451'">$(BaseFrameworkPathOverrideForMono)/4.5.1-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net452'">$(BaseFrameworkPathOverrideForMono)/4.5.2-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net46'">$(BaseFrameworkPathOverrideForMono)/4.6-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net461'">$(BaseFrameworkPathOverrideForMono)/4.6.1-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net462'">$(BaseFrameworkPathOverrideForMono)/4.6.2-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net47'">$(BaseFrameworkPathOverrideForMono)/4.7-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net471'">$(BaseFrameworkPathOverrideForMono)/4.7.1-api</FrameworkPathOverride>
<EnableFrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">true</EnableFrameworkPathOverride>
<!-- Add the Facades directory. Not sure how else to do this. Necessary at least for .NET 4.5 -->
<AssemblySearchPaths Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">$(FrameworkPathOverride)/Facades;$(AssemblySearchPaths)</AssemblySearchPaths>
</PropertyGroup>
</Project>
</Project>

View File

@@ -31,14 +31,13 @@
// ****************************************************************************/
using System;
using System.Data.Entity.Migrations;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net;
using DiscImageChef.Server.Migrations;
using DiscImageChef.Server.Models;
using HtmlAgilityPack;
using Microsoft.EntityFrameworkCore;
namespace DiscImageChef.Server.Task
{
@@ -47,30 +46,29 @@ namespace DiscImageChef.Server.Task
public static void Main(string[] args)
{
DateTime start, end;
Console.WriteLine("{0}: Migrating database to latest version...", DateTime.UtcNow);
start = DateTime.UtcNow;
Configuration migratorConfig = new Configuration();
DbMigrator dbMigrator = new DbMigrator(migratorConfig);
dbMigrator.Update();
end = DateTime.UtcNow;
Console.WriteLine("{0}: Took {1:F2} seconds", DateTime.UtcNow, (end - start).TotalSeconds);
start = DateTime.UtcNow;
Console.WriteLine("{0}: Connecting to database...", DateTime.UtcNow);
System.Console.WriteLine("{0}: Connecting to database...", DateTime.UtcNow);
DicServerContext ctx = new DicServerContext();
end = DateTime.UtcNow;
Console.WriteLine("{0}: Took {1:F2} seconds", end, (end - start).TotalSeconds);
System.Console.WriteLine("{0}: Took {1:F2} seconds", end, (end - start).TotalSeconds);
System.Console.WriteLine("{0}: Migrating database to latest version...", DateTime.UtcNow);
start = DateTime.UtcNow;
ctx.Database.Migrate();
end = DateTime.UtcNow;
System.Console.WriteLine("{0}: Took {1:F2} seconds", DateTime.UtcNow, (end - start).TotalSeconds);
WebClient client;
try
{
Console.WriteLine("{0}: Retrieving USB IDs from Linux USB...", DateTime.UtcNow);
System.Console.WriteLine("{0}: Retrieving USB IDs from Linux USB...", DateTime.UtcNow);
start = DateTime.UtcNow;
client = new WebClient();
StringReader sr = new StringReader(client.DownloadString("http://www.linux-usb.org/usb.ids"));
end = DateTime.UtcNow;
Console.WriteLine("{0}: Took {1:F2} seconds", end, (end - start).TotalSeconds);
System.Console.WriteLine("{0}: Took {1:F2} seconds", end, (end - start).TotalSeconds);
UsbVendor vendor = null;
int newVendors = 0;
@@ -80,16 +78,16 @@ namespace DiscImageChef.Server.Task
int counter = 0;
start = DateTime.UtcNow;
Console.WriteLine("{0}: Adding and updating database entries...", DateTime.UtcNow);
System.Console.WriteLine("{0}: Adding and updating database entries...", DateTime.UtcNow);
do
{
if(counter == 1000)
{
DateTime start2 = DateTime.UtcNow;
Console.WriteLine("{0}: Saving changes", start2);
System.Console.WriteLine("{0}: Saving changes", start2);
ctx.SaveChanges();
end = DateTime.UtcNow;
Console.WriteLine("{0}: Took {1:F2} seconds", end, (end - start2).TotalSeconds);
System.Console.WriteLine("{0}: Took {1:F2} seconds", end, (end - start2).TotalSeconds);
counter = 0;
}
@@ -118,7 +116,7 @@ namespace DiscImageChef.Server.Task
{
product = new UsbProduct(vendor, number, name);
ctx.UsbProducts.Add(product);
Console.WriteLine("{0}: Will add product {1} with ID {2:X4} and vendor {3} ({4:X4})",
System.Console.WriteLine("{0}: Will add product {1} with ID {2:X4} and vendor {3} ({4:X4})",
DateTime.UtcNow, product.Product, product.ProductId,
product.Vendor?.Vendor ?? "null", product.Vendor?.VendorId ?? 0);
newProducts++;
@@ -126,7 +124,7 @@ namespace DiscImageChef.Server.Task
}
else if(name != product.Product)
{
Console
System.Console
.WriteLine("{0}: Will modify product with ID {1:X4} and vendor {2} ({3:X4}) from \"{4}\" to \"{5}\"",
DateTime.UtcNow, product.ProductId, product.Vendor?.Vendor ?? "null",
product.Vendor?.VendorId ?? 0,
@@ -153,14 +151,14 @@ namespace DiscImageChef.Server.Task
{
vendor = new UsbVendor(number, name);
ctx.UsbVendors.Add(vendor);
Console.WriteLine("{0}: Will add vendor {1} with ID {2:X4}", DateTime.UtcNow, vendor.Vendor,
System.Console.WriteLine("{0}: Will add vendor {1} with ID {2:X4}", DateTime.UtcNow, vendor.Vendor,
vendor.VendorId);
newVendors++;
counter++;
}
else if(name != vendor.Vendor)
{
Console.WriteLine("{0}: Will modify vendor with ID {1:X4} from \"{2}\" to \"{3}\"",
System.Console.WriteLine("{0}: Will modify vendor with ID {1:X4} from \"{2}\" to \"{3}\"",
DateTime.UtcNow, vendor.VendorId, vendor.Vendor, name);
vendor.Vendor = name;
vendor.ModifiedWhen = DateTime.UtcNow;
@@ -171,68 +169,68 @@ namespace DiscImageChef.Server.Task
while(true);
end = DateTime.UtcNow;
Console.WriteLine("{0}: Took {1:F2} seconds", end, (end - start).TotalSeconds);
System.Console.WriteLine("{0}: Took {1:F2} seconds", end, (end - start).TotalSeconds);
Console.WriteLine("{0}: Saving database changes...", DateTime.UtcNow);
System.Console.WriteLine("{0}: Saving database changes...", DateTime.UtcNow);
start = DateTime.UtcNow;
ctx.SaveChanges();
end = DateTime.UtcNow;
Console.WriteLine("{0}: Took {1:F2} seconds", end, (end - start).TotalSeconds);
System.Console.WriteLine("{0}: Took {1:F2} seconds", end, (end - start).TotalSeconds);
Console.WriteLine("{0}: {1} vendors added.", DateTime.UtcNow, newVendors);
Console.WriteLine("{0}: {1} products added.", DateTime.UtcNow, newProducts);
Console.WriteLine("{0}: {1} vendors modified.", DateTime.UtcNow, modifiedVendors);
Console.WriteLine("{0}: {1} products modified.", DateTime.UtcNow, modifiedProducts);
System.Console.WriteLine("{0}: {1} vendors added.", DateTime.UtcNow, newVendors);
System.Console.WriteLine("{0}: {1} products added.", DateTime.UtcNow, newProducts);
System.Console.WriteLine("{0}: {1} vendors modified.", DateTime.UtcNow, modifiedVendors);
System.Console.WriteLine("{0}: {1} products modified.", DateTime.UtcNow, modifiedProducts);
Console.WriteLine("{0}: Looking up a vendor", DateTime.UtcNow);
System.Console.WriteLine("{0}: Looking up a vendor", DateTime.UtcNow);
start = DateTime.UtcNow;
vendor = ctx.UsbVendors.FirstOrDefault(v => v.VendorId == 0x8086);
if(vendor is null) Console.WriteLine("{0}: Error, could not find vendor.", DateTime.UtcNow);
if(vendor is null) System.Console.WriteLine("{0}: Error, could not find vendor.", DateTime.UtcNow);
else
Console.WriteLine("{0}: Found {1}.", DateTime.UtcNow,
System.Console.WriteLine("{0}: Found {1}.", DateTime.UtcNow,
vendor.Vendor);
end = DateTime.UtcNow;
Console.WriteLine("{0}: Took {1:F2} seconds", end, (end - start).TotalSeconds);
System.Console.WriteLine("{0}: Took {1:F2} seconds", end, (end - start).TotalSeconds);
Console.WriteLine("{0}: Looking up a product", DateTime.UtcNow);
System.Console.WriteLine("{0}: Looking up a product", DateTime.UtcNow);
start = DateTime.UtcNow;
UsbProduct prd =
ctx.UsbProducts.FirstOrDefault(p => p.ProductId == 0x0001 && p.Vendor.VendorId == 0x8086);
if(prd is null) Console.WriteLine("{0}: Error, could not find product.", DateTime.UtcNow);
else Console.WriteLine("{0}: Found {1}.", DateTime.UtcNow, prd.Product);
if(prd is null) System.Console.WriteLine("{0}: Error, could not find product.", DateTime.UtcNow);
else System.Console.WriteLine("{0}: Found {1}.", DateTime.UtcNow, prd.Product);
end = DateTime.UtcNow;
Console.WriteLine("{0}: Took {1:F2} seconds", end, (end - start).TotalSeconds);
System.Console.WriteLine("{0}: Took {1:F2} seconds", end, (end - start).TotalSeconds);
}
catch(Exception ex)
{
#if DEBUG
if(Debugger.IsAttached) throw;
#endif
Console.WriteLine("{0}: Exception {1} filling USB IDs...", DateTime.UtcNow, ex);
System.Console.WriteLine("{0}: Exception {1} filling USB IDs...", DateTime.UtcNow, ex);
}
Console.WriteLine("{0}: Fixing all devices without modification time...", DateTime.UtcNow);
System.Console.WriteLine("{0}: Fixing all devices without modification time...", DateTime.UtcNow);
start = DateTime.UtcNow;
foreach(Device device in ctx.Devices.Where(d => d.ModifiedWhen == null))
device.ModifiedWhen = device.AddedWhen;
end = DateTime.UtcNow;
Console.WriteLine("{0}: Took {1:F2} seconds", end, (end - start).TotalSeconds);
System.Console.WriteLine("{0}: Took {1:F2} seconds", end, (end - start).TotalSeconds);
Console.WriteLine("{0}: Committing changes...", DateTime.UtcNow);
System.Console.WriteLine("{0}: Committing changes...", DateTime.UtcNow);
start = DateTime.UtcNow;
ctx.SaveChanges();
end = DateTime.UtcNow;
Console.WriteLine("{0}: Took {1:F2} seconds", end, (end - start).TotalSeconds);
System.Console.WriteLine("{0}: Took {1:F2} seconds", end, (end - start).TotalSeconds);
try
{
Console.WriteLine("{0}: Retrieving CompactDisc read offsets from AccurateRip...", DateTime.UtcNow);
System.Console.WriteLine("{0}: Retrieving CompactDisc read offsets from AccurateRip...", DateTime.UtcNow);
start = DateTime.UtcNow;
client = new WebClient();
string html = client.DownloadString("http://www.accuraterip.com/driveoffsets.htm");
end = DateTime.UtcNow;
Console.WriteLine("{0}: Took {1:F2} seconds", end, (end - start).TotalSeconds);
System.Console.WriteLine("{0}: Took {1:F2} seconds", end, (end - start).TotalSeconds);
// The HTML is too malformed to process easily, so find start of table
html = "<html><body><table><tr>" +
@@ -247,7 +245,7 @@ namespace DiscImageChef.Server.Task
int addedOffsets = 0;
int modifiedOffsets = 0;
Console.WriteLine("{0}: Processing offsets...", DateTime.UtcNow);
System.Console.WriteLine("{0}: Processing offsets...", DateTime.UtcNow);
start = DateTime.UtcNow;
foreach(HtmlNode row in firstTable.Descendants("tr"))
{
@@ -255,7 +253,7 @@ namespace DiscImageChef.Server.Task
if(columns.Length != 4)
{
Console.WriteLine("{0}: Row does not have correct number of columns...", DateTime.UtcNow);
System.Console.WriteLine("{0}: Row does not have correct number of columns...", DateTime.UtcNow);
continue;
}
@@ -268,28 +266,28 @@ namespace DiscImageChef.Server.Task
{
if(column0.ToLowerInvariant() != "cd drive")
{
Console.WriteLine("{0}: Unexpected header \"{1}\" found...", DateTime.UtcNow,
System.Console.WriteLine("{0}: Unexpected header \"{1}\" found...", DateTime.UtcNow,
columns[0].InnerText);
break;
}
if(column1.ToLowerInvariant() != "correction offset")
{
Console.WriteLine("{0}: Unexpected header \"{1}\" found...", DateTime.UtcNow,
System.Console.WriteLine("{0}: Unexpected header \"{1}\" found...", DateTime.UtcNow,
columns[1].InnerText);
break;
}
if(column2.ToLowerInvariant() != "submitted by")
{
Console.WriteLine("{0}: Unexpected header \"{1}\" found...", DateTime.UtcNow,
System.Console.WriteLine("{0}: Unexpected header \"{1}\" found...", DateTime.UtcNow,
columns[2].InnerText);
break;
}
if(column3.ToLowerInvariant() != "percentage agree")
{
Console.WriteLine("{0}: Unexpected header \"{1}\" found...", DateTime.UtcNow,
System.Console.WriteLine("{0}: Unexpected header \"{1}\" found...", DateTime.UtcNow,
columns[3].InnerText);
break;
}
@@ -412,23 +410,23 @@ namespace DiscImageChef.Server.Task
}
end = DateTime.UtcNow;
Console.WriteLine("{0}: Took {1:F2} seconds", end, (end - start).TotalSeconds);
System.Console.WriteLine("{0}: Took {1:F2} seconds", end, (end - start).TotalSeconds);
Console.WriteLine("{0}: Committing changes...", DateTime.UtcNow);
System.Console.WriteLine("{0}: Committing changes...", DateTime.UtcNow);
start = DateTime.UtcNow;
ctx.SaveChanges();
end = DateTime.UtcNow;
Console.WriteLine("{0}: Took {1:F2} seconds", end, (end - start).TotalSeconds);
System.Console.WriteLine("{0}: Took {1:F2} seconds", end, (end - start).TotalSeconds);
Console.WriteLine("{0}: Added {1} offsets", end, addedOffsets);
Console.WriteLine("{0}: Modified {1} offsets", end, modifiedOffsets);
System.Console.WriteLine("{0}: Added {1} offsets", end, addedOffsets);
System.Console.WriteLine("{0}: Modified {1} offsets", end, modifiedOffsets);
}
catch(Exception ex)
{
#if DEBUG
if(Debugger.IsAttached) throw;
#endif
Console.WriteLine("{0}: Exception {1} filling CompactDisc read offsets...", DateTime.UtcNow, ex);
System.Console.WriteLine("{0}: Exception {1} filling CompactDisc read offsets...", DateTime.UtcNow, ex);
}
}
}

View File

@@ -1,35 +0,0 @@
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("DiscImageChef.Server.Task")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("DiscImageChef.Server.Task")]
[assembly: AssemblyCopyright("Copyright © 2011-2019 Natalia Portillo")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("79D6A54E-47B6-4D0A-ABEB-4FA7B5ADF4B2")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("4.5.99.1693")]
[assembly: AssemblyFileVersion("4.5.99.1693")]

View File

@@ -1,50 +0,0 @@
// /***************************************************************************
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : RouteConfig.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : DiscImageChef Server.
//
// --[ Description ] ----------------------------------------------------------
//
// Sets ASP.NET routing information.
//
// --[ License ] --------------------------------------------------------------
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2011-2019 Natalia Portillo
// ****************************************************************************/
using System.Web.Mvc;
using System.Web.Routing;
namespace DiscImageChef.Server
{
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapMvcAttributeRoutes();
routes.MapRoute("Default", "{controller}/{action}/{id}",
new {controller = "Home", action = "Index", id = UrlParameter.Optional});
}
}
}

View File

@@ -1,61 +0,0 @@
// /***************************************************************************
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : WebApiConfig.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : DiscImageChef Server.
//
// --[ Description ] ----------------------------------------------------------
//
// Configures Web API
//
// --[ License ] --------------------------------------------------------------
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2011-2019 Natalia Portillo
// ****************************************************************************/
// This is verbatim from ASP.NET so left as is
// ReSharper disable All
using System.Data.Entity.Migrations;
using System.Web.Http;
using DiscImageChef.Server.Migrations;
using DiscImageChef.Server.Models;
namespace DiscImageChef.Server
{
public static class WebApiConfig
{
public static void Register(HttpConfiguration config)
{
// Web API configuration and services
// Web API routes
config.MapHttpAttributeRoutes();
config.Routes.MapHttpRoute(name: "DefaultApi", routeTemplate: "api/{controller}/{id}",
defaults: new {id = RouteParameter.Optional});
//DicServerContext ctx = new DicServerContext();
Configuration migratorConfig = new Migrations.Configuration();
DbMigrator dbMigrator = new DbMigrator(migratorConfig);
dbMigrator.Update();
}
}
}

View File

@@ -33,23 +33,27 @@
using System;
using System.IO;
using System.Reflection;
using System.Web.Hosting;
using System.Web.Mvc;
using Markdig;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
namespace DiscImageChef.Server.Controllers
{
[RoutePrefix("Home")]
public class HomeController : Controller
{
private IWebHostEnvironment _environment;
public HomeController(IWebHostEnvironment environment)
{
_environment = environment;
}
[Route("")]
[Route("~/")]
[Route("README")]
[Route("~/README")]
public ActionResult Index()
{
StreamReader sr =
new StreamReader(Path.Combine(HostingEnvironment.MapPath("~") ?? throw new InvalidOperationException(),
new StreamReader(Path.Combine(_environment.ContentRootPath ?? throw new InvalidOperationException(),
"docs", "README.md"));
string mdcontent = sr.ReadToEnd();
sr.Close();
@@ -64,11 +68,10 @@ namespace DiscImageChef.Server.Controllers
}
[Route("Changelog")]
[Route("~/Changelog")]
public ActionResult Changelog()
{
StreamReader sr =
new StreamReader(Path.Combine(HostingEnvironment.MapPath("~") ?? throw new InvalidOperationException(),
new StreamReader(Path.Combine(_environment.ContentRootPath ?? throw new InvalidOperationException(),
"docs", "Changelog.md"));
string mdcontent = sr.ReadToEnd();
sr.Close();
@@ -83,11 +86,10 @@ namespace DiscImageChef.Server.Controllers
}
[Route("CODE_OF_CONDUCT")]
[Route("~/CODE_OF_CONDUCT")]
public ActionResult CODE_OF_CONDUCT()
{
StreamReader sr =
new StreamReader(Path.Combine(HostingEnvironment.MapPath("~") ?? throw new InvalidOperationException(),
new StreamReader(Path.Combine(_environment.ContentRootPath ?? throw new InvalidOperationException(),
"docs", "CODE_OF_CONDUCT.md"));
string mdcontent = sr.ReadToEnd();
sr.Close();
@@ -102,11 +104,10 @@ namespace DiscImageChef.Server.Controllers
}
[Route("PULL_REQUEST_TEMPLATE")]
[Route("~/PULL_REQUEST_TEMPLATE")]
public ActionResult PULL_REQUEST_TEMPLATE()
{
StreamReader sr =
new StreamReader(Path.Combine(HostingEnvironment.MapPath("~") ?? throw new InvalidOperationException(),
new StreamReader(Path.Combine(_environment.ContentRootPath ?? throw new InvalidOperationException(),
"docs", "PULL_REQUEST_TEMPLATE.md"));
string mdcontent = sr.ReadToEnd();
sr.Close();
@@ -121,11 +122,10 @@ namespace DiscImageChef.Server.Controllers
}
[Route("ISSUE_TEMPLATE")]
[Route("~/ISSUE_TEMPLATE")]
public ActionResult ISSUE_TEMPLATE()
{
StreamReader sr =
new StreamReader(Path.Combine(HostingEnvironment.MapPath("~") ?? throw new InvalidOperationException(),
new StreamReader(Path.Combine(_environment.ContentRootPath ?? throw new InvalidOperationException(),
"docs", "ISSUE_TEMPLATE.md"));
string mdcontent = sr.ReadToEnd();
sr.Close();
@@ -140,11 +140,10 @@ namespace DiscImageChef.Server.Controllers
}
[Route("CONTRIBUTING")]
[Route("~/CONTRIBUTING")]
public ActionResult CONTRIBUTING()
{
StreamReader sr =
new StreamReader(Path.Combine(HostingEnvironment.MapPath("~") ?? throw new InvalidOperationException(),
new StreamReader(Path.Combine(_environment.ContentRootPath ?? throw new InvalidOperationException(),
"docs", "CONTRIBUTING.md"));
string mdcontent = sr.ReadToEnd();
sr.Close();
@@ -159,11 +158,10 @@ namespace DiscImageChef.Server.Controllers
}
[Route("DONATING")]
[Route("~/DONATING")]
public ActionResult DONATING()
{
StreamReader sr =
new StreamReader(Path.Combine(HostingEnvironment.MapPath("~") ?? throw new InvalidOperationException(),
new StreamReader(Path.Combine(_environment.ContentRootPath ?? throw new InvalidOperationException(),
"docs", "DONATING.md"));
string mdcontent = sr.ReadToEnd();
sr.Close();
@@ -178,11 +176,10 @@ namespace DiscImageChef.Server.Controllers
}
[Route("TODO")]
[Route("~/TODO")]
public ActionResult TODO()
{
StreamReader sr =
new StreamReader(Path.Combine(HostingEnvironment.MapPath("~") ?? throw new InvalidOperationException(),
new StreamReader(Path.Combine(_environment.ContentRootPath ?? throw new InvalidOperationException(),
"docs", "TODO.md"));
string mdcontent = sr.ReadToEnd();
sr.Close();

View File

@@ -33,18 +33,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;
using System.Web.Routing;
using DiscImageChef.CommonTypes.Metadata;
using DiscImageChef.Decoders.PCMCIA;
using DiscImageChef.Decoders.SCSI;
using DiscImageChef.Server.Models;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Routing;
using Tuple = DiscImageChef.Decoders.PCMCIA.Tuple;
namespace DiscImageChef.Server.Controllers
{
public class ReportController : Controller
{
private DicServerContext _ctx;
public ReportController(DicServerContext context)
{
_ctx = context;
}
public ActionResult Index() => RedirectToAction("View", "Report", new RouteValueDictionary {{"id", 1}});
public ActionResult View(int? id)
@@ -53,8 +60,7 @@ namespace DiscImageChef.Server.Controllers
try
{
DicServerContext ctx = new DicServerContext();
Device report = ctx.Devices.FirstOrDefault(d => d.Id == id);
Device report = _ctx.Devices.FirstOrDefault(d => d.Id == id);
if(report is null) return Content("Cannot find requested report");
@@ -68,13 +74,13 @@ namespace DiscImageChef.Server.Controllers
string usbProductDescription = null;
UsbProduct dbProduct =
ctx.UsbProducts.FirstOrDefault(p => p.ProductId == report.USB.ProductID &&
_ctx.UsbProducts.FirstOrDefault(p => p.ProductId == report.USB.ProductID &&
p.Vendor != null &&
p.Vendor.VendorId == report.USB.VendorID);
if(dbProduct is null)
{
UsbVendor dbVendor = ctx.UsbVendors.FirstOrDefault(v => v.VendorId == report.USB.VendorID);
UsbVendor dbVendor = _ctx.UsbVendors.FirstOrDefault(v => v.VendorId == report.USB.VendorID);
if(!(dbVendor is null)) usbVendorDescription = dbVendor.Vendor;
}

View File

@@ -36,14 +36,15 @@ using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading;
using System.Web.Hosting;
using System.Web.Mvc;
using System.Xml;
using System.Xml.Serialization;
using DiscImageChef.CommonTypes.Interop;
using DiscImageChef.CommonTypes.Metadata;
using DiscImageChef.Server.Models;
using Highsoft.Web.Mvc.Charts;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Hosting.Internal;
using Filter = DiscImageChef.Server.Models.Filter;
using OperatingSystem = DiscImageChef.Server.Models.OperatingSystem;
using PlatformID = DiscImageChef.CommonTypes.Interop.PlatformID;
@@ -56,12 +57,19 @@ namespace DiscImageChef.Server.Controllers
/// </summary>
public class StatsController : Controller
{
DicServerContext ctx = new DicServerContext();
DicServerContext ctx;
List<DeviceItem> devices;
List<NameValueStats> operatingSystems;
List<MediaItem> realMedia;
List<NameValueStats> versions;
List<MediaItem> virtualMedia;
private IWebHostEnvironment _environment;
public StatsController(IWebHostEnvironment environment, DicServerContext context)
{
_environment = environment;
ctx = context;
}
public ActionResult Index()
{
@@ -71,7 +79,7 @@ namespace DiscImageChef.Server.Controllers
{
if(
System.IO.File
.Exists(Path.Combine(HostingEnvironment.MapPath("~") ?? throw new InvalidOperationException(),
.Exists(Path.Combine(_environment.ContentRootPath ?? throw new InvalidOperationException(),
"Statistics", "Statistics.xml")))
try
{
@@ -79,7 +87,7 @@ namespace DiscImageChef.Server.Controllers
XmlSerializer xs = new XmlSerializer(statistics.GetType());
FileStream fs =
WaitForFile(Path.Combine(HostingEnvironment.MapPath("~") ?? throw new InvalidOperationException(), "Statistics", "Statistics.xml"),
WaitForFile(Path.Combine(_environment.ContentRootPath ?? throw new InvalidOperationException(), "Statistics", "Statistics.xml"),
FileMode.Open, FileAccess.Read, FileShare.Read);
statistics = (Stats)xs.Deserialize(fs);
fs.Close();
@@ -87,7 +95,7 @@ namespace DiscImageChef.Server.Controllers
StatsConverter.Convert(statistics);
System.IO.File
.Delete(Path.Combine(HostingEnvironment.MapPath("~") ?? throw new InvalidOperationException(),
.Delete(Path.Combine(_environment.ContentRootPath ?? throw new InvalidOperationException(),
"Statistics", "Statistics.xml"));
}
catch(XmlException)
@@ -443,24 +451,24 @@ namespace DiscImageChef.Server.Controllers
xmlFile = xmlFile.Replace('/', '_').Replace('\\', '_').Replace('?', '_');
if(System.IO.File.Exists(Path.Combine(HostingEnvironment.MapPath("~"), "Reports", xmlFile)))
if(System.IO.File.Exists(Path.Combine(_environment.ContentRootPath, "Reports", xmlFile)))
{
DeviceReport deviceReport = new DeviceReport();
XmlSerializer xs = new XmlSerializer(deviceReport.GetType());
FileStream fs =
WaitForFile(Path.Combine(HostingEnvironment.MapPath("~") ?? throw new InvalidOperationException(), "Reports", xmlFile),
WaitForFile(Path.Combine(_environment.ContentRootPath ?? throw new InvalidOperationException(), "Reports", xmlFile),
FileMode.Open, FileAccess.Read, FileShare.Read);
deviceReport = (DeviceReport)xs.Deserialize(fs);
fs.Close();
DeviceReportV2 deviceReportV2 = new DeviceReportV2(deviceReport);
device.Report = ctx.Devices.Add(new Device(deviceReportV2));
device.Report = ctx.Devices.Add(new Device(deviceReportV2)).Entity;
ctx.SaveChanges();
System.IO.File
.Delete(Path.Combine(HostingEnvironment.MapPath("~") ?? throw new InvalidOperationException(),
.Delete(Path.Combine(_environment.ContentRootPath ?? throw new InvalidOperationException(),
"Reports", xmlFile));
}

View File

@@ -37,35 +37,41 @@ using System.Linq;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Web.Http;
using DiscImageChef.CommonTypes.Metadata;
using DiscImageChef.Dto;
using DiscImageChef.Server.Models;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Newtonsoft.Json;
namespace DiscImageChef.Server.Controllers
{
public class UpdateController : ApiController
public class UpdateController : Controller
{
private DicServerContext _ctx;
public UpdateController(DicServerContext ctx)
{
_ctx = ctx;
}
/// <summary>
/// Receives a report from DiscImageChef.Core, verifies it's in the correct format and stores it on the server
/// </summary>
/// <returns>HTTP response</returns>
[Route("api/update")]
[HttpGet]
public HttpResponseMessage UploadReport(long timestamp)
public ActionResult Update(long timestamp)
{
DicServerContext ctx = new DicServerContext();
SyncDto sync = new SyncDto();
DateTime lastSync = DateHandlers.UnixToDateTime(timestamp);
sync.UsbVendors = new List<UsbVendorDto>();
foreach(UsbVendor vendor in ctx.UsbVendors.Where(v => v.ModifiedWhen > lastSync))
foreach(UsbVendor vendor in _ctx.UsbVendors.Where(v => v.ModifiedWhen > lastSync))
sync.UsbVendors.Add(new UsbVendorDto {VendorId = (ushort)vendor.VendorId, Vendor = vendor.Vendor});
sync.UsbProducts = new List<UsbProductDto>();
foreach(UsbProduct product in ctx.UsbProducts.Where(p => p.ModifiedWhen > lastSync))
foreach(UsbProduct product in _ctx.UsbProducts.Include(p => p.Vendor).Where(p => p.ModifiedWhen > lastSync))
sync.UsbProducts.Add(new UsbProductDto
{
Id = product.Id,
@@ -75,11 +81,11 @@ namespace DiscImageChef.Server.Controllers
});
sync.Offsets = new List<CdOffsetDto>();
foreach(CompactDiscOffset offset in ctx.CdOffsets.Where(o => o.ModifiedWhen > lastSync))
foreach(CompactDiscOffset offset in _ctx.CdOffsets.Where(o => o.ModifiedWhen > lastSync))
sync.Offsets.Add(new CdOffsetDto(offset, offset.Id));
sync.Devices = new List<DeviceDto>();
foreach(Device device in ctx.Devices.Where(d => d.ModifiedWhen > lastSync).ToList())
foreach(Device device in _ctx.Devices.Where(d => d.ModifiedWhen > lastSync).ToList())
sync.Devices.Add(new
DeviceDto(JsonConvert.DeserializeObject<DeviceReportV2>(JsonConvert.SerializeObject(device, Formatting.None, new JsonSerializerSettings {ReferenceLoopHandling = ReferenceLoopHandling.Ignore})),
device.Id, device.OptimalMultipleSectorsRead));
@@ -88,10 +94,11 @@ namespace DiscImageChef.Server.Controllers
StringWriter sw = new StringWriter();
js.Serialize(sw, sync);
return new HttpResponseMessage
return new ContentResult
{
StatusCode = HttpStatusCode.OK,
Content = new StringContent(sw.ToString(), Encoding.UTF8, "application/json")
StatusCode = (int)HttpStatusCode.OK,
Content = sw.ToString(),
ContentType = "application/json"
};
}
}

View File

@@ -36,22 +36,32 @@ using System.IO;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using System.Web;
using System.Web.Hosting;
using System.Web.Http;
using System.Xml.Serialization;
using Cinchoo.PGP;
using DiscImageChef.CommonTypes.Metadata;
using DiscImageChef.Server.Models;
using MailKit.Net.Smtp;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Hosting.Internal;
using MimeKit;
using Newtonsoft.Json;
namespace DiscImageChef.Server.Controllers
{
public class UploadReportController : ApiController
public class UploadReportController : Controller
{
DicServerContext ctx = new DicServerContext();
private DicServerContext ctx;
private IWebHostEnvironment _environment;
public UploadReportController(IWebHostEnvironment environment, DicServerContext _ctx)
{
_environment = environment;
ctx = _ctx;
}
/// <summary>
/// Receives a report from DiscImageChef.Core, verifies it's in the correct format and stores it on the server
@@ -59,21 +69,21 @@ namespace DiscImageChef.Server.Controllers
/// <returns>HTTP response</returns>
[Route("api/uploadreport")]
[HttpPost]
public HttpResponseMessage UploadReport()
public async Task<IActionResult> UploadReport()
{
HttpResponseMessage response = new HttpResponseMessage {StatusCode = HttpStatusCode.OK};
ContentResult response = new ContentResult {StatusCode = (int)HttpStatusCode.OK, ContentType = "text/plain"};
try
{
DeviceReport newReport = new DeviceReport();
HttpRequest request = HttpContext.Current.Request;
HttpRequest request = HttpContext.Request;
XmlSerializer xs = new XmlSerializer(newReport.GetType());
newReport = (DeviceReport)xs.Deserialize(request.InputStream);
newReport = (DeviceReport) xs.Deserialize(new StringReader(await new StreamReader(request.Body).ReadToEndAsync()));
if(newReport == null)
{
response.Content = new StringContent("notstats", Encoding.UTF8, "text/plain");
response.Content = "notstats";
return response;
}
@@ -94,7 +104,7 @@ namespace DiscImageChef.Server.Controllers
MemoryStream pgpOut = new MemoryStream();
ChoPGPEncryptDecrypt pgp = new ChoPGPEncryptDecrypt();
pgp.Encrypt(pgpIn, pgpOut,
Path.Combine(HostingEnvironment.MapPath("~") ?? throw new InvalidOperationException(),
Path.Combine(_environment.ContentRootPath ?? throw new InvalidOperationException(),
"public.asc"), true);
pgpOut.Position = 0;
reportV2String = Encoding.UTF8.GetString(pgpOut.ToArray());
@@ -114,7 +124,7 @@ namespace DiscImageChef.Server.Controllers
client.Disconnect(true);
}
response.Content = new StringContent("ok", Encoding.UTF8, "text/plain");
response.Content = "ok";
return response;
}
// ReSharper disable once RedundantCatchClause
@@ -123,7 +133,7 @@ namespace DiscImageChef.Server.Controllers
#if DEBUG
if(Debugger.IsAttached) throw;
#endif
response.Content = new StringContent("error", Encoding.UTF8, "text/plain");
response.Content = "error";
return response;
}
}
@@ -134,21 +144,21 @@ namespace DiscImageChef.Server.Controllers
/// <returns>HTTP response</returns>
[Route("api/uploadreportv2")]
[HttpPost]
public HttpResponseMessage UploadReportV2()
public async Task<IActionResult> UploadReportV2()
{
HttpResponseMessage response = new HttpResponseMessage {StatusCode = HttpStatusCode.OK};
ContentResult response = new ContentResult {StatusCode = (int)HttpStatusCode.OK, ContentType = "text/plain"};
try
{
HttpRequest request = HttpContext.Current.Request;
HttpRequest request = HttpContext.Request;
StreamReader sr = new StreamReader(request.InputStream);
string reportJson = sr.ReadToEnd();
StreamReader sr = new StreamReader(request.Body);
string reportJson = await sr.ReadToEndAsync();
DeviceReportV2 newReport = JsonConvert.DeserializeObject<DeviceReportV2>(reportJson);
if(newReport == null)
{
response.Content = new StringContent("notstats", Encoding.UTF8, "text/plain");
response.Content = "notstats";
return response;
}
@@ -159,7 +169,7 @@ namespace DiscImageChef.Server.Controllers
MemoryStream pgpOut = new MemoryStream();
ChoPGPEncryptDecrypt pgp = new ChoPGPEncryptDecrypt();
pgp.Encrypt(pgpIn, pgpOut,
Path.Combine(HostingEnvironment.MapPath("~") ?? throw new InvalidOperationException(),
Path.Combine(_environment.ContentRootPath ?? throw new InvalidOperationException(),
"public.asc"), true);
pgpOut.Position = 0;
reportJson = Encoding.UTF8.GetString(pgpOut.ToArray());
@@ -178,7 +188,7 @@ namespace DiscImageChef.Server.Controllers
client.Disconnect(true);
}
response.Content = new StringContent("ok", Encoding.UTF8, "text/plain");
response.Content = "ok";
return response;
}
// ReSharper disable once RedundantCatchClause
@@ -187,7 +197,7 @@ namespace DiscImageChef.Server.Controllers
#if DEBUG
if(Debugger.IsAttached) throw;
#endif
response.Content = new StringContent("error", Encoding.UTF8, "text/plain");
response.Content ="error";
return response;
}
}

View File

@@ -38,46 +38,57 @@ using System.Net;
using System.Net.Http;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Web;
using System.Web.Http;
using System.Xml.Serialization;
using DiscImageChef.CommonTypes.Metadata;
using DiscImageChef.Server.Models;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using OperatingSystem = DiscImageChef.Server.Models.OperatingSystem;
using Version = DiscImageChef.Server.Models.Version;
namespace DiscImageChef.Server.Controllers
{
public class UploadStatsController : ApiController
public class UploadStatsController : Controller
{
DicServerContext _ctx;
private IWebHostEnvironment _environment;
public UploadStatsController(IWebHostEnvironment environment, DicServerContext ctx)
{
_environment = environment;
_ctx = ctx;
}
/// <summary>
/// Receives statistics from DiscImageChef.Core, processes them and adds them to a server-side global statistics XML
/// </summary>
/// <returns>HTTP response</returns>
[Route("api/uploadstats")]
[HttpPost]
public HttpResponseMessage UploadStats()
public async Task<IActionResult> UploadStats()
{
HttpResponseMessage response = new HttpResponseMessage {StatusCode = HttpStatusCode.OK};
ContentResult response = new ContentResult {StatusCode = (int)HttpStatusCode.OK, ContentType = "text/plain"};
try
{
Stats newStats = new Stats();
HttpRequest request = HttpContext.Current.Request;
HttpRequest request = HttpContext.Request;
XmlSerializer xs = new XmlSerializer(newStats.GetType());
newStats = (Stats)xs.Deserialize(request.InputStream);
newStats = (Stats) xs.Deserialize(new StringReader(await new StreamReader(request.Body).ReadToEndAsync()));
if(newStats == null)
{
response.Content = new StringContent("notstats", Encoding.UTF8, "text/plain");
response.Content = "notstats";
return response;
}
StatsConverter.Convert(newStats);
response.Content = new StringContent("ok", Encoding.UTF8, "text/plain");
response.Content = "ok";
return response;
}
catch(Exception ex)
@@ -85,7 +96,7 @@ namespace DiscImageChef.Server.Controllers
#if DEBUG
if(Debugger.IsAttached) throw;
#endif
response.Content = new StringContent("error", Encoding.UTF8, "text/plain");
response.Content = "error";
return response;
}
}
@@ -96,76 +107,75 @@ namespace DiscImageChef.Server.Controllers
/// <returns>HTTP response</returns>
[Route("api/uploadstatsv2")]
[HttpPost]
public HttpResponseMessage UploadStatsV2()
public async Task<IActionResult> UploadStatsV2()
{
HttpResponseMessage response = new HttpResponseMessage {StatusCode = HttpStatusCode.OK};
ContentResult response = new ContentResult {StatusCode = (int)HttpStatusCode.OK, ContentType = "text/plain"};
try
{
HttpRequest request = HttpContext.Current.Request;
HttpRequest request = HttpContext.Request;
StreamReader sr = new StreamReader(request.InputStream);
StatsDto newstats = JsonConvert.DeserializeObject<StatsDto>(sr.ReadToEnd());
StreamReader sr = new StreamReader(request.Body);
var statsString = await sr.ReadToEndAsync();
StatsDto newstats = JsonConvert.DeserializeObject<StatsDto>(statsString);
if(newstats == null)
{
response.Content = new StringContent("notstats", Encoding.UTF8, "text/plain");
response.Content = "notstats";
return response;
}
DicServerContext ctx = new DicServerContext();
if(newstats.Commands != null)
foreach(NameValueStats nvs in newstats.Commands)
{
Command existing = ctx.Commands.FirstOrDefault(c => c.Name == nvs.name);
Command existing = _ctx.Commands.FirstOrDefault(c => c.Name == nvs.name);
if(existing == null) ctx.Commands.Add(new Command {Name = nvs.name, Count = nvs.Value});
if(existing == null) _ctx.Commands.Add(new Command {Name = nvs.name, Count = nvs.Value});
else existing.Count += nvs.Value;
}
if(newstats.Versions != null)
foreach(NameValueStats nvs in newstats.Versions)
{
Version existing = ctx.Versions.FirstOrDefault(c => c.Value == nvs.name);
Version existing = _ctx.Versions.FirstOrDefault(c => c.Value == nvs.name);
if(existing == null) ctx.Versions.Add(new Version {Value = nvs.name, Count = nvs.Value});
if(existing == null) _ctx.Versions.Add(new Version {Value = nvs.name, Count = nvs.Value});
else existing.Count += nvs.Value;
}
if(newstats.Filesystems != null)
foreach(NameValueStats nvs in newstats.Filesystems)
{
Filesystem existing = ctx.Filesystems.FirstOrDefault(c => c.Name == nvs.name);
Filesystem existing = _ctx.Filesystems.FirstOrDefault(c => c.Name == nvs.name);
if(existing == null) ctx.Filesystems.Add(new Filesystem {Name = nvs.name, Count = nvs.Value});
if(existing == null) _ctx.Filesystems.Add(new Filesystem {Name = nvs.name, Count = nvs.Value});
else existing.Count += nvs.Value;
}
if(newstats.Partitions != null)
foreach(NameValueStats nvs in newstats.Partitions)
{
Partition existing = ctx.Partitions.FirstOrDefault(c => c.Name == nvs.name);
Partition existing = _ctx.Partitions.FirstOrDefault(c => c.Name == nvs.name);
if(existing == null) ctx.Partitions.Add(new Partition {Name = nvs.name, Count = nvs.Value});
if(existing == null) _ctx.Partitions.Add(new Partition {Name = nvs.name, Count = nvs.Value});
else existing.Count += nvs.Value;
}
if(newstats.MediaFormats != null)
foreach(NameValueStats nvs in newstats.MediaFormats)
{
MediaFormat existing = ctx.MediaFormats.FirstOrDefault(c => c.Name == nvs.name);
MediaFormat existing = _ctx.MediaFormats.FirstOrDefault(c => c.Name == nvs.name);
if(existing == null) ctx.MediaFormats.Add(new MediaFormat {Name = nvs.name, Count = nvs.Value});
if(existing == null) _ctx.MediaFormats.Add(new MediaFormat {Name = nvs.name, Count = nvs.Value});
else existing.Count += nvs.Value;
}
if(newstats.Filters != null)
foreach(NameValueStats nvs in newstats.Filters)
{
Filter existing = ctx.Filters.FirstOrDefault(c => c.Name == nvs.name);
Filter existing = _ctx.Filters.FirstOrDefault(c => c.Name == nvs.name);
if(existing == null) ctx.Filters.Add(new Filter {Name = nvs.name, Count = nvs.Value});
if(existing == null) _ctx.Filters.Add(new Filter {Name = nvs.name, Count = nvs.Value});
else existing.Count += nvs.Value;
}
@@ -173,11 +183,11 @@ namespace DiscImageChef.Server.Controllers
foreach(OsStats operatingSystem in newstats.OperatingSystems)
{
OperatingSystem existing =
ctx.OperatingSystems.FirstOrDefault(c => c.Name == operatingSystem.name &&
_ctx.OperatingSystems.FirstOrDefault(c => c.Name == operatingSystem.name &&
c.Version == operatingSystem.version);
if(existing == null)
ctx.OperatingSystems.Add(new OperatingSystem
_ctx.OperatingSystems.Add(new OperatingSystem
{
Name = operatingSystem.name,
Version = operatingSystem.version,
@@ -189,10 +199,10 @@ namespace DiscImageChef.Server.Controllers
if(newstats.Medias != null)
foreach(MediaStats media in newstats.Medias)
{
Media existing = ctx.Medias.FirstOrDefault(c => c.Type == media.type && c.Real == media.real);
Media existing = _ctx.Medias.FirstOrDefault(c => c.Type == media.type && c.Real == media.real);
if(existing == null)
ctx.Medias.Add(new Media {Type = media.type, Real = media.real, Count = media.Value});
_ctx.Medias.Add(new Media {Type = media.type, Real = media.real, Count = media.Value});
else existing.Count += media.Value;
}
@@ -200,13 +210,13 @@ namespace DiscImageChef.Server.Controllers
foreach(DeviceStats device in newstats.Devices)
{
DeviceStat existing =
ctx.DeviceStats.FirstOrDefault(c => c.Bus == device.Bus &&
_ctx.DeviceStats.FirstOrDefault(c => c.Bus == device.Bus &&
c.Manufacturer == device.Manufacturer &&
c.Model == device.Model &&
c.Revision == device.Revision);
if(existing == null)
ctx.DeviceStats.Add(new DeviceStat
_ctx.DeviceStats.Add(new DeviceStat
{
Bus = device.Bus,
Manufacturer = device.Manufacturer,
@@ -215,9 +225,9 @@ namespace DiscImageChef.Server.Controllers
});
}
ctx.SaveChanges();
_ctx.SaveChanges();
response.Content = new StringContent("ok", Encoding.UTF8, "text/plain");
response.Content = "ok";
return response;
}
// ReSharper disable once RedundantCatchClause
@@ -226,7 +236,7 @@ namespace DiscImageChef.Server.Controllers
#if DEBUG
if(Debugger.IsAttached) throw;
#endif
response.Content = new StringContent("error", Encoding.UTF8, "text/plain");
response.Content = "error";
return response;
}
}

View File

@@ -1,33 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
<Import Project="..\packages\Unclassified.NetRevisionTask.0.2.5\build\Unclassified.NetRevisionTask.props" Condition="Exists('..\packages\Unclassified.NetRevisionTask.0.2.5\build\Unclassified.NetRevisionTask.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>
</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{911ADDF5-E5FA-445D-88CD-C7F8FFDBE645}</ProjectGuid>
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DiscImageChef.Server</RootNamespace>
<AssemblyName>DiscImageChef.Server</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<MvcBuildViews>false</MvcBuildViews>
<UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress />
<IISExpressSSLPort />
<IISExpressAnonymousAuthentication />
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<UseGlobalApplicationHostFile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<SynchReleaseVersion>false</SynchReleaseVersion>
<ReleaseVersion>4.5.99.1693</ReleaseVersion>
<ReleaseVersion>$(Version)</ReleaseVersion>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<Version>4.5.99.1693</Version>
@@ -36,445 +13,56 @@
<Product>The Disc Image Chef</Product>
<Title>DiscImageChef.Server</Title>
<ApplicationVersion>$(Version)</ApplicationVersion>
<RuntimeIdentifiers>linux-x64</RuntimeIdentifiers>
</PropertyGroup>
<PropertyGroup>
<NrtRevisionFormat>$(Version)-{chash:8} built by {mname} in $(Configuration){!:, modified}</NrtRevisionFormat>
<NrtResolveSimpleAttributes>true</NrtResolveSimpleAttributes>
<NrtShowRevision>true</NrtShowRevision>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="BouncyCastle.Crypto, Version=1.8.5.0, Culture=neutral, PublicKeyToken=0e99375e54769942">
<HintPath>..\packages\BouncyCastle.1.8.5\lib\BouncyCastle.Crypto.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="ChoPGP, Version=1.0.1.2, Culture=neutral, PublicKeyToken=null">
<HintPath>..\packages\ChoPGP.1.0.1.2\lib\ChoPGP.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Google.Protobuf, Version=3.7.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604">
<HintPath>..\packages\Google.Protobuf.3.7.0\lib\net45\Google.Protobuf.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Highcharts.Web.Mvc, Version=7.0.1.0, Culture=neutral, PublicKeyToken=90b74bd27a557bd3">
<HintPath>..\packages\Highsoft.Highcharts.7.0.3.11\lib\net40\Highcharts.Web.Mvc.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MailKit, Version=2.1.0.0, Culture=neutral, PublicKeyToken=4e064fe7c44a8f1b">
<HintPath>..\packages\MailKit.2.1.4\lib\net45\MailKit.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Markdig, Version=0.16.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\packages\Markdig.0.16.0\lib\net40\Markdig.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.AspNet.TelemetryCorrelation, Version=1.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<HintPath>..\packages\Microsoft.AspNet.TelemetryCorrelation.1.0.5\lib\net45\Microsoft.AspNet.TelemetryCorrelation.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="MimeKit, Version=2.1.0.0, Culture=neutral, PublicKeyToken=bede1c8a46c66814">
<HintPath>..\packages\MimeKit.2.1.4\lib\net45\MimeKit.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="mscorlib" />
<Reference Include="MySql.Data, Version=8.0.15.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d">
<HintPath>..\packages\MySql.Data.8.0.15\lib\net452\MySql.Data.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MySql.Data.EntityFramework, Version=8.0.15.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d">
<HintPath>..\packages\MySql.Data.EntityFramework.8.0.15\lib\net452\MySql.Data.EntityFramework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed">
<HintPath>..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel" />
<Reference Include="System.Configuration.Install" />
<Reference Include="System.Data" />
<Reference Include="System.Diagnostics.DiagnosticSource, Version=4.0.3.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51">
<HintPath>..\packages\System.Diagnostics.DiagnosticSource.4.5.1\lib\net46\System.Diagnostics.DiagnosticSource.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="System.Drawing.Design" />
<Reference Include="System.Management" />
<Reference Include="System.Net.Http.Formatting, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Security" />
<Reference Include="System.Transactions" />
<Reference Include="System.Web.Entity" />
<Reference Include="System.Web.ApplicationServices" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.Helpers.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.Http, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.2.7\lib\net45\System.Web.Http.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.Http.WebHost, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<HintPath>..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.7\lib\net45\System.Web.Http.WebHost.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<HintPath>..\packages\Microsoft.AspNet.Mvc.5.2.7\lib\net45\System.Web.Mvc.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<HintPath>..\packages\Microsoft.AspNet.Razor.3.2.7\lib\net45\System.Web.Razor.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Abstractions" />
<Reference Include="System.Web.Routing" />
<Reference Include="System.Xml" />
<Reference Include="System.Configuration" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http">
</Reference>
<Reference Include="System.Net.Http.WebRequest">
</Reference>
<Reference Include="System.Web.Optimization">
<HintPath>..\packages\Microsoft.AspNet.Web.Optimization.1.1.3\lib\net40\System.Web.Optimization.dll</HintPath>
</Reference>
<Reference Include="WebGrease">
<Private>True</Private>
<HintPath>..\packages\WebGrease.1.6.0\lib\WebGrease.dll</HintPath>
</Reference>
<Reference Include="Antlr3.Runtime">
<Private>True</Private>
<HintPath>..\packages\Antlr.3.5.0.2\lib\Antlr3.Runtime.dll</HintPath>
</Reference>
<ProjectReference Include="..\DiscImageChef.CommonTypes\DiscImageChef.CommonTypes.csproj" />
<ProjectReference Include="..\DiscImageChef.Console\DiscImageChef.Console.csproj" />
<ProjectReference Include="..\DiscImageChef.Decoders\DiscImageChef.Decoders.csproj" />
<ProjectReference Include="..\DiscImageChef.Dto\DiscImageChef.Dto.csproj" />
<ProjectReference Include="..\DiscImageChef.Helpers\DiscImageChef.Helpers.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Include="App_Start\Ata.cs" />
<Compile Include="App_Start\RouteConfig.cs" />
<Compile Include="App_Start\ScsiEvpd.cs" />
<Compile Include="App_Start\ScsiInquiry.cs" />
<Compile Include="App_Start\ScsiMmcFeatures.cs" />
<Compile Include="App_Start\ScsiMmcMode.cs" />
<Compile Include="App_Start\ScsiModeSense.cs" />
<Compile Include="App_Start\SscTestedMedia.cs" />
<Compile Include="App_Start\StatsConverter.cs" />
<Compile Include="App_Start\TestedMedia.cs" />
<Compile Include="App_Start\WebApiConfig.cs" />
<Compile Include="Controllers\ReportController.cs" />
<Compile Include="Controllers\StatsController.cs" />
<Compile Include="Controllers\HomeController.cs" />
<Compile Include="Controllers\UpdateController.cs" />
<Compile Include="Controllers\UploadReportController.cs" />
<Compile Include="Controllers\UploadStatsController.cs" />
<Compile Include="Global.asax.cs">
<DependentUpon>Global.asax</DependentUpon>
</Compile>
<Compile Include="Migrations\201812201613369_InitialMigration.cs" />
<Compile Include="Migrations\201812201613369_InitialMigration.Designer.cs">
<DependentUpon>201812201613369_InitialMigration.cs</DependentUpon>
</Compile>
<Compile Include="Migrations\201812220029427_AddStatistics.cs" />
<Compile Include="Migrations\201812220029427_AddStatistics.Designer.cs">
<DependentUpon>201812220029427_AddStatistics.cs</DependentUpon>
</Compile>
<Compile Include="Migrations\201812221606592_LinkDeviceStatsToReport.cs" />
<Compile Include="Migrations\201812221606592_LinkDeviceStatsToReport.Designer.cs">
<DependentUpon>201812221606592_LinkDeviceStatsToReport.cs</DependentUpon>
</Compile>
<Compile Include="Migrations\201812231612080_FixUnsignedFields.cs" />
<Compile Include="Migrations\201812231612080_FixUnsignedFields.Designer.cs">
<DependentUpon>201812231612080_FixUnsignedFields.cs</DependentUpon>
</Compile>
<Compile Include="Migrations\201812232250198_UseBinaryDataForIdentifyInquiryAndModesInReports.cs" />
<Compile Include="Migrations\201812232250198_UseBinaryDataForIdentifyInquiryAndModesInReports.Designer.cs">
<DependentUpon>201812232250198_UseBinaryDataForIdentifyInquiryAndModesInReports.cs</DependentUpon>
</Compile>
<Compile Include="Migrations\201812240552109_StoreUsbIdsInDatabase.cs" />
<Compile Include="Migrations\201812240552109_StoreUsbIdsInDatabase.Designer.cs">
<DependentUpon>201812240552109_StoreUsbIdsInDatabase.cs</DependentUpon>
</Compile>
<Compile Include="Migrations\201812241719441_FixUsbIdsAndIndexes.cs" />
<Compile Include="Migrations\201812241719441_FixUsbIdsAndIndexes.Designer.cs">
<DependentUpon>201812241719441_FixUsbIdsAndIndexes.cs</DependentUpon>
</Compile>
<Compile Include="Migrations\201812250223002_AddCdOffsets.cs" />
<Compile Include="Migrations\201812250223002_AddCdOffsets.Designer.cs">
<DependentUpon>201812250223002_AddCdOffsets.cs</DependentUpon>
</Compile>
<Compile Include="Migrations\201812251556377_StoreMmcGetConfigurationResponse.cs" />
<Compile Include="Migrations\201812251556377_StoreMmcGetConfigurationResponse.Designer.cs">
<DependentUpon>201812251556377_StoreMmcGetConfigurationResponse.cs</DependentUpon>
</Compile>
<Compile Include="Migrations\201812252219066_StoreReadResultsInReportDatabase.cs" />
<Compile Include="Migrations\201812252219066_StoreReadResultsInReportDatabase.Designer.cs">
<DependentUpon>201812252219066_StoreReadResultsInReportDatabase.cs</DependentUpon>
</Compile>
<Compile Include="Migrations\201901022133012_AddMultisessionLeadTest.cs" />
<Compile Include="Migrations\201901022133012_AddMultisessionLeadTest.Designer.cs">
<DependentUpon>201901022133012_AddMultisessionLeadTest.cs</DependentUpon>
</Compile>
<Compile Include="Migrations\201901030344456_AddOptimalReadMultipleCount.cs" />
<Compile Include="Migrations\201901030344456_AddOptimalReadMultipleCount.Designer.cs">
<DependentUpon>201901030344456_AddOptimalReadMultipleCount.cs</DependentUpon>
</Compile>
<Compile Include="Migrations\201901081359499_AddChangeableScsiModes.cs" />
<Compile Include="Migrations\201901081359499_AddChangeableScsiModes.Designer.cs">
<DependentUpon>201901081359499_AddChangeableScsiModes.cs</DependentUpon>
</Compile>
<Compile Include="Migrations\201905252122267_IdForDensityCode.cs" />
<Compile Include="Migrations\201905252122267_IdForDensityCode.Designer.cs">
<DependentUpon>201905252122267_IdForDensityCode.cs</DependentUpon>
</Compile>
<Compile Include="Migrations\Configuration.cs" />
<Compile Include="Models\CdOffset.cs" />
<Compile Include="Models\Command.cs" />
<Compile Include="Models\Context.cs" />
<Compile Include="Models\Device.cs" />
<Compile Include="Models\DeviceItem.cs" />
<Compile Include="Models\DeviceStat.cs" />
<Compile Include="Models\Filesystem.cs" />
<Compile Include="Models\Filter.cs" />
<Compile Include="Models\Media.cs" />
<Compile Include="Models\MediaFormat.cs" />
<Compile Include="Models\MediaItem.cs" />
<Compile Include="Models\OperatingSystem.cs" />
<Compile Include="Models\Partition.cs" />
<Compile Include="Models\UploadedReport.cs" />
<Compile Include="Models\UsbProduct.cs" />
<Compile Include="Models\UsbVendor.cs" />
<Compile Include="Models\Version.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<PackageReference Include="ChoPGP" Version="1.0.1.2" />
<PackageReference Include="Highsoft.Highcharts" Version="7.2.0.2" />
<PackageReference Include="MailKit" Version="2.3.2" />
<PackageReference Include="Markdig" Version="0.18.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="3.0.0" />
<PackageReference Include="MimeKit" Version="2.3.2" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="3.0.0-rc1.final" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql.Design" Version="1.1.2" />
<PackageReference Include="Unclassified.NetRevisionTask" Version="0.3.0" />
</ItemGroup>
<ItemGroup>
<Content Include="docs\Changelog.md" />
<Content Include="docs\CODE_OF_CONDUCT.md" />
<Content Include="docs\CONTRIBUTING.md" />
<Content Include="docs\DONATING.md" />
<Content Include="docs\ISSUE_TEMPLATE.md" />
<Content Include="docs\NEEDINFO.md" />
<Content Include="docs\PULL_REQUEST_TEMPLATE.md" />
<Content Include="docs\README.md" />
<Content Include="docs\TODO.md" />
<Content Include="fonts\ChicagoFLF.eot" />
<Content Include="fonts\ChicagoFLF.ttf" />
<Content Include="fonts\ChicagoFLF.woff" />
<Content Include="fonts\ChicagoFLF.woff2" />
<Content Include="Global.asax" />
<Content Include="fonts\vga_squarepx.eot" />
<Content Include="fonts\vga_squarepx.ttf" />
<Content Include="fonts\vga_squarepx.woff" />
<Content Include="package-lock.json" />
<Content Include="package.json" />
<Content Include="styles\dos\dicserver.css" />
<Content Include="styles\dos\dicserver.css.map" />
<Content Include="styles\dos\dicserver.scss" />
<Content Include="styles\dos\dicserver_highcharts.css" />
<Content Include="styles\dos\dicserver_highcharts.css.map" />
<Content Include="styles\dos\dicserver_highcharts.scss" />
<Content Include="styles\dos\_colors.scss" />
<Content Include="styles\dos\_fontstyles.scss" />
<Content Include="styles\dos\_font.scss" />
<Content Include="styles\mac\dicserver.css">
<DependentUpon>dicserver.scss</DependentUpon>
</Content>
<Content Include="styles\mac\dicserver.css.map">
<DependentUpon>dicserver.css</DependentUpon>
</Content>
<Content Include="styles\mac\dicserver.scss" />
<Content Include="styles\mac\dicserver_highcharts.css">
<DependentUpon>dicserver_highcharts.scss</DependentUpon>
</Content>
<Content Include="styles\mac\dicserver_highcharts.css.map">
<DependentUpon>dicserver_highcharts.css</DependentUpon>
</Content>
<Content Include="styles\mac\dicserver_highcharts.scss" />
<Content Include="styles\mac\_colors.scss" />
<Content Include="styles\mac\_fontstyles.scss" />
<Content Include="styles\mac\_font.scss" />
<Content Include="styles\_highcharts.scss" />
<Content Include="Views\Home\Changelog.cshtml" />
<Content Include="Views\Home\CODE_OF_CONDUCT.cshtml" />
<Content Include="Views\Home\CONTRIBUTING.cshtml" />
<Content Include="Views\Home\DONATING.cshtml" />
<Content Include="Views\Home\ISSUE_TEMPLATE.cshtml" />
<Content Include="Views\Home\PULL_REQUEST_TEMPLATE.cshtml" />
<Content Include="Views\Home\TODO.cshtml" />
<Content Include="Views\Report\View.cshtml" />
<Content Include="Views\Shared\_Layout.cshtml" />
<Content Include="Web.config" />
<Content Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon>
</Content>
<Content Include="Web.Release.config">
<DependentUpon>Web.config</DependentUpon>
</Content>
<None Include="fonts\.htaccess" />
<None Include="fonts\vga_squarepx.woff2" />
<None Include="Reports\.htaccess" />
<Content Include="Views\Home\Index.cshtml" />
<Content Include="Views\Web.config" />
<Content Include="Views\Stats\Index.cshtml" />
<None Update="docs\Changelog.md">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="docs\DONATING.md">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="docs\README.md">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="docs\TODO.md">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="public.asc">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<_ContentIncludedByDefault Remove="wwwroot\js\site.js" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DiscImageChef.CommonTypes\DiscImageChef.CommonTypes.csproj">
<Project>{f2b84194-26eb-4227-b1c5-6602517e85ae}</Project>
<Name>DiscImageChef.CommonTypes</Name>
</ProjectReference>
<ProjectReference Include="..\DiscImageChef.Decoders\DiscImageChef.Decoders.csproj">
<Project>{0beb3088-b634-4289-ae17-cdf2d25d00d5}</Project>
<Name>DiscImageChef.Decoders</Name>
</ProjectReference>
<ProjectReference Include="..\DiscImageChef.Dto\DiscImageChef.Dto.csproj">
<Project>{f4399ff5-9bd0-475a-9ea7-3dae45291fe2}</Project>
<Name>DiscImageChef.Dto</Name>
</ProjectReference>
<ProjectReference Include="..\DiscImageChef.Helpers\DiscImageChef.Helpers.csproj">
<Project>{f8bdf57b-1571-4cd0-84b3-b422088d359a}</Project>
<Name>DiscImageChef.Helpers</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="..\LICENSE.LGPL">
<Link>LICENSE.LGPL</Link>
</EmbeddedResource>
<EmbeddedResource Include="Migrations\201812201613369_InitialMigration.resx">
<DependentUpon>201812201613369_InitialMigration.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Migrations\201812220029427_AddStatistics.resx">
<DependentUpon>201812220029427_AddStatistics.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Migrations\201812221606592_LinkDeviceStatsToReport.resx">
<DependentUpon>201812221606592_LinkDeviceStatsToReport.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Migrations\201812231612080_FixUnsignedFields.resx">
<DependentUpon>201812231612080_FixUnsignedFields.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Migrations\201812232250198_UseBinaryDataForIdentifyInquiryAndModesInReports.resx">
<DependentUpon>201812232250198_UseBinaryDataForIdentifyInquiryAndModesInReports.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Migrations\201812240552109_StoreUsbIdsInDatabase.resx">
<DependentUpon>201812240552109_StoreUsbIdsInDatabase.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Migrations\201812241719441_FixUsbIdsAndIndexes.resx">
<DependentUpon>201812241719441_FixUsbIdsAndIndexes.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Migrations\201812250223002_AddCdOffsets.resx">
<DependentUpon>201812250223002_AddCdOffsets.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Migrations\201812251556377_StoreMmcGetConfigurationResponse.resx">
<DependentUpon>201812251556377_StoreMmcGetConfigurationResponse.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Migrations\201812252219066_StoreReadResultsInReportDatabase.resx">
<DependentUpon>201812252219066_StoreReadResultsInReportDatabase.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Migrations\201901022133012_AddMultisessionLeadTest.resx">
<DependentUpon>201901022133012_AddMultisessionLeadTest.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Migrations\201901030344456_AddOptimalReadMultipleCount.resx">
<DependentUpon>201901030344456_AddOptimalReadMultipleCount.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Migrations\201901081359499_AddChangeableScsiModes.resx">
<DependentUpon>201901081359499_AddChangeableScsiModes.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Migrations\201905252122267_IdForDensityCode.resx">
<DependentUpon>201905252122267_IdForDensityCode.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
<Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(WebProjectOutputDir)" />
</Target>
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<UseIIS>True</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>22810</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:22810/</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
</CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Unclassified.NetRevisionTask.0.2.5\build\Unclassified.NetRevisionTask.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Unclassified.NetRevisionTask.0.2.5\build\Unclassified.NetRevisionTask.props'))" />
<Error Condition="!Exists('..\packages\Unclassified.NetRevisionTask.0.2.5\build\Unclassified.NetRevisionTask.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Unclassified.NetRevisionTask.0.2.5\build\Unclassified.NetRevisionTask.targets'))" />
<Error Condition="!Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" />
</Target>
<Import Project="..\packages\Unclassified.NetRevisionTask.0.2.5\build\Unclassified.NetRevisionTask.targets" Condition="Exists('..\packages\Unclassified.NetRevisionTask.0.2.5\build\Unclassified.NetRevisionTask.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target> -->
</Project>
</Project>

View File

@@ -1 +0,0 @@
<%@ Application Inherits="DiscImageChef.Server.Global" %>

View File

@@ -1,47 +0,0 @@
// /***************************************************************************
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : Global.asax.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : DiscImageChef Server.
//
// --[ Description ] ----------------------------------------------------------
//
// ASP.NET global definitions.
//
// --[ License ] --------------------------------------------------------------
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2011-2019 Natalia Portillo
// ****************************************************************************/
using System.Web;
using System.Web.Http;
using System.Web.Routing;
namespace DiscImageChef.Server
{
public class Global : HttpApplication
{
protected void Application_Start()
{
GlobalConfiguration.Configure(WebApiConfig.Register);
RouteConfig.RegisterRoutes(RouteTable.Routes);
}
}
}

View File

@@ -1,29 +0,0 @@
// <auto-generated />
namespace DiscImageChef.Server.Migrations
{
using System.CodeDom.Compiler;
using System.Data.Entity.Migrations;
using System.Data.Entity.Migrations.Infrastructure;
using System.Resources;
[GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
public sealed partial class InitialMigration : IMigrationMetadata
{
private readonly ResourceManager Resources = new ResourceManager(typeof(InitialMigration));
string IMigrationMetadata.Id
{
get { return "201812201613369_InitialMigration"; }
}
string IMigrationMetadata.Source
{
get { return null; }
}
string IMigrationMetadata.Target
{
get { return Resources.GetString("Target"); }
}
}
}

View File

@@ -1,584 +0,0 @@
using System.Data.Entity.Migrations;
namespace DiscImageChef.Server.Migrations
{
public partial class InitialMigration : DbMigration
{
public override void Up()
{
CreateTable("dbo.Devices",
c => new
{
Id = c.Int(false, true),
AddedWhen = c.DateTime(false, 0),
CompactFlash = c.Boolean(false),
Manufacturer = c.String(unicode: false),
Model = c.String(unicode: false),
Revision = c.String(unicode: false),
Type = c.Int(false),
ATA_Id = c.Int(),
ATAPI_Id = c.Int(),
FireWire_Id = c.Int(),
MultiMediaCard_Id = c.Int(),
PCMCIA_Id = c.Int(),
SCSI_Id = c.Int(),
SecureDigital_Id = c.Int(),
USB_Id = c.Int()
}).PrimaryKey(t => t.Id).ForeignKey("dbo.Atas", t => t.ATA_Id)
.ForeignKey("dbo.Atas", t => t.ATAPI_Id).ForeignKey("dbo.FireWires", t => t.FireWire_Id)
.ForeignKey("dbo.MmcSds", t => t.MultiMediaCard_Id)
.ForeignKey("dbo.Pcmcias", t => t.PCMCIA_Id).ForeignKey("dbo.Scsis", t => t.SCSI_Id)
.ForeignKey("dbo.MmcSds", t => t.SecureDigital_Id).ForeignKey("dbo.Usbs", t => t.USB_Id)
.Index(t => t.ATA_Id).Index(t => t.ATAPI_Id).Index(t => t.FireWire_Id)
.Index(t => t.MultiMediaCard_Id).Index(t => t.PCMCIA_Id).Index(t => t.SCSI_Id)
.Index(t => t.SecureDigital_Id).Index(t => t.USB_Id);
CreateTable("dbo.Atas",
c => new {Id = c.Int(false, true), Identify = c.Binary(), ReadCapabilities_Id = c.Int()})
.PrimaryKey(t => t.Id).ForeignKey("dbo.TestedMedias", t => t.ReadCapabilities_Id)
.Index(t => t.ReadCapabilities_Id);
CreateTable("dbo.TestedMedias",
c => new
{
Id = c.Int(false, true),
IdentifyData = c.Binary(),
CanReadAACS = c.Boolean(),
CanReadADIP = c.Boolean(),
CanReadATIP = c.Boolean(),
CanReadBCA = c.Boolean(),
CanReadC2Pointers = c.Boolean(),
CanReadCMI = c.Boolean(),
CanReadCorrectedSubchannel = c.Boolean(),
CanReadCorrectedSubchannelWithC2 = c.Boolean(),
CanReadDCB = c.Boolean(),
CanReadDDS = c.Boolean(),
CanReadDMI = c.Boolean(),
CanReadDiscInformation = c.Boolean(),
CanReadFullTOC = c.Boolean(),
CanReadHDCMI = c.Boolean(),
CanReadLayerCapacity = c.Boolean(),
CanReadFirstTrackPreGap = c.Boolean(),
CanReadLeadIn = c.Boolean(),
CanReadLeadOut = c.Boolean(),
CanReadMediaID = c.Boolean(),
CanReadMediaSerial = c.Boolean(),
CanReadPAC = c.Boolean(),
CanReadPFI = c.Boolean(),
CanReadPMA = c.Boolean(),
CanReadPQSubchannel = c.Boolean(),
CanReadPQSubchannelWithC2 = c.Boolean(),
CanReadPRI = c.Boolean(),
CanReadRWSubchannel = c.Boolean(),
CanReadRWSubchannelWithC2 = c.Boolean(),
CanReadRecordablePFI = c.Boolean(),
CanReadSpareAreaInformation = c.Boolean(),
CanReadTOC = c.Boolean(),
Density = c.Byte(),
Manufacturer = c.String(unicode: false),
MediaIsRecognized = c.Boolean(false),
MediumType = c.Byte(),
MediumTypeName = c.String(unicode: false),
Model = c.String(unicode: false),
SupportsHLDTSTReadRawDVD = c.Boolean(),
SupportsNECReadCDDA = c.Boolean(),
SupportsPioneerReadCDDA = c.Boolean(),
SupportsPioneerReadCDDAMSF = c.Boolean(),
SupportsPlextorReadCDDA = c.Boolean(),
SupportsPlextorReadRawDVD = c.Boolean(),
SupportsRead10 = c.Boolean(),
SupportsRead12 = c.Boolean(),
SupportsRead16 = c.Boolean(),
SupportsRead6 = c.Boolean(),
SupportsReadCapacity16 = c.Boolean(),
SupportsReadCapacity = c.Boolean(),
SupportsReadCd = c.Boolean(),
SupportsReadCdMsf = c.Boolean(),
SupportsReadCdRaw = c.Boolean(),
SupportsReadCdMsfRaw = c.Boolean(),
SupportsReadLong16 = c.Boolean(),
SupportsReadLong = c.Boolean(),
ModeSense6Data = c.Binary(),
ModeSense10Data = c.Binary(),
SolidStateDevice = c.Boolean(),
SupportsReadDmaLba = c.Boolean(),
SupportsReadDmaRetryLba = c.Boolean(),
SupportsReadLba = c.Boolean(),
SupportsReadRetryLba = c.Boolean(),
SupportsReadLongLba = c.Boolean(),
SupportsReadLongRetryLba = c.Boolean(),
SupportsSeekLba = c.Boolean(),
SupportsReadDmaLba48 = c.Boolean(),
SupportsReadLba48 = c.Boolean(),
SupportsReadDma = c.Boolean(),
SupportsReadDmaRetry = c.Boolean(),
SupportsReadRetry = c.Boolean(),
SupportsReadSectors = c.Boolean(),
SupportsReadLongRetry = c.Boolean(),
SupportsSeek = c.Boolean(),
CHS_Id = c.Int(),
CurrentCHS_Id = c.Int(),
Ata_Id = c.Int(),
Mmc_Id = c.Int(),
Scsi_Id = c.Int()
}).PrimaryKey(t => t.Id).ForeignKey("dbo.Chs", t => t.CHS_Id)
.ForeignKey("dbo.Chs", t => t.CurrentCHS_Id).ForeignKey("dbo.Atas", t => t.Ata_Id)
.ForeignKey("dbo.Mmcs", t => t.Mmc_Id).ForeignKey("dbo.Scsis", t => t.Scsi_Id)
.Index(t => t.CHS_Id).Index(t => t.CurrentCHS_Id).Index(t => t.Ata_Id)
.Index(t => t.Mmc_Id).Index(t => t.Scsi_Id);
CreateTable("dbo.Chs", c => new {Id = c.Int(false, true)}).PrimaryKey(t => t.Id);
CreateTable("dbo.FireWires",
c => new
{
Id = c.Int(false, true),
Manufacturer = c.String(unicode: false),
Product = c.String(unicode: false),
RemovableMedia = c.Boolean(false)
}).PrimaryKey(t => t.Id);
CreateTable("dbo.MmcSds",
c => new
{
Id = c.Int(false, true),
CID = c.Binary(),
CSD = c.Binary(),
OCR = c.Binary(),
SCR = c.Binary(),
ExtendedCSD = c.Binary()
}).PrimaryKey(t => t.Id);
CreateTable("dbo.Pcmcias",
c => new
{
Id = c.Int(false, true),
CIS = c.Binary(),
Compliance = c.String(unicode: false),
Manufacturer = c.String(unicode: false),
ProductName = c.String(unicode: false)
}).PrimaryKey(t => t.Id);
CreateTable("dbo.Scsis",
c => new
{
Id = c.Int(false, true),
InquiryData = c.Binary(),
SupportsModeSense6 = c.Boolean(false),
SupportsModeSense10 = c.Boolean(false),
SupportsModeSubpages = c.Boolean(false),
ModeSense6Data = c.Binary(),
ModeSense10Data = c.Binary(),
ModeSense_Id = c.Int(),
MultiMediaDevice_Id = c.Int(),
ReadCapabilities_Id = c.Int(),
SequentialDevice_Id = c.Int()
}).PrimaryKey(t => t.Id).ForeignKey("dbo.ScsiModes", t => t.ModeSense_Id)
.ForeignKey("dbo.Mmcs", t => t.MultiMediaDevice_Id)
.ForeignKey("dbo.TestedMedias", t => t.ReadCapabilities_Id)
.ForeignKey("dbo.Sscs", t => t.SequentialDevice_Id).Index(t => t.ModeSense_Id)
.Index(t => t.MultiMediaDevice_Id).Index(t => t.ReadCapabilities_Id)
.Index(t => t.SequentialDevice_Id);
CreateTable("dbo.ScsiPages",
c => new
{
Id = c.Int(false, true),
page = c.Byte(false),
subpage = c.Byte(),
value = c.Binary(),
Scsi_Id = c.Int(),
ScsiMode_Id = c.Int()
}).PrimaryKey(t => t.Id).ForeignKey("dbo.Scsis", t => t.Scsi_Id)
.ForeignKey("dbo.ScsiModes", t => t.ScsiMode_Id).Index(t => t.Scsi_Id)
.Index(t => t.ScsiMode_Id);
CreateTable("dbo.ScsiModes",
c => new
{
Id = c.Int(false, true),
MediumType = c.Byte(),
WriteProtected = c.Boolean(false),
Speed = c.Byte(),
BufferedMode = c.Byte(),
BlankCheckEnabled = c.Boolean(false),
DPOandFUA = c.Boolean(false)
}).PrimaryKey(t => t.Id);
CreateTable("dbo.BlockDescriptors",
c => new {Id = c.Int(false, true), Density = c.Byte(false), ScsiMode_Id = c.Int()})
.PrimaryKey(t => t.Id).ForeignKey("dbo.ScsiModes", t => t.ScsiMode_Id).Index(t => t.ScsiMode_Id);
CreateTable("dbo.Mmcs", c => new {Id = c.Int(false, true), Features_Id = c.Int(), ModeSense2A_Id = c.Int()})
.PrimaryKey(t => t.Id).ForeignKey("dbo.MmcFeatures", t => t.Features_Id)
.ForeignKey("dbo.ModePage_2A", t => t.ModeSense2A_Id).Index(t => t.Features_Id)
.Index(t => t.ModeSense2A_Id);
CreateTable("dbo.MmcFeatures",
c => new
{
Id = c.Int(false, true),
AACSVersion = c.Byte(),
AGIDs = c.Byte(),
BindingNonceBlocks = c.Byte(),
BufferUnderrunFreeInDVD = c.Boolean(false),
BufferUnderrunFreeInSAO = c.Boolean(false),
BufferUnderrunFreeInTAO = c.Boolean(false),
CanAudioScan = c.Boolean(false),
CanEject = c.Boolean(false),
CanEraseSector = c.Boolean(false),
CanExpandBDRESpareArea = c.Boolean(false),
CanFormat = c.Boolean(false),
CanFormatBDREWithoutSpare = c.Boolean(false),
CanFormatCert = c.Boolean(false),
CanFormatFRF = c.Boolean(false),
CanFormatQCert = c.Boolean(false),
CanFormatRRM = c.Boolean(false),
CanGenerateBindingNonce = c.Boolean(false),
CanLoad = c.Boolean(false),
CanMuteSeparateChannels = c.Boolean(false),
CanOverwriteSAOTrack = c.Boolean(false),
CanOverwriteTAOTrack = c.Boolean(false),
CanPlayCDAudio = c.Boolean(false),
CanPseudoOverwriteBDR = c.Boolean(false),
CanReadAllDualR = c.Boolean(false),
CanReadAllDualRW = c.Boolean(false),
CanReadBD = c.Boolean(false),
CanReadBDR = c.Boolean(false),
CanReadBDRE1 = c.Boolean(false),
CanReadBDRE2 = c.Boolean(false),
CanReadBDROM = c.Boolean(false),
CanReadBluBCA = c.Boolean(false),
CanReadCD = c.Boolean(false),
CanReadCDMRW = c.Boolean(false),
CanReadCPRM_MKB = c.Boolean(false),
CanReadDDCD = c.Boolean(false),
CanReadDVD = c.Boolean(false),
CanReadDVDPlusMRW = c.Boolean(false),
CanReadDVDPlusR = c.Boolean(false),
CanReadDVDPlusRDL = c.Boolean(false),
CanReadDVDPlusRW = c.Boolean(false),
CanReadDVDPlusRWDL = c.Boolean(false),
CanReadDriveAACSCertificate = c.Boolean(false),
CanReadHDDVD = c.Boolean(false),
CanReadHDDVDR = c.Boolean(false),
CanReadHDDVDRAM = c.Boolean(false),
CanReadLeadInCDText = c.Boolean(false),
CanReadOldBDR = c.Boolean(false),
CanReadOldBDRE = c.Boolean(false),
CanReadOldBDROM = c.Boolean(false),
CanReadSpareAreaInformation = c.Boolean(false),
CanReportDriveSerial = c.Boolean(false),
CanReportMediaSerial = c.Boolean(false),
CanTestWriteDDCDR = c.Boolean(false),
CanTestWriteDVD = c.Boolean(false),
CanTestWriteInSAO = c.Boolean(false),
CanTestWriteInTAO = c.Boolean(false),
CanUpgradeFirmware = c.Boolean(false),
CanWriteBD = c.Boolean(false),
CanWriteBDR = c.Boolean(false),
CanWriteBDRE1 = c.Boolean(false),
CanWriteBDRE2 = c.Boolean(false),
CanWriteBusEncryptedBlocks = c.Boolean(false),
CanWriteCDMRW = c.Boolean(false),
CanWriteCDRW = c.Boolean(false),
CanWriteCDRWCAV = c.Boolean(false),
CanWriteCDSAO = c.Boolean(false),
CanWriteCDTAO = c.Boolean(false),
CanWriteCSSManagedDVD = c.Boolean(false),
CanWriteDDCDR = c.Boolean(false),
CanWriteDDCDRW = c.Boolean(false),
CanWriteDVDPlusMRW = c.Boolean(false),
CanWriteDVDPlusR = c.Boolean(false),
CanWriteDVDPlusRDL = c.Boolean(false),
CanWriteDVDPlusRW = c.Boolean(false),
CanWriteDVDPlusRWDL = c.Boolean(false),
CanWriteDVDR = c.Boolean(false),
CanWriteDVDRDL = c.Boolean(false),
CanWriteDVDRW = c.Boolean(false),
CanWriteHDDVDR = c.Boolean(false),
CanWriteHDDVDRAM = c.Boolean(false),
CanWriteOldBDR = c.Boolean(false),
CanWriteOldBDRE = c.Boolean(false),
CanWritePackedSubchannelInTAO = c.Boolean(false),
CanWriteRWSubchannelInSAO = c.Boolean(false),
CanWriteRWSubchannelInTAO = c.Boolean(false),
CanWriteRaw = c.Boolean(false),
CanWriteRawMultiSession = c.Boolean(false),
CanWriteRawSubchannelInTAO = c.Boolean(false),
ChangerIsSideChangeCapable = c.Boolean(false),
ChangerSlots = c.Byte(false),
ChangerSupportsDiscPresent = c.Boolean(false),
CPRMVersion = c.Byte(),
CSSVersion = c.Byte(),
DBML = c.Boolean(false),
DVDMultiRead = c.Boolean(false),
EmbeddedChanger = c.Boolean(false),
ErrorRecoveryPage = c.Boolean(false),
FirmwareDate = c.DateTime(precision: 0),
LoadingMechanismType = c.Byte(),
Locked = c.Boolean(false),
MultiRead = c.Boolean(false),
PreventJumper = c.Boolean(false),
SupportsAACS = c.Boolean(false),
SupportsBusEncryption = c.Boolean(false),
SupportsC2 = c.Boolean(false),
SupportsCPRM = c.Boolean(false),
SupportsCSS = c.Boolean(false),
SupportsDAP = c.Boolean(false),
SupportsDeviceBusyEvent = c.Boolean(false),
SupportsHybridDiscs = c.Boolean(false),
SupportsModePage1Ch = c.Boolean(false),
SupportsOSSC = c.Boolean(false),
SupportsPWP = c.Boolean(false),
SupportsSWPP = c.Boolean(false),
SupportsSecurDisc = c.Boolean(false),
SupportsSeparateVolume = c.Boolean(false),
SupportsVCPS = c.Boolean(false),
SupportsWriteInhibitDCB = c.Boolean(false),
SupportsWriteProtectPAC = c.Boolean(false)
}).PrimaryKey(t => t.Id);
CreateTable("dbo.ModePage_2A",
c => new
{
Id = c.Int(false, true),
PS = c.Boolean(false),
MultiSession = c.Boolean(false),
Mode2Form2 = c.Boolean(false),
Mode2Form1 = c.Boolean(false),
AudioPlay = c.Boolean(false),
ISRC = c.Boolean(false),
UPC = c.Boolean(false),
C2Pointer = c.Boolean(false),
DeinterlaveSubchannel = c.Boolean(false),
Subchannel = c.Boolean(false),
AccurateCDDA = c.Boolean(false),
CDDACommand = c.Boolean(false),
LoadingMechanism = c.Byte(false),
Eject = c.Boolean(false),
PreventJumper = c.Boolean(false),
LockState = c.Boolean(false),
Lock = c.Boolean(false),
SeparateChannelMute = c.Boolean(false),
SeparateChannelVolume = c.Boolean(false),
Method2 = c.Boolean(false),
ReadCDRW = c.Boolean(false),
ReadCDR = c.Boolean(false),
WriteCDRW = c.Boolean(false),
WriteCDR = c.Boolean(false),
DigitalPort2 = c.Boolean(false),
DigitalPort1 = c.Boolean(false),
Composite = c.Boolean(false),
SSS = c.Boolean(false),
SDP = c.Boolean(false),
Length = c.Byte(false),
LSBF = c.Boolean(false),
RCK = c.Boolean(false),
BCK = c.Boolean(false),
TestWrite = c.Boolean(false),
ReadBarcode = c.Boolean(false),
ReadDVDRAM = c.Boolean(false),
ReadDVDR = c.Boolean(false),
ReadDVDROM = c.Boolean(false),
WriteDVDRAM = c.Boolean(false),
WriteDVDR = c.Boolean(false),
LeadInPW = c.Boolean(false),
SCC = c.Boolean(false),
BUF = c.Boolean(false),
RotationControlSelected = c.Byte(false)
}).PrimaryKey(t => t.Id);
CreateTable("dbo.Sscs", c => new {Id = c.Int(false, true), BlockSizeGranularity = c.Byte()})
.PrimaryKey(t => t.Id);
CreateTable("dbo.SupportedDensities",
c => new
{
Id = c.Int(false, true),
PrimaryCode = c.Byte(false),
SecondaryCode = c.Byte(false),
Writable = c.Boolean(false),
Duplicate = c.Boolean(false),
DefaultDensity = c.Boolean(false),
Organization = c.String(unicode: false),
Name = c.String(unicode: false),
Description = c.String(unicode: false),
Ssc_Id = c.Int(),
TestedSequentialMedia_Id = c.Int()
}).PrimaryKey(t => t.Id).ForeignKey("dbo.Sscs", t => t.Ssc_Id)
.ForeignKey("dbo.TestedSequentialMedias", t => t.TestedSequentialMedia_Id)
.Index(t => t.Ssc_Id).Index(t => t.TestedSequentialMedia_Id);
CreateTable("dbo.SscSupportedMedias",
c => new
{
Id = c.Int(false, true),
MediumType = c.Byte(false),
Organization = c.String(unicode: false),
Name = c.String(unicode: false),
Description = c.String(unicode: false),
Ssc_Id = c.Int(),
TestedSequentialMedia_Id = c.Int()
}).PrimaryKey(t => t.Id).ForeignKey("dbo.Sscs", t => t.Ssc_Id)
.ForeignKey("dbo.TestedSequentialMedias", t => t.TestedSequentialMedia_Id)
.Index(t => t.Ssc_Id).Index(t => t.TestedSequentialMedia_Id);
CreateTable("dbo.DensityCodes", c => new {Code = c.Int(false, true), SscSupportedMedia_Id = c.Int()})
.PrimaryKey(t => t.Code).ForeignKey("dbo.SscSupportedMedias", t => t.SscSupportedMedia_Id)
.Index(t => t.SscSupportedMedia_Id);
CreateTable("dbo.TestedSequentialMedias",
c => new
{
Id = c.Int(false, true),
CanReadMediaSerial = c.Boolean(),
Density = c.Byte(),
Manufacturer = c.String(unicode: false),
MediaIsRecognized = c.Boolean(false),
MediumType = c.Byte(),
MediumTypeName = c.String(unicode: false),
Model = c.String(unicode: false),
ModeSense6Data = c.Binary(),
ModeSense10Data = c.Binary(),
Ssc_Id = c.Int()
}).PrimaryKey(t => t.Id).ForeignKey("dbo.Sscs", t => t.Ssc_Id).Index(t => t.Ssc_Id);
CreateTable("dbo.Usbs",
c => new
{
Id = c.Int(false, true),
Manufacturer = c.String(unicode: false),
Product = c.String(unicode: false),
RemovableMedia = c.Boolean(false),
Descriptors = c.Binary()
}).PrimaryKey(t => t.Id);
CreateTable("dbo.UploadedReports",
c => new
{
Id = c.Int(false, true),
UploadedWhen = c.DateTime(false, 0),
CompactFlash = c.Boolean(false),
Manufacturer = c.String(unicode: false),
Model = c.String(unicode: false),
Revision = c.String(unicode: false),
Type = c.Int(false),
ATA_Id = c.Int(),
ATAPI_Id = c.Int(),
FireWire_Id = c.Int(),
MultiMediaCard_Id = c.Int(),
PCMCIA_Id = c.Int(),
SCSI_Id = c.Int(),
SecureDigital_Id = c.Int(),
USB_Id = c.Int()
}).PrimaryKey(t => t.Id).ForeignKey("dbo.Atas", t => t.ATA_Id)
.ForeignKey("dbo.Atas", t => t.ATAPI_Id).ForeignKey("dbo.FireWires", t => t.FireWire_Id)
.ForeignKey("dbo.MmcSds", t => t.MultiMediaCard_Id)
.ForeignKey("dbo.Pcmcias", t => t.PCMCIA_Id).ForeignKey("dbo.Scsis", t => t.SCSI_Id)
.ForeignKey("dbo.MmcSds", t => t.SecureDigital_Id).ForeignKey("dbo.Usbs", t => t.USB_Id)
.Index(t => t.ATA_Id).Index(t => t.ATAPI_Id).Index(t => t.FireWire_Id)
.Index(t => t.MultiMediaCard_Id).Index(t => t.PCMCIA_Id).Index(t => t.SCSI_Id)
.Index(t => t.SecureDigital_Id).Index(t => t.USB_Id);
}
public override void Down()
{
DropForeignKey("dbo.UploadedReports", "USB_Id", "dbo.Usbs");
DropForeignKey("dbo.UploadedReports", "SecureDigital_Id", "dbo.MmcSds");
DropForeignKey("dbo.UploadedReports", "SCSI_Id", "dbo.Scsis");
DropForeignKey("dbo.UploadedReports", "PCMCIA_Id", "dbo.Pcmcias");
DropForeignKey("dbo.UploadedReports", "MultiMediaCard_Id", "dbo.MmcSds");
DropForeignKey("dbo.UploadedReports", "FireWire_Id", "dbo.FireWires");
DropForeignKey("dbo.UploadedReports", "ATAPI_Id", "dbo.Atas");
DropForeignKey("dbo.UploadedReports", "ATA_Id", "dbo.Atas");
DropForeignKey("dbo.Devices", "USB_Id", "dbo.Usbs");
DropForeignKey("dbo.Devices", "SecureDigital_Id", "dbo.MmcSds");
DropForeignKey("dbo.Devices", "SCSI_Id", "dbo.Scsis");
DropForeignKey("dbo.Scsis", "SequentialDevice_Id", "dbo.Sscs");
DropForeignKey("dbo.TestedSequentialMedias", "Ssc_Id", "dbo.Sscs");
DropForeignKey("dbo.SscSupportedMedias", "TestedSequentialMedia_Id", "dbo.TestedSequentialMedias");
DropForeignKey("dbo.SupportedDensities", "TestedSequentialMedia_Id", "dbo.TestedSequentialMedias");
DropForeignKey("dbo.SscSupportedMedias", "Ssc_Id", "dbo.Sscs");
DropForeignKey("dbo.DensityCodes", "SscSupportedMedia_Id", "dbo.SscSupportedMedias");
DropForeignKey("dbo.SupportedDensities", "Ssc_Id", "dbo.Sscs");
DropForeignKey("dbo.TestedMedias", "Scsi_Id", "dbo.Scsis");
DropForeignKey("dbo.Scsis", "ReadCapabilities_Id", "dbo.TestedMedias");
DropForeignKey("dbo.Scsis", "MultiMediaDevice_Id", "dbo.Mmcs");
DropForeignKey("dbo.TestedMedias", "Mmc_Id", "dbo.Mmcs");
DropForeignKey("dbo.Mmcs", "ModeSense2A_Id", "dbo.ModePage_2A");
DropForeignKey("dbo.Mmcs", "Features_Id", "dbo.MmcFeatures");
DropForeignKey("dbo.Scsis", "ModeSense_Id", "dbo.ScsiModes");
DropForeignKey("dbo.ScsiPages", "ScsiMode_Id", "dbo.ScsiModes");
DropForeignKey("dbo.BlockDescriptors", "ScsiMode_Id", "dbo.ScsiModes");
DropForeignKey("dbo.ScsiPages", "Scsi_Id", "dbo.Scsis");
DropForeignKey("dbo.Devices", "PCMCIA_Id", "dbo.Pcmcias");
DropForeignKey("dbo.Devices", "MultiMediaCard_Id", "dbo.MmcSds");
DropForeignKey("dbo.Devices", "FireWire_Id", "dbo.FireWires");
DropForeignKey("dbo.Devices", "ATAPI_Id", "dbo.Atas");
DropForeignKey("dbo.Devices", "ATA_Id", "dbo.Atas");
DropForeignKey("dbo.TestedMedias", "Ata_Id", "dbo.Atas");
DropForeignKey("dbo.Atas", "ReadCapabilities_Id", "dbo.TestedMedias");
DropForeignKey("dbo.TestedMedias", "CurrentCHS_Id", "dbo.Chs");
DropForeignKey("dbo.TestedMedias", "CHS_Id", "dbo.Chs");
DropIndex("dbo.UploadedReports", new[] {"USB_Id"});
DropIndex("dbo.UploadedReports", new[] {"SecureDigital_Id"});
DropIndex("dbo.UploadedReports", new[] {"SCSI_Id"});
DropIndex("dbo.UploadedReports", new[] {"PCMCIA_Id"});
DropIndex("dbo.UploadedReports", new[] {"MultiMediaCard_Id"});
DropIndex("dbo.UploadedReports", new[] {"FireWire_Id"});
DropIndex("dbo.UploadedReports", new[] {"ATAPI_Id"});
DropIndex("dbo.UploadedReports", new[] {"ATA_Id"});
DropIndex("dbo.TestedSequentialMedias", new[] {"Ssc_Id"});
DropIndex("dbo.DensityCodes", new[] {"SscSupportedMedia_Id"});
DropIndex("dbo.SscSupportedMedias", new[] {"TestedSequentialMedia_Id"});
DropIndex("dbo.SscSupportedMedias", new[] {"Ssc_Id"});
DropIndex("dbo.SupportedDensities", new[] {"TestedSequentialMedia_Id"});
DropIndex("dbo.SupportedDensities", new[] {"Ssc_Id"});
DropIndex("dbo.Mmcs", new[] {"ModeSense2A_Id"});
DropIndex("dbo.Mmcs", new[] {"Features_Id"});
DropIndex("dbo.BlockDescriptors", new[] {"ScsiMode_Id"});
DropIndex("dbo.ScsiPages", new[] {"ScsiMode_Id"});
DropIndex("dbo.ScsiPages", new[] {"Scsi_Id"});
DropIndex("dbo.Scsis", new[] {"SequentialDevice_Id"});
DropIndex("dbo.Scsis", new[] {"ReadCapabilities_Id"});
DropIndex("dbo.Scsis", new[] {"MultiMediaDevice_Id"});
DropIndex("dbo.Scsis", new[] {"ModeSense_Id"});
DropIndex("dbo.TestedMedias", new[] {"Scsi_Id"});
DropIndex("dbo.TestedMedias", new[] {"Mmc_Id"});
DropIndex("dbo.TestedMedias", new[] {"Ata_Id"});
DropIndex("dbo.TestedMedias", new[] {"CurrentCHS_Id"});
DropIndex("dbo.TestedMedias", new[] {"CHS_Id"});
DropIndex("dbo.Atas", new[] {"ReadCapabilities_Id"});
DropIndex("dbo.Devices", new[] {"USB_Id"});
DropIndex("dbo.Devices", new[] {"SecureDigital_Id"});
DropIndex("dbo.Devices", new[] {"SCSI_Id"});
DropIndex("dbo.Devices", new[] {"PCMCIA_Id"});
DropIndex("dbo.Devices", new[] {"MultiMediaCard_Id"});
DropIndex("dbo.Devices", new[] {"FireWire_Id"});
DropIndex("dbo.Devices", new[] {"ATAPI_Id"});
DropIndex("dbo.Devices", new[] {"ATA_Id"});
DropTable("dbo.UploadedReports");
DropTable("dbo.Usbs");
DropTable("dbo.TestedSequentialMedias");
DropTable("dbo.DensityCodes");
DropTable("dbo.SscSupportedMedias");
DropTable("dbo.SupportedDensities");
DropTable("dbo.Sscs");
DropTable("dbo.ModePage_2A");
DropTable("dbo.MmcFeatures");
DropTable("dbo.Mmcs");
DropTable("dbo.BlockDescriptors");
DropTable("dbo.ScsiModes");
DropTable("dbo.ScsiPages");
DropTable("dbo.Scsis");
DropTable("dbo.Pcmcias");
DropTable("dbo.MmcSds");
DropTable("dbo.FireWires");
DropTable("dbo.Chs");
DropTable("dbo.TestedMedias");
DropTable("dbo.Atas");
DropTable("dbo.Devices");
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -1,29 +0,0 @@
// <auto-generated />
namespace DiscImageChef.Server.Migrations
{
using System.CodeDom.Compiler;
using System.Data.Entity.Migrations;
using System.Data.Entity.Migrations.Infrastructure;
using System.Resources;
[GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
public sealed partial class AddStatistics : IMigrationMetadata
{
private readonly ResourceManager Resources = new ResourceManager(typeof(AddStatistics));
string IMigrationMetadata.Id
{
get { return "201812220029427_AddStatistics"; }
}
string IMigrationMetadata.Source
{
get { return null; }
}
string IMigrationMetadata.Target
{
get { return Resources.GetString("Target"); }
}
}
}

View File

@@ -1,75 +0,0 @@
using System.Data.Entity.Migrations;
namespace DiscImageChef.Server.Migrations
{
public partial class AddStatistics : DbMigration
{
public override void Up()
{
CreateTable("dbo.Commands",
c => new {Id = c.Int(false, true), Name = c.String(unicode: false), Count = c.Long(false)})
.PrimaryKey(t => t.Id);
CreateTable("dbo.DeviceStats",
c => new
{
Id = c.Int(false, true),
Manufacturer = c.String(unicode: false),
Model = c.String(unicode: false),
Revision = c.String(unicode: false),
Bus = c.String(unicode: false)
}).PrimaryKey(t => t.Id);
CreateTable("dbo.Filesystems",
c => new {Id = c.Int(false, true), Name = c.String(unicode: false), Count = c.Long(false)})
.PrimaryKey(t => t.Id);
CreateTable("dbo.Filters",
c => new {Id = c.Int(false, true), Name = c.String(unicode: false), Count = c.Long(false)})
.PrimaryKey(t => t.Id);
CreateTable("dbo.MediaFormats",
c => new {Id = c.Int(false, true), Name = c.String(unicode: false), Count = c.Long(false)})
.PrimaryKey(t => t.Id);
CreateTable("dbo.Media",
c => new
{
Id = c.Int(false, true),
Type = c.String(unicode: false),
Real = c.Boolean(false),
Count = c.Long(false)
}).PrimaryKey(t => t.Id);
CreateTable("dbo.OperatingSystems",
c => new
{
Id = c.Int(false, true),
Name = c.String(unicode: false),
Version = c.String(unicode: false),
Count = c.Long(false)
}).PrimaryKey(t => t.Id);
CreateTable("dbo.Partitions",
c => new {Id = c.Int(false, true), Name = c.String(unicode: false), Count = c.Long(false)})
.PrimaryKey(t => t.Id);
CreateTable("dbo.Versions",
c => new {Id = c.Int(false, true), Value = c.String(unicode: false), Count = c.Long(false)})
.PrimaryKey(t => t.Id);
}
public override void Down()
{
DropTable("dbo.Versions");
DropTable("dbo.Partitions");
DropTable("dbo.OperatingSystems");
DropTable("dbo.Media");
DropTable("dbo.MediaFormats");
DropTable("dbo.Filters");
DropTable("dbo.Filesystems");
DropTable("dbo.DeviceStats");
DropTable("dbo.Commands");
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -1,29 +0,0 @@
// <auto-generated />
namespace DiscImageChef.Server.Migrations
{
using System.CodeDom.Compiler;
using System.Data.Entity.Migrations;
using System.Data.Entity.Migrations.Infrastructure;
using System.Resources;
[GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
public sealed partial class LinkDeviceStatsToReport : IMigrationMetadata
{
private readonly ResourceManager Resources = new ResourceManager(typeof(LinkDeviceStatsToReport));
string IMigrationMetadata.Id
{
get { return "201812221606592_LinkDeviceStatsToReport"; }
}
string IMigrationMetadata.Source
{
get { return null; }
}
string IMigrationMetadata.Target
{
get { return Resources.GetString("Target"); }
}
}
}

View File

@@ -1,21 +0,0 @@
using System.Data.Entity.Migrations;
namespace DiscImageChef.Server.Migrations
{
public partial class LinkDeviceStatsToReport : DbMigration
{
public override void Up()
{
AddColumn("dbo.DeviceStats", "Report_Id", c => c.Int());
CreateIndex("dbo.DeviceStats", "Report_Id");
AddForeignKey("dbo.DeviceStats", "Report_Id", "dbo.Devices", "Id");
}
public override void Down()
{
DropForeignKey("dbo.DeviceStats", "Report_Id", "dbo.Devices");
DropIndex("dbo.DeviceStats", new[] {"Report_Id"});
DropColumn("dbo.DeviceStats", "Report_Id");
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -1,29 +0,0 @@
// <auto-generated />
namespace DiscImageChef.Server.Migrations
{
using System.CodeDom.Compiler;
using System.Data.Entity.Migrations;
using System.Data.Entity.Migrations.Infrastructure;
using System.Resources;
[GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
public sealed partial class FixUnsignedFields : IMigrationMetadata
{
private readonly ResourceManager Resources = new ResourceManager(typeof(FixUnsignedFields));
string IMigrationMetadata.Id
{
get { return "201812231612080_FixUnsignedFields"; }
}
string IMigrationMetadata.Source
{
get { return null; }
}
string IMigrationMetadata.Target
{
get { return Resources.GetString("Target"); }
}
}
}

View File

@@ -1,81 +0,0 @@
using System.Data.Entity.Migrations;
namespace DiscImageChef.Server.Migrations
{
public partial class FixUnsignedFields : DbMigration
{
public override void Up()
{
AddColumn("dbo.TestedMedias", "BlocksSql", c => c.Long());
AddColumn("dbo.TestedMedias", "BlockSizeSql", c => c.Int());
AddColumn("dbo.TestedMedias", "LongBlockSizeSql", c => c.Int());
AddColumn("dbo.TestedMedias", "LBASectorsSql", c => c.Int());
AddColumn("dbo.TestedMedias", "LBA48SectorsSql", c => c.Long());
AddColumn("dbo.TestedMedias", "LogicalAlignmentSql", c => c.Short());
AddColumn("dbo.TestedMedias", "NominalRotationRateSql", c => c.Short());
AddColumn("dbo.TestedMedias", "PhysicalBlockSizeSql", c => c.Int());
AddColumn("dbo.TestedMedias", "UnformattedBPTSql", c => c.Short());
AddColumn("dbo.TestedMedias", "UnformattedBPSSql", c => c.Short());
AddColumn("dbo.Chs", "CylindersSql", c => c.Short(false));
AddColumn("dbo.Chs", "HeadsSql", c => c.Short(false));
AddColumn("dbo.Chs", "SectorsSql", c => c.Short(false));
AddColumn("dbo.FireWires", "VendorIDSql", c => c.Int(false));
AddColumn("dbo.FireWires", "ProductIDSql", c => c.Int(false));
AddColumn("dbo.Pcmcias", "ManufacturerCodeSql", c => c.Short());
AddColumn("dbo.Pcmcias", "CardCodeSql", c => c.Short());
AddColumn("dbo.BlockDescriptors", "BlocksSql", c => c.Long());
AddColumn("dbo.BlockDescriptors", "BlockLengthSql", c => c.Int());
AddColumn("dbo.MmcFeatures", "BlocksPerReadableUnitSql", c => c.Short());
AddColumn("dbo.MmcFeatures", "LogicalBlockSizeSql", c => c.Int());
AddColumn("dbo.MmcFeatures", "PhysicalInterfaceStandardNumberSql", c => c.Int());
AddColumn("dbo.MmcFeatures", "VolumeLevelsSql", c => c.Short());
AddColumn("dbo.Sscs", "MaxBlockLengthSql", c => c.Int());
AddColumn("dbo.Sscs", "MinBlockLengthSql", c => c.Int());
AddColumn("dbo.SupportedDensities", "BitsPerMmSql", c => c.Int(false));
AddColumn("dbo.SupportedDensities", "WidthSql", c => c.Short(false));
AddColumn("dbo.SupportedDensities", "TracksSql", c => c.Short(false));
AddColumn("dbo.SupportedDensities", "CapacitySql", c => c.Int(false));
AddColumn("dbo.SscSupportedMedias", "WidthSql", c => c.Short(false));
AddColumn("dbo.SscSupportedMedias", "LengthSql", c => c.Short(false));
AddColumn("dbo.Usbs", "VendorIDSql", c => c.Short(false));
AddColumn("dbo.Usbs", "ProductIDSql", c => c.Short(false));
}
public override void Down()
{
DropColumn("dbo.Usbs", "ProductIDSql");
DropColumn("dbo.Usbs", "VendorIDSql");
DropColumn("dbo.SscSupportedMedias", "LengthSql");
DropColumn("dbo.SscSupportedMedias", "WidthSql");
DropColumn("dbo.SupportedDensities", "CapacitySql");
DropColumn("dbo.SupportedDensities", "TracksSql");
DropColumn("dbo.SupportedDensities", "WidthSql");
DropColumn("dbo.SupportedDensities", "BitsPerMmSql");
DropColumn("dbo.Sscs", "MinBlockLengthSql");
DropColumn("dbo.Sscs", "MaxBlockLengthSql");
DropColumn("dbo.MmcFeatures", "VolumeLevelsSql");
DropColumn("dbo.MmcFeatures", "PhysicalInterfaceStandardNumberSql");
DropColumn("dbo.MmcFeatures", "LogicalBlockSizeSql");
DropColumn("dbo.MmcFeatures", "BlocksPerReadableUnitSql");
DropColumn("dbo.BlockDescriptors", "BlockLengthSql");
DropColumn("dbo.BlockDescriptors", "BlocksSql");
DropColumn("dbo.Pcmcias", "CardCodeSql");
DropColumn("dbo.Pcmcias", "ManufacturerCodeSql");
DropColumn("dbo.FireWires", "ProductIDSql");
DropColumn("dbo.FireWires", "VendorIDSql");
DropColumn("dbo.Chs", "SectorsSql");
DropColumn("dbo.Chs", "HeadsSql");
DropColumn("dbo.Chs", "CylindersSql");
DropColumn("dbo.TestedMedias", "UnformattedBPSSql");
DropColumn("dbo.TestedMedias", "UnformattedBPTSql");
DropColumn("dbo.TestedMedias", "PhysicalBlockSizeSql");
DropColumn("dbo.TestedMedias", "NominalRotationRateSql");
DropColumn("dbo.TestedMedias", "LogicalAlignmentSql");
DropColumn("dbo.TestedMedias", "LBA48SectorsSql");
DropColumn("dbo.TestedMedias", "LBASectorsSql");
DropColumn("dbo.TestedMedias", "LongBlockSizeSql");
DropColumn("dbo.TestedMedias", "BlockSizeSql");
DropColumn("dbo.TestedMedias", "BlocksSql");
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -1,29 +0,0 @@
// <auto-generated />
namespace DiscImageChef.Server.Migrations
{
using System.CodeDom.Compiler;
using System.Data.Entity.Migrations;
using System.Data.Entity.Migrations.Infrastructure;
using System.Resources;
[GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
public sealed partial class UseBinaryDataForIdentifyInquiryAndModesInReports : IMigrationMetadata
{
private readonly ResourceManager Resources = new ResourceManager(typeof(UseBinaryDataForIdentifyInquiryAndModesInReports));
string IMigrationMetadata.Id
{
get { return "201812232250198_UseBinaryDataForIdentifyInquiryAndModesInReports"; }
}
string IMigrationMetadata.Source
{
get { return null; }
}
string IMigrationMetadata.Target
{
get { return Resources.GetString("Target"); }
}
}
}

View File

@@ -1,74 +0,0 @@
using System.Data.Entity.Migrations;
namespace DiscImageChef.Server.Migrations
{
public partial class UseBinaryDataForIdentifyInquiryAndModesInReports : DbMigration
{
public override void Up()
{
DropForeignKey("Mmcs", "ModeSense2A_Id", "ModePage_2A");
DropIndex("dbo.Mmcs", new[] {"ModeSense2A_Id"});
AddColumn("dbo.Mmcs", "ModeSense2AData", c => c.Binary());
DropColumn("dbo.Mmcs", "ModeSense2A_Id");
DropTable("dbo.ModePage_2A");
}
public override void Down()
{
CreateTable("dbo.ModePage_2A",
c => new
{
Id = c.Int(false, true),
PS = c.Boolean(false),
MultiSession = c.Boolean(false),
Mode2Form2 = c.Boolean(false),
Mode2Form1 = c.Boolean(false),
AudioPlay = c.Boolean(false),
ISRC = c.Boolean(false),
UPC = c.Boolean(false),
C2Pointer = c.Boolean(false),
DeinterlaveSubchannel = c.Boolean(false),
Subchannel = c.Boolean(false),
AccurateCDDA = c.Boolean(false),
CDDACommand = c.Boolean(false),
LoadingMechanism = c.Byte(false),
Eject = c.Boolean(false),
PreventJumper = c.Boolean(false),
LockState = c.Boolean(false),
Lock = c.Boolean(false),
SeparateChannelMute = c.Boolean(false),
SeparateChannelVolume = c.Boolean(false),
Method2 = c.Boolean(false),
ReadCDRW = c.Boolean(false),
ReadCDR = c.Boolean(false),
WriteCDRW = c.Boolean(false),
WriteCDR = c.Boolean(false),
DigitalPort2 = c.Boolean(false),
DigitalPort1 = c.Boolean(false),
Composite = c.Boolean(false),
SSS = c.Boolean(false),
SDP = c.Boolean(false),
Length = c.Byte(false),
LSBF = c.Boolean(false),
RCK = c.Boolean(false),
BCK = c.Boolean(false),
TestWrite = c.Boolean(false),
ReadBarcode = c.Boolean(false),
ReadDVDRAM = c.Boolean(false),
ReadDVDR = c.Boolean(false),
ReadDVDROM = c.Boolean(false),
WriteDVDRAM = c.Boolean(false),
WriteDVDR = c.Boolean(false),
LeadInPW = c.Boolean(false),
SCC = c.Boolean(false),
BUF = c.Boolean(false),
RotationControlSelected = c.Byte(false)
}).PrimaryKey(t => t.Id);
AddColumn("dbo.Mmcs", "ModeSense2A_Id", c => c.Int());
DropColumn("dbo.Mmcs", "ModeSense2AData");
CreateIndex("dbo.Mmcs", "ModeSense2A_Id");
AddForeignKey("dbo.Mmcs", "ModeSense2A_Id", "dbo.ModePage_2A", "Id");
}
}
}

View File

@@ -1,29 +0,0 @@
// <auto-generated />
namespace DiscImageChef.Server.Migrations
{
using System.CodeDom.Compiler;
using System.Data.Entity.Migrations;
using System.Data.Entity.Migrations.Infrastructure;
using System.Resources;
[GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
public sealed partial class StoreUsbIdsInDatabase : IMigrationMetadata
{
private readonly ResourceManager Resources = new ResourceManager(typeof(StoreUsbIdsInDatabase));
string IMigrationMetadata.Id
{
get { return "201812240552109_StoreUsbIdsInDatabase"; }
}
string IMigrationMetadata.Source
{
get { return null; }
}
string IMigrationMetadata.Target
{
get { return Resources.GetString("Target"); }
}
}
}

View File

@@ -1,39 +0,0 @@
using System.Data.Entity.Migrations;
namespace DiscImageChef.Server.Migrations
{
public partial class StoreUsbIdsInDatabase : DbMigration
{
public override void Up()
{
CreateTable("dbo.UsbProducts",
c => new
{
Id = c.Int(false, true),
ProductId = c.Int(false),
Product = c.String(unicode: false),
AddedWhen = c.DateTime(false, 0),
ModifiedWhen = c.DateTime(false, 0),
VendorId = c.Int(false)
}).PrimaryKey(t => t.Id).ForeignKey("dbo.UsbVendors", t => t.VendorId, true)
.Index(t => t.VendorId);
CreateTable("dbo.UsbVendors",
c => new
{
Id = c.Int(false, true),
Vendor = c.String(unicode: false),
AddedWhen = c.DateTime(false, 0),
ModifiedWhen = c.DateTime(false, 0)
}).PrimaryKey(t => t.Id);
}
public override void Down()
{
DropForeignKey("dbo.UsbProducts", "VendorId", "dbo.UsbVendors");
DropIndex("dbo.UsbProducts", new[] {"VendorId"});
DropTable("dbo.UsbVendors");
DropTable("dbo.UsbProducts");
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -1,29 +0,0 @@
// <auto-generated />
namespace DiscImageChef.Server.Migrations
{
using System.CodeDom.Compiler;
using System.Data.Entity.Migrations;
using System.Data.Entity.Migrations.Infrastructure;
using System.Resources;
[GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
public sealed partial class FixUsbIdsAndIndexes : IMigrationMetadata
{
private readonly ResourceManager Resources = new ResourceManager(typeof(FixUsbIdsAndIndexes));
string IMigrationMetadata.Id
{
get { return "201812241719441_FixUsbIdsAndIndexes"; }
}
string IMigrationMetadata.Source
{
get { return null; }
}
string IMigrationMetadata.Target
{
get { return Resources.GetString("Target"); }
}
}
}

View File

@@ -1,25 +0,0 @@
using System.Data.Entity.Migrations;
namespace DiscImageChef.Server.Migrations
{
public partial class FixUsbIdsAndIndexes : DbMigration
{
public override void Up()
{
AddColumn("dbo.UsbVendors", "VendorId", c => c.Int(false));
CreateIndex("dbo.UsbProducts", "ProductId");
CreateIndex("dbo.UsbProducts", "ModifiedWhen");
CreateIndex("dbo.UsbVendors", "VendorId", true);
CreateIndex("dbo.UsbVendors", "ModifiedWhen");
}
public override void Down()
{
DropIndex("dbo.UsbVendors", new[] {"ModifiedWhen"});
DropIndex("dbo.UsbVendors", new[] {"VendorId"});
DropIndex("dbo.UsbProducts", new[] {"ModifiedWhen"});
DropIndex("dbo.UsbProducts", new[] {"ProductId"});
DropColumn("dbo.UsbVendors", "VendorId");
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -1,29 +0,0 @@
// <auto-generated />
namespace DiscImageChef.Server.Migrations
{
using System.CodeDom.Compiler;
using System.Data.Entity.Migrations;
using System.Data.Entity.Migrations.Infrastructure;
using System.Resources;
[GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
public sealed partial class AddCdOffsets : IMigrationMetadata
{
private readonly ResourceManager Resources = new ResourceManager(typeof(AddCdOffsets));
string IMigrationMetadata.Id
{
get { return "201812250223002_AddCdOffsets"; }
}
string IMigrationMetadata.Source
{
get { return null; }
}
string IMigrationMetadata.Target
{
get { return Resources.GetString("Target"); }
}
}
}

View File

@@ -1,40 +0,0 @@
using System.Data.Entity.Migrations;
namespace DiscImageChef.Server.Migrations
{
public partial class AddCdOffsets : DbMigration
{
public override void Up()
{
CreateTable("dbo.CompactDiscOffsets",
c => new
{
Id = c.Int(false, true),
AddedWhen = c.DateTime(false, 0),
ModifiedWhen = c.DateTime(false, 0),
Manufacturer = c.String(unicode: false),
Model = c.String(unicode: false),
Offset = c.Short(false),
Submissions = c.Int(false),
Agreement = c.Single(false)
}).PrimaryKey(t => t.Id).Index(t => t.ModifiedWhen);
AddColumn("dbo.Devices", "ModifiedWhen", c => c.DateTime(precision: 0));
AddColumn("dbo.Devices", "CdOffset_Id", c => c.Int());
CreateIndex("dbo.Devices", "ModifiedWhen");
CreateIndex("dbo.Devices", "CdOffset_Id");
AddForeignKey("dbo.Devices", "CdOffset_Id", "dbo.CompactDiscOffsets", "Id");
}
public override void Down()
{
DropForeignKey("dbo.Devices", "CdOffset_Id", "dbo.CompactDiscOffsets");
DropIndex("dbo.Devices", new[] {"CdOffset_Id"});
DropIndex("dbo.Devices", new[] {"ModifiedWhen"});
DropIndex("dbo.CompactDiscOffsets", new[] {"ModifiedWhen"});
DropColumn("dbo.Devices", "CdOffset_Id");
DropColumn("dbo.Devices", "ModifiedWhen");
DropTable("dbo.CompactDiscOffsets");
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -1,29 +0,0 @@
// <auto-generated />
namespace DiscImageChef.Server.Migrations
{
using System.CodeDom.Compiler;
using System.Data.Entity.Migrations;
using System.Data.Entity.Migrations.Infrastructure;
using System.Resources;
[GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
public sealed partial class StoreMmcGetConfigurationResponse : IMigrationMetadata
{
private readonly ResourceManager Resources = new ResourceManager(typeof(StoreMmcGetConfigurationResponse));
string IMigrationMetadata.Id
{
get { return "201812251556377_StoreMmcGetConfigurationResponse"; }
}
string IMigrationMetadata.Source
{
get { return null; }
}
string IMigrationMetadata.Target
{
get { return Resources.GetString("Target"); }
}
}
}

View File

@@ -1,17 +0,0 @@
using System.Data.Entity.Migrations;
namespace DiscImageChef.Server.Migrations
{
public partial class StoreMmcGetConfigurationResponse : DbMigration
{
public override void Up()
{
AddColumn("dbo.MmcFeatures", "BinaryData", c => c.Binary());
}
public override void Down()
{
DropColumn("dbo.MmcFeatures", "BinaryData");
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -1,29 +0,0 @@
// <auto-generated />
namespace DiscImageChef.Server.Migrations
{
using System.CodeDom.Compiler;
using System.Data.Entity.Migrations;
using System.Data.Entity.Migrations.Infrastructure;
using System.Resources;
[GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
public sealed partial class StoreReadResultsInReportDatabase : IMigrationMetadata
{
private readonly ResourceManager Resources = new ResourceManager(typeof(StoreReadResultsInReportDatabase));
string IMigrationMetadata.Id
{
get { return "201812252219066_StoreReadResultsInReportDatabase"; }
}
string IMigrationMetadata.Source
{
get { return null; }
}
string IMigrationMetadata.Target
{
get { return Resources.GetString("Target"); }
}
}
}

View File

@@ -1,139 +0,0 @@
using System.Data.Entity.Migrations;
namespace DiscImageChef.Server.Migrations
{
public partial class StoreReadResultsInReportDatabase : DbMigration
{
public override void Up()
{
AddColumn("dbo.TestedMedias", "Read6Data", c => c.Binary());
AddColumn("dbo.TestedMedias", "Read10Data", c => c.Binary());
AddColumn("dbo.TestedMedias", "Read12Data", c => c.Binary());
AddColumn("dbo.TestedMedias", "Read16Data", c => c.Binary());
AddColumn("dbo.TestedMedias", "ReadLong10Data", c => c.Binary());
AddColumn("dbo.TestedMedias", "ReadLong16Data", c => c.Binary());
AddColumn("dbo.TestedMedias", "ReadSectorsData", c => c.Binary());
AddColumn("dbo.TestedMedias", "ReadSectorsRetryData", c => c.Binary());
AddColumn("dbo.TestedMedias", "ReadDmaData", c => c.Binary());
AddColumn("dbo.TestedMedias", "ReadDmaRetryData", c => c.Binary());
AddColumn("dbo.TestedMedias", "ReadLbaData", c => c.Binary());
AddColumn("dbo.TestedMedias", "ReadRetryLbaData", c => c.Binary());
AddColumn("dbo.TestedMedias", "ReadDmaLbaData", c => c.Binary());
AddColumn("dbo.TestedMedias", "ReadDmaRetryLbaData", c => c.Binary());
AddColumn("dbo.TestedMedias", "ReadLba48Data", c => c.Binary());
AddColumn("dbo.TestedMedias", "ReadDmaLba48Data", c => c.Binary());
AddColumn("dbo.TestedMedias", "ReadLongData", c => c.Binary());
AddColumn("dbo.TestedMedias", "ReadLongRetryData", c => c.Binary());
AddColumn("dbo.TestedMedias", "ReadLongLbaData", c => c.Binary());
AddColumn("dbo.TestedMedias", "ReadLongRetryLbaData", c => c.Binary());
AddColumn("dbo.TestedMedias", "TocData", c => c.Binary());
AddColumn("dbo.TestedMedias", "FullTocData", c => c.Binary());
AddColumn("dbo.TestedMedias", "AtipData", c => c.Binary());
AddColumn("dbo.TestedMedias", "PmaData", c => c.Binary());
AddColumn("dbo.TestedMedias", "ReadCdData", c => c.Binary());
AddColumn("dbo.TestedMedias", "ReadCdMsfData", c => c.Binary());
AddColumn("dbo.TestedMedias", "ReadCdFullData", c => c.Binary());
AddColumn("dbo.TestedMedias", "ReadCdMsfFullData", c => c.Binary());
AddColumn("dbo.TestedMedias", "Track1PregapData", c => c.Binary());
AddColumn("dbo.TestedMedias", "LeadInData", c => c.Binary());
AddColumn("dbo.TestedMedias", "LeadOutData", c => c.Binary());
AddColumn("dbo.TestedMedias", "C2PointersData", c => c.Binary());
AddColumn("dbo.TestedMedias", "PQSubchannelData", c => c.Binary());
AddColumn("dbo.TestedMedias", "RWSubchannelData", c => c.Binary());
AddColumn("dbo.TestedMedias", "CorrectedSubchannelData", c => c.Binary());
AddColumn("dbo.TestedMedias", "PQSubchannelWithC2Data", c => c.Binary());
AddColumn("dbo.TestedMedias", "RWSubchannelWithC2Data", c => c.Binary());
AddColumn("dbo.TestedMedias", "CorrectedSubchannelWithC2Data", c => c.Binary());
AddColumn("dbo.TestedMedias", "PfiData", c => c.Binary());
AddColumn("dbo.TestedMedias", "DmiData", c => c.Binary());
AddColumn("dbo.TestedMedias", "CmiData", c => c.Binary());
AddColumn("dbo.TestedMedias", "DvdBcaData", c => c.Binary());
AddColumn("dbo.TestedMedias", "DvdAacsData", c => c.Binary());
AddColumn("dbo.TestedMedias", "DvdDdsData", c => c.Binary());
AddColumn("dbo.TestedMedias", "DvdSaiData", c => c.Binary());
AddColumn("dbo.TestedMedias", "PriData", c => c.Binary());
AddColumn("dbo.TestedMedias", "EmbossedPfiData", c => c.Binary());
AddColumn("dbo.TestedMedias", "AdipData", c => c.Binary());
AddColumn("dbo.TestedMedias", "DcbData", c => c.Binary());
AddColumn("dbo.TestedMedias", "HdCmiData", c => c.Binary());
AddColumn("dbo.TestedMedias", "DvdLayerData", c => c.Binary());
AddColumn("dbo.TestedMedias", "BluBcaData", c => c.Binary());
AddColumn("dbo.TestedMedias", "BluDdsData", c => c.Binary());
AddColumn("dbo.TestedMedias", "BluSaiData", c => c.Binary());
AddColumn("dbo.TestedMedias", "BluDiData", c => c.Binary());
AddColumn("dbo.TestedMedias", "BluPacData", c => c.Binary());
AddColumn("dbo.TestedMedias", "PlextorReadCddaData", c => c.Binary());
AddColumn("dbo.TestedMedias", "PioneerReadCddaData", c => c.Binary());
AddColumn("dbo.TestedMedias", "PioneerReadCddaMsfData", c => c.Binary());
AddColumn("dbo.TestedMedias", "NecReadCddaData", c => c.Binary());
AddColumn("dbo.TestedMedias", "PlextorReadRawDVDData", c => c.Binary());
AddColumn("dbo.TestedMedias", "HLDTSTReadRawDVDData", c => c.Binary());
}
public override void Down()
{
DropColumn("dbo.TestedMedias", "HLDTSTReadRawDVDData");
DropColumn("dbo.TestedMedias", "PlextorReadRawDVDData");
DropColumn("dbo.TestedMedias", "NecReadCddaData");
DropColumn("dbo.TestedMedias", "PioneerReadCddaMsfData");
DropColumn("dbo.TestedMedias", "PioneerReadCddaData");
DropColumn("dbo.TestedMedias", "PlextorReadCddaData");
DropColumn("dbo.TestedMedias", "BluPacData");
DropColumn("dbo.TestedMedias", "BluDiData");
DropColumn("dbo.TestedMedias", "BluSaiData");
DropColumn("dbo.TestedMedias", "BluDdsData");
DropColumn("dbo.TestedMedias", "BluBcaData");
DropColumn("dbo.TestedMedias", "DvdLayerData");
DropColumn("dbo.TestedMedias", "HdCmiData");
DropColumn("dbo.TestedMedias", "DcbData");
DropColumn("dbo.TestedMedias", "AdipData");
DropColumn("dbo.TestedMedias", "EmbossedPfiData");
DropColumn("dbo.TestedMedias", "PriData");
DropColumn("dbo.TestedMedias", "DvdSaiData");
DropColumn("dbo.TestedMedias", "DvdDdsData");
DropColumn("dbo.TestedMedias", "DvdAacsData");
DropColumn("dbo.TestedMedias", "DvdBcaData");
DropColumn("dbo.TestedMedias", "CmiData");
DropColumn("dbo.TestedMedias", "DmiData");
DropColumn("dbo.TestedMedias", "PfiData");
DropColumn("dbo.TestedMedias", "CorrectedSubchannelWithC2Data");
DropColumn("dbo.TestedMedias", "RWSubchannelWithC2Data");
DropColumn("dbo.TestedMedias", "PQSubchannelWithC2Data");
DropColumn("dbo.TestedMedias", "CorrectedSubchannelData");
DropColumn("dbo.TestedMedias", "RWSubchannelData");
DropColumn("dbo.TestedMedias", "PQSubchannelData");
DropColumn("dbo.TestedMedias", "C2PointersData");
DropColumn("dbo.TestedMedias", "LeadOutData");
DropColumn("dbo.TestedMedias", "LeadInData");
DropColumn("dbo.TestedMedias", "Track1PregapData");
DropColumn("dbo.TestedMedias", "ReadCdMsfFullData");
DropColumn("dbo.TestedMedias", "ReadCdFullData");
DropColumn("dbo.TestedMedias", "ReadCdMsfData");
DropColumn("dbo.TestedMedias", "ReadCdData");
DropColumn("dbo.TestedMedias", "PmaData");
DropColumn("dbo.TestedMedias", "AtipData");
DropColumn("dbo.TestedMedias", "FullTocData");
DropColumn("dbo.TestedMedias", "TocData");
DropColumn("dbo.TestedMedias", "ReadLongRetryLbaData");
DropColumn("dbo.TestedMedias", "ReadLongLbaData");
DropColumn("dbo.TestedMedias", "ReadLongRetryData");
DropColumn("dbo.TestedMedias", "ReadLongData");
DropColumn("dbo.TestedMedias", "ReadDmaLba48Data");
DropColumn("dbo.TestedMedias", "ReadLba48Data");
DropColumn("dbo.TestedMedias", "ReadDmaRetryLbaData");
DropColumn("dbo.TestedMedias", "ReadDmaLbaData");
DropColumn("dbo.TestedMedias", "ReadRetryLbaData");
DropColumn("dbo.TestedMedias", "ReadLbaData");
DropColumn("dbo.TestedMedias", "ReadDmaRetryData");
DropColumn("dbo.TestedMedias", "ReadDmaData");
DropColumn("dbo.TestedMedias", "ReadSectorsRetryData");
DropColumn("dbo.TestedMedias", "ReadSectorsData");
DropColumn("dbo.TestedMedias", "ReadLong16Data");
DropColumn("dbo.TestedMedias", "ReadLong10Data");
DropColumn("dbo.TestedMedias", "Read16Data");
DropColumn("dbo.TestedMedias", "Read12Data");
DropColumn("dbo.TestedMedias", "Read10Data");
DropColumn("dbo.TestedMedias", "Read6Data");
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -1,29 +0,0 @@
// <auto-generated />
namespace DiscImageChef.Server.Migrations
{
using System.CodeDom.Compiler;
using System.Data.Entity.Migrations;
using System.Data.Entity.Migrations.Infrastructure;
using System.Resources;
[GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
public sealed partial class AddMultisessionLeadTest : IMigrationMetadata
{
private readonly ResourceManager Resources = new ResourceManager(typeof(AddMultisessionLeadTest));
string IMigrationMetadata.Id
{
get { return "201901022133012_AddMultisessionLeadTest"; }
}
string IMigrationMetadata.Source
{
get { return null; }
}
string IMigrationMetadata.Target
{
get { return Resources.GetString("Target"); }
}
}
}

View File

@@ -1,23 +0,0 @@
using System.Data.Entity.Migrations;
namespace DiscImageChef.Server.Migrations
{
public partial class AddMultisessionLeadTest : DbMigration
{
public override void Up()
{
AddColumn("dbo.TestedMedias", "CanReadingIntersessionLeadIn", c => c.Boolean());
AddColumn("dbo.TestedMedias", "CanReadingIntersessionLeadOut", c => c.Boolean());
AddColumn("dbo.TestedMedias", "IntersessionLeadInData", c => c.Binary());
AddColumn("dbo.TestedMedias", "IntersessionLeadOutData", c => c.Binary());
}
public override void Down()
{
DropColumn("dbo.TestedMedias", "IntersessionLeadOutData");
DropColumn("dbo.TestedMedias", "IntersessionLeadInData");
DropColumn("dbo.TestedMedias", "CanReadingIntersessionLeadOut");
DropColumn("dbo.TestedMedias", "CanReadingIntersessionLeadIn");
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -1,29 +0,0 @@
// <auto-generated />
namespace DiscImageChef.Server.Migrations
{
using System.CodeDom.Compiler;
using System.Data.Entity.Migrations;
using System.Data.Entity.Migrations.Infrastructure;
using System.Resources;
[GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
public sealed partial class AddOptimalReadMultipleCount : IMigrationMetadata
{
private readonly ResourceManager Resources = new ResourceManager(typeof(AddOptimalReadMultipleCount));
string IMigrationMetadata.Id
{
get { return "201901030344456_AddOptimalReadMultipleCount"; }
}
string IMigrationMetadata.Source
{
get { return null; }
}
string IMigrationMetadata.Target
{
get { return Resources.GetString("Target"); }
}
}
}

View File

@@ -1,17 +0,0 @@
using System.Data.Entity.Migrations;
namespace DiscImageChef.Server.Migrations
{
public partial class AddOptimalReadMultipleCount : DbMigration
{
public override void Up()
{
AddColumn("dbo.Devices", "OptimalMultipleSectorsRead", c => c.Int(false, defaultValue: 0));
}
public override void Down()
{
DropColumn("dbo.Devices", "OptimalMultipleSectorsRead");
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -1,29 +0,0 @@
// <auto-generated />
namespace DiscImageChef.Server.Migrations
{
using System.CodeDom.Compiler;
using System.Data.Entity.Migrations;
using System.Data.Entity.Migrations.Infrastructure;
using System.Resources;
[GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
public sealed partial class AddChangeableScsiModes : IMigrationMetadata
{
private readonly ResourceManager Resources = new ResourceManager(typeof(AddChangeableScsiModes));
string IMigrationMetadata.Id
{
get { return "201901081359499_AddChangeableScsiModes"; }
}
string IMigrationMetadata.Source
{
get { return null; }
}
string IMigrationMetadata.Target
{
get { return Resources.GetString("Target"); }
}
}
}

View File

@@ -1,23 +0,0 @@
using System.Data.Entity.Migrations;
namespace DiscImageChef.Server.Migrations
{
public partial class AddChangeableScsiModes : DbMigration
{
public override void Up()
{
AddColumn("dbo.Scsis", "ModeSense6CurrentData", c => c.Binary());
AddColumn("dbo.Scsis", "ModeSense10CurrentData", c => c.Binary());
AddColumn("dbo.Scsis", "ModeSense6ChangeableData", c => c.Binary());
AddColumn("dbo.Scsis", "ModeSense10ChangeableData", c => c.Binary());
}
public override void Down()
{
DropColumn("dbo.Scsis", "ModeSense10ChangeableData");
DropColumn("dbo.Scsis", "ModeSense6ChangeableData");
DropColumn("dbo.Scsis", "ModeSense10CurrentData");
DropColumn("dbo.Scsis", "ModeSense6CurrentData");
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -1,29 +0,0 @@
// <auto-generated />
namespace DiscImageChef.Server.Migrations
{
using System.CodeDom.Compiler;
using System.Data.Entity.Migrations;
using System.Data.Entity.Migrations.Infrastructure;
using System.Resources;
[GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
public sealed partial class IdForDensityCode : IMigrationMetadata
{
private readonly ResourceManager Resources = new ResourceManager(typeof(IdForDensityCode));
string IMigrationMetadata.Id
{
get { return "201905252122267_IdForDensityCode"; }
}
string IMigrationMetadata.Source
{
get { return null; }
}
string IMigrationMetadata.Target
{
get { return Resources.GetString("Target"); }
}
}
}

View File

@@ -1,34 +0,0 @@
using System.Data.Entity.Migrations;
namespace DiscImageChef.Server.Migrations
{
public partial class IdForDensityCode : DbMigration
{
public override void Up()
{
RenameTable("DensityCodes", "DensityCodes_old");
CreateTable("dbo.DensityCodes",
c => new {Code = c.Int(false), SscSupportedMedia_Id = c.Int(), Id = c.Int(false, true)})
.PrimaryKey(t => t.Id).ForeignKey("dbo.SscSupportedMedias", t => t.SscSupportedMedia_Id)
.Index(t => t.SscSupportedMedia_Id);
Sql("INSERT INTO DensityCodes (Code, SscSupportedMedia_Id) SELECT Code, SscSupportedMedia_Id FROM DensityCodes_old");
DropTable("DensityCodes_old");
}
public override void Down()
{
RenameTable("DensityCodes", "DensityCodes_old");
CreateTable("dbo.DensityCodes", c => new {Code = c.Int(false, true), SscSupportedMedia_Id = c.Int()})
.PrimaryKey(t => t.Code).ForeignKey("dbo.SscSupportedMedias", t => t.SscSupportedMedia_Id)
.Index(t => t.SscSupportedMedia_Id);
Sql("INSERT INTO DensityCodes (Code, SscSupportedMedia_Id) SELECT Code, SscSupportedMedia_Id FROM DensityCodes_old");
DropTable("DensityCodes_old");
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -1,29 +0,0 @@
// <auto-generated />
namespace DiscImageChef.Server.Migrations
{
using System.CodeDom.Compiler;
using System.Data.Entity.Migrations;
using System.Data.Entity.Migrations.Infrastructure;
using System.Resources;
[GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
public sealed partial class MakeEntityFrameworkHappy : IMigrationMetadata
{
private readonly ResourceManager Resources = new ResourceManager(typeof(MakeEntityFrameworkHappy));
string IMigrationMetadata.Id
{
get { return "201905252245072_MakeEntityFrameworkHappy"; }
}
string IMigrationMetadata.Source
{
get { return null; }
}
string IMigrationMetadata.Target
{
get { return Resources.GetString("Target"); }
}
}
}

View File

@@ -1,11 +0,0 @@
using System.Data.Entity.Migrations;
namespace DiscImageChef.Server.Migrations
{
public partial class MakeEntityFrameworkHappy : DbMigration
{
public override void Up() { }
public override void Down() { }
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,53 +0,0 @@
// /***************************************************************************
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : Configuration.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : DiscImageChef Server.
//
// --[ Description ] ----------------------------------------------------------
//
// Provides database context configuration.
//
// --[ License ] --------------------------------------------------------------
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2011-2019 Natalia Portillo
// ****************************************************************************/
using System.Data.Entity.Migrations;
using DiscImageChef.Server.Models;
namespace DiscImageChef.Server.Migrations
{
public sealed class Configuration : DbMigrationsConfiguration<DicServerContext>
{
public Configuration()
{
AutomaticMigrationsEnabled = false;
}
protected override void Seed(DicServerContext context)
{
// This method will be called after migrating to the latest version.
// You can use the DbSet<T>.AddOrUpdate() helper extension method
// to avoid creating duplicate seed data.
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -63,7 +63,6 @@ namespace DiscImageChef.Server.Models
public int Id { get; set; }
public DateTime AddedWhen { get; set; }
[Index]
public DateTime ModifiedWhen { get; set; }
public virtual ICollection<Device> Devices { get; set; }
}

View File

@@ -30,12 +30,11 @@
// Copyright © 2011-2019 Natalia Portillo
// ****************************************************************************/
using System.Data.Entity;
using MySql.Data.EntityFramework;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
namespace DiscImageChef.Server.Models
{
[DbConfigurationType(typeof(MySqlEFConfiguration))]
public sealed class DicServerContext : DbContext
{
public DbSet<Device> Devices { get; set; }
@@ -52,5 +51,50 @@ namespace DiscImageChef.Server.Models
public DbSet<UsbVendor> UsbVendors { get; set; }
public DbSet<UsbProduct> UsbProducts { get; set; }
public DbSet<CompactDiscOffset> CdOffsets { get; set; }
public DicServerContext() { }
public DicServerContext(DbContextOptions<DicServerContext> options) : base(options) { }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
if(optionsBuilder.IsConfigured) return;
var builder = new ConfigurationBuilder().AddJsonFile("appsettings.json");
var configuration = builder.Build();
optionsBuilder.UseMySql(configuration.GetConnectionString("DefaultConnection"));
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<CompactDiscOffset>().HasIndex(b => b.ModifiedWhen);
modelBuilder.Entity<Device>().HasIndex(b => b.ModifiedWhen);
modelBuilder.Entity<UsbProduct>().HasIndex(b => b.ModifiedWhen);
modelBuilder.Entity<UsbProduct>().HasIndex(b => b.ProductId);
modelBuilder.Entity<UsbProduct>().HasIndex(b => b.VendorId);
modelBuilder.Entity<UsbVendor>().HasIndex(b => b.ModifiedWhen);
modelBuilder.Entity<UsbVendor>().HasIndex(b => b.VendorId).IsUnique();
}
internal static bool TableExists(string tableName)
{
using(var db = new DicServerContext())
{
var connection = db.Database.GetDbConnection();
connection.Open();
var command = connection.CreateCommand();
command.CommandText =
$"SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME=\"{tableName}\"";
var result = (long)command.ExecuteScalar();
return result != 0;
}
}
}
}

View File

@@ -64,7 +64,6 @@ namespace DiscImageChef.Server.Models
}
public DateTime AddedWhen { get; set; }
[Index]
public DateTime? ModifiedWhen { get; set; }
public virtual CompactDiscOffset CdOffset { get; set; }
[DefaultValue(0)]

View File

@@ -0,0 +1,11 @@
using System;
namespace DiscImageChef.Server.Models
{
public class ErrorViewModel
{
public string RequestId { get; set; }
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
}
}

View File

@@ -51,13 +51,10 @@ namespace DiscImageChef.Server.Models
[Key]
public int Id { get; set; }
[Index]
public int ProductId { get; set; }
public string Product { get; set; }
public DateTime AddedWhen { get; set; }
[Index]
public DateTime ModifiedWhen { get; set; }
[Index]
public int VendorId { get; set; }
[JsonIgnore]
public virtual UsbVendor Vendor { get; set; }

View File

@@ -51,11 +51,9 @@ namespace DiscImageChef.Server.Models
[Key]
public int Id { get; set; }
[Index(IsUnique = true)]
public int VendorId { get; set; }
public string Vendor { get; set; }
public DateTime AddedWhen { get; set; }
[Index]
public DateTime ModifiedWhen { get; set; }
[JsonIgnore]

View File

@@ -0,0 +1,121 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using DiscImageChef.Server.Models;
using Microsoft.AspNetCore.Hosting;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
namespace DiscImageChef.Server
{
public class Program
{
public static void Main(string[] args)
{
DateTime start;
DateTime end;
System.Console.Clear();
System.Console.Write(
"\u001b[32m . ,,\n" +
"\u001b[32m ;,. '0d.\n" +
"\u001b[32m oc oWd \u001b[31m" +
@"________/\\\\\\\\\___/\\\\\\\\\\\_________/\\\\\\\\\___/\\\\____________/\\\\_" +
"\n\u001b[0m" +
"\u001b[32m ;X. 'WN' \u001b[31m" +
@" _____/\\\////////___\/////\\\///_______/\\\////////___\/\\\\\\________/\\\\\\_" +
"\n\u001b[0m" +
"\u001b[32m oMo cMM: \u001b[31m" +
@" ___/\\\/________________\/\\\________/\\\/____________\/\\\//\\\____/\\\//\\\_" +
"\n\u001b[0m" +
"\u001b[32m ;MM. .MMM; \u001b[31m" +
@" __/\\\__________________\/\\\_______/\\\______________\/\\\\///\\\/\\\/_\/\\\_" +
"\n\u001b[0m" +
"\u001b[32m NMM WMMW \u001b[31m" +
@" _\/\\\__________________\/\\\______\/\\\______________\/\\\__\///\\\/___\/\\\_" +
"\n\u001b[0m" +
"\u001b[32m 'MMM MMMM; \u001b[31m" +
@" _\//\\\_________________\/\\\______\//\\\_____________\/\\\____\///_____\/\\\_" +
"\n\u001b[0m" +
"\u001b[32m ,MMM: dMMMM: \u001b[31m" +
@" __\///\\\_______________\/\\\_______\///\\\___________\/\\\_____________\/\\\_" +
"\n\u001b[0m" +
"\u001b[32m .MMMW. :MMMMM. \u001b[31m" +
@" ____\////\\\\\\\\\___/\\\\\\\\\\\_____\////\\\\\\\\\__\/\\\_____________\/\\\_" +
"\n\u001b[0m" +
"\u001b[32m XMMMW: .:xKNMMMMMMN0d, lMMMMMd \u001b[31m" +
@" _______\/////////___\///////////_________\/////////___\///______________\///__" +
"\n\u001b[0m" +
"\u001b[32m :MMMMMK; cWMNkl:;;;:lxKMXc .0MMMMMO\u001b[0m\n" +
"\u001b[32m ..KMMMMMMNo,. ,OMMMMMMW:,. \u001b[37;1m DiscImageChef Website\u001b[0m\n" +
"\u001b[32m .;d0NMMMMMMMMMMMMMMW0d:' .;lOWMMMMMMMMMMMMMXkl. \u001b[37;1m Version \u001b[0m\u001b[33m{0}\u001b[37;1m-\u001b[0m\u001b[31m{1}\u001b[0m\n" +
"\u001b[32m :KMMMMMMMMMMMMMMMMMMMMMMMMc WMMMMMMMMMMMMMMMMMMMMMMWk'\u001b[0m\n" +
"\u001b[32m ;NMMMMWX0kkkkO0XMMMMMMMMMMM0' dNMMMMMMMMMMW0xl:;,;:oOWMMX; \u001b[37;1m Running under \u001b[35;1m{2}\u001b[37;1m, \u001b[35m{3}-bit\u001b[37;1m in \u001b[35m{4}-bit\u001b[37;1m mode.\u001b[0m\n" +
"\u001b[32m xMMWk:. .c0MMMMMW' OMMMMMM0c'.. .oNMO \u001b[37;1m Using \u001b[33;1m{5}\u001b[37;1m version \u001b[31;1m{6}\u001b[0m\n" +
"\u001b[32m OMNc .MNc oWMMk 'WMMNl. .MMK ;KX.\u001b[0m\n" +
"\u001b[32m xMO WMN ; ., , ': ,MMx lK\u001b[0m\n" +
"\u001b[32m ,Md cMMl .XMMMWWMMMO XMW. :\u001b[0m\n" +
"\u001b[32m Ok xMMl XMMMMMMMMc 0MW,\u001b[0m\n" +
"\u001b[32m 0 oMM0' lMMMMMMMM. :NMN'\u001b[0m\n" +
"\u001b[32m . .0MMKl ;MMMMMMMM oNMWd\u001b[0m\n" +
"\u001b[32m .dNW cMMMMMMMM, XKl\u001b[0m\n" +
"\u001b[32m 0MMMMMMMMK\u001b[0m\n" +
"\u001b[32m ;MMMMMMMMMMO \u001b[37;1m Proudly presented to you by:\u001b[0m\n" +
"\u001b[32m 'WMMMMKxMMMMM0 \u001b[34;1m Natalia Portillo\u001b[0m\n" +
"\u001b[32m oMMMMNc :WMMMMN:\u001b[0m\n" +
"\u001b[32m .dWMMM0; dWMMMMXl. \u001b[37;1m Thanks to all contributors, collaborators, translators, donators and friends.\u001b[0m\n" +
"\u001b[32m .......,cd0WMMNk: c0MMMMMWKkolc:clodc'\u001b[0m\n" +
"\u001b[32m .';loddol:'. ':oxkkOkkxoc,.\u001b[0m\n" +
"\u001b[0m\n", DiscImageChef.CommonTypes.Interop.Version.GetVersion(),
#if DEBUG
"DEBUG"
#else
"RELEASE"
#endif
, DiscImageChef.CommonTypes.Interop.DetectOS.GetPlatformName(DiscImageChef.CommonTypes.Interop.DetectOS.GetRealPlatformID()),
Environment.Is64BitOperatingSystem ? 64 : 32, Environment.Is64BitProcess ? 64 : 32,
DiscImageChef.CommonTypes.Interop.DetectOS.IsMono ? "Mono" : ".NET Core",
DiscImageChef.CommonTypes.Interop.DetectOS.IsMono ? DiscImageChef.CommonTypes.Interop.Version.GetMonoVersion() : DiscImageChef.CommonTypes.Interop.Version.GetNetCoreVersion());
var host = CreateHostBuilder(args).Build();
using (var scope = host.Services.CreateScope())
{
var services = scope.ServiceProvider;
try
{
start = DateTime.Now;
System.Console.WriteLine("\u001b[31;1mUpdating database with Entity Framework...\u001b[0m");
var context = services.GetRequiredService<DicServerContext>();
context.Database.Migrate();
end = DateTime.Now;
System.Console.WriteLine("\u001b[31;1mTook \u001b[32;1m{0} seconds\u001b[31;1m...\u001b[0m",
(end - start).TotalSeconds);
}
catch(Exception ex)
{
System.Console.WriteLine("\u001b[31;1mCould not open database...\u001b[0m");
#if DEBUG
System.Console.WriteLine("\u001b[31;1mException: {0}\u001b[0m", ex.Message);
#endif
return;
}
}
System.Console.WriteLine("\u001b[31;1mStarting web server...\u001b[0m");
host.Run();
}
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup<Startup>(); });
}
}

View File

@@ -1,35 +0,0 @@
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("DiscImageChef.Server")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("DiscImageChef.Server")]
[assembly: AssemblyCopyright("Copyright © 2011-2019 Natalia Portillo")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("A893FA0E-6952-4517-B4AA-658E421737C1")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("4.5.99.1693")]
[assembly: AssemblyFileVersion("4.5.99.1693")]

View File

@@ -0,0 +1,27 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:62005",
"sslPort": 44393
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"DiscImageChef.Server": {
"commandName": "Project",
"launchBrowser": true,
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

View File

@@ -0,0 +1,64 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using DiscImageChef.Server.Models;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.HttpsPolicy;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
namespace DiscImageChef.Server
{
public class Startup
{
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}
public IConfiguration Configuration { get; }
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddDbContext<DicServerContext>(options =>
options.UseMySql(Configuration.GetConnectionString("DefaultConnection")));
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_3_0);
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseExceptionHandler("/Home/Error");
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}
//app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseRouting();
app.UseAuthorization();
app.UseEndpoints(endpoints =>
{
endpoints.MapControllerRoute(
name: "default",
pattern: "{controller=Home}/{action=Index}/{id?}");
});
}
}
}

View File

@@ -0,0 +1,25 @@
@model ErrorViewModel
@{
ViewData["Title"] = "Error";
}
<h1 class="text-danger">Error.</h1>
<h2 class="text-danger">An error occurred while processing your request.</h2>
@if (Model.ShowRequestId)
{
<p>
<strong>Request ID:</strong> <code>@Model.RequestId</code>
</p>
}
<h3>Development Mode</h3>
<p>
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
</p>
<p>
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
It can result in displaying sensitive information from exceptions to end users.
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
and restarting the app.
</p>

View File

@@ -39,16 +39,16 @@
{
// 24th January, Macintosh launch
case 24:
<link href="../../styles/mac/dicserver.css"
rel="stylesheet"type="text/css" />
<link href="../../styles/mac/dicserver_highcharts.css"
rel="stylesheet"type="text/css" />
<link href="~/css/mac/dicserver.css"
rel="stylesheet" type="text/css" />
<link href="~/css/mac/dicserver_highcharts.css"
rel="stylesheet" type="text/css" />
break;
default:
<link href="../../styles/dos/dicserver.css"
rel="stylesheet"type="text/css" />
<link href="../../styles/dos/dicserver_highcharts.css"
rel="stylesheet"type="text/css" />
<link href="~/css/dos/dicserver.css"
rel="stylesheet" type="text/css" />
<link href="~/css/dos/dicserver_highcharts.css"
rel="stylesheet" type="text/css" />
break;
}
<meta charset="utf-8" />

View File

@@ -0,0 +1,2 @@
<script src="~/lib/jquery-validation/dist/jquery.validate.min.js"></script>
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js"></script>

View File

@@ -657,7 +657,7 @@
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
@{
string highChartsTitleColor;
/* string highChartsTitleColor;
string highChartsDataLabelColor;
switch(DateTime.UtcNow.DayOfYear)
@@ -703,4 +703,5 @@
@(Html.Highsoft().GetHighcharts(new Highcharts {Chart = new Chart {PlotBackgroundColor = null, PlotBorderWidth = null, PlotShadow = new Shadow {Enabled = true}}, Title = new Title {Text = "Devices found by bus", Style = highChartsTitleStyle}, Tooltip = new Tooltip {PointFormat = "{series.name}: <b>{point.percentage:.1f}%</b>"}, PlotOptions = new PlotOptions {Pie = new PlotOptionsPie {AllowPointSelect = true, Cursor = PlotOptionsPieCursor.Pointer, DataLabels = new PlotOptionsPieDataLabels {Style = highChartsDataLabelStyle, Enabled = true, Format = "<b>{point.name}</b>: {point.percentage:.1f} %"}}}, Series = new List<Series> {new PieSeries {Name = "Percentage:", Data = ViewData["devicesBusPieData"] as List<PieSeriesData>}}}, "devicesBusChart", false))
@(Html.Highsoft().GetHighcharts(new Highcharts {Chart = new Chart {PlotBackgroundColor = null, PlotBorderWidth = null, PlotShadow = new Shadow {Enabled = true}}, Title = new Title {Text = "Devices found by manufacturer", Style = highChartsTitleStyle}, Tooltip = new Tooltip {PointFormat = "{series.name}: <b>{point.percentage:.1f}%</b>"}, PlotOptions = new PlotOptions {Pie = new PlotOptionsPie {AllowPointSelect = true, Cursor = PlotOptionsPieCursor.Pointer, DataLabels = new PlotOptionsPieDataLabels {Style = highChartsDataLabelStyle, Enabled = true, Format = "<b>{point.name}</b>: {point.percentage:.1f} %"}}}, Series = new List<Series> {new PieSeries {Name = "Percentage:", Data = ViewData["devicesManufacturerPieData"] as List<PieSeriesData>}}}, "devicesManufacturerChart", false))
*/
}

View File

@@ -1,43 +0,0 @@
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
</sectionGroup>
</configSections>
<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<pages pageBaseType="System.Web.Mvc.WebViewPage">
<namespaces>
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Optimization"/>
<add namespace="System.Web.Routing" />
<add namespace="DiscImageChef.Server" />
</namespaces>
</pages>
</system.web.webPages.razor>
<appSettings>
<add key="webpages:Enabled" value="false" />
</appSettings>
<system.webServer>
<handlers>
<remove name="BlockViewHandler"/>
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
</handlers>
</system.webServer>
<system.web>
<compilation>
<assemblies>
<add assembly="System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</assemblies>
</compilation>
</system.web>
</configuration>

View File

@@ -0,0 +1,3 @@
@using DiscImageChef.Server
@using DiscImageChef.Server.Models
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

View File

@@ -0,0 +1,3 @@
@{
Layout = "_Layout";
}

View File

@@ -1,30 +0,0 @@
<?xml version="1.0"?>
<!-- For more information on using Web.config transformation visit https://go.microsoft.com/fwlink/?LinkId=301874 -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<!--
In the example below, the "SetAttributes" transform will change the value of
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
finds an attribute "name" that has a value of "MyDB".
<connectionStrings>
<add name="MyDB"
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
</connectionStrings>
-->
<system.web>
<!--
In the example below, the "Replace" transform will replace the entire
<customErrors> section of your Web.config file.
Note that because there is only one customErrors section under the
<system.web> node, there is no need to use the "xdt:Locator" attribute.
<customErrors defaultRedirect="GenericError.htm"
mode="RemoteOnly" xdt:Transform="Replace">
<error statusCode="500" redirect="InternalError.htm"/>
</customErrors>
-->
</system.web>
</configuration>

View File

@@ -1,31 +0,0 @@
<?xml version="1.0"?>
<!-- For more information on using Web.config transformation visit https://go.microsoft.com/fwlink/?LinkId=301874 -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<!--
In the example below, the "SetAttributes" transform will change the value of
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
finds an attribute "name" that has a value of "MyDB".
<connectionStrings>
<add name="MyDB"
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
</connectionStrings>
-->
<system.web>
<compilation xdt:Transform="RemoveAttributes(debug)" />
<!--
In the example below, the "Replace" transform will replace the entire
<customErrors> section of your Web.config file.
Note that because there is only one customErrors section under the
<system.web> node, there is no need to use the "xdt:Locator" attribute.
<customErrors defaultRedirect="GenericError.htm"
mode="RemoteOnly" xdt:Transform="Replace">
<error statusCode="500" redirect="InternalError.htm"/>
</customErrors>
-->
</system.web>
</configuration>

View File

@@ -1,98 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
https://go.microsoft.com/fwlink/?LinkId=301879
-->
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<connectionStrings>
<add name="DicServerContext" connectionString="server=localhost;port=3306;database=discimagechef;uid=dic;password=dicpass" providerName="MySql.Data.MySqlClient" />
</connectionStrings>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<providers>
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.EntityFramework" />
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework> <appSettings>
<add key="webpages:Version" value="3.0.0.0" />
<add key="webpages:Enabled" value="false" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.6.1" />
<httpRuntime targetFramework="4.6.1" />
</system.web>
<system.webServer>
<handlers>
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
<remove name="OPTIONSVerbHandler" />
<remove name="TRACEVerbHandler" />
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
</handlers>
<modules>
<remove name="TelemetryCorrelationHttpModule" />
<add name="TelemetryCorrelationHttpModule" type="Microsoft.AspNet.TelemetryCorrelation.TelemetryCorrelationHttpModule, Microsoft.AspNet.TelemetryCorrelation" preCondition="integratedMode,managedHandler" />
</modules>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606e9261f" />
<bindingRedirect oldVersion="0.0.0.0-3.5.0.2" newVersion="3.5.0.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.1" newVersion="4.0.3.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" />
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="BouncyCastle.Crypto" publicKeyToken="0e99375e54769942" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.8.5.0" newVersion="1.8.5.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Google.Protobuf" publicKeyToken="a7d26565bac4d604" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.7.0.0" newVersion="3.7.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<system.data>
<DbProviderFactories>
<remove invariant="MySql.Data.MySqlClient" />
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=8.0.13.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
</system.data>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" />
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+" />
</compilers>
</system.codedom>
</configuration>

View File

@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Microsoft": "Information"
}
}
}

View File

@@ -0,0 +1,13 @@
{
"ConnectionStrings": {
"DefaultConnection": "server=localhost;port=3306;database=discimagechef;uid=dic;password=dicpass"
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*"
}

View File

@@ -1 +0,0 @@
IndexIgnore *

View File

@@ -1,12 +0,0 @@
{
"requires": true,
"lockfileVersion": 1,
"dependencies": {
"bootstrap": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.2.1.tgz",
"integrity": "sha512-tt/7vIv3Gm2mnd/WeDx36nfGGHleil0Wg8IeB7eMrVkY0fZ5iTaBisSh8oNANc2IBsCc6vCgCNTIM/IEN0+50Q==",
"dev": true
}
}
}

View File

@@ -1,5 +0,0 @@
{
"devDependencies": {
"bootstrap": "4.2.1"
}
}

View File

@@ -1,35 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Antlr" version="3.5.0.2" targetFramework="net461" />
<package id="BouncyCastle" version="1.8.5" targetFramework="net461" />
<package id="ChoPGP" version="1.0.1.2" targetFramework="net461" />
<package id="EntityFramework" version="6.2.0" targetFramework="net461" />
<package id="Google.Protobuf" version="3.9.1" targetFramework="net461" />
<package id="Highsoft.Highcharts" version="7.1.3.1" targetFramework="net461" />
<package id="MailKit" version="2.3.1.6" targetFramework="net461" />
<package id="Markdig" version="0.17.1" targetFramework="net461" />
<package id="Microsoft.AspNet.Mvc" version="5.2.7" targetFramework="net461" />
<package id="Microsoft.AspNet.Razor" version="3.2.7" targetFramework="net461" />
<package id="Microsoft.AspNet.TelemetryCorrelation" version="1.0.5" targetFramework="net461" />
<package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetFramework="net461" />
<package id="Microsoft.AspNet.WebApi" version="5.2.7" targetFramework="net461" />
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.7" targetFramework="net461" />
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.7" targetFramework="net461" />
<package id="Microsoft.AspNet.WebApi.HelpPage" version="5.2.7" targetFramework="net461" />
<package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.7" targetFramework="net461" />
<package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net461" />
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.1" targetFramework="net461" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net461" />
<package id="MimeKit" version="2.3.1" targetFramework="net461" />
<package id="MySql.Data" version="8.0.17" targetFramework="net461" />
<package id="MySql.Data.EntityFramework" version="8.0.17" targetFramework="net461" />
<package id="Newtonsoft.Json" version="12.0.2" targetFramework="net461" />
<package id="SSH.NET" version="2016.1.0" targetFramework="net461" />
<package id="System.Configuration.ConfigurationManager" version="4.5.0" targetFramework="net461" />
<package id="System.Diagnostics.DiagnosticSource" version="4.5.1" targetFramework="net461" />
<package id="System.Security.AccessControl" version="4.5.0" targetFramework="net461" />
<package id="System.Security.Permissions" version="4.5.0" targetFramework="net461" />
<package id="System.Security.Principal.Windows" version="4.5.0" targetFramework="net461" />
<package id="Unclassified.NetRevisionTask" version="0.2.5" targetFramework="net461" developmentDependency="true" />
<package id="WebGrease" version="1.6.0" targetFramework="net461" />
</packages>

Some files were not shown because too many files have changed in this diff Show More