Beispiel #1
0
        public void Dispose()
        {
            //Check the server connections and close if needed.
            if (_SmartObjectClient != null)
            {
                _SmartObjectClient.CloseConnection();
                
                _SmartObjectClient = null;
            }

            //Check the server connections and close if needed.
            if (_WorkflowServer != null)
            {
                if (_WorkflowServer.Connection.IsConnected) _WorkflowServer.Connection.Close();
                _WorkflowServer = null;
            }

            //Check the server connections and close if needed.
            if (_WorkflowClient != null)
            {
                if (_WorkflowClient.connection != null) _WorkflowClient.CloseConnection();
                _WorkflowClient.Dispose();
                _WorkflowClient = null;
            }
        }
Beispiel #2
0
 /// <summary>
 /// SmartObject Client
 /// </summary>
 /// <returns>SmartObject Client</returns>
 public K2SmartObjectClient SmartObjectClient()
 {
     if (_SmartObjectClient == null)
     {
         _SmartObjectClient = new K2SmartObjectClient(_K2Server,_WorkflowManagementServerPort);
         return _SmartObjectClient;
     }
     else
     {
         return _SmartObjectClient;
     }
 }