Exemplo n.º 1
0
        private static void Msp_ServiceProviderBuilded(object sender, IServiceProvider e)
        {
            ShareFileClient = new ShareFileClient(new NetAddress
            {
                Address = "localhost",
                Port    = 8911
            }, e.GetService <ILogger <Program> >());
            ShareFileClient.MapShareFileToLocal("FllowOrderSystem/textDict.json", "./textDict.json", null);
            ShareFileClient.StartListen();
            try
            {
                // ShareFileClient.GetGatewayShareFile("FllowOrderSystem/textDict.json", "./textDict.json");
            }
            catch (Exception ex)
            {
            }



            ShareFileClient2 = new ShareFileClient(new NetAddress
            {
                Address = "localhost",
                Port    = 8911
            }, e.GetService <ILogger <Program> >());
            ShareFileClient2.MapShareFileToLocal("FllowOrderSystem/textDict.json", "./textDict2.json", null);
            ShareFileClient2.StartListen();
            try
            {
                //ShareFileClient2.GetGatewayShareFile("FllowOrderSystem/textDict.json", "./textDict2.json");
            }
            catch (Exception ex)
            {
            }
        }
Exemplo n.º 2
0
        private static void Msp_ServiceProviderBuilded(object sender, IServiceProvider e)
        {
            var gatewaycert = new System.Security.Cryptography.X509Certificates.X509Certificate2("../../../../pfx/client.pfx", "123456");

            ShareFileClient = new ShareFileClient(new NetAddress
            {
                Address = "localhost",
                Port    = 8911
            }, e.GetService <ILogger <Program> >(), gatewaycert);
            ShareFileClient.MapShareFileToLocal("FllowOrderSystem/textDict.json", "./textDict.json", null);
            ShareFileClient.StartListen();
            try
            {
                // ShareFileClient.GetGatewayShareFile("FllowOrderSystem/textDict.json", "./textDict.json");
            }
            catch (Exception ex)
            {
            }



            ShareFileClient2 = new ShareFileClient(new NetAddress
            {
                Address = "localhost",
                Port    = 8911
            }, e.GetService <ILogger <Program> >(), gatewaycert);
            ShareFileClient2.MapShareFileToLocal("FllowOrderSystem/textDict.json", "./textDict2.json", null);
            ShareFileClient2.StartListen();
            try
            {
                //ShareFileClient2.GetGatewayShareFile("FllowOrderSystem/textDict.json", "./textDict2.json");
            }
            catch (Exception ex)
            {
            }
        }