Exemplo n.º 1
0
Arquivo: test.cs Projeto: mono/gert
	protected override object GetElementKey (ConfigurationElement element)
	{
		if (null == element)
			throw new ArgumentNullException ("element");

		return ((MyElement) element).Name;
	}
Exemplo n.º 2
0
 protected override object GetElementKey(ConfigurationElement element)
 {
     return(((Place)element).Code);
 }
 protected override object GetElementKey(ConfigurationElement element)
 {
     return ((ASPNET2ConfigurationState)element).Name;
 }
Exemplo n.º 4
0
Arquivo: t38.cs Projeto: nlhepler/mono
	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;
 }
Exemplo n.º 8
0
 protected override object GetElementKey(ConfigurationElement element)
 {
     return ((ProviderSettings)element).Name;
 }
        protected override object GetElementKey(ConfigurationElement element)
        {
            BehaviorConfigurationElement section = (BehaviorConfigurationElement)element;

            return(section.Type);
        }
Exemplo n.º 10
0
 /// <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;
Exemplo n.º 11
0
 protected override object GetElementKey(ConfigurationElement element)
 {
     return(((TopicConfig)element).Name);
 }
 protected override object GetElementKey(ConfigurationElement element)
 {
     return((object)((HandlerElement)element).Name);
 }
Exemplo n.º 13
0
 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);
 }
Exemplo n.º 15
0
 protected override void BaseAdd(ConfigurationElement element)
 {
     BaseAdd(element, false);
 }
 internal ApplicationDefaults(ConfigurationElement element, ConfigurationElement parent)
     : base(element, null, null, parent, null, null)
 {
 }
Exemplo n.º 17
0
 protected override object GetElementKey(ConfigurationElement element)
 {
     return((( DeviceAdapterConfigInstanceElement )element).Name);
 }
Exemplo n.º 18
0
 protected virtual void BaseAdd(ConfigurationElement element)
 {
 }
Exemplo n.º 19
0
 protected override object GetElementKey(ConfigurationElement element)
 {
     return((( SensorEndpointConfigInstanceElement )element).Name);
 }
        protected override object GetElementKey(ConfigurationElement element)
        {
            var e = (AppSettingElement)element;

            return e.Key;
        }
Exemplo n.º 21
0
 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;
 }
Exemplo n.º 25
0
 protected override Object GetElementKey(ConfigurationElement element)
 {
     return(((EyediaConfigElement)element).Name);
 }
 public void CopyTo(ConfigurationElement[] array, int index)
 {
 }
Exemplo n.º 27
0
 protected override object GetElementKey(ConfigurationElement element)
 {
     return(((ParserSetting)element).Name);
 }
Exemplo n.º 28
0
        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();
            }
        }
Exemplo n.º 29
0
 protected override object GetElementKey(ConfigurationElement element) => ((ConnectionConfig)element).Name;
Exemplo n.º 30
0
 protected override object GetElementKey(ConfigurationElement element)
 {
     return(((Con)(element)).Name);
 }
Exemplo n.º 31
0
 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);
 }
Exemplo n.º 34
0
 protected override object GetElementKey(ConfigurationElement xiElement)
 {
     return((xiElement as DataProviderConfigElement).Id);
 }
Exemplo n.º 35
0
 protected override object GetElementKey(ConfigurationElement element)
 {
     return(((AssemblyInfo)element).Assembly);
 }
Exemplo n.º 36
0
Arquivo: test.cs Projeto: mono/gert
	protected override void Reset (ConfigurationElement parentElement)
	{
	}
Exemplo n.º 37
0
 protected override object GetElementKey(ConfigurationElement element)
 {
     return(((SerialSoundAndLight)element).Name);
 }
Exemplo n.º 38
0
 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;
 }
Exemplo n.º 40
0
 protected abstract Object GetElementKey(ConfigurationElement element);
Exemplo n.º 41
0
 /// <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;
 }
Exemplo n.º 45
0
 /// <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];
            }
Exemplo n.º 47
0
 /// <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]);
     }
 }
Exemplo n.º 49
0
        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)
 { }
Exemplo n.º 51
0
 protected override object GetElementKey(ConfigurationElement element)
 {
     return(((UserGroupConfigElement)element).UserGroupName);
 }
Exemplo n.º 52
0
Arquivo: t38.cs Projeto: nlhepler/mono
	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);
 }
Exemplo n.º 54
0
 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;
        }