protected override object GetElementKey (ConfigurationElement element) { if (null == element) throw new ArgumentNullException ("element"); return ((MyElement) element).Name; }
protected override object GetElementKey(ConfigurationElement element) { return(((Place)element).Code); }
protected override object GetElementKey(ConfigurationElement element) { return ((ASPNET2ConfigurationState)element).Name; }
protected override object GetElementKey (ConfigurationElement e) { return ((MyElement) e).Name; }
static internal List<string> GetProviderList(ConfigurationElement section) { List<string> providerList = new List<string>(); foreach (ConfigurationElement element in section.GetCollection(MetabaseSettingsIis7Constants.ProviderElementName)) { providerList.Add((string)element[MetabaseSettingsIis7Constants.ValueAttributeName]); } return providerList; }
internal WorkerProcess(ConfigurationElement parent) : base(null, "workerProcess", null, parent, null, null) { }
protected int BaseIndexOf(ConfigurationElement element) { return -1; }
protected override object GetElementKey(ConfigurationElement element) { return ((ProviderSettings)element).Name; }
protected override object GetElementKey(ConfigurationElement element) { BehaviorConfigurationElement section = (BehaviorConfigurationElement)element; return(section.Type); }
/// <summary> /// Returns the key value for the element which is Number for the /// EditionConfigurationElement /// </summary> /// <param name="element">the element to get the key for</param> /// <returns>the Number for the element</returns> protected override object GetElementKey(ConfigurationElement element) => ((EditionConfigurationElement)element).Number;
protected override object GetElementKey(ConfigurationElement element) { return(((TopicConfig)element).Name); }
protected override object GetElementKey(ConfigurationElement element) { return((object)((HandlerElement)element).Name); }
protected override object GetElementKey(ConfigurationElement element) { return(((MsmqQueueElement)element).Uri); }
/// <summary> /// Gets the element key for a specified configuration element when overridden in a derived class. /// </summary> /// <param name="element">The <see cref="T:System.Configuration.ConfigurationElement"></see> to return the key for.</param> /// <returns> /// An <see cref="T:System.Object"></see> that acts as the key for the specified <see cref="T:System.Configuration.ConfigurationElement"></see>. /// </returns> protected override object GetElementKey(ConfigurationElement element) { return(((CommandCacheDependencyElement)element).Name); }
protected override void BaseAdd(ConfigurationElement element) { BaseAdd(element, false); }
internal ApplicationDefaults(ConfigurationElement element, ConfigurationElement parent) : base(element, null, null, parent, null, null) { }
protected override object GetElementKey(ConfigurationElement element) { return((( DeviceAdapterConfigInstanceElement )element).Name); }
protected virtual void BaseAdd(ConfigurationElement element) { }
protected override object GetElementKey(ConfigurationElement element) { return((( SensorEndpointConfigInstanceElement )element).Name); }
protected override object GetElementKey(ConfigurationElement element) { var e = (AppSettingElement)element; return e.Key; }
protected override object GetElementKey(ConfigurationElement element) { return(((MenuItemElement)element).Name); }
static internal IDictionary<string, List<string>> GetProtocolBindingTable(ConfigurationElement site) { IDictionary<string, List<string>> bindingList = new Dictionary<string, List<string>>(); foreach (ConfigurationElement binding in site.GetCollection(MetabaseSettingsIis7Constants.BindingsElementName)) { string protocol = ((string)binding[MetabaseSettingsIis7Constants.ProtocolAttributeName]).ToLowerInvariant(); string bindingInformation = (string)binding[MetabaseSettingsIis7Constants.BindingInfoAttributeName]; Debug.Print("MetabaseSettingsIis7V2.ctor() adding Protocol: " + protocol + " BindingInformation: " + bindingInformation); if (!bindingList.ContainsKey(protocol)) { bindingList.Add(protocol, new List<string>()); } bindingList[protocol].Add(bindingInformation); } return bindingList; }
protected override object GetElementKey(ConfigurationElement element) { return(this._elements.Find((T e) => e.Equals(element))); }
static internal IEnumerable<string> GetApplicationPaths(ConfigurationElement site) { List<string> appPaths = new List<string>(); ConfigurationElementCollection applications = site.GetCollection(); foreach (ConfigurationElement application in applications) { string appPath = (string)application["path"]; appPaths.Add(appPath); } return appPaths; }
protected override Object GetElementKey(ConfigurationElement element) { return(((EyediaConfigElement)element).Name); }
public void CopyTo(ConfigurationElement[] array, int index) { }
protected override object GetElementKey(ConfigurationElement element) { return(((ParserSetting)element).Name); }
private static void AddRedirectionRules(string siteName, string uiServiceLink) { using (ServerManager serverManager = new ServerManager()) { var config = serverManager.GetWebConfiguration(siteName); var rulesSection = config.GetSection("system.webServer/rewrite/rules"); var rulesCollection = rulesSection.GetCollection(); ConfigurationElement welknownrule = rulesCollection.CreateElement("rule"); welknownrule["name"] = @".well-known"; welknownrule["stopProcessing"] = true; ConfigurationElement matchElement1 = welknownrule.GetChildElement("match"); matchElement1["url"] = @".well-known"; rulesCollection.Add(welknownrule); ConfigurationElement httpsRedirectRule = rulesCollection.CreateElement("rule"); httpsRedirectRule["name"] = "https_upgrade"; httpsRedirectRule["patternSyntax"] = "Wildcard"; httpsRedirectRule["stopProcessing"] = true; ConfigurationElement matchElement2 = httpsRedirectRule.GetChildElement("match"); matchElement2["url"] = "*"; matchElement2["negate"] = "false"; ConfigurationElement redirectAction = httpsRedirectRule.GetChildElement("action"); redirectAction["type"] = "Redirect"; redirectAction["url"] = "https://{HTTP_HOST}{REQUEST_URI}"; redirectAction["redirectType"] = "Found"; ConfigurationElement conditions = httpsRedirectRule.GetChildElement("conditions"); conditions["logicalGrouping"] = "MatchAny"; ConfigurationElementCollection conditionsCollection = conditions.GetCollection(); ConfigurationElement add = conditionsCollection.CreateElement("add"); add["input"] = "{HTTPS}"; add["pattern"] = "off"; conditionsCollection.Add(add); rulesCollection.Add(httpsRedirectRule); ConfigurationElement rewriteRule = rulesCollection.CreateElement("rule"); rewriteRule["name"] = @"ReverseProxyInboundRule"; rewriteRule["stopProcessing"] = true; ConfigurationElement matchElement = rewriteRule.GetChildElement("match"); matchElement["url"] = @"(.*)"; ConfigurationElement actionElement1 = rewriteRule.GetChildElement("action"); actionElement1["type"] = @"Rewrite"; actionElement1["url"] = uiServiceLink + "/{R:1}"; rulesCollection.Add(rewriteRule); serverManager.CommitChanges(); } }
protected override object GetElementKey(ConfigurationElement element) => ((ConnectionConfig)element).Name;
protected override object GetElementKey(ConfigurationElement element) { return(((Con)(element)).Name); }
protected override object GetElementKey(ConfigurationElement element) { return(((BufferModeSettings)element).Name); }
internal SiteDefaults(ConfigurationElement element, ConfigurationElement parent) : base(element, "siteDefaults", null, parent, null, null) { }
/// <summary> /// Returns the SyncTableConfigElement.Name property for the specifed element /// </summary> /// <param name="element">ConfigurationElement</param> /// <returns>Name property</returns> protected override object GetElementKey(ConfigurationElement element) { return(((SyncTableConfigElement)element).Name); }
protected override object GetElementKey(ConfigurationElement xiElement) { return((xiElement as DataProviderConfigElement).Id); }
protected override object GetElementKey(ConfigurationElement element) { return(((AssemblyInfo)element).Assembly); }
protected override void Reset (ConfigurationElement parentElement) { }
protected override object GetElementKey(ConfigurationElement element) { return(((SerialSoundAndLight)element).Name); }
protected virtual void BaseAdd(int index, ConfigurationElement element) { }
///<summary> ///Gets the element key for a specified configuration element when overridden in a derived class. ///</summary> /// ///<returns> ///An <see cref="T:System.Object"></see> that acts as the key for the specified <see cref="T:System.Configuration.ConfigurationElement"></see>. ///</returns> /// ///<param name="element">The <see cref="T:System.Configuration.ConfigurationElement"></see> to return the key for. </param> protected override object GetElementKey(ConfigurationElement element) { UnityContainerExtensionConfigurationElement configElement = (UnityContainerExtensionConfigurationElement)( element ); return configElement.Name; }
protected abstract Object GetElementKey(ConfigurationElement element);
/// <summary> /// Method to fill the XML configirations /// </summary> /// <param name="elem">XML configuration element</param> public void FillXmlConfig(ConfigurationElement elem) { elem["type"] = "AbortRequest"; }
protected override object GetElementKey(ConfigurationElement element) { return ((DateTimeConfigurationElement)element).Value; }
protected override object GetElementKey(ConfigurationElement element) { return(((ConfigConfigurationElement)element).Key); }
static internal object GetAttributeValue(ConfigurationElement element, string attributeName) { return element.GetAttribute(attributeName).Value; }
/// <summary> /// Default by-key fetch for this element. /// </summary> /// <param name="element">The element to get a key for.</param> protected override object GetElementKey(ConfigurationElement element) => element.ToString();
static internal string GetEnabledProtocols(ConfigurationElement site) { ConfigurationElement application = FindElement( site.GetCollection(), MetabaseSettingsIis7Constants.PathAttributeName, HostingEnvironment.ApplicationVirtualPath ); DiagnosticUtility.DebugAssert(application != null, "Unable to find application."); return (string)application[MetabaseSettingsIis7Constants.EnabledProtocolsAttributeName]; }
/// <summary> /// Default by-key fetch for this element /// </summary> protected override object GetElementKey(ConfigurationElement element) { return(element.ToString()); }
// translate IIS setting on extended protection to NCL object static internal void ReadIisExtendedProtectionPolicy(ConfigurationElement element, out ExtendedProtectionTokenChecking tokenChecking, out ExtendedProtectionFlags flags, out List<string> spnList) { tokenChecking = (ExtendedProtectionTokenChecking)element.GetAttributeValue(MetabaseSettingsIis7Constants.TokenCheckingAttributeName); flags = (ExtendedProtectionFlags)element.GetAttributeValue(MetabaseSettingsIis7Constants.FlagsAttributeName); spnList = new List<string>(); foreach (ConfigurationElement configElement in element.GetCollection()) { spnList.Add((string)configElement[MetabaseSettingsIis7Constants.NameAttributeName]); } }
protected override object GetElementKey(ConfigurationElement element) { var ele = element as PacItem; return(ele.host); }
internal ApplicationDomain(ConfigurationElement parent) : base(null, "applicationDomain", null, parent, null, null) { }
protected override object GetElementKey(ConfigurationElement element) { return(((UserGroupConfigElement)element).UserGroupName); }
protected override void BaseAdd (ConfigurationElement e) { base.BaseAdd (e); }
/// <summary> /// Gets a unique key for the specified element. /// </summary> /// <param name="element">The configuration element.</param> /// <returns>The key for the element.</returns> protected override object GetElementKey(ConfigurationElement element) { return(((NamespaceConfigurationElement)element).Namespace); }
protected override object GetElementKey(ConfigurationElement element) { return ((RSSConfigSite)element).ContentURI.GetHashCode(); }
/// <summary> /// Gets configuration element key. /// </summary> /// <param name="element">Configuration element.</param> /// <returns>Element key.</returns> protected override object GetElementKey(ConfigurationElement element) { MobeelizerConfigProperty e = (MobeelizerConfigProperty)element; return e.Name; }