Пример #1
0
 public static void ExecuteMethod_AddProcessObjectToContainerAndStoreBoth(ProcessContainer ownerProcessContainer, Process process)
 {
     if(ownerProcessContainer.ProcessIDs == null)
         ownerProcessContainer.ProcessIDs = new List<string>();
     ownerProcessContainer.ProcessIDs.Add(process.ID);
     ownerProcessContainer.StoreInformation();
     process.StoreInformation();
 }
Пример #2
0
 public static void ExecuteMethod_ExecuteAndStoreProcessWithLock(string processLockLocation, Process process)
 {
     string lockEtag;
     bool obtainLock = StorageSupport.AcquireLogicalLockByCreatingBlob(processLockLocation, out lockEtag);
     if (obtainLock == false)
         return;
     try
     {
         string operationTypeName = process.ExecutingOperation.ItemFullType;
         OperationSupport.ExecuteOperation(operationTypeName, new Tuple<string, object>("Process", process));
         process.StoreInformation();
     }
     finally
     {
         StorageSupport.ReleaseLogicalLockByDeletingBlob(processLockLocation, lockEtag);
     }
 }