Exemplo n.º 1
0
 private static void ProcessSingleOperation(OperationRequest operationRequest)
 {
     if (operationRequest.PublishWebContent != null)
     {
         ProcessPublishWebContent(operationRequest.PublishWebContent);
     }
     if (operationRequest.UpdateWebContentOperation != null)
     {
         ProcessUpdateWebContent(operationRequest.UpdateWebContentOperation);
     }
     if (operationRequest.SubscriberNotification != null)
     {
         WorkerSupport.ExecuteSubscription(operationRequest.SubscriberNotification);
     }
     if (operationRequest.RefreshDefaultViewsOperation != null)
     {
         WorkerSupport.RefreshDefaultViews(operationRequest.RefreshDefaultViewsOperation);
     }
     if (operationRequest.DeleteEntireOwner != null)
     {
         VirtualOwner virtualOwner = new VirtualOwner(operationRequest.DeleteEntireOwner.ContainerName,
                                                      operationRequest.DeleteEntireOwner.LocationPrefix);
         DeleteEntireOwner(virtualOwner);
     }
     if (operationRequest.DeleteOwnerContent != null)
     {
         VirtualOwner virtualOwner = new VirtualOwner(operationRequest.DeleteOwnerContent.ContainerName,
                                                      operationRequest.DeleteOwnerContent.LocationPrefix);
         DeleteOwnerContent(virtualOwner);
     }
     if (operationRequest.SubscriptionChainRequest != null)
     {
         WorkerSupport.ExecuteSubscriptionChain(operationRequest.SubscriptionChainRequest);
     }
 }
Exemplo n.º 2
0
        public static OperationRequest RefreshDefaultViews(string viewLocation, string fullTypeName, bool useQueuedWorker)
        {
            OperationRequest operationRequest = new OperationRequest
            {
                RefreshDefaultViewsOperation = new RefreshDefaultViewsOperation
                {
                    ViewLocation      = viewLocation,
                    TypeNameToRefresh = fullTypeName
                }
            };

            if (useQueuedWorker)
            {
                return(operationRequest);
            }
            WorkerSupport.RefreshDefaultViews(operationRequest.RefreshDefaultViewsOperation);
            return(null);
        }