aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/UpdateServiceHelper.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-02-21 20:21:57 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-02-21 20:21:57 +0200
commit956f9ea033553136ebf199fff30f288dc26fbeb0 (patch)
tree3780e906d8d4f12c5be3836e1704d93d8d4966bd /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/UpdateServiceHelper.cs
parent808ce20dbd74862a75499ee0d4e87247ee4479b4 (diff)
downloadTango-956f9ea033553136ebf199fff30f288dc26fbeb0.tar.gz
Tango-956f9ea033553136ebf199fff30f288dc26fbeb0.zip
Working on machine studio update center..
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/UpdateServiceHelper.cs')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/UpdateServiceHelper.cs29
1 files changed, 29 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/UpdateServiceHelper.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/UpdateServiceHelper.cs
new file mode 100644
index 000000000..87b974b99
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/UpdateServiceHelper.cs
@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.ServiceModel;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.Settings;
+
+namespace Tango.MachineStudio.Common.Update
+{
+ public static class UpdateServiceHelper
+ {
+ public static ChannelFactory<IMachineStudioUpdateService> GetUpdateServiceChannel()
+ {
+ BasicHttpBinding binding = new BasicHttpBinding(BasicHttpSecurityMode.None);
+ binding.ReceiveTimeout = TimeSpan.FromSeconds(20);
+ binding.SendTimeout = TimeSpan.FromSeconds(20);
+ binding.MaxBufferPoolSize = 6553600;
+ binding.MaxBufferSize = 6553600;
+ binding.MaxReceivedMessageSize = 6553600;
+ binding.ReaderQuotas.MaxDepth = 6553600;
+ binding.ReaderQuotas.MaxStringContentLength = 6553600;
+ binding.ReaderQuotas.MaxArrayLength = 6553600;
+ binding.ReaderQuotas.MaxBytesPerRead = 6553600;
+
+ return new ChannelFactory<IMachineStudioUpdateService>(binding, SettingsManager.Default.MachineStudio.UpdateServiceAddress);
+ }
+ }
+}