Exemple #1
0
        private void extractDuplicateFilteringForDeployment(MultipartFormData payload, DeploymentBuilder deploymentBuilder)
        {
            bool enableDuplicateFiltering = false;
            bool deployChangedOnly        = false;

            MultipartFormData.FormPart deploymentEnableDuplicateFiltering = payload.getNamedPart(ENABLE_DUPLICATE_FILTERING);
            if (deploymentEnableDuplicateFiltering != null)
            {
                enableDuplicateFiltering = bool.Parse(deploymentEnableDuplicateFiltering.TextContent);
            }

            MultipartFormData.FormPart deploymentDeployChangedOnly = payload.getNamedPart(DEPLOY_CHANGED_ONLY);
            if (deploymentDeployChangedOnly != null)
            {
                deployChangedOnly = bool.Parse(deploymentDeployChangedOnly.TextContent);
            }

            // deployChangedOnly overrides the enableDuplicateFiltering setting
            if (deployChangedOnly)
            {
                deploymentBuilder.enableDuplicateFiltering(true);
            }
            else if (enableDuplicateFiltering)
            {
                deploymentBuilder.enableDuplicateFiltering(false);
            }
        }