protected override void ProcessRecord()
 {
     try
     {
         if (!string.IsNullOrEmpty(ServiceInstanceGuid))
         {
             var sInstanceGuid = Guid.Parse(ServiceInstanceGuid);
             _managementServer.RefreshServiceInstance(sInstanceGuid);
         }
         else
         {
             var sTypeGuid = Guid.Parse(ServiceTypeGuid);
             _smoManagementServer.Connection = _managementServer.Connection;
             var sInstanceGuid = _smoManagementServer.GetServiceInstanceGuid(sTypeGuid, ServiceInstanceName);
             _managementServer.RefreshServiceInstance(sInstanceGuid);
         }
     }
     catch (Exception ex)
     {
         ErrorHelper.Write(ex);
     }
 }
Beispiel #2
0
 internal virtual bool RefreshServiceInstance(Guid ServiceInstanceGuid)
 {
     return(_serviceManagementServer.RefreshServiceInstance(ServiceInstanceGuid));
 }