aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/DataStore/Tango.DataStore.Web
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2020-11-16 18:32:04 +0200
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2020-11-16 18:32:04 +0200
commit6f0f2a7908884deab8aca33ec967d03c5e564060 (patch)
treeb9d3e7efa91e8b3ac597dc1a824dd3a6175e16d4 /Software/Visual_Studio/DataStore/Tango.DataStore.Web
parentc39d31f1095bda6bda2755100f9f8df3da1eb93d (diff)
downloadTango-6f0f2a7908884deab8aca33ec967d03c5e564060.tar.gz
Tango-6f0f2a7908884deab8aca33ec967d03c5e564060.zip
Working on DataStore WebAPI.
Modified data store bytes parsing to Base64.
Diffstat (limited to 'Software/Visual_Studio/DataStore/Tango.DataStore.Web')
-rw-r--r--Software/Visual_Studio/DataStore/Tango.DataStore.Web/DataStoreWebHelper.cs16
-rw-r--r--Software/Visual_Studio/DataStore/Tango.DataStore.Web/DataStoreWebItem.cs26
-rw-r--r--Software/Visual_Studio/DataStore/Tango.DataStore.Web/DataStoreWebItemType.cs14
-rw-r--r--Software/Visual_Studio/DataStore/Tango.DataStore.Web/DataStoreWebPutItem.cs28
-rw-r--r--Software/Visual_Studio/DataStore/Tango.DataStore.Web/ExtensionMethods.cs12
-rw-r--r--Software/Visual_Studio/DataStore/Tango.DataStore.Web/Properties/AssemblyInfo.cs36
-rw-r--r--Software/Visual_Studio/DataStore/Tango.DataStore.Web/Tango.DataStore.Web.csproj71
-rw-r--r--Software/Visual_Studio/DataStore/Tango.DataStore.Web/packages.config5
8 files changed, 208 insertions, 0 deletions
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/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..ac4e4a6f8
--- /dev/null
+++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Web/Tango.DataStore.Web.csproj
@@ -0,0 +1,71 @@
+<?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="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