Esempio n. 1
0
 public static OperationRequest SyncTemplatesToSite(string sourceContainerName, string sourcePathRoot, string targetContainerName, string targetPathRoot, bool useQueuedWorker, bool renderWhileSync)
 {
     if (useQueuedWorker)
     {
         OperationRequest envelope = new OperationRequest
         {
             UpdateWebContentOperation = new UpdateWebContentOperation
             {
                 SourceContainerName =
                     sourceContainerName,
                 SourcePathRoot      = sourcePathRoot,
                 TargetContainerName =
                     targetContainerName,
                 TargetPathRoot  = targetPathRoot,
                 RenderWhileSync = renderWhileSync
             }
         };
         //QueueSupport.PutToDefaultQueue(envelope);
         return(envelope);
     }
     else
     {
         WorkerSupport.WebContentSync(sourceContainerName, sourcePathRoot, targetContainerName, targetPathRoot, renderWhileSync ? (WorkerSupport.PerformCustomOperation)RenderWebSupport.RenderingSyncHandler : (WorkerSupport.PerformCustomOperation)RenderWebSupport.CopyAsIsSyncHandler);
         return(null);
     }
 }
Esempio n. 2
0
        public static void ProcessUpdateWebContent(UpdateWebContentOperation operation)
        {
            string sourceContainerName = operation.SourceContainerName;
            string sourcePathRoot      = operation.SourcePathRoot;
            string targetContainerName = operation.TargetContainerName;
            string targetPathRoot      = operation.TargetPathRoot;
            bool   renderWhileSync     = operation.RenderWhileSync;

            WorkerSupport.WebContentSync(sourceContainerName, sourcePathRoot, targetContainerName, targetPathRoot,
                                         renderWhileSync
                                             ? (WorkerSupport.PerformCustomOperation)RenderWebSupport.RenderingSyncHandler
                                             : (WorkerSupport.PerformCustomOperation)RenderWebSupport.CopyAsIsSyncHandler);
        }