diff options
| author | Mirta <mirta@twine-s.com> | 2020-11-23 16:13:53 +0200 |
|---|---|---|
| committer | Mirta <mirta@twine-s.com> | 2020-11-23 16:13:53 +0200 |
| commit | 91c007adced573e09b77ab4be4a5aba623a816cc (patch) | |
| tree | 250221fc2def7d59f1393be8394f766faf576656 /Software/Visual_Studio/DataStore | |
| parent | 4e9af2b852eb3b9eecfa09e9bc76869558e183cb (diff) | |
| parent | 50a3c0b857b4aa88a9e3970d69256f12b5b24eb8 (diff) | |
| download | Tango-91c007adced573e09b77ab4be4a5aba623a816cc.tar.gz Tango-91c007adced573e09b77ab4be4a5aba623a816cc.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/DataStore')
81 files changed, 6926 insertions, 0 deletions
diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/App.config b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/App.config new file mode 100644 index 000000000..f850936a4 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/App.config @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="utf-8"?> +<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> + <startup> + <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /> + </startup> + <entityFramework> + <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" /> + <providers> + <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /> + </providers> + </entityFramework> + <runtime> + <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> + <dependentAssembly> + <assemblyIdentity name="Microsoft.IdentityModel.Clients.ActiveDirectory" publicKeyToken="31bf3856ad364e35" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-5.0.5.0" newVersion="5.0.5.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="Z.EntityFramework.Extensions" publicKeyToken="59b66d028979105b" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.50.0" newVersion="4.0.50.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="Microsoft.Data.Services.Client" publicKeyToken="31bf3856ad364e35" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31bf3856ad364e35" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31bf3856ad364e35" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Reactive.Core" publicKeyToken="94bc3704cddfc263" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-3.0.3000.0" newVersion="3.0.3000.0" /> + </dependentAssembly> + </assemblyBinding> + </runtime> +</configuration>
\ No newline at end of file diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/DataStoreUtil.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/DataStoreUtil.cs new file mode 100644 index 000000000..b18476e3f --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/DataStoreUtil.cs @@ -0,0 +1,131 @@ +using ConsoleTables; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Http; +using System.Text; +using System.Threading.Tasks; +using Tango.Core.Cryptography; +using Tango.DataStore.Web; +using Tango.Settings; +using Tango.Web; + +namespace Tango.DataStore.CLI +{ + public class DataStoreConsole + { + public void Get(GetOptions options) + { + try + { + ApplyAutoLogin(options); + + if (options.MachineSerialNumber != null) + { + Console.WriteLine($"Retrieving data store values for '{options.MachineSerialNumber}'..."); + } + else + { + Console.WriteLine("Retrieving global data store values..."); + } + + var client = CreateClient(options.Email, options.Password, options.Environment); + + var items = client.Get(options.MachineSerialNumber, options.Collection, options.Key).ToList(); + + ConsoleTable table = new ConsoleTable("COLLECTION", "KEY", "DATA TYPE", "PROTO TYPE", "STATE", "GLOBAL", "LOCAL"); + + foreach (var item in items) + { + table.AddRow(item.Collection, item.Key, item.DataType, item.ProtoMessageType != MessageType.None ? item.ProtoMessageType.ToString() : null, item.Type, item.GlobalValue.ToStringSafe().ToOneLine(), item.LocalValue.ToStringSafe().ToOneLine()); + } + + Console.WriteLine(); + Console.WriteLine("DATA STORE RESULTS:"); + Console.WriteLine(); + + table.Write(); + } + catch (Exception ex) + { + Console.WriteLine(ex.FlattenMessage()); + } + } + + public void Put(PutOptions options) + { + try + { + ApplyAutoLogin(options); + + if (options.MachineSerialNumber != null) + { + Console.WriteLine($"Storing data store value for '{options.MachineSerialNumber}'..."); + } + else + { + Console.WriteLine("Storing global data store value..."); + } + + var client = CreateClient(options.Email, options.Password, options.Environment); + + if (options.DataType == Web.DataType.Proto) + { + options.Value = options.Value.ToStringOrEmpty().Replace("'", "\""); + } + + client.Put(new DataStoreWebPutItem() + { + Collection = options.Collection, + Key = options.Key, + DataType = options.DataType, + MachineSerialNumber = options.MachineSerialNumber, + ProtoMessageType = options.ProtoMessageType, + Value = options.Value + }); + + Console.WriteLine($"Item '{options.Key}' stored successfully."); + } + catch (Exception ex) + { + Console.WriteLine(ex.FlattenMessage()); + } + } + + public void AutoLogin(LoginConfig options) + { + MachineLevelCryptographer crypt = new MachineLevelCryptographer(); + var settings = SettingsManager.Default.GetOrCreate<DataStoreUtilSettings>(); + settings.Email = options.Email; + settings.Password = crypt.Encrypt(options.Password); + settings.Save(); + } + + private void ApplyAutoLogin(OptionsBase options) + { + if (options.Email == null && options.Password == null) + { + MachineLevelCryptographer crypt = new MachineLevelCryptographer(); + var settings = SettingsManager.Default.GetOrCreate<DataStoreUtilSettings>(); + options.Email = settings.Email; + options.Password = crypt.Decrypt(settings.Password); + } + } + + private DataStoreClient CreateClient(String email, String password, DeploymentSlot slot) + { + String token = String.Empty; + + HttpClient http = new HttpClient(); + DataStoreClient dsClient = new DataStoreClient(slot.ToAddress(), http); + var response = dsClient.Login(new LoginRequest() + { + Email = email, + Password = password, + }); + http.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", response.Token); + + return dsClient; + } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/DataStoreUtilSettings.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/DataStoreUtilSettings.cs new file mode 100644 index 000000000..58380d231 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/DataStoreUtilSettings.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Settings; + +namespace Tango.DataStore.CLI +{ + public class DataStoreUtilSettings : SettingsBase + { + public String Email { get; set; } + public String Password { get; set; } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Options.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Options.cs new file mode 100644 index 000000000..fd91a5722 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Options.cs @@ -0,0 +1,68 @@ +using CommandLine; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.DataStore.Web; +using Tango.Web; + +namespace Tango.DataStore.CLI +{ + public class OptionsBase + { + [Option(longName: "email", HelpText = "Email address.")] + public String Email { get; set; } + + [Option(longName: "password", HelpText = "Password.")] + public String Password { get; set; } + + [Option(longName: "env", HelpText = "The target environment.", Required = true)] + public DeploymentSlot Environment { get; set; } + } + + [Verb("get", HelpText = "Get a data store item.")] + public class GetOptions : OptionsBase + { + [Option(longName: "sn", HelpText = "Machine serial number. if not specified will return only global values.")] + public String MachineSerialNumber { get; set; } + + [Option(longName: "collection", HelpText = "Collection name.\nIf not specified will return all collections.\nIf 'key' if specified the 'collection' must be specified.")] + public String Collection { get; set; } + + [Option(longName: "key", HelpText = "Item key. If not specified will return the entire collection.")] + public String Key { get; set; } + } + + [Verb("put", HelpText = "Put a new, or update an existing data store item.")] + public class PutOptions : OptionsBase + { + [Option(longName: "sn", HelpText = "Machine serial number. If not specified will put a value on the global data store.")] + public String MachineSerialNumber { get; set; } + + [Option(longName: "collection", HelpText = "New or existing collection name.", Required = true)] + public String Collection { get; set; } + + [Option(longName: "key", HelpText = "New or existing item key", Required = true)] + public String Key { get; set; } + + [Option(longName: "data-type", HelpText = "Item data type", Required = true)] + public Web.DataType DataType { get; set; } + + [Option(longName: "proto-type", HelpText = "Protobuf message type when data-type is 'Proto'.")] + public MessageType ProtoMessageType { get; set; } + + [Option(longName: "value", HelpText = "Item value", Required = true)] + public String Value { get; set; } + } + + [Verb("login-config", HelpText = "Stores the specified credentials for use with the --auto-login flag.")] + public class LoginConfig + { + [Option(longName: "email", HelpText = "Email address.")] + public String Email { get; set; } + + [Option(longName: "password", HelpText = "Password.")] + public String Password { get; set; } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Program.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Program.cs new file mode 100644 index 000000000..85dfbb0bb --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Program.cs @@ -0,0 +1,48 @@ +using CommandLine; +using ConsoleTables; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Net.Http; +using System.Text; +using System.Threading.Tasks; +using Tango.BL; +using Tango.DataStore.Web; +using Tango.Web; + +namespace Tango.DataStore.CLI +{ + class Program + { + static void Main(string[] args) + { + var console = new DataStoreConsole(); + + var result = Parser.Default.ParseArguments<GetOptions, PutOptions, LoginConfig>(args) + .WithParsed<GetOptions>((options) => + { + console.Get(options); + }) + .WithParsed<PutOptions>((options) => + { + console.Put(options); + }) + .WithParsed<LoginConfig>((options) => + { + console.AutoLogin(options); + }) + .WithNotParsed((errors) => + { + + }); + + if (Debugger.IsAttached) + { + Console.WriteLine(); + Console.WriteLine("Press return to exit..."); + Console.ReadLine(); + } + } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..366b8e28e --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +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("Tango.DataStore.CLI")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Tango.DataStore.CLI")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[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("6189b8c3-7af9-43dd-8a61-a8a05f526f62")] + +// 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("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Tango.DataStore.CLI.csproj b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Tango.DataStore.CLI.csproj new file mode 100644 index 000000000..42b0b95dc --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Tango.DataStore.CLI.csproj @@ -0,0 +1,114 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{6189B8C3-7AF9-43DD-8A61-A8A05F526F62}</ProjectGuid> + <OutputType>Exe</OutputType> + <RootNamespace>Tango.DataStore.CLI</RootNamespace> + <AssemblyName>dsUtil</AssemblyName> + <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> + <Deterministic>true</Deterministic> + </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> + <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> + <ItemGroup> + <Reference Include="CommandLine, Version=2.8.0.0, Culture=neutral, PublicKeyToken=5a870481e358d379, processorArchitecture=MSIL"> + <HintPath>..\..\packages\CommandLineParser.2.8.0\lib\net461\CommandLine.dll</HintPath> + </Reference> + <Reference Include="ConsoleTables, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL"> + <HintPath>..\..\packages\ConsoleTables.2.4.2\lib\net40\ConsoleTables.dll</HintPath> + </Reference> + <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> + <HintPath>..\..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath> + </Reference> + <Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> + <HintPath>..\..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath> + </Reference> + <Reference Include="Google.Protobuf, Version=3.4.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL"> + <HintPath>..\..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll</HintPath> + </Reference> + <Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> + <HintPath>..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.ComponentModel.DataAnnotations" /> + <Reference Include="System.Core" /> + <Reference Include="System.Runtime.Serialization" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Data" /> + <Reference Include="System.Net.Http" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="DataStoreUtil.cs" /> + <Compile Include="DataStoreUtilSettings.cs" /> + <Compile Include="Options.cs" /> + <Compile Include="Program.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="Web\DataStoreClient.cs" /> + </ItemGroup> + <ItemGroup> + <None Include="App.config" /> + <None Include="packages.config" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\Tango.BL\Tango.BL.csproj"> + <Project>{F441FEEE-322A-4943-B566-110E12FD3B72}</Project> + <Name>Tango.BL</Name> + </ProjectReference> + <ProjectReference Include="..\..\Tango.Core\Tango.Core.csproj"> + <Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project> + <Name>Tango.Core</Name> + </ProjectReference> + <ProjectReference Include="..\..\Tango.PMR\Tango.PMR.csproj"> + <Project>{e4927038-348d-4295-aaf4-861c58cb3943}</Project> + <Name>Tango.PMR</Name> + </ProjectReference> + <ProjectReference Include="..\..\Tango.Settings\Tango.Settings.csproj"> + <Project>{d8f1ad85-526a-4f50-b6dc-d437af63d8d8}</Project> + <Name>Tango.Settings</Name> + </ProjectReference> + <ProjectReference Include="..\..\Tango.Web\Tango.Web.csproj"> + <Project>{5001990f-977b-48ff-b217-0236a5022ad8}</Project> + <Name>Tango.Web</Name> + </ProjectReference> + <ProjectReference Include="..\Tango.DataStore.EF\Tango.DataStore.EF.csproj"> + <Project>{88d9906b-8fc4-4fe0-b7eb-127a0a8fcee4}</Project> + <Name>Tango.DataStore.EF</Name> + </ProjectReference> + <ProjectReference Include="..\Tango.DataStore\Tango.DataStore.csproj"> + <Project>{e0364dfa-0721-4637-9d32-9d22aac109d6}</Project> + <Name>Tango.DataStore</Name> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <Folder Include="Options\" /> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <PropertyGroup> + <PreBuildEvent>REM nswag run "$(SolutionDir)Web\Tango.MachineService\Nswag\DataStoreClient.nswag" /variables:assembly="$(SolutionDir)Web\Tango.MachineService\bin\Tango.MachineService.dll",output="$(ProjectDir)Web\DataStoreClient.cs"</PreBuildEvent> + </PropertyGroup> +</Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Web/DataStoreClient.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Web/DataStoreClient.cs new file mode 100644 index 000000000..cf280284f --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Web/DataStoreClient.cs @@ -0,0 +1,3766 @@ +//---------------------- +// <auto-generated> +// Generated using the NSwag toolchain v13.2.3.0 (NJsonSchema v10.1.5.0 (Newtonsoft.Json v11.0.0.0)) (http://NSwag.org) +// </auto-generated> +//---------------------- + +#pragma warning disable 108 // Disable "CS0108 '{derivedDto}.ToJson()' hides inherited member '{dtoBase}.ToJson()'. Use the new keyword if hiding was intended." +#pragma warning disable 114 // Disable "CS0114 '{derivedDto}.RaisePropertyChanged(String)' hides inherited member 'dtoBase.RaisePropertyChanged(String)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword." +#pragma warning disable 472 // Disable "CS0472 The result of the expression is always 'false' since a value of type 'Int32' is never equal to 'null' of type 'Int32?' +#pragma warning disable 1573 // Disable "CS1573 Parameter '...' has no matching param tag in the XML comment for ... +#pragma warning disable 1591 // Disable "CS1591 Missing XML comment for publicly visible type or member ..." + +namespace Tango.DataStore.Web +{ + using System = global::System; + + [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.2.3.0 (NJsonSchema v10.1.5.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class DataStoreClient + { + private string _baseUrl = ""; + private System.Net.Http.HttpClient _httpClient; + private System.Lazy<Newtonsoft.Json.JsonSerializerSettings> _settings; + + public DataStoreClient(string baseUrl, System.Net.Http.HttpClient httpClient) + { + BaseUrl = baseUrl; + _httpClient = httpClient; + _settings = new System.Lazy<Newtonsoft.Json.JsonSerializerSettings>(CreateSerializerSettings); + } + + private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() + { + var settings = new Newtonsoft.Json.JsonSerializerSettings(); + UpdateJsonSerializerSettings(settings); + return settings; + } + + public string BaseUrl + { + get { return _baseUrl; } + set { _baseUrl = value; } + } + + protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } + + partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); + partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); + partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); + partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); + + /// <exception cref="ApiException">A server side error occurred.</exception> + public System.Threading.Tasks.Task<LoginResponse> LoginAsync(LoginRequest request) + { + return LoginAsync(request, System.Threading.CancellationToken.None); + } + + /// <exception cref="ApiException">A server side error occurred.</exception> + public LoginResponse Login(LoginRequest request) + { + return System.Threading.Tasks.Task.Run(async () => await LoginAsync(request, System.Threading.CancellationToken.None)).GetAwaiter().GetResult(); + } + + /// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param> + /// <exception cref="ApiException">A server side error occurred.</exception> + public async System.Threading.Tasks.Task<LoginResponse> LoginAsync(LoginRequest request, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/DataStore/Login"); + + var client_ = _httpClient; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(request, _settings.Value)); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + PrepareRequest(client_, request_, urlBuilder_); + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = ((int)response_.StatusCode).ToString(); + if (status_ == "200") + { + var objectResponse_ = await ReadObjectResponseAsync<LoginResponse>(response_, headers_).ConfigureAwait(false); + return objectResponse_.Object; + } + else + if (status_ != "200" && status_ != "204") + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + (int)response_.StatusCode + ").", (int)response_.StatusCode, responseData_, headers_, null); + } + + return default(LoginResponse); + } + finally + { + if (response_ != null) + response_.Dispose(); + } + } + } + finally + { + } + } + + /// <exception cref="ApiException">A server side error occurred.</exception> + public System.Threading.Tasks.Task<System.Collections.Generic.ICollection<DataStoreWebItem>> GetAsync(string sn, string collection, string key) + { + return GetAsync(sn, collection, key, System.Threading.CancellationToken.None); + } + + /// <exception cref="ApiException">A server side error occurred.</exception> + public System.Collections.Generic.ICollection<DataStoreWebItem> Get(string sn, string collection, string key) + { + return System.Threading.Tasks.Task.Run(async () => await GetAsync(sn, collection, key, System.Threading.CancellationToken.None)).GetAwaiter().GetResult(); + } + + /// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param> + /// <exception cref="ApiException">A server side error occurred.</exception> + public async System.Threading.Tasks.Task<System.Collections.Generic.ICollection<DataStoreWebItem>> GetAsync(string sn, string collection, string key, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/DataStore/Get?"); + if (sn != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("sn") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sn, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); + } + if (collection != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("collection") + "=").Append(System.Uri.EscapeDataString(ConvertToString(collection, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); + } + if (key != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("key") + "=").Append(System.Uri.EscapeDataString(ConvertToString(key, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); + } + urlBuilder_.Length--; + + var client_ = _httpClient; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + PrepareRequest(client_, request_, urlBuilder_); + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = ((int)response_.StatusCode).ToString(); + if (status_ == "200") + { + var objectResponse_ = await ReadObjectResponseAsync<System.Collections.Generic.ICollection<DataStoreWebItem>>(response_, headers_).ConfigureAwait(false); + return objectResponse_.Object; + } + else + if (status_ != "200" && status_ != "204") + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + (int)response_.StatusCode + ").", (int)response_.StatusCode, responseData_, headers_, null); + } + + return default(System.Collections.Generic.ICollection<DataStoreWebItem>); + } + finally + { + if (response_ != null) + response_.Dispose(); + } + } + } + finally + { + } + } + + /// <exception cref="ApiException">A server side error occurred.</exception> + public System.Threading.Tasks.Task PutAsync(DataStoreWebPutItem item) + { + return PutAsync(item, System.Threading.CancellationToken.None); + } + + /// <exception cref="ApiException">A server side error occurred.</exception> + public void Put(DataStoreWebPutItem item) + { + System.Threading.Tasks.Task.Run(async () => await PutAsync(item, System.Threading.CancellationToken.None)).GetAwaiter().GetResult(); + } + + /// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param> + /// <exception cref="ApiException">A server side error occurred.</exception> + public async System.Threading.Tasks.Task PutAsync(DataStoreWebPutItem item, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/DataStore/Put"); + + var client_ = _httpClient; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(item, _settings.Value)); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("PUT"); + + PrepareRequest(client_, request_, urlBuilder_); + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = ((int)response_.StatusCode).ToString(); + if (status_ == "204") + { + return; + } + else + if (status_ != "200" && status_ != "204") + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + (int)response_.StatusCode + ").", (int)response_.StatusCode, responseData_, headers_, null); + } + } + finally + { + if (response_ != null) + response_.Dispose(); + } + } + } + finally + { + } + } + + /// <exception cref="ApiException">A server side error occurred.</exception> + public System.Threading.Tasks.Task<FileResponse> ExecuteAsync(HttpControllerContext context) + { + return ExecuteAsync(context, System.Threading.CancellationToken.None); + } + + /// <exception cref="ApiException">A server side error occurred.</exception> + public FileResponse Execute(HttpControllerContext context) + { + return System.Threading.Tasks.Task.Run(async () => await ExecuteAsync(context, System.Threading.CancellationToken.None)).GetAwaiter().GetResult(); + } + + /// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param> + /// <exception cref="ApiException">A server side error occurred.</exception> + public async System.Threading.Tasks.Task<FileResponse> ExecuteAsync(HttpControllerContext context, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/DataStore/Execute"); + + var client_ = _httpClient; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(context, _settings.Value)); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + PrepareRequest(client_, request_, urlBuilder_); + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = ((int)response_.StatusCode).ToString(); + if (status_ == "200" || status_ == "206") + { + var responseStream_ = response_.Content == null ? System.IO.Stream.Null : await response_.Content.ReadAsStreamAsync().ConfigureAwait(false); + var fileResponse_ = new FileResponse((int)response_.StatusCode, headers_, responseStream_, null, response_); + client_ = null; response_ = null; // response and client are disposed by FileResponse + return fileResponse_; + } + else + if (status_ != "200" && status_ != "204") + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + (int)response_.StatusCode + ").", (int)response_.StatusCode, responseData_, headers_, null); + } + + return default(FileResponse); + } + finally + { + if (response_ != null) + response_.Dispose(); + } + } + } + finally + { + } + } + + protected struct ObjectResponseResult<T> + { + public ObjectResponseResult(T responseObject, string responseText) + { + this.Object = responseObject; + this.Text = responseText; + } + + public T Object { get; } + + public string Text { get; } + } + + public bool ReadResponseAsString { get; set; } + + protected virtual async System.Threading.Tasks.Task<ObjectResponseResult<T>> ReadObjectResponseAsync<T>(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> headers) + { + if (response == null || response.Content == null) + { + return new ObjectResponseResult<T>(default(T), string.Empty); + } + + if (ReadResponseAsString) + { + var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject<T>(responseText, JsonSerializerSettings); + return new ObjectResponseResult<T>(typedBody, responseText); + } + catch (Newtonsoft.Json.JsonException exception) + { + var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; + throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); + } + } + else + { + try + { + using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) + using (var streamReader = new System.IO.StreamReader(responseStream)) + using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) + { + var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); + var typedBody = serializer.Deserialize<T>(jsonTextReader); + return new ObjectResponseResult<T>(typedBody, string.Empty); + } + } + catch (Newtonsoft.Json.JsonException exception) + { + var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; + throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); + } + } + } + + private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) + { + if (value is System.Enum) + { + string name = System.Enum.GetName(value.GetType(), value); + if (name != null) + { + var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); + if (field != null) + { + var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) + as System.Runtime.Serialization.EnumMemberAttribute; + if (attribute != null) + { + return attribute.Value != null ? attribute.Value : name; + } + } + } + } + else if (value is bool) { + return System.Convert.ToString(value, cultureInfo).ToLowerInvariant(); + } + else if (value is byte[]) + { + return System.Convert.ToBase64String((byte[]) value); + } + else if (value != null && value.GetType().IsArray) + { + var array = System.Linq.Enumerable.OfType<object>((System.Array) value); + return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); + } + + return System.Convert.ToString(value, cultureInfo); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class LoginResponse + { + [Newtonsoft.Json.JsonProperty("Token", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Token { get; set; } + + [Newtonsoft.Json.JsonProperty("ExpirationUTC", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public System.DateTimeOffset ExpirationUTC { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class LoginRequest + { + [Newtonsoft.Json.JsonProperty("Email", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Email { get; set; } + + [Newtonsoft.Json.JsonProperty("Password", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Password { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class DataStoreWebItem + { + [Newtonsoft.Json.JsonProperty("Collection", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Collection { get; set; } + + [Newtonsoft.Json.JsonProperty("Type", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public DataStoreWebItemType Type { get; set; } + + [Newtonsoft.Json.JsonProperty("Date", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public System.DateTimeOffset Date { get; set; } + + [Newtonsoft.Json.JsonProperty("Key", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Key { get; set; } + + [Newtonsoft.Json.JsonProperty("DataType", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public DataType DataType { get; set; } + + [Newtonsoft.Json.JsonProperty("ProtoMessageType", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public MessageType ProtoMessageType { get; set; } + + [Newtonsoft.Json.JsonProperty("LocalValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public object LocalValue { get; set; } + + [Newtonsoft.Json.JsonProperty("GlobalValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public object GlobalValue { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum DataStoreWebItemType + { + [System.Runtime.Serialization.EnumMember(Value = @"Local")] + Local = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"Global")] + Global = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"Overrides")] + Overrides = 2, + + } + + /// <summary>Represents a data store item type.</summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum DataType + { + [System.Runtime.Serialization.EnumMember(Value = @"Int32")] + Int32 = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"Float")] + Float = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"Double")] + Double = 2, + + [System.Runtime.Serialization.EnumMember(Value = @"Boolean")] + Boolean = 3, + + [System.Runtime.Serialization.EnumMember(Value = @"String")] + String = 4, + + [System.Runtime.Serialization.EnumMember(Value = @"Bytes")] + Bytes = 5, + + [System.Runtime.Serialization.EnumMember(Value = @"Proto")] + Proto = 6, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum MessageType + { + [System.Runtime.Serialization.EnumMember(Value = @"None")] + None = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"ErrorResponse")] + ErrorResponse = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"CalculateRequest")] + CalculateRequest = 2, + + [System.Runtime.Serialization.EnumMember(Value = @"CalculateResponse")] + CalculateResponse = 3, + + [System.Runtime.Serialization.EnumMember(Value = @"ProgressRequest")] + ProgressRequest = 4, + + [System.Runtime.Serialization.EnumMember(Value = @"ProgressResponse")] + ProgressResponse = 5, + + [System.Runtime.Serialization.EnumMember(Value = @"StubCartridgeReadRequest")] + StubCartridgeReadRequest = 6, + + [System.Runtime.Serialization.EnumMember(Value = @"StubCartridgeReadResponse")] + StubCartridgeReadResponse = 7, + + [System.Runtime.Serialization.EnumMember(Value = @"StubCartridgeWriteRequest")] + StubCartridgeWriteRequest = 8, + + [System.Runtime.Serialization.EnumMember(Value = @"StubCartridgeWriteResponse")] + StubCartridgeWriteResponse = 9, + + [System.Runtime.Serialization.EnumMember(Value = @"StubDispenserRequest")] + StubDispenserRequest = 10, + + [System.Runtime.Serialization.EnumMember(Value = @"StubDispenserResponse")] + StubDispenserResponse = 11, + + [System.Runtime.Serialization.EnumMember(Value = @"StubGpioinputSetupRequest")] + StubGpioinputSetupRequest = 12, + + [System.Runtime.Serialization.EnumMember(Value = @"StubGpioinputSetupResponse")] + StubGpioinputSetupResponse = 13, + + [System.Runtime.Serialization.EnumMember(Value = @"StubGpioreadBitRequest")] + StubGpioreadBitRequest = 14, + + [System.Runtime.Serialization.EnumMember(Value = @"StubGpioreadBitResponse")] + StubGpioreadBitResponse = 15, + + [System.Runtime.Serialization.EnumMember(Value = @"StubGpioreadByteRequest")] + StubGpioreadByteRequest = 16, + + [System.Runtime.Serialization.EnumMember(Value = @"StubGpioreadByteResponse")] + StubGpioreadByteResponse = 17, + + [System.Runtime.Serialization.EnumMember(Value = @"StubGpiowriteBitRequest")] + StubGpiowriteBitRequest = 18, + + [System.Runtime.Serialization.EnumMember(Value = @"StubGpiowriteBitResponse")] + StubGpiowriteBitResponse = 19, + + [System.Runtime.Serialization.EnumMember(Value = @"StubGpiowriteByteRequest")] + StubGpiowriteByteRequest = 20, + + [System.Runtime.Serialization.EnumMember(Value = @"StubGpiowriteByteResponse")] + StubGpiowriteByteResponse = 21, + + [System.Runtime.Serialization.EnumMember(Value = @"StubHeaterRequest")] + StubHeaterRequest = 22, + + [System.Runtime.Serialization.EnumMember(Value = @"StubHeaterResponse")] + StubHeaterResponse = 23, + + [System.Runtime.Serialization.EnumMember(Value = @"StubI2Crequest")] + StubI2Crequest = 24, + + [System.Runtime.Serialization.EnumMember(Value = @"StubI2Cresponse")] + StubI2Cresponse = 25, + + [System.Runtime.Serialization.EnumMember(Value = @"StubOptLimitSwitchRequest")] + StubOptLimitSwitchRequest = 26, + + [System.Runtime.Serialization.EnumMember(Value = @"StubOptLimitSwitchResponse")] + StubOptLimitSwitchResponse = 27, + + [System.Runtime.Serialization.EnumMember(Value = @"StubSteperMotorRequest")] + StubSteperMotorRequest = 28, + + [System.Runtime.Serialization.EnumMember(Value = @"StubSteperMotorResponse")] + StubSteperMotorResponse = 29, + + [System.Runtime.Serialization.EnumMember(Value = @"StubValveRequest")] + StubValveRequest = 30, + + [System.Runtime.Serialization.EnumMember(Value = @"StubValveResponse")] + StubValveResponse = 31, + + [System.Runtime.Serialization.EnumMember(Value = @"StubExtFlashReadRequest")] + StubExtFlashReadRequest = 32, + + [System.Runtime.Serialization.EnumMember(Value = @"StubExtFlashReadResponse")] + StubExtFlashReadResponse = 33, + + [System.Runtime.Serialization.EnumMember(Value = @"StubExtFlashWriteRequest")] + StubExtFlashWriteRequest = 34, + + [System.Runtime.Serialization.EnumMember(Value = @"StubExtFlashWriteResponse")] + StubExtFlashWriteResponse = 35, + + [System.Runtime.Serialization.EnumMember(Value = @"StubFpgareadBackRegRequest")] + StubFpgareadBackRegRequest = 36, + + [System.Runtime.Serialization.EnumMember(Value = @"StubFpgareadBackRegResponse")] + StubFpgareadBackRegResponse = 37, + + [System.Runtime.Serialization.EnumMember(Value = @"StubFpgareadVersionRequest")] + StubFpgareadVersionRequest = 38, + + [System.Runtime.Serialization.EnumMember(Value = @"StubFpgareadVersionResponse")] + StubFpgareadVersionResponse = 39, + + [System.Runtime.Serialization.EnumMember(Value = @"StubL6470DriverRequest")] + StubL6470DriverRequest = 40, + + [System.Runtime.Serialization.EnumMember(Value = @"StubL6470DriverResponse")] + StubL6470DriverResponse = 41, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorInitRequest")] + StubMotorInitRequest = 42, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorInitResponse")] + StubMotorInitResponse = 43, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorRunRequest")] + StubMotorRunRequest = 44, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorRunResponse")] + StubMotorRunResponse = 45, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorStopRequest")] + StubMotorStopRequest = 46, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorStopResponse")] + StubMotorStopResponse = 47, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorStatusRequest")] + StubMotorStatusRequest = 48, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorStatusResponse")] + StubMotorStatusResponse = 49, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorMovRequest")] + StubMotorMovRequest = 50, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorMovResponse")] + StubMotorMovResponse = 51, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorSpeedRequest")] + StubMotorSpeedRequest = 52, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorSpeedResponse")] + StubMotorSpeedResponse = 53, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorPositionRequest")] + StubMotorPositionRequest = 54, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorPositionResponse")] + StubMotorPositionResponse = 55, + + [System.Runtime.Serialization.EnumMember(Value = @"StubHwversionRequest")] + StubHwversionRequest = 56, + + [System.Runtime.Serialization.EnumMember(Value = @"StubHwversionResponse")] + StubHwversionResponse = 57, + + [System.Runtime.Serialization.EnumMember(Value = @"StubF3Gpo01WriteRequest")] + StubF3Gpo01WriteRequest = 58, + + [System.Runtime.Serialization.EnumMember(Value = @"StubF3Gpo01WriteResponse")] + StubF3Gpo01WriteResponse = 59, + + [System.Runtime.Serialization.EnumMember(Value = @"StubHeatingTestRequest")] + StubHeatingTestRequest = 60, + + [System.Runtime.Serialization.EnumMember(Value = @"StubHeatingTestResponse")] + StubHeatingTestResponse = 61, + + [System.Runtime.Serialization.EnumMember(Value = @"StubHeatingTestPollRequest")] + StubHeatingTestPollRequest = 62, + + [System.Runtime.Serialization.EnumMember(Value = @"StubHeatingTestPollResponse")] + StubHeatingTestPollResponse = 63, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorRequest")] + StubMotorRequest = 64, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorResponse")] + StubMotorResponse = 65, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorHomeMarkRequest")] + StubMotorHomeMarkRequest = 66, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorHomeMarkResponse")] + StubMotorHomeMarkResponse = 67, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorRunStepTickRequest")] + StubMotorRunStepTickRequest = 68, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorRunStepTickResponse")] + StubMotorRunStepTickResponse = 69, + + [System.Runtime.Serialization.EnumMember(Value = @"StubFpgaReadRegRequest")] + StubFpgaReadRegRequest = 70, + + [System.Runtime.Serialization.EnumMember(Value = @"StubFpgaReadRegResponse")] + StubFpgaReadRegResponse = 71, + + [System.Runtime.Serialization.EnumMember(Value = @"StubFpgaWriteRegRequest")] + StubFpgaWriteRegRequest = 72, + + [System.Runtime.Serialization.EnumMember(Value = @"StubFpgaWriteRegResponse")] + StubFpgaWriteRegResponse = 73, + + [System.Runtime.Serialization.EnumMember(Value = @"StubReadEmbeddedVersionRequest")] + StubReadEmbeddedVersionRequest = 74, + + [System.Runtime.Serialization.EnumMember(Value = @"StubReadEmbeddedVersionResponse")] + StubReadEmbeddedVersionResponse = 75, + + [System.Runtime.Serialization.EnumMember(Value = @"StubTivaReadRegRequest")] + StubTivaReadRegRequest = 76, + + [System.Runtime.Serialization.EnumMember(Value = @"StubTivaReadRegResponse")] + StubTivaReadRegResponse = 77, + + [System.Runtime.Serialization.EnumMember(Value = @"StubTivaWriteRegRequest")] + StubTivaWriteRegRequest = 78, + + [System.Runtime.Serialization.EnumMember(Value = @"StubTivaWriteRegResponse")] + StubTivaWriteRegResponse = 79, + + [System.Runtime.Serialization.EnumMember(Value = @"StubDancerPositionRequest")] + StubDancerPositionRequest = 80, + + [System.Runtime.Serialization.EnumMember(Value = @"StubDancerPositionResponse")] + StubDancerPositionResponse = 81, + + [System.Runtime.Serialization.EnumMember(Value = @"StubSpeedSensorRequest")] + StubSpeedSensorRequest = 82, + + [System.Runtime.Serialization.EnumMember(Value = @"StubSpeedSensorResponse")] + StubSpeedSensorResponse = 83, + + [System.Runtime.Serialization.EnumMember(Value = @"StubRealTimeUsageRequest")] + StubRealTimeUsageRequest = 84, + + [System.Runtime.Serialization.EnumMember(Value = @"StubRealTimeUsageResponse")] + StubRealTimeUsageResponse = 85, + + [System.Runtime.Serialization.EnumMember(Value = @"StubIntAdcreadRequest")] + StubIntAdcreadRequest = 86, + + [System.Runtime.Serialization.EnumMember(Value = @"StubIntAdcreadResponse")] + StubIntAdcreadResponse = 87, + + [System.Runtime.Serialization.EnumMember(Value = @"StubTempSensorRequest")] + StubTempSensorRequest = 88, + + [System.Runtime.Serialization.EnumMember(Value = @"StubTempSensorResponse")] + StubTempSensorResponse = 89, + + [System.Runtime.Serialization.EnumMember(Value = @"StubI2CreadBytesRequest")] + StubI2CreadBytesRequest = 90, + + [System.Runtime.Serialization.EnumMember(Value = @"StubI2CreadBytesResponse")] + StubI2CreadBytesResponse = 91, + + [System.Runtime.Serialization.EnumMember(Value = @"StubI2CwriteBytesRequest")] + StubI2CwriteBytesRequest = 92, + + [System.Runtime.Serialization.EnumMember(Value = @"StubI2CwriteBytesResponse")] + StubI2CwriteBytesResponse = 93, + + [System.Runtime.Serialization.EnumMember(Value = @"StubExtFlashWriteWordsRequest")] + StubExtFlashWriteWordsRequest = 94, + + [System.Runtime.Serialization.EnumMember(Value = @"StubExtFlashWriteWordsResponse")] + StubExtFlashWriteWordsResponse = 95, + + [System.Runtime.Serialization.EnumMember(Value = @"StubExtFlashReadWordsRequest")] + StubExtFlashReadWordsRequest = 96, + + [System.Runtime.Serialization.EnumMember(Value = @"StubExtFlashReadWordsResponse")] + StubExtFlashReadWordsResponse = 97, + + [System.Runtime.Serialization.EnumMember(Value = @"StubJobRequest")] + StubJobRequest = 98, + + [System.Runtime.Serialization.EnumMember(Value = @"StubJobResponse")] + StubJobResponse = 99, + + [System.Runtime.Serialization.EnumMember(Value = @"StubAbortJobRequest")] + StubAbortJobRequest = 100, + + [System.Runtime.Serialization.EnumMember(Value = @"StubAbortJobResponse")] + StubAbortJobResponse = 101, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMidTankPressureSensorRequest")] + StubMidTankPressureSensorRequest = 102, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMidTankPressureSensorResponse")] + StubMidTankPressureSensorResponse = 103, + + [System.Runtime.Serialization.EnumMember(Value = @"StubDispenserEepromRequest")] + StubDispenserEepromRequest = 104, + + [System.Runtime.Serialization.EnumMember(Value = @"StubDispenserEepromResponse")] + StubDispenserEepromResponse = 105, + + [System.Runtime.Serialization.EnumMember(Value = @"StubWhsEepromRequest")] + StubWhsEepromRequest = 106, + + [System.Runtime.Serialization.EnumMember(Value = @"StubWhsEepromResponse")] + StubWhsEepromResponse = 107, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMainCardEepromReadRequest")] + StubMainCardEepromReadRequest = 108, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMainCardEepromReadResponse")] + StubMainCardEepromReadResponse = 109, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMainCardEepromWriteRequest")] + StubMainCardEepromWriteRequest = 110, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMainCardEepromWriteResponse")] + StubMainCardEepromWriteResponse = 111, + + [System.Runtime.Serialization.EnumMember(Value = @"StubHeadEepromRequest")] + StubHeadEepromRequest = 112, + + [System.Runtime.Serialization.EnumMember(Value = @"StubHeadEepromResponse")] + StubHeadEepromResponse = 113, + + [System.Runtime.Serialization.EnumMember(Value = @"ExternalBridgeUdpDiscoveryPacket")] + ExternalBridgeUdpDiscoveryPacket = 114, + + [System.Runtime.Serialization.EnumMember(Value = @"ExternalBridgeLoginRequest")] + ExternalBridgeLoginRequest = 115, + + [System.Runtime.Serialization.EnumMember(Value = @"ExternalBridgeLoginResponse")] + ExternalBridgeLoginResponse = 116, + + [System.Runtime.Serialization.EnumMember(Value = @"ExternalBridgeLogoutRequest")] + ExternalBridgeLogoutRequest = 117, + + [System.Runtime.Serialization.EnumMember(Value = @"ExternalBridgeLogoutResponse")] + ExternalBridgeLogoutResponse = 118, + + [System.Runtime.Serialization.EnumMember(Value = @"DirectSynchronizationRequest")] + DirectSynchronizationRequest = 119, + + [System.Runtime.Serialization.EnumMember(Value = @"DirectSynchronizationResponse")] + DirectSynchronizationResponse = 120, + + [System.Runtime.Serialization.EnumMember(Value = @"OverrideDataBaseRequest")] + OverrideDataBaseRequest = 121, + + [System.Runtime.Serialization.EnumMember(Value = @"OverrideDataBaseResponse")] + OverrideDataBaseResponse = 122, + + [System.Runtime.Serialization.EnumMember(Value = @"StartApplicationLogsRequest")] + StartApplicationLogsRequest = 123, + + [System.Runtime.Serialization.EnumMember(Value = @"StartApplicationLogsResponse")] + StartApplicationLogsResponse = 124, + + [System.Runtime.Serialization.EnumMember(Value = @"StopApplicationLogsRequest")] + StopApplicationLogsRequest = 125, + + [System.Runtime.Serialization.EnumMember(Value = @"StopApplicationLogsResponse")] + StopApplicationLogsResponse = 126, + + [System.Runtime.Serialization.EnumMember(Value = @"ColorProfileRequest")] + ColorProfileRequest = 127, + + [System.Runtime.Serialization.EnumMember(Value = @"ColorProfileResponse")] + ColorProfileResponse = 128, + + [System.Runtime.Serialization.EnumMember(Value = @"UpdateStatusRequest")] + UpdateStatusRequest = 129, + + [System.Runtime.Serialization.EnumMember(Value = @"UpdateStatusResponse")] + UpdateStatusResponse = 130, + + [System.Runtime.Serialization.EnumMember(Value = @"GenericRequest")] + GenericRequest = 131, + + [System.Runtime.Serialization.EnumMember(Value = @"GenericResponse")] + GenericResponse = 132, + + [System.Runtime.Serialization.EnumMember(Value = @"ConfigureProtocolRequest")] + ConfigureProtocolRequest = 133, + + [System.Runtime.Serialization.EnumMember(Value = @"ConfigureProtocolResponse")] + ConfigureProtocolResponse = 134, + + [System.Runtime.Serialization.EnumMember(Value = @"StartDiagnosticsRequest")] + StartDiagnosticsRequest = 135, + + [System.Runtime.Serialization.EnumMember(Value = @"StartDiagnosticsResponse")] + StartDiagnosticsResponse = 136, + + [System.Runtime.Serialization.EnumMember(Value = @"MotorAbortHomingRequest")] + MotorAbortHomingRequest = 137, + + [System.Runtime.Serialization.EnumMember(Value = @"MotorAbortHomingResponse")] + MotorAbortHomingResponse = 138, + + [System.Runtime.Serialization.EnumMember(Value = @"MotorHomingRequest")] + MotorHomingRequest = 139, + + [System.Runtime.Serialization.EnumMember(Value = @"MotorHomingResponse")] + MotorHomingResponse = 140, + + [System.Runtime.Serialization.EnumMember(Value = @"MotorJoggingRequest")] + MotorJoggingRequest = 141, + + [System.Runtime.Serialization.EnumMember(Value = @"MotorJoggingResponse")] + MotorJoggingResponse = 142, + + [System.Runtime.Serialization.EnumMember(Value = @"MotorAbortJoggingRequest")] + MotorAbortJoggingRequest = 143, + + [System.Runtime.Serialization.EnumMember(Value = @"MotorAbortJoggingResponse")] + MotorAbortJoggingResponse = 144, + + [System.Runtime.Serialization.EnumMember(Value = @"DispenserAbortHomingRequest")] + DispenserAbortHomingRequest = 145, + + [System.Runtime.Serialization.EnumMember(Value = @"DispenserAbortHomingResponse")] + DispenserAbortHomingResponse = 146, + + [System.Runtime.Serialization.EnumMember(Value = @"DispenserHomingRequest")] + DispenserHomingRequest = 147, + + [System.Runtime.Serialization.EnumMember(Value = @"DispenserHomingResponse")] + DispenserHomingResponse = 148, + + [System.Runtime.Serialization.EnumMember(Value = @"DispenserJoggingRequest")] + DispenserJoggingRequest = 149, + + [System.Runtime.Serialization.EnumMember(Value = @"DispenserJoggingResponse")] + DispenserJoggingResponse = 150, + + [System.Runtime.Serialization.EnumMember(Value = @"DispenserAbortJoggingRequest")] + DispenserAbortJoggingRequest = 151, + + [System.Runtime.Serialization.EnumMember(Value = @"DispenserAbortJoggingResponse")] + DispenserAbortJoggingResponse = 152, + + [System.Runtime.Serialization.EnumMember(Value = @"SetDigitalOutRequest")] + SetDigitalOutRequest = 153, + + [System.Runtime.Serialization.EnumMember(Value = @"SetDigitalOutResponse")] + SetDigitalOutResponse = 154, + + [System.Runtime.Serialization.EnumMember(Value = @"ThreadJoggingRequest")] + ThreadJoggingRequest = 155, + + [System.Runtime.Serialization.EnumMember(Value = @"ThreadJoggingResponse")] + ThreadJoggingResponse = 156, + + [System.Runtime.Serialization.EnumMember(Value = @"ThreadAbortJoggingRequest")] + ThreadAbortJoggingRequest = 157, + + [System.Runtime.Serialization.EnumMember(Value = @"ThreadAbortJoggingResponse")] + ThreadAbortJoggingResponse = 158, + + [System.Runtime.Serialization.EnumMember(Value = @"SetComponentValueRequest")] + SetComponentValueRequest = 159, + + [System.Runtime.Serialization.EnumMember(Value = @"SetComponentValueResponse")] + SetComponentValueResponse = 160, + + [System.Runtime.Serialization.EnumMember(Value = @"ResolveEventRequest")] + ResolveEventRequest = 161, + + [System.Runtime.Serialization.EnumMember(Value = @"ResolveEventResponse")] + ResolveEventResponse = 162, + + [System.Runtime.Serialization.EnumMember(Value = @"StopDiagnosticsRequest")] + StopDiagnosticsRequest = 163, + + [System.Runtime.Serialization.EnumMember(Value = @"StopDiagnosticsResponse")] + StopDiagnosticsResponse = 164, + + [System.Runtime.Serialization.EnumMember(Value = @"StartEventsNotificationRequest")] + StartEventsNotificationRequest = 165, + + [System.Runtime.Serialization.EnumMember(Value = @"StartEventsNotificationResponse")] + StartEventsNotificationResponse = 166, + + [System.Runtime.Serialization.EnumMember(Value = @"StopEventsNotificationRequest")] + StopEventsNotificationRequest = 167, + + [System.Runtime.Serialization.EnumMember(Value = @"StopEventsNotificationResponse")] + StopEventsNotificationResponse = 168, + + [System.Runtime.Serialization.EnumMember(Value = @"SetHeaterStateRequest")] + SetHeaterStateRequest = 169, + + [System.Runtime.Serialization.EnumMember(Value = @"SetHeaterStateResponse")] + SetHeaterStateResponse = 170, + + [System.Runtime.Serialization.EnumMember(Value = @"SetBlowerStateRequest")] + SetBlowerStateRequest = 171, + + [System.Runtime.Serialization.EnumMember(Value = @"SetBlowerStateResponse")] + SetBlowerStateResponse = 172, + + [System.Runtime.Serialization.EnumMember(Value = @"SetValveStateRequest")] + SetValveStateRequest = 173, + + [System.Runtime.Serialization.EnumMember(Value = @"SetValveStateResponse")] + SetValveStateResponse = 174, + + [System.Runtime.Serialization.EnumMember(Value = @"CartridgeValidationRequest")] + CartridgeValidationRequest = 175, + + [System.Runtime.Serialization.EnumMember(Value = @"CartridgeValidationResponse")] + CartridgeValidationResponse = 176, + + [System.Runtime.Serialization.EnumMember(Value = @"JobRequest")] + JobRequest = 177, + + [System.Runtime.Serialization.EnumMember(Value = @"JobResponse")] + JobResponse = 178, + + [System.Runtime.Serialization.EnumMember(Value = @"AbortJobRequest")] + AbortJobRequest = 179, + + [System.Runtime.Serialization.EnumMember(Value = @"AbortJobResponse")] + AbortJobResponse = 180, + + [System.Runtime.Serialization.EnumMember(Value = @"UploadProcessParametersRequest")] + UploadProcessParametersRequest = 181, + + [System.Runtime.Serialization.EnumMember(Value = @"UploadProcessParametersResponse")] + UploadProcessParametersResponse = 182, + + [System.Runtime.Serialization.EnumMember(Value = @"CurrentJobRequest")] + CurrentJobRequest = 183, + + [System.Runtime.Serialization.EnumMember(Value = @"CurrentJobResponse")] + CurrentJobResponse = 184, + + [System.Runtime.Serialization.EnumMember(Value = @"ResumeCurrentJobRequest")] + ResumeCurrentJobRequest = 185, + + [System.Runtime.Serialization.EnumMember(Value = @"ResumeCurrentJobResponse")] + ResumeCurrentJobResponse = 186, + + [System.Runtime.Serialization.EnumMember(Value = @"StartHeadCleaningRequest")] + StartHeadCleaningRequest = 187, + + [System.Runtime.Serialization.EnumMember(Value = @"StartHeadCleaningResponse")] + StartHeadCleaningResponse = 188, + + [System.Runtime.Serialization.EnumMember(Value = @"AbortHeadCleaningRequest")] + AbortHeadCleaningRequest = 189, + + [System.Runtime.Serialization.EnumMember(Value = @"AbortHeadCleaningResponse")] + AbortHeadCleaningResponse = 190, + + [System.Runtime.Serialization.EnumMember(Value = @"StartDebugLogRequest")] + StartDebugLogRequest = 191, + + [System.Runtime.Serialization.EnumMember(Value = @"StartDebugLogResponse")] + StartDebugLogResponse = 192, + + [System.Runtime.Serialization.EnumMember(Value = @"StopDebugLogRequest")] + StopDebugLogRequest = 193, + + [System.Runtime.Serialization.EnumMember(Value = @"StopDebugLogResponse")] + StopDebugLogResponse = 194, + + [System.Runtime.Serialization.EnumMember(Value = @"SetDebugLogCategoryRequest")] + SetDebugLogCategoryRequest = 195, + + [System.Runtime.Serialization.EnumMember(Value = @"SetDebugLogCategoryResponse")] + SetDebugLogCategoryResponse = 196, + + [System.Runtime.Serialization.EnumMember(Value = @"SetupDebugDisributorsRequest")] + SetupDebugDisributorsRequest = 197, + + [System.Runtime.Serialization.EnumMember(Value = @"SetupDebugDisributorsResponse")] + SetupDebugDisributorsResponse = 198, + + [System.Runtime.Serialization.EnumMember(Value = @"UploadHardwareConfigurationRequest")] + UploadHardwareConfigurationRequest = 199, + + [System.Runtime.Serialization.EnumMember(Value = @"UploadHardwareConfigurationResponse")] + UploadHardwareConfigurationResponse = 200, + + [System.Runtime.Serialization.EnumMember(Value = @"SystemResetRequest")] + SystemResetRequest = 201, + + [System.Runtime.Serialization.EnumMember(Value = @"SystemResetResponse")] + SystemResetResponse = 202, + + [System.Runtime.Serialization.EnumMember(Value = @"KeepAliveRequest")] + KeepAliveRequest = 203, + + [System.Runtime.Serialization.EnumMember(Value = @"KeepAliveResponse")] + KeepAliveResponse = 204, + + [System.Runtime.Serialization.EnumMember(Value = @"ConnectRequest")] + ConnectRequest = 205, + + [System.Runtime.Serialization.EnumMember(Value = @"ConnectResponse")] + ConnectResponse = 206, + + [System.Runtime.Serialization.EnumMember(Value = @"DisconnectRequest")] + DisconnectRequest = 207, + + [System.Runtime.Serialization.EnumMember(Value = @"DisconnectResponse")] + DisconnectResponse = 208, + + [System.Runtime.Serialization.EnumMember(Value = @"FileUploadRequest")] + FileUploadRequest = 209, + + [System.Runtime.Serialization.EnumMember(Value = @"FileUploadResponse")] + FileUploadResponse = 210, + + [System.Runtime.Serialization.EnumMember(Value = @"FileChunkUploadRequest")] + FileChunkUploadRequest = 211, + + [System.Runtime.Serialization.EnumMember(Value = @"FileChunkUploadResponse")] + FileChunkUploadResponse = 212, + + [System.Runtime.Serialization.EnumMember(Value = @"ExecuteProcessRequest")] + ExecuteProcessRequest = 213, + + [System.Runtime.Serialization.EnumMember(Value = @"ExecuteProcessResponse")] + ExecuteProcessResponse = 214, + + [System.Runtime.Serialization.EnumMember(Value = @"KillProcessRequest")] + KillProcessRequest = 215, + + [System.Runtime.Serialization.EnumMember(Value = @"KillProcessResponse")] + KillProcessResponse = 216, + + [System.Runtime.Serialization.EnumMember(Value = @"CreateRequest")] + CreateRequest = 217, + + [System.Runtime.Serialization.EnumMember(Value = @"CreateResponse")] + CreateResponse = 218, + + [System.Runtime.Serialization.EnumMember(Value = @"DeleteRequest")] + DeleteRequest = 219, + + [System.Runtime.Serialization.EnumMember(Value = @"DeleteResponse")] + DeleteResponse = 220, + + [System.Runtime.Serialization.EnumMember(Value = @"GetStorageInfoRequest")] + GetStorageInfoRequest = 221, + + [System.Runtime.Serialization.EnumMember(Value = @"GetStorageInfoResponse")] + GetStorageInfoResponse = 222, + + [System.Runtime.Serialization.EnumMember(Value = @"GetFilesRequest")] + GetFilesRequest = 223, + + [System.Runtime.Serialization.EnumMember(Value = @"GetFilesResponse")] + GetFilesResponse = 224, + + [System.Runtime.Serialization.EnumMember(Value = @"FileDownloadRequest")] + FileDownloadRequest = 225, + + [System.Runtime.Serialization.EnumMember(Value = @"FileDownloadResponse")] + FileDownloadResponse = 226, + + [System.Runtime.Serialization.EnumMember(Value = @"FileChunkDownloadRequest")] + FileChunkDownloadRequest = 227, + + [System.Runtime.Serialization.EnumMember(Value = @"FileChunkDownloadResponse")] + FileChunkDownloadResponse = 228, + + [System.Runtime.Serialization.EnumMember(Value = @"ValidateVersionRequest")] + ValidateVersionRequest = 229, + + [System.Runtime.Serialization.EnumMember(Value = @"ValidateVersionResponse")] + ValidateVersionResponse = 230, + + [System.Runtime.Serialization.EnumMember(Value = @"ActivateVersionRequest")] + ActivateVersionRequest = 231, + + [System.Runtime.Serialization.EnumMember(Value = @"ActivateVersionResponse")] + ActivateVersionResponse = 232, + + [System.Runtime.Serialization.EnumMember(Value = @"DispenserDataRequest")] + DispenserDataRequest = 233, + + [System.Runtime.Serialization.EnumMember(Value = @"DispenserDataResponse")] + DispenserDataResponse = 234, + + [System.Runtime.Serialization.EnumMember(Value = @"MidTankDataSetupRequest")] + MidTankDataSetupRequest = 235, + + [System.Runtime.Serialization.EnumMember(Value = @"MidTankDataSetupResponse")] + MidTankDataSetupResponse = 236, + + [System.Runtime.Serialization.EnumMember(Value = @"MachineCalibrationDataRequest")] + MachineCalibrationDataRequest = 237, + + [System.Runtime.Serialization.EnumMember(Value = @"MachineCalibrationDataResponse")] + MachineCalibrationDataResponse = 238, + + [System.Runtime.Serialization.EnumMember(Value = @"MainCardStoredDataRequest")] + MainCardStoredDataRequest = 239, + + [System.Runtime.Serialization.EnumMember(Value = @"MainCardStoredDataResponse")] + MainCardStoredDataResponse = 240, + + [System.Runtime.Serialization.EnumMember(Value = @"StartMachineStatusUpdateRequest")] + StartMachineStatusUpdateRequest = 241, + + [System.Runtime.Serialization.EnumMember(Value = @"StartMachineStatusUpdateResponse")] + StartMachineStatusUpdateResponse = 242, + + [System.Runtime.Serialization.EnumMember(Value = @"StopMachineStatusUpdateRequest")] + StopMachineStatusUpdateRequest = 243, + + [System.Runtime.Serialization.EnumMember(Value = @"StopMachineStatusUpdateResponse")] + StopMachineStatusUpdateResponse = 244, + + [System.Runtime.Serialization.EnumMember(Value = @"StartPowerDownRequest")] + StartPowerDownRequest = 245, + + [System.Runtime.Serialization.EnumMember(Value = @"StartPowerDownResponse")] + StartPowerDownResponse = 246, + + [System.Runtime.Serialization.EnumMember(Value = @"AbortPowerDownRequest")] + AbortPowerDownRequest = 247, + + [System.Runtime.Serialization.EnumMember(Value = @"AbortPowerDownResponse")] + AbortPowerDownResponse = 248, + + [System.Runtime.Serialization.EnumMember(Value = @"StartPowerUpRequest")] + StartPowerUpRequest = 249, + + [System.Runtime.Serialization.EnumMember(Value = @"StartPowerUpResponse")] + StartPowerUpResponse = 250, + + [System.Runtime.Serialization.EnumMember(Value = @"AbortPowerUpRequest")] + AbortPowerUpRequest = 251, + + [System.Runtime.Serialization.EnumMember(Value = @"AbortPowerUpResponse")] + AbortPowerUpResponse = 252, + + [System.Runtime.Serialization.EnumMember(Value = @"StandByRequest")] + StandByRequest = 253, + + [System.Runtime.Serialization.EnumMember(Value = @"StandByResponse")] + StandByResponse = 254, + + [System.Runtime.Serialization.EnumMember(Value = @"StartThreadLoadingRequest")] + StartThreadLoadingRequest = 255, + + [System.Runtime.Serialization.EnumMember(Value = @"StartThreadLoadingResponse")] + StartThreadLoadingResponse = 256, + + [System.Runtime.Serialization.EnumMember(Value = @"ContinueThreadLoadingRequest")] + ContinueThreadLoadingRequest = 257, + + [System.Runtime.Serialization.EnumMember(Value = @"ContinueThreadLoadingResponse")] + ContinueThreadLoadingResponse = 258, + + [System.Runtime.Serialization.EnumMember(Value = @"StopThreadLoadingRequest")] + StopThreadLoadingRequest = 259, + + [System.Runtime.Serialization.EnumMember(Value = @"StopThreadLoadingResponse")] + StopThreadLoadingResponse = 260, + + [System.Runtime.Serialization.EnumMember(Value = @"TryThreadLoadingRequest")] + TryThreadLoadingRequest = 261, + + [System.Runtime.Serialization.EnumMember(Value = @"TryThreadLoadingResponse")] + TryThreadLoadingResponse = 262, + + [System.Runtime.Serialization.EnumMember(Value = @"AttemptThreadJoggingRequest")] + AttemptThreadJoggingRequest = 263, + + [System.Runtime.Serialization.EnumMember(Value = @"AttemptThreadJoggingResponse")] + AttemptThreadJoggingResponse = 264, + + [System.Runtime.Serialization.EnumMember(Value = @"StartInkFillingStatusRequest")] + StartInkFillingStatusRequest = 265, + + [System.Runtime.Serialization.EnumMember(Value = @"StartInkFillingStatusResponse")] + StartInkFillingStatusResponse = 266, + + [System.Runtime.Serialization.EnumMember(Value = @"PutDataStoreItemRequest")] + PutDataStoreItemRequest = 267, + + [System.Runtime.Serialization.EnumMember(Value = @"PutDataStoreItemResponse")] + PutDataStoreItemResponse = 268, + + [System.Runtime.Serialization.EnumMember(Value = @"GetDataStoreItemRequest")] + GetDataStoreItemRequest = 269, + + [System.Runtime.Serialization.EnumMember(Value = @"GetDataStoreItemResponse")] + GetDataStoreItemResponse = 270, + + [System.Runtime.Serialization.EnumMember(Value = @"DataStoreItemModifiedRequest")] + DataStoreItemModifiedRequest = 271, + + [System.Runtime.Serialization.EnumMember(Value = @"DataStoreItemModifiedResponse")] + DataStoreItemModifiedResponse = 272, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class DataStoreWebPutItem + { + [Newtonsoft.Json.JsonProperty("MachineSerialNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string MachineSerialNumber { get; set; } + + [Newtonsoft.Json.JsonProperty("Collection", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Collection { get; set; } + + [Newtonsoft.Json.JsonProperty("Key", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Key { get; set; } + + [Newtonsoft.Json.JsonProperty("DataType", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public DataType DataType { get; set; } + + [Newtonsoft.Json.JsonProperty("ProtoMessageType", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public MessageType ProtoMessageType { get; set; } + + [Newtonsoft.Json.JsonProperty("Value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public object Value { get; set; } + + + } + + /// <summary>Contains information for a single HTTP operation.</summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class HttpControllerContext + { + /// <summary>Gets or sets the configuration.</summary> + [Newtonsoft.Json.JsonProperty("Configuration", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public HttpConfiguration Configuration { get; set; } + + /// <summary>Gets or sets the controller descriptor.</summary> + [Newtonsoft.Json.JsonProperty("ControllerDescriptor", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public HttpControllerDescriptor ControllerDescriptor { get; set; } + + /// <summary>Gets or sets the HTTP controller.</summary> + [Newtonsoft.Json.JsonProperty("Controller", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public IHttpController Controller { get; set; } + + /// <summary>Gets or sets the request.</summary> + [Newtonsoft.Json.JsonProperty("Request", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public HttpRequestMessage Request { get; set; } + + /// <summary>Gets or sets the request context.</summary> + [Newtonsoft.Json.JsonProperty("RequestContext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public HttpRequestContext RequestContext { get; set; } + + /// <summary>Gets or sets the route data.</summary> + [Newtonsoft.Json.JsonProperty("RouteData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public IHttpRouteData RouteData { get; set; } + + + } + + /// <summary>Represents a configuration of HttpServer instances. </summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class HttpConfiguration + { + /// <summary>Gets or sets the action that will perform final initialization of the HttpConfiguration instance before it is used to process requests. </summary> + [Newtonsoft.Json.JsonProperty("Initializer", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ActionOfHttpConfiguration Initializer { get; set; } + + /// <summary>Gets the list of filters that apply to all requests served using this HttpConfiguration instance.</summary> + [Newtonsoft.Json.JsonProperty("Filters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<FilterInfo> Filters { get; set; } + + /// <summary>Gets an ordered list of DelegatingHandler instances to be invoked as an HttpRequestMessage travels up the stack and an HttpResponseMessage travels down in stack in return. </summary> + [Newtonsoft.Json.JsonProperty("MessageHandlers", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<DelegatingHandler> MessageHandlers { get; set; } + + /// <summary>Gets the HttpRouteCollection associated with this HttpConfiguration instance.</summary> + [Newtonsoft.Json.JsonProperty("Routes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<IHttpRoute> Routes { get; set; } + + /// <summary>Gets the properties associated with this instance.</summary> + [Newtonsoft.Json.JsonProperty("Properties", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.IDictionary<string, object> Properties { get; set; } + + /// <summary>Gets the root virtual path.</summary> + [Newtonsoft.Json.JsonProperty("VirtualPathRoot", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string VirtualPathRoot { get; set; } + + /// <summary>Gets or sets the dependency resolver associated with thisinstance.</summary> + [Newtonsoft.Json.JsonProperty("DependencyResolver", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public IDependencyResolver DependencyResolver { get; set; } + + /// <summary>Gets the container of default services associated with this instance.</summary> + [Newtonsoft.Json.JsonProperty("Services", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ServicesContainer Services { get; set; } + + /// <summary>Gets the collection of rules for how parameters should be bound.</summary> + [Newtonsoft.Json.JsonProperty("ParameterBindingRules", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ParameterBindingRulesCollection ParameterBindingRules { get; set; } + + /// <summary>Gets or sets a value indicating whether error details should be included in error messages.</summary> + [Newtonsoft.Json.JsonProperty("IncludeErrorDetailPolicy", Required = Newtonsoft.Json.Required.Always)] + public IncludeErrorDetailPolicy IncludeErrorDetailPolicy { get; set; } + + /// <summary>Gets the media-type formatters for this instance.</summary> + [Newtonsoft.Json.JsonProperty("Formatters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public MediaTypeFormatterCollection Formatters { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class ActionOfHttpConfiguration : MulticastDelegate + { + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class MulticastDelegate : Delegate + { + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class Delegate + { + [Newtonsoft.Json.JsonProperty("_target", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public object _target { get; set; } + + [Newtonsoft.Json.JsonProperty("_methodBase", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public object _methodBase { get; set; } + + [Newtonsoft.Json.JsonProperty("_methodPtr", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public IntPtr _methodPtr { get; set; } = new IntPtr(); + + [Newtonsoft.Json.JsonProperty("_methodPtrAux", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public IntPtr _methodPtrAux { get; set; } = new IntPtr(); + + [Newtonsoft.Json.JsonProperty("Method", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public MethodInfo Method { get; set; } + + [Newtonsoft.Json.JsonProperty("Target", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public object Target { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class IntPtr + { + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class MethodInfo : MethodBase + { + [Newtonsoft.Json.JsonProperty("MemberType", Required = Newtonsoft.Json.Required.Always)] + public MemberTypes MemberType { get; set; } + + [Newtonsoft.Json.JsonProperty("ReturnType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ReturnType { get; set; } + + [Newtonsoft.Json.JsonProperty("ReturnParameter", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ParameterInfo ReturnParameter { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + [System.Flags] + public enum MemberTypes + { + Constructor = 1, + + Event = 2, + + Field = 4, + + Method = 8, + + Property = 16, + + TypeInfo = 32, + + Custom = 64, + + NestedType = 128, + + All = 191, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class ParameterInfo + { + [Newtonsoft.Json.JsonProperty("ParameterType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ParameterType { get; set; } + + [Newtonsoft.Json.JsonProperty("Name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("HasDefaultValue", Required = Newtonsoft.Json.Required.Always)] + public bool HasDefaultValue { get; set; } + + [Newtonsoft.Json.JsonProperty("DefaultValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public object DefaultValue { get; set; } + + [Newtonsoft.Json.JsonProperty("RawDefaultValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public object RawDefaultValue { get; set; } + + [Newtonsoft.Json.JsonProperty("Position", Required = Newtonsoft.Json.Required.Always)] + public int Position { get; set; } + + [Newtonsoft.Json.JsonProperty("Attributes", Required = Newtonsoft.Json.Required.Always)] + public ParameterAttributes Attributes { get; set; } + + [Newtonsoft.Json.JsonProperty("Member", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public MemberInfo Member { get; set; } + + [Newtonsoft.Json.JsonProperty("IsIn", Required = Newtonsoft.Json.Required.Always)] + public bool IsIn { get; set; } + + [Newtonsoft.Json.JsonProperty("IsOut", Required = Newtonsoft.Json.Required.Always)] + public bool IsOut { get; set; } + + [Newtonsoft.Json.JsonProperty("IsLcid", Required = Newtonsoft.Json.Required.Always)] + public bool IsLcid { get; set; } + + [Newtonsoft.Json.JsonProperty("IsRetval", Required = Newtonsoft.Json.Required.Always)] + public bool IsRetval { get; set; } + + [Newtonsoft.Json.JsonProperty("IsOptional", Required = Newtonsoft.Json.Required.Always)] + public bool IsOptional { get; set; } + + [Newtonsoft.Json.JsonProperty("MetadataToken", Required = Newtonsoft.Json.Required.Always)] + public int MetadataToken { get; set; } + + [Newtonsoft.Json.JsonProperty("CustomAttributes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<CustomAttributeData> CustomAttributes { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + [System.Flags] + public enum ParameterAttributes + { + None = 0, + + In = 1, + + Out = 2, + + Lcid = 4, + + Retval = 8, + + Optional = 16, + + HasDefault = 4096, + + HasFieldMarshal = 8192, + + Reserved3 = 16384, + + Reserved4 = 32768, + + ReservedMask = 61440, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class MemberInfo + { + [Newtonsoft.Json.JsonProperty("CustomAttributes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<CustomAttributeData> CustomAttributes { get; set; } + + [Newtonsoft.Json.JsonProperty("MetadataToken", Required = Newtonsoft.Json.Required.Always)] + public int MetadataToken { get; set; } + + [Newtonsoft.Json.JsonProperty("Module", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Module Module { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class CustomAttributeData + { + [Newtonsoft.Json.JsonProperty("AttributeType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string AttributeType { get; set; } + + [Newtonsoft.Json.JsonProperty("Constructor", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ConstructorInfo Constructor { get; set; } + + [Newtonsoft.Json.JsonProperty("ConstructorArguments", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<CustomAttributeTypedArgument> ConstructorArguments { get; set; } + + [Newtonsoft.Json.JsonProperty("NamedArguments", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<CustomAttributeNamedArgument> NamedArguments { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class ConstructorInfo : MethodBase + { + [Newtonsoft.Json.JsonProperty("MemberType", Required = Newtonsoft.Json.Required.Always)] + public MemberTypes MemberType { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class MethodBase : MemberInfo + { + [Newtonsoft.Json.JsonProperty("MethodImplementationFlags", Required = Newtonsoft.Json.Required.Always)] + public MethodImplAttributes MethodImplementationFlags { get; set; } + + [Newtonsoft.Json.JsonProperty("CallingConvention", Required = Newtonsoft.Json.Required.Always)] + public CallingConventions CallingConvention { get; set; } + + [Newtonsoft.Json.JsonProperty("IsGenericMethodDefinition", Required = Newtonsoft.Json.Required.Always)] + public bool IsGenericMethodDefinition { get; set; } + + [Newtonsoft.Json.JsonProperty("ContainsGenericParameters", Required = Newtonsoft.Json.Required.Always)] + public bool ContainsGenericParameters { get; set; } + + [Newtonsoft.Json.JsonProperty("IsGenericMethod", Required = Newtonsoft.Json.Required.Always)] + public bool IsGenericMethod { get; set; } + + [Newtonsoft.Json.JsonProperty("IsSecurityCritical", Required = Newtonsoft.Json.Required.Always)] + public bool IsSecurityCritical { get; set; } + + [Newtonsoft.Json.JsonProperty("IsSecuritySafeCritical", Required = Newtonsoft.Json.Required.Always)] + public bool IsSecuritySafeCritical { get; set; } + + [Newtonsoft.Json.JsonProperty("IsSecurityTransparent", Required = Newtonsoft.Json.Required.Always)] + public bool IsSecurityTransparent { get; set; } + + [Newtonsoft.Json.JsonProperty("IsPublic", Required = Newtonsoft.Json.Required.Always)] + public bool IsPublic { get; set; } + + [Newtonsoft.Json.JsonProperty("IsPrivate", Required = Newtonsoft.Json.Required.Always)] + public bool IsPrivate { get; set; } + + [Newtonsoft.Json.JsonProperty("IsFamily", Required = Newtonsoft.Json.Required.Always)] + public bool IsFamily { get; set; } + + [Newtonsoft.Json.JsonProperty("IsAssembly", Required = Newtonsoft.Json.Required.Always)] + public bool IsAssembly { get; set; } + + [Newtonsoft.Json.JsonProperty("IsFamilyAndAssembly", Required = Newtonsoft.Json.Required.Always)] + public bool IsFamilyAndAssembly { get; set; } + + [Newtonsoft.Json.JsonProperty("IsFamilyOrAssembly", Required = Newtonsoft.Json.Required.Always)] + public bool IsFamilyOrAssembly { get; set; } + + [Newtonsoft.Json.JsonProperty("IsStatic", Required = Newtonsoft.Json.Required.Always)] + public bool IsStatic { get; set; } + + [Newtonsoft.Json.JsonProperty("IsFinal", Required = Newtonsoft.Json.Required.Always)] + public bool IsFinal { get; set; } + + [Newtonsoft.Json.JsonProperty("IsVirtual", Required = Newtonsoft.Json.Required.Always)] + public bool IsVirtual { get; set; } + + [Newtonsoft.Json.JsonProperty("IsHideBySig", Required = Newtonsoft.Json.Required.Always)] + public bool IsHideBySig { get; set; } + + [Newtonsoft.Json.JsonProperty("IsAbstract", Required = Newtonsoft.Json.Required.Always)] + public bool IsAbstract { get; set; } + + [Newtonsoft.Json.JsonProperty("IsSpecialName", Required = Newtonsoft.Json.Required.Always)] + public bool IsSpecialName { get; set; } + + [Newtonsoft.Json.JsonProperty("IsConstructor", Required = Newtonsoft.Json.Required.Always)] + public bool IsConstructor { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum MethodImplAttributes + { + IL = 0, + + Managed = 0, + + Native = 1, + + OPTIL = 2, + + Runtime = 3, + + CodeTypeMask = 3, + + Unmanaged = 4, + + ManagedMask = 4, + + NoInlining = 8, + + ForwardRef = 16, + + Synchronized = 32, + + NoOptimization = 64, + + PreserveSig = 128, + + AggressiveInlining = 256, + + SecurityMitigations = 1024, + + InternalCall = 4096, + + MaxMethodImplVal = 65535, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + [System.Flags] + public enum CallingConventions + { + Standard = 1, + + VarArgs = 2, + + Any = 3, + + HasThis = 32, + + ExplicitThis = 64, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class CustomAttributeTypedArgument + { + [Newtonsoft.Json.JsonProperty("ArgumentType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ArgumentType { get; set; } + + [Newtonsoft.Json.JsonProperty("Value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public object Value { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class CustomAttributeNamedArgument + { + [Newtonsoft.Json.JsonProperty("MemberInfo", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public MemberInfo MemberInfo { get; set; } + + [Newtonsoft.Json.JsonProperty("TypedValue", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public CustomAttributeTypedArgument TypedValue { get; set; } = new CustomAttributeTypedArgument(); + + [Newtonsoft.Json.JsonProperty("MemberName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string MemberName { get; set; } + + [Newtonsoft.Json.JsonProperty("IsField", Required = Newtonsoft.Json.Required.Always)] + public bool IsField { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class Module + { + [Newtonsoft.Json.JsonProperty("CustomAttributes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<CustomAttributeData> CustomAttributes { get; set; } + + [Newtonsoft.Json.JsonProperty("MDStreamVersion", Required = Newtonsoft.Json.Required.Always)] + public int MDStreamVersion { get; set; } + + [Newtonsoft.Json.JsonProperty("FullyQualifiedName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string FullyQualifiedName { get; set; } + + [Newtonsoft.Json.JsonProperty("ModuleVersionId", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public System.Guid ModuleVersionId { get; set; } + + [Newtonsoft.Json.JsonProperty("MetadataToken", Required = Newtonsoft.Json.Required.Always)] + public int MetadataToken { get; set; } + + [Newtonsoft.Json.JsonProperty("ScopeName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ScopeName { get; set; } + + [Newtonsoft.Json.JsonProperty("Name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("Assembly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Assembly Assembly { get; set; } + + [Newtonsoft.Json.JsonProperty("ModuleHandle", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public ModuleHandle ModuleHandle { get; set; } = new ModuleHandle(); + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class Assembly + { + [Newtonsoft.Json.JsonProperty("CodeBase", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string CodeBase { get; set; } + + [Newtonsoft.Json.JsonProperty("EscapedCodeBase", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string EscapedCodeBase { get; set; } + + [Newtonsoft.Json.JsonProperty("FullName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string FullName { get; set; } + + [Newtonsoft.Json.JsonProperty("EntryPoint", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public MethodInfo EntryPoint { get; set; } + + [Newtonsoft.Json.JsonProperty("ExportedTypes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<string> ExportedTypes { get; set; } + + [Newtonsoft.Json.JsonProperty("DefinedTypes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<string> DefinedTypes { get; set; } + + [Newtonsoft.Json.JsonProperty("Evidence", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<Evidence> Evidence { get; set; } + + [Newtonsoft.Json.JsonProperty("PermissionSet", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<PermissionSet> PermissionSet { get; set; } + + [Newtonsoft.Json.JsonProperty("IsFullyTrusted", Required = Newtonsoft.Json.Required.Always)] + public bool IsFullyTrusted { get; set; } + + [Newtonsoft.Json.JsonProperty("SecurityRuleSet", Required = Newtonsoft.Json.Required.Always)] + public SecurityRuleSet SecurityRuleSet { get; set; } + + [Newtonsoft.Json.JsonProperty("ManifestModule", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Module ManifestModule { get; set; } + + [Newtonsoft.Json.JsonProperty("CustomAttributes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<CustomAttributeData> CustomAttributes { get; set; } + + [Newtonsoft.Json.JsonProperty("ReflectionOnly", Required = Newtonsoft.Json.Required.Always)] + public bool ReflectionOnly { get; set; } + + [Newtonsoft.Json.JsonProperty("Modules", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<Module> Modules { get; set; } + + [Newtonsoft.Json.JsonProperty("Location", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Location { get; set; } + + [Newtonsoft.Json.JsonProperty("ImageRuntimeVersion", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ImageRuntimeVersion { get; set; } + + [Newtonsoft.Json.JsonProperty("GlobalAssemblyCache", Required = Newtonsoft.Json.Required.Always)] + public bool GlobalAssemblyCache { get; set; } + + [Newtonsoft.Json.JsonProperty("HostContext", Required = Newtonsoft.Json.Required.Always)] + public long HostContext { get; set; } + + [Newtonsoft.Json.JsonProperty("IsDynamic", Required = Newtonsoft.Json.Required.Always)] + public bool IsDynamic { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum SecurityRuleSet + { + None = 0, + + Level1 = 1, + + Level2 = 2, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class ModuleHandle + { + [Newtonsoft.Json.JsonProperty("MDStreamVersion", Required = Newtonsoft.Json.Required.Always)] + public int MDStreamVersion { get; set; } + + + } + + /// <summary>Provides information about the available action filters.</summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class FilterInfo + { + /// <summary>Gets or sets an instance of the FilterInfo.</summary> + [Newtonsoft.Json.JsonProperty("Instance", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public IFilter Instance { get; set; } + + /// <summary>Gets or sets the scope FilterInfo.</summary> + [Newtonsoft.Json.JsonProperty("Scope", Required = Newtonsoft.Json.Required.Always)] + public FilterScope Scope { get; set; } + + + } + + /// <summary>Defines the methods that are used in a filter.</summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class IFilter + { + /// <summary>Gets or sets a value indicating whether more than one instance of the indicated attribute can be specified for a single program element.</summary> + [Newtonsoft.Json.JsonProperty("AllowMultiple", Required = Newtonsoft.Json.Required.Always)] + public bool AllowMultiple { get; set; } + + + } + + /// <summary>Defines values that specify the order in which filters run within the same filter type and filter order.</summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum FilterScope + { + Global = 0, + + Controller = 10, + + Action = 20, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class DelegatingHandler : HttpMessageHandler + { + [Newtonsoft.Json.JsonProperty("InnerHandler", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public HttpMessageHandler InnerHandler { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class HttpMessageHandler + { + + } + + /// <summary>IHttpRoute defines the interface for a route expressing how to map an incoming HttpRequestMessage to a particular controller and action. </summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class IHttpRoute + { + /// <summary>Gets the route template describing the URI pattern to match against. </summary> + [Newtonsoft.Json.JsonProperty("RouteTemplate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string RouteTemplate { get; set; } + + /// <summary>Gets the default values for route parameters if not provided by the incoming HttpRequestMessage. </summary> + [Newtonsoft.Json.JsonProperty("Defaults", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.IDictionary<string, object> Defaults { get; set; } + + /// <summary>Gets the constraints for the route parameters. </summary> + [Newtonsoft.Json.JsonProperty("Constraints", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.IDictionary<string, object> Constraints { get; set; } + + /// <summary>Gets any additional data tokens not used directly to determine whether a route matches an incoming HttpRequestMessage. </summary> + [Newtonsoft.Json.JsonProperty("DataTokens", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.IDictionary<string, object> DataTokens { get; set; } + + /// <summary>Gets the message handler that will be the recipient of the request.</summary> + [Newtonsoft.Json.JsonProperty("Handler", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public HttpMessageHandler Handler { get; set; } + + + } + + /// <summary>Represents a dependency injection container.</summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class IDependencyResolver + { + + } + + /// <summary>An abstract class that provides a container for services used by ASP.NET Web API.</summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class ServicesContainer + { + + } + + /// <summary>Collection of functions that can produce a parameter binding for a given parameter. </summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class ParameterBindingRulesCollection : System.Collections.ObjectModel.Collection<FuncOfHttpParameterDescriptorAndHttpParameterBinding> + { + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class FuncOfHttpParameterDescriptorAndHttpParameterBinding : MulticastDelegate + { + + } + + /// <summary>Specifies whether error details, such as exception messages and stack traces, should be included in error messages.</summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum IncludeErrorDetailPolicy + { + Default = 0, + + LocalOnly = 1, + + Always = 2, + + Never = 3, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class MediaTypeFormatterCollection : Anonymous + { + + } + + /// <summary>MediaTypeFormatter class to handle Xml. </summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class XmlMediaTypeFormatter : MediaTypeFormatter + { + /// <summary>Gets or sets a value indicating whether the XML formatter uses the XmlSerializer as the default serializer, instead of using the DataContractSerializer.</summary> + [Newtonsoft.Json.JsonProperty("UseXmlSerializer", Required = Newtonsoft.Json.Required.Always)] + public bool UseXmlSerializer { get; set; } = false; + + /// <summary>Gets or sets a value indicating whether to indent elements when writing data.</summary> + [Newtonsoft.Json.JsonProperty("Indent", Required = Newtonsoft.Json.Required.Always)] + public bool Indent { get; set; } + + /// <summary>Gets the settings to be used while writing.</summary> + [Newtonsoft.Json.JsonProperty("WriterSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public XmlWriterSettings WriterSettings { get; set; } + + /// <summary>Gets and sets the maximum nested node depth.</summary> + [Newtonsoft.Json.JsonProperty("MaxDepth", Required = Newtonsoft.Json.Required.Always)] + public int MaxDepth { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class XmlWriterSettings + { + [Newtonsoft.Json.JsonProperty("Async", Required = Newtonsoft.Json.Required.Always)] + public bool Async { get; set; } + + [Newtonsoft.Json.JsonProperty("Encoding", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Encoding Encoding { get; set; } + + [Newtonsoft.Json.JsonProperty("OmitXmlDeclaration", Required = Newtonsoft.Json.Required.Always)] + public bool OmitXmlDeclaration { get; set; } + + [Newtonsoft.Json.JsonProperty("NewLineHandling", Required = Newtonsoft.Json.Required.Always)] + public NewLineHandling NewLineHandling { get; set; } + + [Newtonsoft.Json.JsonProperty("NewLineChars", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string NewLineChars { get; set; } + + [Newtonsoft.Json.JsonProperty("Indent", Required = Newtonsoft.Json.Required.Always)] + public bool Indent { get; set; } + + [Newtonsoft.Json.JsonProperty("IndentChars", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string IndentChars { get; set; } + + [Newtonsoft.Json.JsonProperty("NewLineOnAttributes", Required = Newtonsoft.Json.Required.Always)] + public bool NewLineOnAttributes { get; set; } + + [Newtonsoft.Json.JsonProperty("CloseOutput", Required = Newtonsoft.Json.Required.Always)] + public bool CloseOutput { get; set; } + + [Newtonsoft.Json.JsonProperty("ConformanceLevel", Required = Newtonsoft.Json.Required.Always)] + public ConformanceLevel ConformanceLevel { get; set; } + + [Newtonsoft.Json.JsonProperty("CheckCharacters", Required = Newtonsoft.Json.Required.Always)] + public bool CheckCharacters { get; set; } + + [Newtonsoft.Json.JsonProperty("NamespaceHandling", Required = Newtonsoft.Json.Required.Always)] + public NamespaceHandling NamespaceHandling { get; set; } + + [Newtonsoft.Json.JsonProperty("WriteEndDocumentOnClose", Required = Newtonsoft.Json.Required.Always)] + public bool WriteEndDocumentOnClose { get; set; } + + [Newtonsoft.Json.JsonProperty("OutputMethod", Required = Newtonsoft.Json.Required.Always)] + public XmlOutputMethod OutputMethod { get; set; } + + [Newtonsoft.Json.JsonProperty("DoNotEscapeUriAttributes", Required = Newtonsoft.Json.Required.Always)] + public bool DoNotEscapeUriAttributes { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class Encoding + { + [Newtonsoft.Json.JsonProperty("BodyName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string BodyName { get; set; } + + [Newtonsoft.Json.JsonProperty("EncodingName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string EncodingName { get; set; } + + [Newtonsoft.Json.JsonProperty("HeaderName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string HeaderName { get; set; } + + [Newtonsoft.Json.JsonProperty("WebName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string WebName { get; set; } + + [Newtonsoft.Json.JsonProperty("WindowsCodePage", Required = Newtonsoft.Json.Required.Always)] + public int WindowsCodePage { get; set; } + + [Newtonsoft.Json.JsonProperty("IsBrowserDisplay", Required = Newtonsoft.Json.Required.Always)] + public bool IsBrowserDisplay { get; set; } + + [Newtonsoft.Json.JsonProperty("IsBrowserSave", Required = Newtonsoft.Json.Required.Always)] + public bool IsBrowserSave { get; set; } + + [Newtonsoft.Json.JsonProperty("IsMailNewsDisplay", Required = Newtonsoft.Json.Required.Always)] + public bool IsMailNewsDisplay { get; set; } + + [Newtonsoft.Json.JsonProperty("IsMailNewsSave", Required = Newtonsoft.Json.Required.Always)] + public bool IsMailNewsSave { get; set; } + + [Newtonsoft.Json.JsonProperty("IsSingleByte", Required = Newtonsoft.Json.Required.Always)] + public bool IsSingleByte { get; set; } + + [Newtonsoft.Json.JsonProperty("EncoderFallback", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public EncoderFallback EncoderFallback { get; set; } + + [Newtonsoft.Json.JsonProperty("DecoderFallback", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public DecoderFallback DecoderFallback { get; set; } + + [Newtonsoft.Json.JsonProperty("IsReadOnly", Required = Newtonsoft.Json.Required.Always)] + public bool IsReadOnly { get; set; } + + [Newtonsoft.Json.JsonProperty("CodePage", Required = Newtonsoft.Json.Required.Always)] + public int CodePage { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class EncoderFallback + { + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class DecoderFallback + { + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum NewLineHandling + { + Replace = 0, + + Entitize = 1, + + None = 2, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum ConformanceLevel + { + Auto = 0, + + Fragment = 1, + + Document = 2, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + [System.Flags] + public enum NamespaceHandling + { + Default = 0, + + OmitDuplicates = 1, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum XmlOutputMethod + { + Xml = 0, + + Html = 1, + + Text = 2, + + AutoDetect = 3, + + } + + /// <summary>Base class to handle serializing and deserializing strongly-typed objects using ObjectContent. </summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class MediaTypeFormatter + { + /// <summary>Gets the mutable collection of media types supported bythis MediaTypeFormatter.</summary> + [Newtonsoft.Json.JsonProperty("SupportedMediaTypes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<MediaTypeHeaderValue> SupportedMediaTypes { get; set; } + + /// <summary>Gets the mutable collection of character encodings supported bythis MediaTypeFormatter.</summary> + [Newtonsoft.Json.JsonProperty("SupportedEncodings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<Encoding> SupportedEncodings { get; set; } + + /// <summary>Gets the mutable collection of MediaTypeMapping objects that match HTTP requests to media types.</summary> + [Newtonsoft.Json.JsonProperty("MediaTypeMappings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<MediaTypeMapping> MediaTypeMappings { get; set; } + + /// <summary>Gets or sets the IRequiredMemberSelector instance used to determine required members.</summary> + [Newtonsoft.Json.JsonProperty("RequiredMemberSelector", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public IRequiredMemberSelector RequiredMemberSelector { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class MediaTypeHeaderValue + { + [Newtonsoft.Json.JsonProperty("CharSet", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string CharSet { get; set; } + + [Newtonsoft.Json.JsonProperty("Parameters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<NameValueHeaderValue> Parameters { get; set; } + + [Newtonsoft.Json.JsonProperty("MediaType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string MediaType { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class NameValueHeaderValue + { + [Newtonsoft.Json.JsonProperty("Name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("Value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Value { get; set; } + + + } + + /// <summary>An abstract base class used to create an association between HttpRequestMessage or HttpResponseMessage instances that have certain characteristics and a specific MediaTypeHeaderValue. </summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class MediaTypeMapping + { + /// <summary>Gets the MediaTypeHeaderValue that is associated with HttpRequestMessage or HttpResponseMessage instances that have the given characteristics of the MediaTypeMapping. </summary> + [Newtonsoft.Json.JsonProperty("MediaType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public MediaTypeHeaderValue MediaType { get; set; } + + + } + + /// <summary>Defines method that determines whether a given member is required on deserialization.</summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class IRequiredMemberSelector + { + + } + + /// <summary>Represents the MediaTypeFormatter class to handle JSON. </summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class JsonMediaTypeFormatter : BaseJsonMediaTypeFormatter + { + /// <summary>Gets or sets a value indicating whether to use DataContractJsonSerializer by default. </summary> + [Newtonsoft.Json.JsonProperty("UseDataContractJsonSerializer", Required = Newtonsoft.Json.Required.Always)] + public bool UseDataContractJsonSerializer { get; set; } + + /// <summary>Gets or sets a value indicating whether to indent elements when writing data. </summary> + [Newtonsoft.Json.JsonProperty("Indent", Required = Newtonsoft.Json.Required.Always)] + public bool Indent { get; set; } + + /// <summary>Gets or sets the maximum depth allowed by this formatter.</summary> + [Newtonsoft.Json.JsonProperty("MaxDepth", Required = Newtonsoft.Json.Required.Always)] + public int MaxDepth { get; set; } + + + } + + /// <summary>Abstract media type formatter class to support Bson and Json.</summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class BaseJsonMediaTypeFormatter : MediaTypeFormatter + { + /// <summary>Gets or sets the JsonSerializerSettings used to configure the JsonSerializer.</summary> + [Newtonsoft.Json.JsonProperty("SerializerSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public JsonSerializerSettings SerializerSettings { get; set; } + + /// <summary>Gets or sets the maximum depth allowed by this formatter.</summary> + [Newtonsoft.Json.JsonProperty("MaxDepth", Required = Newtonsoft.Json.Required.Always)] + public int MaxDepth { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class JsonSerializerSettings + { + [Newtonsoft.Json.JsonProperty("ReferenceLoopHandling", Required = Newtonsoft.Json.Required.Always)] + public ReferenceLoopHandling ReferenceLoopHandling { get; set; } + + [Newtonsoft.Json.JsonProperty("MissingMemberHandling", Required = Newtonsoft.Json.Required.Always)] + public MissingMemberHandling MissingMemberHandling { get; set; } + + [Newtonsoft.Json.JsonProperty("ObjectCreationHandling", Required = Newtonsoft.Json.Required.Always)] + public ObjectCreationHandling ObjectCreationHandling { get; set; } + + [Newtonsoft.Json.JsonProperty("NullValueHandling", Required = Newtonsoft.Json.Required.Always)] + public NullValueHandling NullValueHandling { get; set; } + + [Newtonsoft.Json.JsonProperty("DefaultValueHandling", Required = Newtonsoft.Json.Required.Always)] + public DefaultValueHandling DefaultValueHandling { get; set; } + + [Newtonsoft.Json.JsonProperty("Converters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<JsonConverter> Converters { get; set; } + + [Newtonsoft.Json.JsonProperty("PreserveReferencesHandling", Required = Newtonsoft.Json.Required.Always)] + public PreserveReferencesHandling PreserveReferencesHandling { get; set; } + + [Newtonsoft.Json.JsonProperty("TypeNameHandling", Required = Newtonsoft.Json.Required.Always)] + public TypeNameHandling TypeNameHandling { get; set; } + + [Newtonsoft.Json.JsonProperty("MetadataPropertyHandling", Required = Newtonsoft.Json.Required.Always)] + public MetadataPropertyHandling MetadataPropertyHandling { get; set; } + + [Newtonsoft.Json.JsonProperty("TypeNameAssemblyFormat", Required = Newtonsoft.Json.Required.Always)] + public FormatterAssemblyStyle TypeNameAssemblyFormat { get; set; } + + [Newtonsoft.Json.JsonProperty("TypeNameAssemblyFormatHandling", Required = Newtonsoft.Json.Required.Always)] + public TypeNameAssemblyFormatHandling TypeNameAssemblyFormatHandling { get; set; } + + [Newtonsoft.Json.JsonProperty("ConstructorHandling", Required = Newtonsoft.Json.Required.Always)] + public ConstructorHandling ConstructorHandling { get; set; } + + [Newtonsoft.Json.JsonProperty("ContractResolver", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public IContractResolver ContractResolver { get; set; } + + [Newtonsoft.Json.JsonProperty("EqualityComparer", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public IEqualityComparer EqualityComparer { get; set; } + + [Newtonsoft.Json.JsonProperty("ReferenceResolver", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public IReferenceResolver ReferenceResolver { get; set; } + + [Newtonsoft.Json.JsonProperty("ReferenceResolverProvider", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public FuncOfIReferenceResolver ReferenceResolverProvider { get; set; } + + [Newtonsoft.Json.JsonProperty("TraceWriter", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ITraceWriter TraceWriter { get; set; } + + [Newtonsoft.Json.JsonProperty("Binder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SerializationBinder Binder { get; set; } + + [Newtonsoft.Json.JsonProperty("SerializationBinder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ISerializationBinder SerializationBinder { get; set; } + + [Newtonsoft.Json.JsonProperty("Error", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public EventHandlerOfErrorEventArgs Error { get; set; } + + [Newtonsoft.Json.JsonProperty("Context", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public StreamingContext Context { get; set; } = new StreamingContext(); + + [Newtonsoft.Json.JsonProperty("DateFormatString", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string DateFormatString { get; set; } + + [Newtonsoft.Json.JsonProperty("MaxDepth", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? MaxDepth { get; set; } + + [Newtonsoft.Json.JsonProperty("Formatting", Required = Newtonsoft.Json.Required.Always)] + public Formatting Formatting { get; set; } + + [Newtonsoft.Json.JsonProperty("DateFormatHandling", Required = Newtonsoft.Json.Required.Always)] + public DateFormatHandling DateFormatHandling { get; set; } + + [Newtonsoft.Json.JsonProperty("DateTimeZoneHandling", Required = Newtonsoft.Json.Required.Always)] + public DateTimeZoneHandling DateTimeZoneHandling { get; set; } + + [Newtonsoft.Json.JsonProperty("DateParseHandling", Required = Newtonsoft.Json.Required.Always)] + public DateParseHandling DateParseHandling { get; set; } + + [Newtonsoft.Json.JsonProperty("FloatFormatHandling", Required = Newtonsoft.Json.Required.Always)] + public FloatFormatHandling FloatFormatHandling { get; set; } + + [Newtonsoft.Json.JsonProperty("FloatParseHandling", Required = Newtonsoft.Json.Required.Always)] + public FloatParseHandling FloatParseHandling { get; set; } + + [Newtonsoft.Json.JsonProperty("StringEscapeHandling", Required = Newtonsoft.Json.Required.Always)] + public StringEscapeHandling StringEscapeHandling { get; set; } + + [Newtonsoft.Json.JsonProperty("Culture", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Culture { get; set; } + + [Newtonsoft.Json.JsonProperty("CheckAdditionalContent", Required = Newtonsoft.Json.Required.Always)] + public bool CheckAdditionalContent { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum ReferenceLoopHandling + { + Error = 0, + + Ignore = 1, + + Serialize = 2, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum MissingMemberHandling + { + Ignore = 0, + + Error = 1, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum ObjectCreationHandling + { + Auto = 0, + + Reuse = 1, + + Replace = 2, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum NullValueHandling + { + Include = 0, + + Ignore = 1, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + [System.Flags] + public enum DefaultValueHandling + { + Include = 0, + + Ignore = 1, + + Populate = 2, + + IgnoreAndPopulate = 3, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class JsonConverter + { + [Newtonsoft.Json.JsonProperty("CanRead", Required = Newtonsoft.Json.Required.Always)] + public bool CanRead { get; set; } + + [Newtonsoft.Json.JsonProperty("CanWrite", Required = Newtonsoft.Json.Required.Always)] + public bool CanWrite { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + [System.Flags] + public enum PreserveReferencesHandling + { + None = 0, + + Objects = 1, + + Arrays = 2, + + All = 3, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + [System.Flags] + public enum TypeNameHandling + { + None = 0, + + Objects = 1, + + Arrays = 2, + + All = 3, + + Auto = 4, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum MetadataPropertyHandling + { + Default = 0, + + ReadAhead = 1, + + Ignore = 2, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum FormatterAssemblyStyle + { + Simple = 0, + + Full = 1, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum TypeNameAssemblyFormatHandling + { + Simple = 0, + + Full = 1, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum ConstructorHandling + { + Default = 0, + + AllowNonPublicDefaultConstructor = 1, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class IContractResolver + { + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class IEqualityComparer + { + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class IReferenceResolver + { + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class FuncOfIReferenceResolver : MulticastDelegate + { + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class ITraceWriter + { + [Newtonsoft.Json.JsonProperty("LevelFilter", Required = Newtonsoft.Json.Required.Always)] + public TraceLevel LevelFilter { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum TraceLevel + { + Off = 0, + + Error = 1, + + Warning = 2, + + Info = 3, + + Verbose = 4, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class SerializationBinder + { + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class ISerializationBinder + { + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class EventHandlerOfErrorEventArgs : MulticastDelegate + { + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class StreamingContext + { + [Newtonsoft.Json.JsonProperty("Context", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public object Context { get; set; } + + [Newtonsoft.Json.JsonProperty("State", Required = Newtonsoft.Json.Required.Always)] + public StreamingContextStates State { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + [System.Flags] + public enum StreamingContextStates + { + CrossProcess = 1, + + CrossMachine = 2, + + File = 4, + + Persistence = 8, + + Remoting = 16, + + Other = 32, + + Clone = 64, + + CrossAppDomain = 128, + + All = 255, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum Formatting + { + None = 0, + + Indented = 1, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum DateFormatHandling + { + IsoDateFormat = 0, + + MicrosoftDateFormat = 1, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum DateTimeZoneHandling + { + Local = 0, + + Utc = 1, + + Unspecified = 2, + + RoundtripKind = 3, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum DateParseHandling + { + None = 0, + + DateTime = 1, + + DateTimeOffset = 2, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum FloatFormatHandling + { + String = 0, + + Symbol = 1, + + DefaultValue = 2, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum FloatParseHandling + { + Double = 0, + + Decimal = 1, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum StringEscapeHandling + { + Default = 0, + + EscapeNonAscii = 1, + + EscapeHtml = 2, + + } + + /// <summary>MediaTypeFormatter class for handling HTML form URL-ended data, also known as application/x-www-form-urlencoded. </summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class FormUrlEncodedMediaTypeFormatter : MediaTypeFormatter + { + /// <summary>Gets or sets the maximum depth allowed by this formatter.</summary> + [Newtonsoft.Json.JsonProperty("MaxDepth", Required = Newtonsoft.Json.Required.Always)] + public int MaxDepth { get; set; } + + /// <summary>Gets or sets the size of the buffer when reading the incoming stream.</summary> + [Newtonsoft.Json.JsonProperty("ReadBufferSize", Required = Newtonsoft.Json.Required.Always)] + public int ReadBufferSize { get; set; } + + + } + + /// <summary>Represents information that describes the HTTP controller.</summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class HttpControllerDescriptor + { + /// <summary>Gets the properties associated with this instance.</summary> + [Newtonsoft.Json.JsonProperty("Properties", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.IDictionary<string, object> Properties { get; set; } + + /// <summary>Gets or sets the configurations associated with the controller.</summary> + [Newtonsoft.Json.JsonProperty("Configuration", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public HttpConfiguration Configuration { get; set; } + + /// <summary>Gets or sets the name of the controller.</summary> + [Newtonsoft.Json.JsonProperty("ControllerName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ControllerName { get; set; } + + /// <summary>Gets or sets the type of the controller.</summary> + [Newtonsoft.Json.JsonProperty("ControllerType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ControllerType { get; set; } + + + } + + /// <summary>Represents an HTTP controller.</summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class IHttpController + { + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class HttpRequestMessage + { + [Newtonsoft.Json.JsonProperty("Version", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Version Version { get; set; } + + [Newtonsoft.Json.JsonProperty("Content", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public HttpContent Content { get; set; } + + [Newtonsoft.Json.JsonProperty("Method", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public HttpMethod Method { get; set; } + + [Newtonsoft.Json.JsonProperty("RequestUri", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Uri RequestUri { get; set; } + + [Newtonsoft.Json.JsonProperty("Headers", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public HttpRequestHeaders Headers { get; set; } + + [Newtonsoft.Json.JsonProperty("Properties", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.IDictionary<string, object> Properties { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class Version + { + [Newtonsoft.Json.JsonProperty("Major", Required = Newtonsoft.Json.Required.Always)] + public int Major { get; set; } + + [Newtonsoft.Json.JsonProperty("Minor", Required = Newtonsoft.Json.Required.Always)] + public int Minor { get; set; } + + [Newtonsoft.Json.JsonProperty("Build", Required = Newtonsoft.Json.Required.Always)] + public int Build { get; set; } + + [Newtonsoft.Json.JsonProperty("Revision", Required = Newtonsoft.Json.Required.Always)] + public int Revision { get; set; } + + [Newtonsoft.Json.JsonProperty("MajorRevision", Required = Newtonsoft.Json.Required.Always)] + public int MajorRevision { get; set; } + + [Newtonsoft.Json.JsonProperty("MinorRevision", Required = Newtonsoft.Json.Required.Always)] + public int MinorRevision { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class HttpContent + { + [Newtonsoft.Json.JsonProperty("Headers", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public HttpContentHeaders Headers { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class HttpContentHeaders : Anonymous2 + { + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class ContentDispositionHeaderValue + { + [Newtonsoft.Json.JsonProperty("DispositionType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string DispositionType { get; set; } + + [Newtonsoft.Json.JsonProperty("Parameters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<NameValueHeaderValue> Parameters { get; set; } + + [Newtonsoft.Json.JsonProperty("Name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("FileName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string FileName { get; set; } + + [Newtonsoft.Json.JsonProperty("FileNameStar", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string FileNameStar { get; set; } + + [Newtonsoft.Json.JsonProperty("CreationDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? CreationDate { get; set; } + + [Newtonsoft.Json.JsonProperty("ModificationDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? ModificationDate { get; set; } + + [Newtonsoft.Json.JsonProperty("ReadDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? ReadDate { get; set; } + + [Newtonsoft.Json.JsonProperty("Size", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? Size { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class ContentRangeHeaderValue + { + [Newtonsoft.Json.JsonProperty("Unit", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Unit { get; set; } + + [Newtonsoft.Json.JsonProperty("From", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? From { get; set; } + + [Newtonsoft.Json.JsonProperty("To", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? To { get; set; } + + [Newtonsoft.Json.JsonProperty("Length", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? Length { get; set; } + + [Newtonsoft.Json.JsonProperty("HasLength", Required = Newtonsoft.Json.Required.Always)] + public bool HasLength { get; set; } + + [Newtonsoft.Json.JsonProperty("HasRange", Required = Newtonsoft.Json.Required.Always)] + public bool HasRange { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class KeyValuePairOfStringAndIEnumerableOfString + { + [Newtonsoft.Json.JsonProperty("Key", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Key { get; set; } + + [Newtonsoft.Json.JsonProperty("Value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<string> Value { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class HttpMethod + { + [Newtonsoft.Json.JsonProperty("Method", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Method { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class HttpRequestHeaders : Anonymous3 + { + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class MediaTypeWithQualityHeaderValue : MediaTypeHeaderValue + { + [Newtonsoft.Json.JsonProperty("Quality", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? Quality { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class StringWithQualityHeaderValue + { + [Newtonsoft.Json.JsonProperty("Value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Value { get; set; } + + [Newtonsoft.Json.JsonProperty("Quality", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? Quality { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class AuthenticationHeaderValue + { + [Newtonsoft.Json.JsonProperty("Scheme", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Scheme { get; set; } + + [Newtonsoft.Json.JsonProperty("Parameter", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Parameter { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class NameValueWithParametersHeaderValue : NameValueHeaderValue + { + [Newtonsoft.Json.JsonProperty("Parameters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<NameValueHeaderValue> Parameters { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class EntityTagHeaderValue + { + [Newtonsoft.Json.JsonProperty("Tag", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Tag { get; set; } + + [Newtonsoft.Json.JsonProperty("IsWeak", Required = Newtonsoft.Json.Required.Always)] + public bool IsWeak { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class RangeConditionHeaderValue + { + [Newtonsoft.Json.JsonProperty("Date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Date { get; set; } + + [Newtonsoft.Json.JsonProperty("EntityTag", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public EntityTagHeaderValue EntityTag { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class RangeHeaderValue + { + [Newtonsoft.Json.JsonProperty("Unit", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Unit { get; set; } + + [Newtonsoft.Json.JsonProperty("Ranges", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<RangeItemHeaderValue> Ranges { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class RangeItemHeaderValue + { + [Newtonsoft.Json.JsonProperty("From", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? From { get; set; } + + [Newtonsoft.Json.JsonProperty("To", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? To { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class TransferCodingWithQualityHeaderValue : TransferCodingHeaderValue + { + [Newtonsoft.Json.JsonProperty("Quality", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? Quality { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class TransferCodingHeaderValue + { + [Newtonsoft.Json.JsonProperty("Value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Value { get; set; } + + [Newtonsoft.Json.JsonProperty("Parameters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<NameValueHeaderValue> Parameters { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class ProductInfoHeaderValue + { + [Newtonsoft.Json.JsonProperty("Product", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ProductHeaderValue Product { get; set; } + + [Newtonsoft.Json.JsonProperty("Comment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Comment { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class ProductHeaderValue + { + [Newtonsoft.Json.JsonProperty("Name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("Version", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Version { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class CacheControlHeaderValue + { + [Newtonsoft.Json.JsonProperty("NoCache", Required = Newtonsoft.Json.Required.Always)] + public bool NoCache { get; set; } + + [Newtonsoft.Json.JsonProperty("NoCacheHeaders", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<string> NoCacheHeaders { get; set; } + + [Newtonsoft.Json.JsonProperty("NoStore", Required = Newtonsoft.Json.Required.Always)] + public bool NoStore { get; set; } + + [Newtonsoft.Json.JsonProperty("MaxAge", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.TimeSpan? MaxAge { get; set; } + + [Newtonsoft.Json.JsonProperty("SharedMaxAge", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.TimeSpan? SharedMaxAge { get; set; } + + [Newtonsoft.Json.JsonProperty("MaxStale", Required = Newtonsoft.Json.Required.Always)] + public bool MaxStale { get; set; } + + [Newtonsoft.Json.JsonProperty("MaxStaleLimit", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.TimeSpan? MaxStaleLimit { get; set; } + + [Newtonsoft.Json.JsonProperty("MinFresh", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.TimeSpan? MinFresh { get; set; } + + [Newtonsoft.Json.JsonProperty("NoTransform", Required = Newtonsoft.Json.Required.Always)] + public bool NoTransform { get; set; } + + [Newtonsoft.Json.JsonProperty("OnlyIfCached", Required = Newtonsoft.Json.Required.Always)] + public bool OnlyIfCached { get; set; } + + [Newtonsoft.Json.JsonProperty("Public", Required = Newtonsoft.Json.Required.Always)] + public bool Public { get; set; } + + [Newtonsoft.Json.JsonProperty("Private", Required = Newtonsoft.Json.Required.Always)] + public bool Private { get; set; } + + [Newtonsoft.Json.JsonProperty("PrivateHeaders", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<string> PrivateHeaders { get; set; } + + [Newtonsoft.Json.JsonProperty("MustRevalidate", Required = Newtonsoft.Json.Required.Always)] + public bool MustRevalidate { get; set; } + + [Newtonsoft.Json.JsonProperty("ProxyRevalidate", Required = Newtonsoft.Json.Required.Always)] + public bool ProxyRevalidate { get; set; } + + [Newtonsoft.Json.JsonProperty("Extensions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<NameValueHeaderValue> Extensions { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class ViaHeaderValue + { + [Newtonsoft.Json.JsonProperty("ProtocolName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ProtocolName { get; set; } + + [Newtonsoft.Json.JsonProperty("ProtocolVersion", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ProtocolVersion { get; set; } + + [Newtonsoft.Json.JsonProperty("ReceivedBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ReceivedBy { get; set; } + + [Newtonsoft.Json.JsonProperty("Comment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Comment { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class WarningHeaderValue + { + [Newtonsoft.Json.JsonProperty("Code", Required = Newtonsoft.Json.Required.Always)] + public int Code { get; set; } + + [Newtonsoft.Json.JsonProperty("Agent", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Agent { get; set; } + + [Newtonsoft.Json.JsonProperty("Text", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Text { get; set; } + + [Newtonsoft.Json.JsonProperty("Date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Date { get; set; } + + + } + + /// <summary>Represents the context associated with a request.</summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class HttpRequestContext + { + /// <summary>Gets or sets the client certificate.</summary> + [Newtonsoft.Json.JsonProperty("ClientCertificate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public X509Certificate2 ClientCertificate { get; set; } + + /// <summary>Gets or sets the configuration.</summary> + [Newtonsoft.Json.JsonProperty("Configuration", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public HttpConfiguration Configuration { get; set; } + + /// <summary>Gets or sets a value indicating whether error details, such as exception messages and stack traces, should be included in the response for this request.</summary> + [Newtonsoft.Json.JsonProperty("IncludeErrorDetail", Required = Newtonsoft.Json.Required.Always)] + public bool IncludeErrorDetail { get; set; } + + /// <summary>Gets or sets a value indicating whether the request originates from a local address.</summary> + [Newtonsoft.Json.JsonProperty("IsLocal", Required = Newtonsoft.Json.Required.Always)] + public bool IsLocal { get; set; } + + /// <summary>.Gets or sets the principal</summary> + [Newtonsoft.Json.JsonProperty("Principal", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public IPrincipal Principal { get; set; } + + /// <summary>Gets or sets the route data.</summary> + [Newtonsoft.Json.JsonProperty("RouteData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public IHttpRouteData RouteData { get; set; } + + /// <summary>Gets or sets the factory used to generate URLs to other APIs.</summary> + [Newtonsoft.Json.JsonProperty("Url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public UrlHelper Url { get; set; } + + /// <summary>Gets or sets the virtual path root.</summary> + [Newtonsoft.Json.JsonProperty("VirtualPathRoot", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string VirtualPathRoot { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class X509Certificate2 : X509Certificate + { + [Newtonsoft.Json.JsonProperty("Archived", Required = Newtonsoft.Json.Required.Always)] + public bool Archived { get; set; } + + [Newtonsoft.Json.JsonProperty("Extensions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<Extensions> Extensions { get; set; } + + [Newtonsoft.Json.JsonProperty("FriendlyName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string FriendlyName { get; set; } + + [Newtonsoft.Json.JsonProperty("IssuerName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public X500DistinguishedName IssuerName { get; set; } + + [Newtonsoft.Json.JsonProperty("NotAfter", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public System.DateTimeOffset NotAfter { get; set; } + + [Newtonsoft.Json.JsonProperty("NotBefore", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public System.DateTimeOffset NotBefore { get; set; } + + [Newtonsoft.Json.JsonProperty("HasPrivateKey", Required = Newtonsoft.Json.Required.Always)] + public bool HasPrivateKey { get; set; } + + [Newtonsoft.Json.JsonProperty("PrivateKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public AsymmetricAlgorithm PrivateKey { get; set; } + + [Newtonsoft.Json.JsonProperty("PublicKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public PublicKey PublicKey { get; set; } + + [Newtonsoft.Json.JsonProperty("RawData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public byte[] RawData { get; set; } + + [Newtonsoft.Json.JsonProperty("SerialNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string SerialNumber { get; set; } + + [Newtonsoft.Json.JsonProperty("SubjectName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public X500DistinguishedName SubjectName { get; set; } + + [Newtonsoft.Json.JsonProperty("SignatureAlgorithm", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Oid SignatureAlgorithm { get; set; } + + [Newtonsoft.Json.JsonProperty("Thumbprint", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Thumbprint { get; set; } + + [Newtonsoft.Json.JsonProperty("Version", Required = Newtonsoft.Json.Required.Always)] + public int Version { get; set; } + + [Newtonsoft.Json.JsonProperty("CertContext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SafeCertContextHandle CertContext { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class X500DistinguishedName : AsnEncodedData + { + [Newtonsoft.Json.JsonProperty("Name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class AsnEncodedData + { + [Newtonsoft.Json.JsonProperty("Oid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Oid Oid { get; set; } + + [Newtonsoft.Json.JsonProperty("RawData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public byte[] RawData { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class Oid + { + [Newtonsoft.Json.JsonProperty("Value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Value { get; set; } + + [Newtonsoft.Json.JsonProperty("FriendlyName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string FriendlyName { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class AsymmetricAlgorithm + { + [Newtonsoft.Json.JsonProperty("KeySize", Required = Newtonsoft.Json.Required.Always)] + public int KeySize { get; set; } + + [Newtonsoft.Json.JsonProperty("LegalKeySizes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<KeySizes> LegalKeySizes { get; set; } + + [Newtonsoft.Json.JsonProperty("SignatureAlgorithm", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string SignatureAlgorithm { get; set; } + + [Newtonsoft.Json.JsonProperty("KeyExchangeAlgorithm", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string KeyExchangeAlgorithm { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class KeySizes + { + [Newtonsoft.Json.JsonProperty("MinSize", Required = Newtonsoft.Json.Required.Always)] + public int MinSize { get; set; } + + [Newtonsoft.Json.JsonProperty("MaxSize", Required = Newtonsoft.Json.Required.Always)] + public int MaxSize { get; set; } + + [Newtonsoft.Json.JsonProperty("SkipSize", Required = Newtonsoft.Json.Required.Always)] + public int SkipSize { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class PublicKey + { + [Newtonsoft.Json.JsonProperty("Key", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public AsymmetricAlgorithm Key { get; set; } + + [Newtonsoft.Json.JsonProperty("Oid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Oid Oid { get; set; } + + [Newtonsoft.Json.JsonProperty("EncodedKeyValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public AsnEncodedData EncodedKeyValue { get; set; } + + [Newtonsoft.Json.JsonProperty("EncodedParameters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public AsnEncodedData EncodedParameters { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class SafeCertContextHandle : SafeHandleZeroOrMinusOneIsInvalid + { + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class SafeHandleZeroOrMinusOneIsInvalid : SafeHandle + { + [Newtonsoft.Json.JsonProperty("IsInvalid", Required = Newtonsoft.Json.Required.Always)] + public bool IsInvalid { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class SafeHandle : CriticalFinalizerObject + { + [Newtonsoft.Json.JsonProperty("IsClosed", Required = Newtonsoft.Json.Required.Always)] + public bool IsClosed { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class CriticalFinalizerObject + { + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class X509Certificate + { + [Newtonsoft.Json.JsonProperty("Handle", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public IntPtr Handle { get; set; } = new IntPtr(); + + [Newtonsoft.Json.JsonProperty("Issuer", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Issuer { get; set; } + + [Newtonsoft.Json.JsonProperty("Subject", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Subject { get; set; } + + [Newtonsoft.Json.JsonProperty("CertContext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SafeCertContextHandle2 CertContext { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class SafeCertContextHandle2 : SafeHandleZeroOrMinusOneIsInvalid + { + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class IPrincipal + { + [Newtonsoft.Json.JsonProperty("Identity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public IIdentity Identity { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class IIdentity + { + [Newtonsoft.Json.JsonProperty("Name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("AuthenticationType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string AuthenticationType { get; set; } + + [Newtonsoft.Json.JsonProperty("IsAuthenticated", Required = Newtonsoft.Json.Required.Always)] + public bool IsAuthenticated { get; set; } + + + } + + /// <summary>Provides information about a route.</summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class IHttpRouteData + { + /// <summary>Gets the object that represents the route.</summary> + [Newtonsoft.Json.JsonProperty("Route", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public IHttpRoute Route { get; set; } + + /// <summary>Gets a collection of URL parameter values and default values for the route.</summary> + [Newtonsoft.Json.JsonProperty("Values", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.IDictionary<string, object> Values { get; set; } + + + } + + /// <summary>Represents a factory for creating URLs. </summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class UrlHelper + { + /// <summary>Gets or sets the HttpRequestMessage of the current UrlHelper instance.</summary> + [Newtonsoft.Json.JsonProperty("Request", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public HttpRequestMessage Request { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class Evidence + { + private System.Collections.Generic.IDictionary<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>(); + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties; } + set { _additionalProperties = value; } + } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class PermissionSet + { + private System.Collections.Generic.IDictionary<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>(); + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties; } + set { _additionalProperties = value; } + } + + + } + + /// <summary>Collection class that contains MediaTypeFormatter instances. </summary> + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class Anonymous + { + /// <summary>Gets the MediaTypeFormatter to use for XML.</summary> + [Newtonsoft.Json.JsonProperty("XmlFormatter", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public XmlMediaTypeFormatter XmlFormatter { get; set; } + + /// <summary>Gets the MediaTypeFormatter to use for JSON.</summary> + [Newtonsoft.Json.JsonProperty("JsonFormatter", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public JsonMediaTypeFormatter JsonFormatter { get; set; } + + /// <summary>Gets the MediaTypeFormatter to use for application/x-www-form-urlencoded data.</summary> + [Newtonsoft.Json.JsonProperty("FormUrlEncodedFormatter", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public FormUrlEncodedMediaTypeFormatter FormUrlEncodedFormatter { get; set; } + + [Newtonsoft.Json.JsonProperty("WritingFormatters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<MediaTypeFormatter> WritingFormatters { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class Anonymous2 + { + [Newtonsoft.Json.JsonProperty("Allow", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<string> Allow { get; set; } + + [Newtonsoft.Json.JsonProperty("ContentDisposition", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ContentDispositionHeaderValue ContentDisposition { get; set; } + + [Newtonsoft.Json.JsonProperty("ContentEncoding", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<string> ContentEncoding { get; set; } + + [Newtonsoft.Json.JsonProperty("ContentLanguage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<string> ContentLanguage { get; set; } + + [Newtonsoft.Json.JsonProperty("ContentLength", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? ContentLength { get; set; } + + [Newtonsoft.Json.JsonProperty("ContentLocation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Uri ContentLocation { get; set; } + + [Newtonsoft.Json.JsonProperty("ContentMD5", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public byte[] ContentMD5 { get; set; } + + [Newtonsoft.Json.JsonProperty("ContentRange", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ContentRangeHeaderValue ContentRange { get; set; } + + [Newtonsoft.Json.JsonProperty("ContentType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public MediaTypeHeaderValue ContentType { get; set; } + + [Newtonsoft.Json.JsonProperty("Expires", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Expires { get; set; } + + [Newtonsoft.Json.JsonProperty("LastModified", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? LastModified { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class Anonymous3 + { + [Newtonsoft.Json.JsonProperty("Accept", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<MediaTypeWithQualityHeaderValue> Accept { get; set; } + + [Newtonsoft.Json.JsonProperty("AcceptCharset", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<StringWithQualityHeaderValue> AcceptCharset { get; set; } + + [Newtonsoft.Json.JsonProperty("AcceptEncoding", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<StringWithQualityHeaderValue> AcceptEncoding { get; set; } + + [Newtonsoft.Json.JsonProperty("AcceptLanguage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<StringWithQualityHeaderValue> AcceptLanguage { get; set; } + + [Newtonsoft.Json.JsonProperty("Authorization", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public AuthenticationHeaderValue Authorization { get; set; } + + [Newtonsoft.Json.JsonProperty("Expect", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<NameValueWithParametersHeaderValue> Expect { get; set; } + + [Newtonsoft.Json.JsonProperty("ExpectContinue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? ExpectContinue { get; set; } + + [Newtonsoft.Json.JsonProperty("From", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string From { get; set; } + + [Newtonsoft.Json.JsonProperty("Host", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Host { get; set; } + + [Newtonsoft.Json.JsonProperty("IfMatch", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<EntityTagHeaderValue> IfMatch { get; set; } + + [Newtonsoft.Json.JsonProperty("IfModifiedSince", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? IfModifiedSince { get; set; } + + [Newtonsoft.Json.JsonProperty("IfNoneMatch", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<EntityTagHeaderValue> IfNoneMatch { get; set; } + + [Newtonsoft.Json.JsonProperty("IfRange", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public RangeConditionHeaderValue IfRange { get; set; } + + [Newtonsoft.Json.JsonProperty("IfUnmodifiedSince", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? IfUnmodifiedSince { get; set; } + + [Newtonsoft.Json.JsonProperty("MaxForwards", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? MaxForwards { get; set; } + + [Newtonsoft.Json.JsonProperty("ProxyAuthorization", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public AuthenticationHeaderValue ProxyAuthorization { get; set; } + + [Newtonsoft.Json.JsonProperty("Range", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public RangeHeaderValue Range { get; set; } + + [Newtonsoft.Json.JsonProperty("Referrer", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Uri Referrer { get; set; } + + [Newtonsoft.Json.JsonProperty("TE", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<TransferCodingWithQualityHeaderValue> TE { get; set; } + + [Newtonsoft.Json.JsonProperty("UserAgent", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<ProductInfoHeaderValue> UserAgent { get; set; } + + [Newtonsoft.Json.JsonProperty("CacheControl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public CacheControlHeaderValue CacheControl { get; set; } + + [Newtonsoft.Json.JsonProperty("Connection", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<string> Connection { get; set; } + + [Newtonsoft.Json.JsonProperty("ConnectionClose", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? ConnectionClose { get; set; } + + [Newtonsoft.Json.JsonProperty("Date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Date { get; set; } + + [Newtonsoft.Json.JsonProperty("Pragma", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<NameValueHeaderValue> Pragma { get; set; } + + [Newtonsoft.Json.JsonProperty("Trailer", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<string> Trailer { get; set; } + + [Newtonsoft.Json.JsonProperty("TransferEncoding", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<TransferCodingHeaderValue> TransferEncoding { get; set; } + + [Newtonsoft.Json.JsonProperty("TransferEncodingChunked", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? TransferEncodingChunked { get; set; } + + [Newtonsoft.Json.JsonProperty("Upgrade", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<ProductHeaderValue> Upgrade { get; set; } + + [Newtonsoft.Json.JsonProperty("Via", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<ViaHeaderValue> Via { get; set; } + + [Newtonsoft.Json.JsonProperty("Warning", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection<WarningHeaderValue> Warning { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class Extensions + { + private System.Collections.Generic.IDictionary<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>(); + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties; } + set { _additionalProperties = value; } + } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.2.3.0 (NJsonSchema v10.1.5.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class FileResponse : System.IDisposable + { + private System.IDisposable _client; + private System.IDisposable _response; + + public int StatusCode { get; private set; } + + public System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> Headers { get; private set; } + + public System.IO.Stream Stream { get; private set; } + + public bool IsPartial + { + get { return StatusCode == 206; } + } + + public FileResponse(int statusCode, System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> headers, System.IO.Stream stream, System.IDisposable client, System.IDisposable response) + { + StatusCode = statusCode; + Headers = headers; + Stream = stream; + _client = client; + _response = response; + } + + public void Dispose() + { + if (Stream != null) + Stream.Dispose(); + if (_response != null) + _response.Dispose(); + if (_client != null) + _client.Dispose(); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.2.3.0 (NJsonSchema v10.1.5.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class ApiException : System.Exception + { + public int StatusCode { get; private set; } + + public string Response { get; private set; } + + public System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> Headers { get; private set; } + + public ApiException(string message, int statusCode, string response, System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> headers, System.Exception innerException) + : base(message + "\n\nStatus: " + statusCode + "\nResponse: \n" + response.Substring(0, response.Length >= 512 ? 512 : response.Length), innerException) + { + StatusCode = statusCode; + Response = response; + Headers = headers; + } + + public override string ToString() + { + return string.Format("HTTP Response: \n\n{0}\n\n{1}", Response, base.ToString()); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.2.3.0 (NJsonSchema v10.1.5.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class ApiException<TResult> : ApiException + { + public TResult Result { get; private set; } + + public ApiException(string message, int statusCode, string response, System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> headers, TResult result, System.Exception innerException) + : base(message, statusCode, response, headers, innerException) + { + Result = result; + } + } + +} + +#pragma warning restore 1591 +#pragma warning restore 1573 +#pragma warning restore 472 +#pragma warning restore 114 +#pragma warning restore 108
\ No newline at end of file diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/packages.config b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/packages.config new file mode 100644 index 000000000..dcc862688 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/packages.config @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="CommandLineParser" version="2.8.0" targetFramework="net461" /> + <package id="ConsoleTables" version="2.4.2" targetFramework="net461" /> + <package id="EntityFramework" version="6.2.0" targetFramework="net461" /> + <package id="Google.Protobuf" version="3.4.1" targetFramework="net461" /> + <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net461" /> +</packages>
\ No newline at end of file diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.EF/EFDataStoreCollection.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.EF/EFDataStoreCollection.cs new file mode 100644 index 000000000..c1b45e37f --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.EF/EFDataStoreCollection.cs @@ -0,0 +1,175 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL; +using Tango.BL.Entities; +using Tango.Core.ExtensionMethods; + +namespace Tango.DataStore.EF +{ + public class EFDataStoreCollection : IDataStoreCollection + { + public string Name { get; } + + public EFDataStoreCollection(String name) + { + Name = name; + } + + public void Put<T>(string key, T value) + { + Put(key, (object)value); + } + + public void Put(string key, object value) + { + Put(key, DataStoreHelper.GetDataType(value), value); + } + + public void Put(string key, DataType type, object value) + { + using (var db = ObservablesContext.CreateDefault()) + { + var globalItem = db.GlobalDataStoreItems.FirstOrDefault(x => x.CollectionName == Name && x.Key == key); + + if (globalItem != null) + { + if (globalItem.DataType != (int)type) + { + throw new InvalidOperationException("A global data store item exists with the same key, but different data type."); + } + } + + DataStoreItem item = db.DataStoreItems.SingleOrDefault(x => x.CollectionName == Name && x.Key == key); + + if (item == null) + { + item = new DataStoreItem(); + db.DataStoreItems.Add(item); + } + + item.CollectionName = Name; + item.Key = key; + item.DataType = (int)type; + item.Value = EFDataStoreHelper.CreateBytes(type, value); + item.IsSynchronized = false; + item.LastUpdated = DateTime.UtcNow; + + db.SaveChanges(); + } + } + + public T Get<T>(string key) + { + return (T)Get(key, null); + } + + public T Get<T>(string key, T defaultValue) + { + return (T)Get(key, (object)defaultValue); + } + + public object Get(string key) + { + return Get(key, null); + } + + public object Get(string key, object defaultValue) + { + return GetItem(key, defaultValue).Value; + } + + public IDataStoreItem GetItem(string key) + { + return GetItem(key, null); + } + + public IDataStoreItem GetItem(string key, object defaultValue) + { + using (var db = ObservablesContext.CreateDefault()) + { + var item = db.DataStoreItems.SingleOrDefault(x => x.CollectionName == Name && x.Key == key); + + if (item == null) + { + var globalItem = db.GlobalDataStoreItems.SingleOrDefault(x => x.CollectionName == Name && x.Key == key); + + if (globalItem == null) + { + if (defaultValue == null) + { + throw new KeyNotFoundException("The specified data store key was not found."); + } + else + { + Put(key, defaultValue); + return GetItem(key); + } + } + else + { + return globalItem.ToDataStoreItem(); + } + } + + return item.ToDataStoreItem(); + } + } + + public List<IDataStoreItem> GetAll() + { + using (var db = ObservablesContext.CreateDefault()) + { + var localItems = db.DataStoreItems.Where(x => x.CollectionName == Name).ToList(); + var globalItems = db.GlobalDataStoreItems.Where(x => x.CollectionName == Name).ToList(); + + foreach (var globalItem in globalItems.ToList()) + { + var localItem = localItems.FirstOrDefault(x => x.CollectionName == globalItem.CollectionName && x.Key == globalItem.Key); + + if (localItem != null) + { + globalItems.Remove(globalItem); + } + } + + return localItems.Select(x => x.ToDataStoreItem()).Concat(localItems.Select(x => x.ToDataStoreItem())).ToList(); + } + } + + public List<IDataStoreItem> GetUnsynchronized() + { + using (var db = ObservablesContext.CreateDefault()) + { + return db.DataStoreItems.Where(x => x.CollectionName == Name && !x.IsSynchronized).ToList().Select(x => x.ToDataStoreItem()).ToList(); + } + } + + public void Delete(string key) + { + using (var db = ObservablesContext.CreateDefault()) + { + db.Database.ExecuteSqlCommand($"DELETE FROM DATA_STORE_ITEMS WHERE COLLECTION_NAME = '{Name}' AND [KEY] = '{key}'"); + } + } + + public void DeleteAll() + { + using (var db = ObservablesContext.CreateDefault()) + { + db.Database.ExecuteSqlCommand($"DELETE FROM DATA_STORE_ITEMS WHERE COLLECTION_NAME = '{Name}'"); + } + } + + public int Count() + { + using (var db = ObservablesContext.CreateDefault()) + { + return db.DataStoreItems.Count(x => x.CollectionName == Name); + } + } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.EF/EFDataStoreHelper.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.EF/EFDataStoreHelper.cs new file mode 100644 index 000000000..5e885458b --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.EF/EFDataStoreHelper.cs @@ -0,0 +1,119 @@ +using Google.Protobuf; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.DataStore.EF +{ + public static class EFDataStoreHelper + { + public static byte[] CreateBytes(DataType type, Object obj) + { + switch (type) + { + case DataType.Int32: + return BitConverter.GetBytes((int)obj); + case DataType.Float: + return BitConverter.GetBytes((float)obj); + case DataType.Double: + return BitConverter.GetBytes((double)obj); + case DataType.Boolean: + return BitConverter.GetBytes((bool)obj); + case DataType.String: + return Encoding.Default.GetBytes(obj.ToString()); + case DataType.Bytes: + return (byte[])obj; + case DataType.Proto: + if (obj is DataStoreProtoObject protoMessage) + { + return protoMessage.ToBytes(); + } + else + { + throw new NotSupportedException($"Data type is 'Proto' but object is not of type '{nameof(DataStoreProtoObject)}'."); + } + } + + throw new NotSupportedException("The specified type is not supported."); + } + + public static Object CreateObject(DataType type, byte[] bytes) + { + switch (type) + { + case DataType.Int32: + return BitConverter.ToInt32(bytes, 0); + case DataType.Float: + return BitConverter.ToSingle(bytes, 0); + case DataType.Double: + return BitConverter.ToDouble(bytes, 0); + case DataType.Boolean: + return BitConverter.ToBoolean(bytes, 0); + case DataType.String: + return Encoding.Default.GetString(bytes); + case DataType.Bytes: + return bytes; + case DataType.Proto: + return DataStoreProtoObject.FromBytes(bytes); + } + + throw new NotSupportedException("The specified type is not supported."); + } + + public static IDataStoreItem CreateDataStoreItem(DataStoreItem item) + { + return new EFDataStoreItem() + { + Guid = item.Guid, + Date = item.LastUpdated, + IsSynchronized = item.IsSynchronized, + Key = item.Key, + Type = (DataType)item.DataType, + Value = CreateObject((DataType)item.DataType, item.Value) + }; + } + + public static IDataStoreItem CreateDataStoreItem(GlobalDataStoreItem item) + { + return new EFDataStoreItem() + { + Guid = item.Guid, + Date = item.LastUpdated, + IsSynchronized = true, + Key = item.Key, + Type = (DataType)item.DataType, + Value = CreateObject((DataType)item.DataType, item.Value) + }; + } + + public static DataStoreItem CreateLocalDbDataStoreItem(IDataStoreItem item, String collection) + { + return new DataStoreItem() + { + Guid = item.Guid, + CollectionName = collection, + LastUpdated = item.Date, + IsSynchronized = item.IsSynchronized, + Key = item.Key, + DataType = (int)item.Type, + Value = CreateBytes(item.Type, item.Value) + }; + } + + public static GlobalDataStoreItem CreateGlobalDbDataStoreItem(IDataStoreItem item, String collection) + { + return new GlobalDataStoreItem() + { + Guid = item.Guid, + CollectionName = collection, + LastUpdated = item.Date, + Key = item.Key, + DataType = (int)item.Type, + Value = CreateBytes(item.Type, item.Value) + }; + } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.EF/EFDataStoreItem.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.EF/EFDataStoreItem.cs new file mode 100644 index 000000000..6bcb97d17 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.EF/EFDataStoreItem.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DataStore.EF +{ + public class EFDataStoreItem : IDataStoreItem + { + public string Guid { get; set; } + public string Key { get; set; } + public DataType Type { get; set; } + public object Value { get; set; } + public DateTime Date { get; set; } + public bool IsSynchronized { get; set; } + + public EFDataStoreItem() + { + Guid = System.Guid.NewGuid().ToString(); + } + + public override string ToString() + { + return DataStoreHelper.FormatDataStoreItem(this); + } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.EF/EFDataStoreManager.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.EF/EFDataStoreManager.cs new file mode 100644 index 000000000..4314a25f9 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.EF/EFDataStoreManager.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL; + +namespace Tango.DataStore.EF +{ + public class EFDataStoreManager : IDataStoreManager + { + public IDataStoreCollection GetCollection(string name) + { + using (var db = ObservablesContext.CreateDefault()) + { + return new EFDataStoreCollection(name); + } + } + + public List<string> GetCollectionNames() + { + using (var db = ObservablesContext.CreateDefault()) + { + return db.DataStoreItems.Select(x => x.CollectionName).Distinct().ToList(); + } + } + + public void Dispose() + { + //DO Nothing. + } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.EF/ExtensionMethods.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.EF/ExtensionMethods.cs new file mode 100644 index 000000000..6d45a69e7 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.EF/ExtensionMethods.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; +using Tango.DataStore; +using Tango.DataStore.EF; + +public static class ExtensionMethods +{ + public static IDataStoreItem ToDataStoreItem(this DataStoreItem item) + { + return EFDataStoreHelper.CreateDataStoreItem(item); + } + + public static IDataStoreItem ToDataStoreItem(this GlobalDataStoreItem item) + { + return EFDataStoreHelper.CreateDataStoreItem(item); + } + + public static DataStoreItem ToLocalDbDataStoreItem(this IDataStoreItem item, String collection) + { + return EFDataStoreHelper.CreateLocalDbDataStoreItem(item, collection); + } + + public static GlobalDataStoreItem ToGlobalDbDataStoreItem(this IDataStoreItem item, String collection) + { + return EFDataStoreHelper.CreateGlobalDbDataStoreItem(item, collection); + } +} + diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.EF/Properties/AssemblyInfo.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.EF/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..c59e45461 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.EF/Properties/AssemblyInfo.cs @@ -0,0 +1,7 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Tango - Data Store Entity Framework Implementation")] +[assembly: AssemblyVersion("2.0.4.1608")] +[assembly: ComVisible(false)]
\ No newline at end of file diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.EF/Tango.DataStore.EF.csproj b/Software/Visual_Studio/DataStore/Tango.DataStore.EF/Tango.DataStore.EF.csproj new file mode 100644 index 000000000..491c710e0 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.EF/Tango.DataStore.EF.csproj @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{88D9906B-8FC4-4FE0-B7EB-127A0A8FCEE4}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>Tango.DataStore.EF</RootNamespace> + <AssemblyName>Tango.DataStore.EF</AssemblyName> + <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <Deterministic>true</Deterministic> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> + <HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath> + </Reference> + <Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> + <HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath> + </Reference> + <Reference Include="Google.Protobuf, Version=3.4.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL"> + <HintPath>..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll</HintPath> + </Reference> + <Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> + <HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.ComponentModel.DataAnnotations" /> + <Reference Include="System.Core" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Data" /> + <Reference Include="System.Net.Http" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="..\..\Versioning\GlobalVersionInfo.cs"> + <Link>GlobalVersionInfo.cs</Link> + </Compile> + <Compile Include="EFDataStoreCollection.cs" /> + <Compile Include="EFDataStoreHelper.cs" /> + <Compile Include="EFDataStoreItem.cs" /> + <Compile Include="EFDataStoreManager.cs" /> + <Compile Include="ExtensionMethods.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <None Include="packages.config" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\Tango.BL\Tango.BL.csproj"> + <Project>{f441feee-322a-4943-b566-110e12fd3b72}</Project> + <Name>Tango.BL</Name> + </ProjectReference> + <ProjectReference Include="..\..\Tango.Core\Tango.Core.csproj"> + <Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project> + <Name>Tango.Core</Name> + </ProjectReference> + <ProjectReference Include="..\Tango.DataStore\Tango.DataStore.csproj"> + <Project>{e0364dfa-0721-4637-9d32-9d22aac109d6}</Project> + <Name>Tango.DataStore</Name> + </ProjectReference> + <ProjectReference Include="..\..\Tango.PMR\Tango.PMR.csproj"> + <Project>{e4927038-348d-4295-aaf4-861c58cb3943}</Project> + <Name>Tango.PMR</Name> + </ProjectReference> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> +</Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.EF/packages.config b/Software/Visual_Studio/DataStore/Tango.DataStore.EF/packages.config new file mode 100644 index 000000000..13be55da1 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.EF/packages.config @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="EntityFramework" version="6.2.0" targetFramework="net461" /> + <package id="Google.Protobuf" version="3.4.1" targetFramework="net461" /> + <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net461" /> +</packages>
\ No newline at end of file diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/CustomControl1.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/CustomControl1.cs new file mode 100644 index 000000000..fab0127e8 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/CustomControl1.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Tango.DataStore.Editing +{ + public class CustomControl1 : Control + { + static CustomControl1() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(CustomControl1), new FrameworkPropertyMetadata(typeof(CustomControl1))); + } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/DataStoreCollectionModel.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/DataStoreCollectionModel.cs new file mode 100644 index 000000000..3e58aa4b1 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/DataStoreCollectionModel.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Core; + +namespace Tango.DataStore.Editing +{ + public class DataStoreCollectionModel : ExtendedObject + { + public String Name { get; set; } + public ObservableCollection<DataStoreItemModel> Items { get; set; } + public bool IsDeleted { get; set; } + + private bool _isSelected; + public bool IsSelected + { + get { return _isSelected; } + set { _isSelected = value; RaisePropertyChangedAuto(); Items.ToList().ForEach(x => x.IsSelected = value); } + } + + public DataStoreCollectionModel() + { + Items = new ObservableCollection<DataStoreItemModel>(); + } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/DataStoreItemModel.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/DataStoreItemModel.cs new file mode 100644 index 000000000..8f00a0ec6 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/DataStoreItemModel.cs @@ -0,0 +1,146 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Core; + +namespace Tango.DataStore.Editing +{ + public class DataStoreItemModel : ExtendedObject, IDataStoreItem + { + public IDataStoreItem GlobalItem { get; set; } + + public DataType OriginalType { get; set; } + public Object OriginalValue { get; set; } + + private Object _value; + public Object Value + { + get { return _value; } + set { _value = value; RaisePropertyChangedAuto(); RaisePropertyChanged(nameof(HasDifference)); RaisePropertyChanged(nameof(FormattedValue)); } + } + + private bool _isSelected; + public bool IsSelected + { + get { return _isSelected; } + set { _isSelected = value; RaisePropertyChangedAuto(); } + } + + public bool HasDifference + { + get + { + if (OriginalType != Type) + { + return true; + } + + if (OriginalType == DataType.Bytes && Type == DataType.Bytes) + { + if (OriginalValue != null && Value != null) + { + return !Enumerable.SequenceEqual(OriginalValue as byte[], Value as byte[]); + } + } + + if (Value == null && OriginalValue == null) return false; + + return !OriginalValue.ToStringSafe().Equals(Value.ToStringSafe()) || (IsGlobal && GlobalItem.Value != Value); + } + } + + public String FormattedValue + { + get + { + var value = this.ToString(); + + if (value != null) return value.ToOneLine(); + return null; + } + } + + public string Guid { get; set; } + public string Key { get; set; } + + private DataType _type; + public DataType Type + { + get { return _type; } + set { _type = value; RaisePropertyChangedAuto(); } + } + + private DateTime _date; + public DateTime Date + { + get { return _date; } + set { _date = value; RaisePropertyChangedAuto(); } + } + + public bool IsSynchronized { get; set; } + public bool ExistsOnMachine { get; set; } + + private bool _isGlobal; + public bool IsGlobal + { + get { return _isGlobal; } + set { _isGlobal = value; RaisePropertyChangedAuto(); } + } + + private bool _isDeleted; + public bool IsDeleted + { + get { return _isDeleted; } + set { _isDeleted = value; RaisePropertyChangedAuto(); } + } + + public static DataStoreItemModel FromLocalDataStoreItem(IDataStoreItem local, IDataStoreItem globalItem) + { + DataStoreItemModel model = new DataStoreItemModel(); + + model.OriginalValue = local.Value; + model.Value = local.Value; + model.Guid = local.Guid; + model.Key = local.Key; + model.OriginalType = local.Type; + model.Type = local.Type; + model.Date = local.Date; + model.IsGlobal = false; + model.IsSynchronized = local.IsSynchronized; + + model.GlobalItem = globalItem; + + return model; + } + + public static DataStoreItemModel FromGlobalDataStoreItem(IDataStoreItem global) + { + DataStoreItemModel model = new DataStoreItemModel(); + + model.GlobalItem = global; + model.Guid = global.Guid; + model.Key = global.Key; + model.Type = global.Type; + model.OriginalType = global.Type; + model.Date = global.Date; + model.IsGlobal = true; + model.IsSynchronized = global.IsSynchronized; + + return model; + } + + public override string ToString() + { + if (this.Value != null) + { + return DataStoreHelper.FormatDataStoreItem(this); + } + else + { + return null; + } + } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/DataStoreModel.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/DataStoreModel.cs new file mode 100644 index 000000000..a68cc0af9 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/DataStoreModel.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Core; + +namespace Tango.DataStore.Editing +{ + public class DataStoreModel : ExtendedObject + { + public ObservableCollection<DataStoreCollectionModel> Collections { get; set; } + + public DataStoreModel() + { + Collections = new ObservableCollection<DataStoreCollectionModel>(); + } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/Properties/AssemblyInfo.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..9f04af8ea --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/Properties/AssemblyInfo.cs @@ -0,0 +1,55 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +// 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("Tango.DataStore.Editing")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Tango.DataStore.Editing")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[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)] + +//In order to begin building localizable applications, set +//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file +//inside a <PropertyGroup>. For example, if you are using US english +//in your source files, set the <UICulture> to en-US. Then uncomment +//the NeutralResourceLanguage attribute below. Update the "en-US" in +//the line below to match the UICulture setting in the project file. + +//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] + + +[assembly:ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] + + +// 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("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/Properties/Resources.Designer.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/Properties/Resources.Designer.cs new file mode 100644 index 000000000..c23f8f4eb --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/Properties/Resources.Designer.cs @@ -0,0 +1,62 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace Tango.DataStore.Editing.Properties { + + + /// <summary> + /// A strongly-typed resource class, for looking up localized strings, etc. + /// </summary> + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// <summary> + /// Returns the cached ResourceManager instance used by this class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if ((resourceMan == null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tango.DataStore.Editing.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// <summary> + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/Properties/Resources.resx b/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/Properties/Resources.resx new file mode 100644 index 000000000..af7dbebba --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/Properties/Resources.resx @@ -0,0 +1,117 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root>
\ No newline at end of file diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/Properties/Settings.Designer.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/Properties/Settings.Designer.cs new file mode 100644 index 000000000..28f49dcd4 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace Tango.DataStore.Editing.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/Properties/Settings.settings b/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/Properties/Settings.settings new file mode 100644 index 000000000..033d7a5e9 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/Properties/Settings.settings @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='utf-8'?> +<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)"> + <Profiles> + <Profile Name="(Default)" /> + </Profiles> + <Settings /> +</SettingsFile>
\ No newline at end of file diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/Tango.DataStore.Editing.csproj b/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/Tango.DataStore.Editing.csproj new file mode 100644 index 000000000..b7da15e51 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/Tango.DataStore.Editing.csproj @@ -0,0 +1,106 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{EE088FF7-04D1-41FB-9D6A-CEDEEE7A7B9C}</ProjectGuid> + <OutputType>library</OutputType> + <RootNamespace>Tango.DataStore.Editing</RootNamespace> + <AssemblyName>Tango.DataStore.Editing</AssemblyName> + <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <WarningLevel>4</WarningLevel> + <Deterministic>true</Deterministic> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Xml" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Core" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="System.Net.Http" /> + <Reference Include="System.Xaml"> + <RequiredTargetFramework>4.0</RequiredTargetFramework> + </Reference> + <Reference Include="WindowsBase" /> + <Reference Include="PresentationCore" /> + <Reference Include="PresentationFramework" /> + </ItemGroup> + <ItemGroup> + <Compile Include="UpdateDataStoreRequest.cs" /> + <Compile Include="UpdateDataStoreResponse.cs" /> + <Page Include="Themes\Generic.xaml"> + <Generator>MSBuild:Compile</Generator> + <SubType>Designer</SubType> + </Page> + <Compile Include="CustomControl1.cs"> + <SubType>Code</SubType> + </Compile> + </ItemGroup> + <ItemGroup> + <Compile Include="DataStoreCollectionModel.cs" /> + <Compile Include="DataStoreItemModel.cs" /> + <Compile Include="DataStoreModel.cs" /> + <Compile Include="Properties\AssemblyInfo.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Properties\Resources.Designer.cs"> + <AutoGen>True</AutoGen> + <DesignTime>True</DesignTime> + <DependentUpon>Resources.resx</DependentUpon> + </Compile> + <Compile Include="Properties\Settings.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Settings.settings</DependentUpon> + <DesignTimeSharedInput>True</DesignTimeSharedInput> + </Compile> + <EmbeddedResource Include="Properties\Resources.resx"> + <Generator>ResXFileCodeGenerator</Generator> + <LastGenOutput>Resources.Designer.cs</LastGenOutput> + </EmbeddedResource> + <None Include="Properties\Settings.settings"> + <Generator>SettingsSingleFileGenerator</Generator> + <LastGenOutput>Settings.Designer.cs</LastGenOutput> + </None> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\Tango.BL\Tango.BL.csproj"> + <Project>{f441feee-322a-4943-b566-110e12fd3b72}</Project> + <Name>Tango.BL</Name> + </ProjectReference> + <ProjectReference Include="..\..\Tango.Core\Tango.Core.csproj"> + <Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project> + <Name>Tango.Core</Name> + </ProjectReference> + <ProjectReference Include="..\Tango.DataStore\Tango.DataStore.csproj"> + <Project>{e0364dfa-0721-4637-9d32-9d22aac109d6}</Project> + <Name>Tango.DataStore</Name> + </ProjectReference> + <ProjectReference Include="..\..\Tango.SharedUI\Tango.SharedUI.csproj"> + <Project>{8491d07b-c1f6-4b62-a412-41b9fd2d6538}</Project> + <Name>Tango.SharedUI</Name> + </ProjectReference> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> +</Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/Themes/Generic.xaml b/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/Themes/Generic.xaml new file mode 100644 index 000000000..795842292 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/Themes/Generic.xaml @@ -0,0 +1,18 @@ +<ResourceDictionary + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:local="clr-namespace:Tango.DataStore.Editing"> + <Style TargetType="{x:Type local:CustomControl1}"> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type local:CustomControl1}"> + <Border Background="{TemplateBinding Background}" + BorderBrush="{TemplateBinding BorderBrush}" + BorderThickness="{TemplateBinding BorderThickness}"> + + </Border> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> +</ResourceDictionary> diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/UpdateDataStoreRequest.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/UpdateDataStoreRequest.cs new file mode 100644 index 000000000..dc95ea6ae --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/UpdateDataStoreRequest.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.DTO; + +namespace Tango.DataStore.Editing +{ + public class UpdateDataStoreRequest + { + public List<String> ToDelete { get; set; } + public List<DataStoreItemDTO> ToUpsert { get; set; } + + public UpdateDataStoreRequest() + { + ToDelete = new List<string>(); + ToUpsert = new List<DataStoreItemDTO>(); + } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/UpdateDataStoreResponse.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/UpdateDataStoreResponse.cs new file mode 100644 index 000000000..697ae341d --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Editing/UpdateDataStoreResponse.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DataStore.Editing +{ + public class UpdateDataStoreResponse + { + + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.LiteDB/LiteDBDataStoreCollection.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.LiteDB/LiteDBDataStoreCollection.cs new file mode 100644 index 000000000..c76a3b6d9 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.LiteDB/LiteDBDataStoreCollection.cs @@ -0,0 +1,113 @@ +using LiteDB; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DataStore.Lite +{ + public class LiteDBDataStoreCollection : IDataStoreCollection + { + private ILiteCollection<IDataStoreItem> _collection; + + public string Name { get; private set; } + + public LiteDBDataStoreCollection(ILiteCollection<IDataStoreItem> collection) + { + _collection = collection; + } + + public void Put<T>(string key, T value) + { + Put(key, (object)value); + } + + public void Put(string key, object value) + { + Put(key, DataStoreHelper.GetDataType(value), value); + } + + public void Put(string key, DataType type, object value) + { + _collection.Upsert(new LiteDBDataStoreItem() + { + Key = key, + Date = DateTime.UtcNow, + Type = type, + Value = value, + IsSynchronized = false, + }); + } + + public T Get<T>(string key) + { + return (T)Convert.ChangeType(Get(key), typeof(T)); + } + + public T Get<T>(string key, T defaultValue) + { + return (T)Convert.ChangeType(Get(key, defaultValue), typeof(T)); + } + + public object Get(string key) + { + return Get(key, null); + } + + public object Get(string key, object defaultValue) + { + return GetItem(key, defaultValue).Value; + } + + public IDataStoreItem GetItem(string key) + { + return GetItem(key, null); + } + + public IDataStoreItem GetItem(string key, object defaultValue) + { + var item = _collection.FindById(key); + + if (item == null) + { + if (defaultValue == null) + { + throw new KeyNotFoundException("The specified key was not found on the data store."); + } + else + { + Put(key, defaultValue); + return GetItem(key); + } + } + + return item; + } + + public List<IDataStoreItem> GetAll() + { + return _collection.FindAll().ToList(); + } + + public void Delete(string key) + { + _collection.Delete(key); + } + + public void DeleteAll() + { + _collection.DeleteMany(x => true); + } + + public int Count() + { + return _collection.Count(); + } + + public List<IDataStoreItem> GetUnsynchronized() + { + return _collection.Find(x => !x.IsSynchronized).ToList(); + } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.LiteDB/LiteDBDataStoreItem.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.LiteDB/LiteDBDataStoreItem.cs new file mode 100644 index 000000000..ba2e5748e --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.LiteDB/LiteDBDataStoreItem.cs @@ -0,0 +1,30 @@ +using LiteDB; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DataStore.Lite +{ + public class LiteDBDataStoreItem : IDataStoreItem + { + public String Guid { get; set; } + [BsonId] + public string Key { get; set; } + public DataType Type { get; set; } + public object Value { get; set; } + public DateTime Date { get; set; } + public bool IsSynchronized { get; set; } + + public LiteDBDataStoreItem() + { + Guid = System.Guid.NewGuid().ToString(); + } + + public override string ToString() + { + return DataStoreHelper.FormatDataStoreItem(this); + } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.LiteDB/LiteDBDataStoreManager.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.LiteDB/LiteDBDataStoreManager.cs new file mode 100644 index 000000000..25abd91ab --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.LiteDB/LiteDBDataStoreManager.cs @@ -0,0 +1,47 @@ +using LiteDB; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DataStore.Lite +{ + public class LiteDBDataStoreManager : IDataStoreManager + { + private bool _disposed; + private LiteDatabase _database; + + public String DatabasePath { get; private set; } + + public LiteDBDataStoreManager(String databasePath) + { + DatabasePath = databasePath; + Directory.CreateDirectory(Path.GetDirectoryName(DatabasePath)); + _database = new LiteDatabase($"Filename={DatabasePath}"); + _database.Pragma("TIMEOUT", 10); //Read Timeout + _database.Pragma("UTC_DATE", true); //Keep time as UTC when getting data + _database.Commit(); + } + + public IDataStoreCollection GetCollection(string name) + { + return new LiteDBDataStoreCollection(_database.GetCollection<IDataStoreItem>(name)); + } + + public List<String> GetCollectionNames() + { + return _database.GetCollectionNames().ToList(); + } + + public void Dispose() + { + if (!_disposed) + { + _disposed = true; + _database.Dispose(); + } + } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.LiteDB/Properties/AssemblyInfo.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.LiteDB/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..f1b35f107 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.LiteDB/Properties/AssemblyInfo.cs @@ -0,0 +1,7 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Tango - Data Store LiteDB Implementation")] +[assembly: AssemblyVersion("2.0.4.1608")] +[assembly: ComVisible(false)]
\ No newline at end of file diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.LiteDB/Tango.DataStore.Lite.csproj b/Software/Visual_Studio/DataStore/Tango.DataStore.LiteDB/Tango.DataStore.Lite.csproj new file mode 100644 index 000000000..65ba97520 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.LiteDB/Tango.DataStore.Lite.csproj @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{FA96BC0C-4055-475C-9DCC-70A5A9436B10}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>Tango.DataStore.Lite</RootNamespace> + <AssemblyName>Tango.DataStore.Lite</AssemblyName> + <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <Deterministic>true</Deterministic> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="LiteDB, Version=5.0.4.0, Culture=neutral, PublicKeyToken=4ee40123013c9f27, processorArchitecture=MSIL"> + <HintPath>..\packages\LiteDB.5.0.4\lib\net45\LiteDB.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Core" /> + <Reference Include="System.Runtime" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Data" /> + <Reference Include="System.Net.Http" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="..\..\Versioning\GlobalVersionInfo.cs"> + <Link>GlobalVersionInfo.cs</Link> + </Compile> + <Compile Include="LiteDBDataStoreCollection.cs" /> + <Compile Include="LiteDBDataStoreItem.cs" /> + <Compile Include="LiteDBDataStoreManager.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\Tango.DataStore\Tango.DataStore.csproj"> + <Project>{e0364dfa-0721-4637-9d32-9d22aac109d6}</Project> + <Name>Tango.DataStore</Name> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <None Include="packages.config" /> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> +</Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.LiteDB/packages.config b/Software/Visual_Studio/DataStore/Tango.DataStore.LiteDB/packages.config new file mode 100644 index 000000000..9dcac7837 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.LiteDB/packages.config @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="LiteDB" version="5.0.4" targetFramework="net461" /> +</packages>
\ No newline at end of file diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/Properties/AssemblyInfo.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..808b25d41 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/Properties/AssemblyInfo.cs @@ -0,0 +1,7 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Tango - Data Store Remote Messages")] +[assembly: AssemblyVersion("2.0.4.1608")] +[assembly: ComVisible(false)]
\ No newline at end of file diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreCollection.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreCollection.cs new file mode 100644 index 000000000..e4453fafc --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreCollection.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DataStore.Remote +{ + public class RemoteDataStoreCollection + { + public String Name { get; set; } + public List<RemoteDataStoreItem> Items { get; set; } + + public RemoteDataStoreCollection() + { + Items = new List<RemoteDataStoreItem>(); + } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreCountRequest.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreCountRequest.cs new file mode 100644 index 000000000..84ba279fb --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreCountRequest.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DataStore.Remote +{ + public class RemoteDataStoreCountRequest + { + public String Collection { get; set; } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreCountResponse.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreCountResponse.cs new file mode 100644 index 000000000..71d4e13b2 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreCountResponse.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DataStore.Remote +{ + public class RemoteDataStoreCountResponse + { + public int Count { get; set; } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreDeleteAllRequest.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreDeleteAllRequest.cs new file mode 100644 index 000000000..ab5406611 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreDeleteAllRequest.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DataStore.Remote +{ + public class RemoteDataStoreDeleteAllRequest + { + public String Collection { get; set; } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreDeleteAllResponse.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreDeleteAllResponse.cs new file mode 100644 index 000000000..b5ddc0b64 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreDeleteAllResponse.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DataStore.Remote +{ + public class RemoteDataStoreDeleteAllResponse + { + + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreDeleteRequest.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreDeleteRequest.cs new file mode 100644 index 000000000..13d400154 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreDeleteRequest.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DataStore.Remote +{ + public class RemoteDataStoreDeleteRequest + { + public String Collection { get; set; } + public String Key { get; set; } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreDeleteResponse.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreDeleteResponse.cs new file mode 100644 index 000000000..07bb40a8b --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreDeleteResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DataStore.Remote +{ + public class RemoteDataStoreDeleteResponse + { + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreGetAllItemsRequest.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreGetAllItemsRequest.cs new file mode 100644 index 000000000..a285cd5c1 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreGetAllItemsRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DataStore.Remote +{ + public class RemoteDataStoreGetAllItemsRequest + { + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreGetAllItemsResponse.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreGetAllItemsResponse.cs new file mode 100644 index 000000000..3afb22c1e --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreGetAllItemsResponse.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DataStore.Remote +{ + public class RemoteDataStoreGetAllItemsResponse + { + public List<RemoteDataStoreCollection> Collections { get; set; } + + public RemoteDataStoreGetAllItemsResponse() + { + Collections = new List<RemoteDataStoreCollection>(); + } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreGetAllRequest.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreGetAllRequest.cs new file mode 100644 index 000000000..747a5cb2f --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreGetAllRequest.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DataStore.Remote +{ + public class RemoteDataStoreGetAllRequest + { + public String Collection { get; set; } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreGetAllResponse.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreGetAllResponse.cs new file mode 100644 index 000000000..2d9e0f527 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreGetAllResponse.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DataStore.Remote +{ + public class RemoteDataStoreGetAllResponse + { + public List<RemoteDataStoreItem> Items { get; set; } + + public RemoteDataStoreGetAllResponse() + { + Items = new List<RemoteDataStoreItem>(); + } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreGetCollectionNamesRequest.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreGetCollectionNamesRequest.cs new file mode 100644 index 000000000..6299f7512 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreGetCollectionNamesRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DataStore.Remote +{ + public class RemoteDataStoreGetCollectionNamesRequest + { + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreGetCollectionNamesResponse.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreGetCollectionNamesResponse.cs new file mode 100644 index 000000000..fe98b73fc --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreGetCollectionNamesResponse.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DataStore.Remote +{ + public class RemoteDataStoreGetCollectionNamesResponse + { + public List<String> Names { get; set; } + + public RemoteDataStoreGetCollectionNamesResponse() + { + Names = new List<string>(); + } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreGetItemRequest.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreGetItemRequest.cs new file mode 100644 index 000000000..7d16a0f38 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreGetItemRequest.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DataStore.Remote +{ + public class RemoteDataStoreGetItemRequest + { + public String Collection { get; set; } + public String Key { get; set; } + public Object DefaultValue { get; set; } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreGetItemResponse.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreGetItemResponse.cs new file mode 100644 index 000000000..82393a786 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreGetItemResponse.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DataStore.Remote +{ + public class RemoteDataStoreGetItemResponse + { + public RemoteDataStoreItem Item { get; set; } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreGetRequest.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreGetRequest.cs new file mode 100644 index 000000000..4b8e9ee47 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreGetRequest.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DataStore.Remote +{ + public class RemoteDataStoreGetRequest + { + public String Collection { get; set; } + public String Key { get; set; } + public Object DefaultValue { get; set; } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreGetResponse.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreGetResponse.cs new file mode 100644 index 000000000..cc3b157e8 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreGetResponse.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DataStore.Remote +{ + public class RemoteDataStoreGetResponse + { + public DataType DataType { get; set; } + + private Object _value; + public Object Value + { + get + { + return DataType == DataType.Proto ? ProtoObject : _value; + } + set + { + if (value is DataStoreProtoObject protoValue) + { + ProtoObject = protoValue; + } + else + { + _value = value; + } + } + } + + public DataStoreProtoObject ProtoObject { get; set; } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreItem.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreItem.cs new file mode 100644 index 000000000..4327a0bd6 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreItem.cs @@ -0,0 +1,47 @@ +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DataStore.Remote +{ + public class RemoteDataStoreItem : IDataStoreItem + { + public string Guid { get; set; } + public string Key { get; set; } + public DataType Type { get; set; } + + private object _value; + public object Value + { + get + { + if (_value is JObject jObject) + { + return (jObject.ToObject<DataStoreProtoObject>()); + } + else + { + return _value; + } + } + set { _value = value; } + } + + public DateTime Date { get; set; } + public bool IsSynchronized { get; set; } + + public RemoteDataStoreItem() + { + Guid = System.Guid.NewGuid().ToString(); + Date = DateTime.UtcNow; + } + + public override string ToString() + { + return DataStoreHelper.FormatDataStoreItem(this); + } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStorePutRequest.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStorePutRequest.cs new file mode 100644 index 000000000..77aa5e41f --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStorePutRequest.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DataStore.Remote +{ + public class RemoteDataStorePutRequest + { + public String Collection { get; set; } + public DataType DataType { get; set; } + public String Key { get; set; } + + private Object _value; + public Object Value + { + get + { + return DataType == DataType.Proto ? ProtoObject : _value; + } + set + { + if (value is DataStoreProtoObject protoValue) + { + ProtoObject = protoValue; + } + else + { + _value = value; + } + } + } + + public DataStoreProtoObject ProtoObject { get; set; } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStorePutResponse.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStorePutResponse.cs new file mode 100644 index 000000000..7dd92490a --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStorePutResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DataStore.Remote +{ + public class RemoteDataStorePutResponse + { + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreStartListenRequest.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreStartListenRequest.cs new file mode 100644 index 000000000..b8da17012 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreStartListenRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DataStore.Remote +{ + public class RemoteDataStoreStartListenRequest + { + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreStartListenResponse.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreStartListenResponse.cs new file mode 100644 index 000000000..c2a6c24a6 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/RemoteDataStoreStartListenResponse.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DataStore.Remote +{ + public enum RemoteDataStoreChangeType + { + None, + Modified + } + + public class RemoteDataStoreStartListenResponse + { + public RemoteDataStoreChangeType ChangeType { get; set; } + public String CollectionName { get; set; } + public RemoteDataStoreItem Item { get; set; } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/Tango.DataStore.Remote.csproj b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/Tango.DataStore.Remote.csproj new file mode 100644 index 000000000..49fa37dc1 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/Tango.DataStore.Remote.csproj @@ -0,0 +1,87 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{29448F3C-9B3E-4DA6-8555-46A8B9A6B3AA}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>Tango.DataStore.Remote</RootNamespace> + <AssemblyName>Tango.DataStore.Remote</AssemblyName> + <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <Deterministic>true</Deterministic> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="Google.Protobuf, Version=3.4.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL"> + <HintPath>..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll</HintPath> + </Reference> + <Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> + <HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Core" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Data" /> + <Reference Include="System.Net.Http" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="..\..\Versioning\GlobalVersionInfo.cs"> + <Link>GlobalVersionInfo.cs</Link> + </Compile> + <Compile Include="RemoteDataStoreCollection.cs" /> + <Compile Include="RemoteDataStoreCountRequest.cs" /> + <Compile Include="RemoteDataStoreCountResponse.cs" /> + <Compile Include="RemoteDataStoreDeleteAllRequest.cs" /> + <Compile Include="RemoteDataStoreDeleteAllResponse.cs" /> + <Compile Include="RemoteDataStoreDeleteRequest.cs" /> + <Compile Include="RemoteDataStoreDeleteResponse.cs" /> + <Compile Include="RemoteDataStoreGetAllItemsRequest.cs" /> + <Compile Include="RemoteDataStoreGetAllItemsResponse.cs" /> + <Compile Include="RemoteDataStoreGetAllRequest.cs" /> + <Compile Include="RemoteDataStoreGetAllResponse.cs" /> + <Compile Include="RemoteDataStoreGetCollectionNamesRequest.cs" /> + <Compile Include="RemoteDataStoreGetCollectionNamesResponse.cs" /> + <Compile Include="RemoteDataStoreGetItemRequest.cs" /> + <Compile Include="RemoteDataStoreGetItemResponse.cs" /> + <Compile Include="RemoteDataStoreGetRequest.cs" /> + <Compile Include="RemoteDataStoreGetResponse.cs" /> + <Compile Include="RemoteDataStoreItem.cs" /> + <Compile Include="RemoteDataStoreStartListenRequest.cs" /> + <Compile Include="RemoteDataStoreStartListenResponse.cs" /> + <Compile Include="RemoteDataStorePutRequest.cs" /> + <Compile Include="RemoteDataStorePutResponse.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\Tango.DataStore\Tango.DataStore.csproj"> + <Project>{e0364dfa-0721-4637-9d32-9d22aac109d6}</Project> + <Name>Tango.DataStore</Name> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <None Include="packages.config" /> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> +</Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/packages.config b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/packages.config new file mode 100644 index 000000000..026e719c3 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Remote/packages.config @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="Google.Protobuf" version="3.4.1" targetFramework="net461" /> + <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net461" /> +</packages>
\ No newline at end of file diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Web/DataStoreWebHelper.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Web/DataStoreWebHelper.cs new file mode 100644 index 000000000..2353a70fe --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Web/DataStoreWebHelper.cs @@ -0,0 +1,16 @@ +using Google.Protobuf; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.PMR; +using Tango.PMR.Common; + +namespace Tango.DataStore.Web +{ + public static class DataStoreWebHelper + { + + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Web/DataStoreWebItem.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Web/DataStoreWebItem.cs new file mode 100644 index 000000000..a847517b1 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Web/DataStoreWebItem.cs @@ -0,0 +1,26 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using Tango.DataStore; +using Tango.PMR.Common; + +namespace Tango.DataStore.Web +{ + public class DataStoreWebItem + { + public String Collection { get; set; } + [JsonConverter(typeof(StringEnumConverter))] + public DataStoreWebItemType Type { get; set; } + public DateTime Date { get; set; } + public String Key { get; set; } + [JsonConverter(typeof(StringEnumConverter))] + public DataType DataType { get; set; } + [JsonConverter(typeof(StringEnumConverter))] + public MessageType ProtoMessageType { get; set; } + public Object LocalValue { get; set; } + public Object GlobalValue { get; set; } + } +}
\ No newline at end of file diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Web/DataStoreWebItemType.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Web/DataStoreWebItemType.cs new file mode 100644 index 000000000..684997bf4 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Web/DataStoreWebItemType.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; + +namespace Tango.DataStore.Web +{ + public enum DataStoreWebItemType + { + Local, + Global, + Overrides + } +}
\ No newline at end of file diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Web/DataStoreWebPutItem.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Web/DataStoreWebPutItem.cs new file mode 100644 index 000000000..6b897c82a --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Web/DataStoreWebPutItem.cs @@ -0,0 +1,28 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.PMR.Common; + +namespace Tango.DataStore.Web +{ + public class DataStoreWebPutItem + { + public String MachineSerialNumber { get; set; } + + public String Collection { get; set; } + + public String Key { get; set; } + + [JsonConverter(typeof(StringEnumConverter))] + public DataType DataType { get; set; } + + [JsonConverter(typeof(StringEnumConverter))] + public MessageType ProtoMessageType { get; set; } + + public Object Value { get; set; } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Web/ExtensionMethods.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Web/ExtensionMethods.cs new file mode 100644 index 000000000..a0959ae27 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Web/ExtensionMethods.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DataStore.Web +{ + public class ExtensionMethods + { + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Web/LoginRequest.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Web/LoginRequest.cs new file mode 100644 index 000000000..4a68fe3ab --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Web/LoginRequest.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DataStore.Web +{ + public class LoginRequest + { + public String Email { get; set; } + public String Password { get; set; } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Web/LoginResponse.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Web/LoginResponse.cs new file mode 100644 index 000000000..5c70d85b9 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Web/LoginResponse.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DataStore.Web +{ + public class LoginResponse + { + public String Token { get; set; } + public DateTime ExpirationUTC { get; set; } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Web/Properties/AssemblyInfo.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Web/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..27f57a100 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Web/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +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("Tango.DataStore.Web")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Tango.DataStore.Web")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[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("a9828548-af43-4ce4-8b13-50e99f9c9cf7")] + +// 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("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Web/Tango.DataStore.Web.csproj b/Software/Visual_Studio/DataStore/Tango.DataStore.Web/Tango.DataStore.Web.csproj new file mode 100644 index 000000000..9233a050b --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Web/Tango.DataStore.Web.csproj @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{A9828548-AF43-4CE4-8B13-50E99F9C9CF7}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>Tango.DataStore.Web</RootNamespace> + <AssemblyName>Tango.DataStore.Web</AssemblyName> + <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <Deterministic>true</Deterministic> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="Google.Protobuf, Version=3.4.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL"> + <HintPath>..\..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll</HintPath> + </Reference> + <Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> + <HintPath>..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Core" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Data" /> + <Reference Include="System.Net.Http" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="DataStoreWebHelper.cs" /> + <Compile Include="DataStoreWebItem.cs" /> + <Compile Include="DataStoreWebItemType.cs" /> + <Compile Include="DataStoreWebPutItem.cs" /> + <Compile Include="ExtensionMethods.cs" /> + <Compile Include="LoginRequest.cs" /> + <Compile Include="LoginResponse.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\Tango.PMR\Tango.PMR.csproj"> + <Project>{e4927038-348d-4295-aaf4-861c58cb3943}</Project> + <Name>Tango.PMR</Name> + </ProjectReference> + <ProjectReference Include="..\Tango.DataStore\Tango.DataStore.csproj"> + <Project>{e0364dfa-0721-4637-9d32-9d22aac109d6}</Project> + <Name>Tango.DataStore</Name> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <None Include="packages.config" /> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> +</Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Web/packages.config b/Software/Visual_Studio/DataStore/Tango.DataStore.Web/packages.config new file mode 100644 index 000000000..026e719c3 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Web/packages.config @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="Google.Protobuf" version="3.4.1" targetFramework="net461" /> + <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net461" /> +</packages>
\ No newline at end of file diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore/DataStoreHelper.cs b/Software/Visual_Studio/DataStore/Tango.DataStore/DataStoreHelper.cs new file mode 100644 index 000000000..0ceecd81b --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore/DataStoreHelper.cs @@ -0,0 +1,147 @@ +using Google.Protobuf; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using Tango.Core.ExtensionMethods; +using Tango.PMR; +using Tango.PMR.Common; + +namespace Tango.DataStore +{ + /// <summary> + /// Contains data store helper methods. + /// </summary> + public static class DataStoreHelper + { + /// <summary> + /// Gets the data store data type by the specified object type. + /// </summary> + /// <param name="value">The value.</param> + /// <returns></returns> + public static DataType GetDataType(Object value) + { + return GetDataType(value.GetType()); + } + + /// <summary> + /// Gets data store data type by the specified .net type. + /// </summary> + /// <param name="type">The type.</param> + /// <returns></returns> + /// <exception cref="System.NotSupportedException"></exception> + public static DataType GetDataType(Type type) + { + if (type == typeof(int)) + { + return DataType.Int32; + } + else if (type == typeof(Int64)) + { + return DataType.Int32; + } + else if (type == typeof(float)) + { + return DataType.Float; + } + else if (type == typeof(double)) + { + return DataType.Double; + } + else if (type == typeof(String)) + { + return DataType.String; + } + else if (type == typeof(bool)) + { + return DataType.Boolean; + } + else if (type == typeof(byte[])) + { + return DataType.Bytes; + } + else if (type == typeof(DataStoreProtoObject)) + { + return DataType.Proto; + } + else if (typeof(IMessage).IsAssignableFrom(type)) + { + return DataType.Proto; + } + + throw new NotSupportedException($"The specified type '{type.Name}' is not supported by the data store."); + } + + /// <summary> + /// Formats the data store item as a string. + /// </summary> + /// <param name="item">The item.</param> + /// <returns></returns> + public static String FormatDataStoreItem(IDataStoreItem item) + { + if (item.Type == DataType.Bytes) + { + return Convert.ToBase64String((byte[])item.Value); + } + else if (item.Type == DataType.Proto) + { + return (item.Value as DataStoreProtoObject).Message.ToJsonString(); + } + else + { + return item.Value.ToStringSafe(); + } + } + + /// <summary> + /// Parses a data store value from a string. + /// </summary> + /// <param name="type">The type.</param> + /// <param name="text">The string.</param> + /// <param name="protoMessageType">Type of the proto message (if type is Proto).</param> + /// <returns></returns> + /// <exception cref="ArgumentNullException">No PMR message type specified.</exception> + /// <exception cref="NotSupportedException">The specified data store type is not supported.</exception> + public static Object ParseDataStoreValue(DataType type, String text, MessageType? protoMessageType = null) + { + switch (type) + { + case DataType.String: + return text; + case DataType.Int32: + return int.Parse(text); + case DataType.Float: + return float.Parse(text); + case DataType.Double: + return double.Parse(text); + case DataType.Boolean: + return bool.Parse(text); + case DataType.Proto: + if (protoMessageType == null) throw new ArgumentNullException("No PMR message type specified."); + var messageType = MessageFactory.GetPMRTypeFromMessageType(protoMessageType.Value); + var instance = Activator.CreateInstance(messageType) as IMessage; + instance = instance.GetParser().ParseJson(text); + return DataStoreProtoObject.FromMessage(instance); + case DataType.Bytes: + return Convert.FromBase64String(text); + } + + throw new NotSupportedException("The specified data store type is not supported."); + } + + /// <summary> + /// Validates the name of the collection or key. + /// </summary> + /// <param name="name">The name.</param> + /// <returns></returns> + public static bool ValidateCollectionOrKeyName(String name) + { + var regexItem = new Regex("^[a-zA-Z0-9_-]*$"); + return regexItem.IsMatch(name); + } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore/DataStoreProtoObject.cs b/Software/Visual_Studio/DataStore/Tango.DataStore/DataStoreProtoObject.cs new file mode 100644 index 000000000..1a9dd324d --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore/DataStoreProtoObject.cs @@ -0,0 +1,85 @@ +using Google.Protobuf; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Core.Bson; +using Tango.Core.ExtensionMethods; +using Tango.PMR; +using Tango.PMR.Common; +using Tango.PMR.DataStore; + +namespace Tango.DataStore +{ + public class DataStoreProtoObject + { + [JsonConverter(typeof(StringEnumConverter))] + public MessageType MessageType { get; set; } + public Type Type { get; set; } + public byte[] Data { get; set; } + + + private IMessage _message; + [JsonIgnore] + public IMessage Message + { + get + { + if (_message == null) + { + _message = MessageFactory.ParseProtoMessage(Data, Type); + } + + return _message; + } + private set { _message = value; } + } + + public byte[] ToBytes() + { + return BsonConvert.Serialize<DataStoreProtoObject>(this); + } + + public static DataStoreProtoObject FromBytes(byte[] data) + { + var instance = BsonConvert.Deserialize<DataStoreProtoObject>(data); + instance.Message = MessageFactory.ParseProtoMessage(instance.Data, instance.Type); + + return instance; + } + + public static DataStoreProtoObject FromMessage(IMessage message) + { + DataStoreProtoObject proto = new DataStoreProtoObject(); + proto.Type = message.GetType(); + proto.MessageType = MessageFactory.ParseMessageType(proto.Type.Name); + proto.Data = message.ToByteArray(); + proto.Message = message; + return proto; + } + + public static DataStoreProtoObject FromJObject(JObject obj) + { + return (obj.ToObject<DataStoreProtoObject>()); + } + + public static DataStoreProtoObject FromPMRDataStoreItem(DataStoreItem item) + { + DataStoreProtoObject proto = new DataStoreProtoObject(); + proto.MessageType = item.ProtoType; + proto.Type = MessageFactory.GetPMRTypeFromMessageType(item.ProtoType); + proto.Data = item.BytesValue.ToByteArray(); + return proto; + } + + public override string ToString() + { + return Message?.ToJsonString(); + } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore/DataType.cs b/Software/Visual_Studio/DataStore/Tango.DataStore/DataType.cs new file mode 100644 index 000000000..132bff28e --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore/DataType.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DataStore +{ + /// <summary> + /// Represents a data store item type. + /// </summary> + public enum DataType + { + Int32, + Float, + Double, + Boolean, + String, + Bytes, + Proto + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore/ExtensionMethods.cs b/Software/Visual_Studio/DataStore/Tango.DataStore/ExtensionMethods.cs new file mode 100644 index 000000000..acc381a61 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore/ExtensionMethods.cs @@ -0,0 +1,16 @@ +using Google.Protobuf; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.DataStore; + +public static class ExtensionMethods +{ + public static DataStoreProtoObject ToDataStoreProtoObject(IMessage message) + { + return DataStoreProtoObject.FromMessage(message); + } +} + diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore/IDataStoreCollection.cs b/Software/Visual_Studio/DataStore/Tango.DataStore/IDataStoreCollection.cs new file mode 100644 index 000000000..baca95c67 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore/IDataStoreCollection.cs @@ -0,0 +1,119 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DataStore +{ + /// <summary> + /// Represents a data store collection. + /// </summary> + public interface IDataStoreCollection + { + /// <summary> + /// Gets the collection name. + /// </summary> + String Name { get; } + + /// <summary> + /// Upserts the specified key and value. + /// </summary> + /// <param name="key">The key.</param> + /// <param name="value">The value.</param> + void Put(String key, Object value); + + /// <summary> + /// Upserts the specified key and value of type T. + /// </summary> + /// <typeparam name="T"></typeparam> + /// <param name="key">The key.</param> + /// <param name="value">The value.</param> + void Put<T>(String key, T value); + + /// <summary> + /// Upserts the specified key and value. + /// The value must be of the specified DataType. + /// </summary> + /// <param name="key">The key.</param> + /// <param name="type">The type.</param> + /// <param name="value">The value.</param> + void Put(String key, DataType type, Object value); + + /// <summary> + /// Gets the value by the specified key + /// </summary> + /// <param name="key">The key.</param> + /// <returns></returns> + Object Get(String key); + + /// <summary> + /// Gets the value by the specified key + /// </summary> + /// <param name="key">The key.</param> + /// <param name="defaultValue">Will execute put when the key was not found.</param> + /// <returns></returns> + Object Get(String key, Object defaultValue); + + /// <summary> + /// Gets the value of type T by the specified key + /// </summary> + /// <typeparam name="T"></typeparam> + /// <param name="key">The key.</param> + /// <returns></returns> + T Get<T>(String key); + + /// <summary> + /// Gets the value of type T by the specified key + /// </summary> + /// <typeparam name="T"></typeparam> + /// <param name="key">The key.</param> + /// <param name="defaultValue">Will execute put when the key was not found.</param> + /// <returns></returns> + T Get<T>(String key, T defaultValue); + + /// <summary> + /// Gets the full data store item by the specified key. + /// </summary> + /// <param name="key">The key.</param> + /// <returns></returns> + IDataStoreItem GetItem(String key); + + /// <summary> + /// Gets the full data store item by the specified key. + /// </summary> + /// <param name="key">The key.</param> + /// <param name="defaultValue">Will execute put when the key was not found.</param> + /// <returns></returns> + IDataStoreItem GetItem(String key, Object defaultValue); + + /// <summary> + /// Gets all the data store items in the collection. + /// </summary> + /// <returns></returns> + List<IDataStoreItem> GetAll(); + + /// <summary> + /// Gets all the data store unsynchronized items in the collection. + /// </summary> + /// <returns></returns> + List<IDataStoreItem> GetUnsynchronized(); + + /// <summary> + /// Deleted an item by the specified key. + /// </summary> + /// <param name="key">The key.</param> + void Delete(String key); + + /// <summary> + /// Deletes all items in the collection. + /// </summary> + void DeleteAll(); + + /// <summary> + /// Returns the number of items in the collection. + /// </summary> + /// <returns></returns> + int Count(); + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore/IDataStoreItem.cs b/Software/Visual_Studio/DataStore/Tango.DataStore/IDataStoreItem.cs new file mode 100644 index 000000000..9c03f40ee --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore/IDataStoreItem.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DataStore +{ + /// <summary> + /// Represents a data store item. + /// </summary> + public interface IDataStoreItem + { + /// <summary> + /// Gets or sets the unique identifier (Use only for synchronization). + /// </summary> + String Guid { get; set; } + + /// <summary> + /// Gets or sets item id. + /// </summary> + String Key { get; set; } + + /// <summary> + /// Gets or sets the item type. + /// </summary> + DataType Type { get; set; } + + /// <summary> + /// Gets or sets the item value. + /// </summary> + Object Value { get; set; } + + /// <summary> + /// Gets or sets the item update UTC date. + /// </summary> + DateTime Date { get; set; } + + /// <summary> + /// Gets or sets a value indicating whether this item is synchronized with the remote service. + /// </summary> + bool IsSynchronized { get; set; } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore/IDataStoreManager.cs b/Software/Visual_Studio/DataStore/Tango.DataStore/IDataStoreManager.cs new file mode 100644 index 000000000..5443f12e2 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore/IDataStoreManager.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DataStore +{ + /// <summary> + /// Represents a key/value data store manager. + /// </summary> + /// <seealso cref="System.IDisposable" /> + public interface IDataStoreManager : IDisposable + { + /// <summary> + /// Gets the data store collection by name. + /// </summary> + /// <param name="name">The name.</param> + /// <returns></returns> + IDataStoreCollection GetCollection(String name); + + /// <summary> + /// Gets all the collection names. + /// </summary> + /// <returns></returns> + List<String> GetCollectionNames(); + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore/Properties/AssemblyInfo.cs b/Software/Visual_Studio/DataStore/Tango.DataStore/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..8e9365e03 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore/Properties/AssemblyInfo.cs @@ -0,0 +1,7 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Tango - Data Store Library")] +[assembly: AssemblyVersion("2.0.4.1608")] +[assembly: ComVisible(false)]
\ No newline at end of file diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore/Tango.DataStore.csproj b/Software/Visual_Studio/DataStore/Tango.DataStore/Tango.DataStore.csproj new file mode 100644 index 000000000..d75d39963 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore/Tango.DataStore.csproj @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{E0364DFA-0721-4637-9D32-9D22AAC109D6}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>Tango.DataStore</RootNamespace> + <AssemblyName>Tango.DataStore</AssemblyName> + <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <Deterministic>true</Deterministic> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <DocumentationFile>bin\Debug\Tango.DataStore.xml</DocumentationFile> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <DocumentationFile>bin\Release\Tango.DataStore.xml</DocumentationFile> + </PropertyGroup> + <ItemGroup> + <Reference Include="Google.Protobuf, Version=3.4.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL"> + <HintPath>..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll</HintPath> + </Reference> + <Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> + <HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Core" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Data" /> + <Reference Include="System.Net.Http" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="..\..\Versioning\GlobalVersionInfo.cs"> + <Link>GlobalVersionInfo.cs</Link> + </Compile> + <Compile Include="DataStoreHelper.cs" /> + <Compile Include="DataStoreProtoObject.cs" /> + <Compile Include="ExtensionMethods.cs" /> + <Compile Include="IDataStoreItem.cs" /> + <Compile Include="DataType.cs" /> + <Compile Include="IDataStoreCollection.cs" /> + <Compile Include="IDataStoreManager.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <None Include="packages.config" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\Tango.Core\Tango.Core.csproj"> + <Project>{A34EE0F0-649D-41C8-8489-B6F1CC6924EE}</Project> + <Name>Tango.Core</Name> + </ProjectReference> + <ProjectReference Include="..\..\Tango.PMR\Tango.PMR.csproj"> + <Project>{e4927038-348d-4295-aaf4-861c58cb3943}</Project> + <Name>Tango.PMR</Name> + </ProjectReference> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> +</Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore/packages.config b/Software/Visual_Studio/DataStore/Tango.DataStore/packages.config new file mode 100644 index 000000000..026e719c3 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore/packages.config @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="Google.Protobuf" version="3.4.1" targetFramework="net461" /> + <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net461" /> +</packages>
\ No newline at end of file |
