Exemplo n.º 1
0
        public WindowsFeature(string variableName, string featureName, string ensureState
                              , string description = "")
        {
            this.Key = CodeGenHelpers.FormatKey(variableName, "Feature");
            this.ObjectDescription = description;

            this.AddAttribute("Name", featureName);
            this.AddAttribute("Ensure", ensureState);
        }
        public WebConfigPropertyDesiredState(string filter, string propertyName, string value, string siteLocation)
        {
            SiteName = siteLocation.Split('/')[0];

            var elements          = filter.Split('/');
            var parentElementName = elements[elements.Length - 1];

            this.Key = CodeGenHelpers.FormatKey(siteLocation + "_" + parentElementName.Replace("Authentication", "Auth") + "_" + propertyName);

            this.SiteLocation = siteLocation;
            this.AddAttribute("Location", siteLocation);
            this.AddAttribute("Filter", filter);
            this.AddAttribute("Name", propertyName);
            this.AddAttribute("Value", value);
            this.AddAttribute("PSPath", "MACHINE/WEBROOT/APPHOST");
        }
Exemplo n.º 3
0
 internal static string GetSiteKey(string siteName)
 {
     return(CodeGenHelpers.FormatKey(siteName) + "_Site");
 }
Exemplo n.º 4
0
 internal static string GetPoolVariableName(string poolName)
 {
     return(CodeGenHelpers.FormatKey(poolName, "Pool"));
 }
Exemplo n.º 5
0
 private static string GetVirtualDirectoryVariableName(string name1, string name2)
 {
     return(CodeGenHelpers.FormatKey(name1, name2, "Virt"));
 }
Exemplo n.º 6
0
 internal static string GetPoolVariableName(string name)
 {
     return(CodeGenHelpers.FormatKey(name) + "_Pool");
 }
Exemplo n.º 7
0
 public static string GetApplicationVariableName(string name1, string name2)
 {
     return(CodeGenHelpers.FormatKey(name1, name2, "App"));
 }