AzureSiteReplicator.WebDeployHelper.TestSkipRule C# (CSharp) Method

TestSkipRule() public method

public TestSkipRule ( List skipRules, string contentPath ) : List
skipRules List
contentPath string
return List
        public List<string> TestSkipRule(List<SkipRule> skipRules, string contentPath)
        {
            DeploymentBaseOptions sourceOptions = new DeploymentBaseOptions();
            DeploymentBaseOptions destOptions = new DeploymentBaseOptions();
            DeploymentSyncOptions syncOptions = new DeploymentSyncOptions();

            _skipRulesTestResults = new List<string>();

            AddSkips(skipRules.AsReadOnly(), sourceOptions, destOptions);
            syncOptions.WhatIf = true;

            // Puropsely only setting event handler for source so that we don't get duplicate
            // events being fired
            sourceOptions.TraceLevel = TraceLevel.Verbose;
            sourceOptions.Trace += AddSkipRuleResultEventHandler;

            using (DeploymentObject sourceObject = DeploymentManager.CreateObject(DeploymentWellKnownProvider.ContentPath, contentPath, sourceOptions))
            {
                sourceObject.SyncTo(destOptions, syncOptions);
            }

            _skipRulesTestResults.Sort();
            return _skipRulesTestResults;
        }