Пример #1
0
        private static bool IsAlienDbTaggedParameter(DeploymentWellKnownTag dbTag, DeploymentParameterWPI parameter)
        {
            return(parameter.HasTags((long)databaseEngineTags) && !parameter.HasTags((long)dbTag));

/*
 #pragma warning disable 612,618
 *          return (parameter.Tags & databaseEngineTags) != DeploymentWellKnownTag.None
 *                 &&
 *                 (parameter.Tags & dbTag) == DeploymentWellKnownTag.None;
 #pragma warning restore 612,618
 */
        }
Пример #2
0
        protected static DeploymentParameter MakeDeploymentParameterFromDecalredParameter(DeploymentParameterWPI d)
        {
            DeploymentParameter r = new DeploymentParameter();

            r.Name         = d.Name;
            r.FriendlyName = d.FriendlyName;
            r.DefaultValue = d.DefaultValue;
            r.Description  = d.Description;

            r.SetWellKnownTagsFromRawString(d.RawTags);
            if (!string.IsNullOrEmpty(d.ValidationString))
            {
                // synchronized with Microsoft.Web.Deployment.DeploymentSyncParameterValidationKind
                if (d.HasValidation((int)DeploymentParameterValidationKind.AllowEmpty))
                {
                    r.ValidationKind |= DeploymentParameterValidationKind.AllowEmpty;
                }
                if (d.HasValidation((int)DeploymentParameterValidationKind.RegularExpression))
                {
                    r.ValidationKind |= DeploymentParameterValidationKind.RegularExpression;
                }
                if (d.HasValidation((int)DeploymentParameterValidationKind.Enumeration))
                {
                    r.ValidationKind |= DeploymentParameterValidationKind.Enumeration;
                }
                if (d.HasValidation((int)DeploymentParameterValidationKind.Boolean))
                {
                    r.ValidationKind |= DeploymentParameterValidationKind.Boolean;
                }

                r.ValidationString = d.ValidationString;
            }
            else
            {
                r.ValidationKind = DeploymentParameterValidationKind.None;
            }

            return(r);
        }
Пример #3
0
        private static bool IsAlienDbTaggedParameter(DeploymentWellKnownTag dbTag, DeploymentParameterWPI parameter)
        {
            return parameter.HasTags((long)databaseEngineTags) && !parameter.HasTags((long)dbTag);
/*
#pragma warning disable 612,618
            return (parameter.Tags & databaseEngineTags) != DeploymentWellKnownTag.None 
                   && 
                   (parameter.Tags & dbTag) == DeploymentWellKnownTag.None;
#pragma warning restore 612,618
*/
        }