Exemple #1
0
 /// <summary>
 /// Abort the client if it is not null.
 /// </summary>
 public static void AbortClient()
 {
     if (m_Client != null)
     {
         m_Client.Abort();
         m_Client = null;
     }
 }
Exemple #2
0
 /// <summary>
 /// Create the client using the stub instance context SubscribedServiceEvents defined above
 /// </summary>
 /// <returns>true IFF the client communications channel was successfully created and opened</returns>
 public static bool CreateClient()
 {
     m_Client = new SOCFXCommandServiceClient(new InstanceContext(new SubscribedServiceEvents()));
     if (m_Client.State == System.ServiceModel.CommunicationState.Created)
     {
         m_Client.Open();
     }
     return(m_Client.State == System.ServiceModel.CommunicationState.Opened);
 }