示例#1
0
 protected override void BeginProcessing()
 {
     try
     {
         _packageDeploymentManager.CreateConnection();
         _packageDeploymentManager.Connection.Open(ModuleHelper.BuildConnectionString());
     }
     catch (Exception ex)
     {
         ErrorHelper.Write(ex);
     }
 }
 protected override void BeginProcessing()
 {
     try
     {
         wfMan.CreateConnection();
         wfMan.Connection.Open(ModuleHelper.BuildConnectionString());
     }
     catch (Exception ex)
     {
         ErrorHelper.Write(ex);
     }
 }
 protected override void BeginProcessing()
 {
     _serviceTypeGuid = string.IsNullOrEmpty(ServiceTypeGuid) ? Guid.NewGuid() : Guid.Parse(ServiceTypeGuid);
     DisplayName      = string.IsNullOrEmpty(DisplayName) ? SystemName : DisplayName;
     try
     {
         _managementServer.CreateConnection();
         _managementServer.Connection.Open(ModuleHelper.BuildConnectionString());
     }
     catch (Exception ex)
     {
         ErrorHelper.Write(ex);
     }
 }
 protected override void BeginProcessing()
 {
     if (string.IsNullOrEmpty(ServiceInstanceGuid) && (string.IsNullOrEmpty(ServiceInstanceName) || string.IsNullOrEmpty(ServiceTypeGuid)))
     {
         throw new Exception("You need to provide either Service Instance Guid OR Service Instance System name with Service type Guid");
     }
     try
     {
         _managementServer.CreateConnection();
         _managementServer.Connection.Open(ModuleHelper.BuildConnectionString());
     }
     catch (Exception ex)
     {
         ErrorHelper.Write(ex);
     }
 }
示例#5
0
 protected override void ProcessRecord()
 {
     ModuleHelper.RestartK2Service();
 }