Ejemplo n.º 1
0
 /// <summary>
 ///     Returns a default application-wide singleton instance of DXEndpoint with a default
 ///     role.
 ///     Most applications use only a single data-source and should rely on this method to
 ///     get one.
 /// </summary>
 /// <returns>Instance of DXEndpoint with a default role.</returns>
 public static IDXEndpoint GetInstance()
 {
     if (endpointInstance == null)
     {
         lock (instanceLocker)
         {
             endpointInstance = new DXEndpoint();
             endpointInstance.Connect(DefaultAddress);
         }
     }
     return(endpointInstance);
 }
Ejemplo n.º 2
0
 /// <summary>
 ///     Creates an new endpoint.
 /// </summary>
 /// <returns>The created endpoint.</returns>
 public static IDXEndpoint Create()
 {
     lock (instanceLocker)
     {
         if (endpointInstance != null && endpointInstance.State != DXEndpointState.Closed)
         {
             endpointInstance.Close();
         }
         endpointInstance = new DXEndpoint();
         endpointInstance.Connect(DefaultAddress);
     }
     return(endpointInstance);
 }