Microsoft.Web.Administration.SectionGroup.AllowDefinitionToEnum C# (CSharp) Method

AllowDefinitionToEnum() static private method

static private AllowDefinitionToEnum ( string allowDefinition ) : ConfigurationAllowDefinition
allowDefinition string
return ConfigurationAllowDefinition
        static internal ConfigurationAllowDefinition AllowDefinitionToEnum(string allowDefinition)
        {
            switch (allowDefinition)
            {
                case KEYWORD_SECTION_ALLOWDEFINITION_EVERYWHERE:
                    return ConfigurationAllowDefinition.Everywhere;

                case KEYWORD_SECTION_ALLOWDEFINITION_MACHINEONLY:
                    return ConfigurationAllowDefinition.MachineOnly;

                case KEYWORD_SECTION_ALLOWDEFINITION_MACHINETOAPPLICATION:
                    return ConfigurationAllowDefinition.MachineToApplication;

                case KEYWORD_SECTION_ALLOWDEFINITION_MACHINETOWEBROOT:
                    return ConfigurationAllowDefinition.MachineToWebRoot;

                case KEYWORD_SECTION_ALLOWDEFINITION_APPHOSTONLY:
                    return ConfigurationAllowDefinition.AppHostOnly;

                default:
                    throw new ServerManagerException("Invalid allow definition string");
            }
        }
    }