示例#1
0
 public void Dispose()
 {
     if (Service != null)
     {
         Service.Dispose();
         Service = null;
     }
 }
示例#2
0
 public ProxyDictionary()
 {
     if (GlobalAppConfig.RunningMode == 2)
     {
         Service = Function.UnitySection("unity.xml", "unityConsole", "dictionary").Resolve <ItfDictionary>();
     }
     else if (GlobalAppConfig.RunningMode == 3)
     {
         try
         {
             Service = WcfEndpoint.Fac <ItfDictionary>().CreateChannel(WcfEndpoint.HisEndpointAddress(this.GetType().Name));
             Service.Verify();
         }
         catch
         {
             if (WcfEndpoint.AllowChange)
             {
                 WcfEndpoint.ChangeServer();
                 Service = WcfEndpoint.Fac <ItfDictionary>().CreateChannel(WcfEndpoint.HisEndpointAddress(this.GetType().Name));
             }
         }
     }
 }