Browse Source

update to restclient

Nick-PRSDigital@bitbucket.org 2 years ago
parent
commit
746632b293

+ 15 - 1
prs.mobile/ConnectionTestApp/ConnectionTest.sln

@@ -33,7 +33,9 @@ Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "InABox.Remote.Shared", "..\
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "InABox.WebSocket.Shared", "..\..\..\inabox\inabox.websocket.shared\InABox.WebSocket.Shared.csproj", "{4057A462-4A28-46D6-BF75-12E1D494F3ED}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PRSClasses", "..\..\prs.classes\PRSClasses.csproj", "{21814563-A9B8-483D-A635-FE9EC7BB1ACB}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PRSClasses", "..\..\prs.classes\PRSClasses.csproj", "{21814563-A9B8-483D-A635-FE9EC7BB1ACB}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "InABox.Client.Rest", "..\..\..\inabox\inabox.client.rest\InABox.Client.Rest\InABox.Client.Rest.csproj", "{86D2D6F5-06F1-43D5-B766-A02A9C4D3907}"
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -167,6 +169,18 @@ Global
 		{21814563-A9B8-483D-A635-FE9EC7BB1ACB}.Release|iPhone.Build.0 = Release|Any CPU
 		{21814563-A9B8-483D-A635-FE9EC7BB1ACB}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
 		{21814563-A9B8-483D-A635-FE9EC7BB1ACB}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+		{86D2D6F5-06F1-43D5-B766-A02A9C4D3907}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{86D2D6F5-06F1-43D5-B766-A02A9C4D3907}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{86D2D6F5-06F1-43D5-B766-A02A9C4D3907}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+		{86D2D6F5-06F1-43D5-B766-A02A9C4D3907}.Debug|iPhone.Build.0 = Debug|Any CPU
+		{86D2D6F5-06F1-43D5-B766-A02A9C4D3907}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+		{86D2D6F5-06F1-43D5-B766-A02A9C4D3907}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+		{86D2D6F5-06F1-43D5-B766-A02A9C4D3907}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{86D2D6F5-06F1-43D5-B766-A02A9C4D3907}.Release|Any CPU.Build.0 = Release|Any CPU
+		{86D2D6F5-06F1-43D5-B766-A02A9C4D3907}.Release|iPhone.ActiveCfg = Release|Any CPU
+		{86D2D6F5-06F1-43D5-B766-A02A9C4D3907}.Release|iPhone.Build.0 = Release|Any CPU
+		{86D2D6F5-06F1-43D5-B766-A02A9C4D3907}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+		{86D2D6F5-06F1-43D5-B766-A02A9C4D3907}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

+ 0 - 1
prs.mobile/ConnectionTestApp/ConnectionTest/ConnectionTest.Android/Resources/Resource.designer.cs

@@ -2,7 +2,6 @@
 //------------------------------------------------------------------------------
 // <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.

+ 1 - 0
prs.mobile/ConnectionTestApp/ConnectionTest/ConnectionTest/ConnectionTest.csproj

@@ -17,6 +17,7 @@
   </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\..\..\..\..\inabox\InABox.Client.Remote.Json\InABox.Client.Remote.Json.csproj" />
+    <ProjectReference Include="..\..\..\..\..\inabox\inabox.client.rest\InABox.Client.Rest\InABox.Client.Rest.csproj" />
     <ProjectReference Include="..\..\..\..\..\inabox\inabox.client.websocket\InABox.Client.WebSocket.csproj" />
     <ProjectReference Include="..\..\..\..\..\inabox\InABox.Configuration\InABox.Configuration.csproj" />
     <ProjectReference Include="..\..\..\..\..\inabox\InABox.Core\InABox.Core.csproj" />

+ 7 - 4
prs.mobile/ConnectionTestApp/ConnectionTest/ConnectionTest/ConnectionTestUnit.xaml.cs

@@ -23,7 +23,7 @@ namespace ConnectionTest
         string URL = "";
         string log = "";
         double interval = 1000;
-        static JsonClient<User> client;
+        static RestClient<User> client;
         public ConnectionTestUnit(string url)
         {
             InitializeComponent();
@@ -112,10 +112,13 @@ namespace ConnectionTest
                     Thread.Sleep((int)interval);
 
                     if(client == null)
-                        client = new JsonClient<User>(URL, false, true, BinarySerializationSettings.Latest);
+                        client = new RestClient<User>(URL, false, true, BinarySerializationSettings.Latest);
 
                     if(ClientFactory.ClientType == null)
-                        ClientFactory.SetClientType(typeof(JsonClient<>), "Test connection App", "1.0", URL, true);
+                        ClientFactory.SetClientType(typeof(RestClient<>), InABox.Core.Platform.TimeBench, "Connection Test app 2.0 - rest client",  URL, true);
+
+
+
                     var result = ClientFactory.Validate("TAN", "nictan");
 
                     //var request = WebRequest.Create("http://" + URL);
@@ -135,7 +138,7 @@ namespace ConnectionTest
                         attemptNoLbl.Text = "Attempt: " + count;                       
                     });
 
-                    CoreTable table = new Client<Product>().Query();
+                    //CoreTable table = new Client<Product>().Query();
 
                     Device.BeginInvokeOnMainThread(() =>
                     {

+ 2 - 2
prs.mobile/ConnectionTestApp/ConnectionTest/ConnectionTest/MainPage.xaml.cs

@@ -17,11 +17,11 @@ namespace ConnectionTest
     {
         List<string> urls = new List<string>
         { 
-            //"remote.com-al.com.au:8000",
+            "remote.com-al.com.au:8000",
             //"remote2.com-al.com.au:8000",
             //"remote.prsdigital.com.au:8005",
             //"remote2.prsdigital.com.au:8005",
-            "remote.com-al.com.au:8020",
+            //"remote.com-al.com.au:8020",
         };
         public MainPage()
         {