ConfigurationPropertyCollection Klasa
Definicja
Reprezentuje kolekcję właściwości elementów konfiguracji.Represents a collection of configuration-element properties.
public ref class ConfigurationPropertyCollection : System::Collections::ICollection
public class ConfigurationPropertyCollection : System.Collections.ICollection
type ConfigurationPropertyCollection = class
interface ICollection
interface IEnumerable
Public Class ConfigurationPropertyCollection
Implements ICollection
- Dziedziczenie
-
ConfigurationPropertyCollection
- Implementuje
Przykłady
Poniższy przykład pokazuje jedno z możliwych użycia ConfigurationPropertyCollection .The following example shows one possible use of the ConfigurationPropertyCollection. Zapoznaj się z przykładem powiązanego typu ConfigurationProperty .Refer to the example of the related type ConfigurationProperty.
Poniżej znajduje się fragment konfiguracji używany przez powyższy przykład.The following is an excerpt from the configuration used by the above example.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="CustomSection" type="Samples.AspNet, ConfigurationProperty, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" allowDefinition="Everywhere" allowExeDefinition="MachineToApplication" restartOnExternalChanges="true" />
</configSections>
<CustomSection fileName="default.txt" alias="alias.txt" maxUsers="1000"
maxIdleTime="00:05:00" />
</configuration>
Uwagi
ConfigurationPropertyCollectionKlasa reprezentuje kolekcję ConfigurationProperty obiektów, które mogą być atrybutami lub ConfigurationElement obiektami elementu konfiguracji.The ConfigurationPropertyCollection class represents the collection of the ConfigurationProperty objects that can be attributes or ConfigurationElement objects of a configuration element.
ConfigurationPropertyKlasa reprezentuje ustawienie konfiguracji indywidualnej.The ConfigurationProperty class represents an individual configuration setting. Umożliwia pobieranie lub Ustawianie nazwy, typu i wartości domyślnej dla określonej jednostki konfiguracji (atrybutu lub elementu).It allows you to get or set the name, type, and default value for a particular configuration entity (attribute or element). Dodatkowe opcje pozwalają określić, czy atrybut jest wymagany, jest kluczem elementu czy reprezentuje domyślną kolekcję elementów.Additional options allow you to specify whether the attribute is required, is an element key, or represents a default element collection.
Konstruktory
ConfigurationPropertyCollection() |
Inicjuje nowe wystąpienie klasy ConfigurationPropertyCollection.Initializes a new instance of the ConfigurationPropertyCollection class. |
Właściwości
Count |
Pobiera liczbę właściwości w kolekcji.Gets the number of properties in the collection. |
IsSynchronized |
Pobiera wartość wskazującą, czy dostęp do kolekcji jest synchronizowany (bezpieczny wątkowo).Gets a value indicating whether access to the collection is synchronized (thread safe). |
Item[String] |
Pobiera element kolekcji o podanej nazwie.Gets the collection item with the specified name. |
SyncRoot |
Pobiera obiekt do synchronizowania dostępu do kolekcji.Gets the object to synchronize access to the collection. |
Metody
Add(ConfigurationProperty) |
Dodaje do kolekcji właściwość Configuration.Adds a configuration property to the collection. |
Clear() |
Usuwa wszystkie obiekty właściwości konfiguracji z kolekcji.Removes all configuration property objects from the collection. |
Contains(String) |
Określa, czy właściwość konfiguracji jest zawarta w tej kolekcji.Specifies whether the configuration property is contained in this collection. |
CopyTo(ConfigurationProperty[], Int32) |
Kopiuje ten ConfigurationPropertyCollection do tablicy.Copies this ConfigurationPropertyCollection to an array. |
Equals(Object) |
Określa, czy dany obiekt jest taki sam, jak bieżący obiekt.Determines whether the specified object is equal to the current object. (Odziedziczone po Object) |
GetEnumerator() |
Pobiera IEnumerator obiekt, który ma zastosowanie do kolekcji.Gets the IEnumerator object as it applies to the collection. |
GetHashCode() |
Służy jako domyślna funkcja skrótu.Serves as the default hash function. (Odziedziczone po Object) |
GetType() |
Pobiera Type bieżące wystąpienie.Gets the Type of the current instance. (Odziedziczone po Object) |
MemberwiseClone() |
Tworzy skróconą kopię bieżącego elementu Object .Creates a shallow copy of the current Object. (Odziedziczone po Object) |
Remove(String) |
Usuwa właściwość konfiguracji z kolekcji.Removes a configuration property from the collection. |
ToString() |
Zwraca ciąg reprezentujący bieżący obiekt.Returns a string that represents the current object. (Odziedziczone po Object) |
Jawne implementacje interfejsu
ICollection.CopyTo(Array, Int32) |
Kopiuje tę kolekcję do tablicy.Copies this collection to an array. |
Metody rozszerzania
Cast<TResult>(IEnumerable) |
Rzutuje elementy elementu IEnumerable do określonego typu.Casts the elements of an IEnumerable to the specified type. |
OfType<TResult>(IEnumerable) |
Filtruje elementy IEnumerable w oparciu o określony typ.Filters the elements of an IEnumerable based on a specified type. |
AsParallel(IEnumerable) |
Włącza przetwarzanie równoległe zapytania.Enables parallelization of a query. |
AsQueryable(IEnumerable) |
Konwertuje IEnumerable do IQueryable .Converts an IEnumerable to an IQueryable. |