示例#1
0
        private static void Logout()
        {
            try
            {
                SDKEnvironment.Logout(new Uri(ServerName));
            }
            catch (Exception ex)
            {
                Program.Log.Error(null, ex);
            }

            try
            {
                if (scs != null)
                {
                    scs.Abort();
                    scs.Dispose();
                    scs = null;
                }

                SDKEnvironment.RemoveAllServers();
            }
            catch (Exception ex)
            {
                Program.Log.Error(null, ex);
            }
        }
 public void Dispose()
 {
     try
     {
         if (State.HasFlag(XProtectState.LoggedIn))
         {
             Environment.Logout(_uri);
         }
     }
     catch (Exception e)
     {
         LastError = e.Message;
     }
 }