ConfigurationSectionCollection 클래스

정의

구성 파일 내 관련 섹션의 컬렉션을 나타냅니다.

public ref class ConfigurationSectionCollection sealed : System::Collections::Specialized::NameObjectCollectionBase
public sealed class ConfigurationSectionCollection : System.Collections.Specialized.NameObjectCollectionBase
[System.Serializable]
public sealed class ConfigurationSectionCollection : System.Collections.Specialized.NameObjectCollectionBase
type ConfigurationSectionCollection = class
    inherit NameObjectCollectionBase
[<System.Serializable>]
type ConfigurationSectionCollection = class
    inherit NameObjectCollectionBase
Public NotInheritable Class ConfigurationSectionCollection
Inherits NameObjectCollectionBase
상속
ConfigurationSectionCollection
특성

예제

다음 코드 예제에서는 ConfigurationSectionCollection 클래스를 사용하는 방법을 보여 줍니다.

using System;
using System.Configuration;
using System.Collections;

namespace Samples.AspNet.Configuration
{

    // Define a custom section programmatically.
    public sealed class CustomSection :
        ConfigurationSection
    {
        // The collection (property bag) that contains 
        // the section properties.
        private static ConfigurationPropertyCollection _Properties;

        // The FileName property.
        private static readonly ConfigurationProperty _FileName =
            new ConfigurationProperty("fileName",
            typeof(string), "default.txt",
            ConfigurationPropertyOptions.IsRequired);

        // The MasUsers property.
        private static readonly ConfigurationProperty _MaxUsers =
            new ConfigurationProperty("maxUsers",
            typeof(long), (long)1000,
            ConfigurationPropertyOptions.None);

        // The MaxIdleTime property.
        private static readonly ConfigurationProperty _MaxIdleTime =
            new ConfigurationProperty("maxIdleTime",
            typeof(TimeSpan), TimeSpan.FromMinutes(5),
            ConfigurationPropertyOptions.IsRequired);

        // CustomSection constructor.
        public CustomSection()
        {
            // Property initialization
            _Properties =
                new ConfigurationPropertyCollection();

            _Properties.Add(_FileName);
            _Properties.Add(_MaxUsers);
            _Properties.Add(_MaxIdleTime);
        }

        // This is a key customization. 
        // It returns the initialized property bag.
        protected override ConfigurationPropertyCollection Properties
        {
            get
            {
                return _Properties;
            }
        }

        [StringValidator(InvalidCharacters = " ~!@#$%^&*()[]{}/;'\"|\\",
            MinLength = 1, MaxLength = 60)]
        public string FileName
        {
            get
            {
                return (string)this["fileName"];
            }
            set
            {

                this["fileName"] = value;
            }
        }

        [LongValidator(MinValue = 1, MaxValue = 1000000,
            ExcludeRange = false)]
        public long MaxUsers
        {
            get
            {
                return (long)this["maxUsers"];
            }
            set
            {
                this["maxUsers"] = value;
            }
        }

        [TimeSpanValidator(MinValueString = "0:0:30",
            MaxValueString = "5:00:0",
            ExcludeRange = false)]
        public TimeSpan MaxIdleTime
        {
            get
            {
                return (TimeSpan)this["maxIdleTime"];
            }
            set
            {
                this["maxIdleTime"] = value;
            }
        }
    }

    class UsingCustomSectionCollection
    {

        // Create a custom section.
        static void CreateSection()
        {
            try
            {

                CustomSection customSection;

                // Get the current configuration file.
                System.Configuration.Configuration config =
                        ConfigurationManager.OpenExeConfiguration(
                        ConfigurationUserLevel.None);

                // Create the section entry  
                // in the <configSections> and the 
                // related target section in <configuration>.
                if (config.Sections["CustomSection"] == null)
                {
                    customSection = new CustomSection();
                    config.Sections.Add("CustomSection", customSection);
                    customSection.SectionInformation.ForceSave = true;
                    config.Save(ConfigurationSaveMode.Full);
                }
            }
            catch (ConfigurationErrorsException err)
            {
                Console.WriteLine(err.ToString());
            }
        }

        static void GetAllKeys()
        {

            try
            {
                System.Configuration.Configuration config =
                ConfigurationManager.OpenExeConfiguration(
                ConfigurationUserLevel.None);

                ConfigurationSectionCollection sections =
                    config.Sections;

                foreach (string key in sections.Keys)
                {
                    Console.WriteLine(
                     "Key value: {0}", key);
                }
            }
            catch (ConfigurationErrorsException err)
            {
                Console.WriteLine(err.ToString());
            }
        }


        static void Clear()
        {

            try
            {
                System.Configuration.Configuration config =
                ConfigurationManager.OpenExeConfiguration(
                ConfigurationUserLevel.None);

                config.Sections.Clear();

                config.Save(ConfigurationSaveMode.Full);
            }
            catch (ConfigurationErrorsException err)
            {
                Console.WriteLine(err.ToString());
            }
        }


        static void GetSection()
        {

            try
            {
                CustomSection customSection =
                    ConfigurationManager.GetSection(
                    "CustomSection") as CustomSection;

                if (customSection == null)
                    Console.WriteLine(
                        "Failed to load CustomSection.");
                else
                {
                    // Display section information
                    Console.WriteLine("Defaults:");
                    Console.WriteLine("File Name:       {0}",
                        customSection.FileName);
                    Console.WriteLine("Max Users:       {0}",
                        customSection.MaxUsers);
                    Console.WriteLine("Max Idle Time:   {0}",
                        customSection.MaxIdleTime);
                }
            }
            catch (ConfigurationErrorsException err)
            {
                Console.WriteLine(err.ToString());
            }
        }

        static void GetEnumerator()
        {

            try
            {
                System.Configuration.Configuration config =
                ConfigurationManager.OpenExeConfiguration(
                ConfigurationUserLevel.None);

                ConfigurationSectionCollection sections =
                    config.Sections;

                IEnumerator secEnum =
                    sections.GetEnumerator();

                int i = 0;
                while (secEnum.MoveNext())
                {
                    string setionName = sections.GetKey(i);
                    Console.WriteLine(
                        "Section name: {0}", setionName);
                    i += 1;
                }
            }
            catch (ConfigurationErrorsException err)
            {
                Console.WriteLine(err.ToString());
            }
        }

        static void GetKeys()
        {

            try
            {
                System.Configuration.Configuration config =
                ConfigurationManager.OpenExeConfiguration(
                ConfigurationUserLevel.None);

                ConfigurationSectionCollection sections =
                    config.Sections;

                foreach (string key in sections.Keys)
                {

                    Console.WriteLine(
                     "Key value: {0}", key);
                }
            }
            catch (ConfigurationErrorsException err)
            {
                Console.WriteLine(err.ToString());
            }
        }


        static void GetItems()
        {

            try
            {
                System.Configuration.Configuration config =
                ConfigurationManager.OpenExeConfiguration(
                ConfigurationUserLevel.None);

                ConfigurationSectionCollection sections =
                    config.Sections;

                ConfigurationSection section1 =
                    sections["runtime"];

                ConfigurationSection section2 =
                    sections[0];

                Console.WriteLine(
                     "Section1: {0}", section1.SectionInformation.Name);

                Console.WriteLine(
                    "Section2: {0}", section2.SectionInformation.Name);
            }
            catch (ConfigurationErrorsException err)
            {
                Console.WriteLine(err.ToString());
            }
        }


        static void Remove()
        {

            try
            {
                System.Configuration.Configuration config =
                ConfigurationManager.OpenExeConfiguration(
                ConfigurationUserLevel.None);

                CustomSection customSection =
                    config.GetSection(
                    "CustomSection") as CustomSection;

                if (customSection != null)
                {
                    config.Sections.Remove("CustomSection");
                    customSection.SectionInformation.ForceSave = true;
                    config.Save(ConfigurationSaveMode.Full);
                }
                else
                    Console.WriteLine(
                        "CustomSection does not exists.");
            }
            catch (ConfigurationErrorsException err)
            {
                Console.WriteLine(err.ToString());
            }
        }

        static void AddSection()
        {

            try
            {
                System.Configuration.Configuration config =
                ConfigurationManager.OpenExeConfiguration(
                ConfigurationUserLevel.None);

                CustomSection customSection =
                    new CustomSection();

                string index =
                    config.Sections.Count.ToString();

                customSection.FileName =
                    "newFile" + index + ".txt";

                string sectionName = "CustomSection" + index;

                TimeSpan ts = new TimeSpan(0, 15, 0);
                customSection.MaxIdleTime = ts;
                customSection.MaxUsers = 100;

                config.Sections.Add(sectionName, customSection);
                customSection.SectionInformation.ForceSave = true;
                config.Save(ConfigurationSaveMode.Full);
            }
            catch (ConfigurationErrorsException err)
            {
                Console.WriteLine(err.ToString());
            }
        }

        // Exercise the collection.
        // Uncomment the function you want to exercise.
        // Start with CreateSection().
        static void Main(string[] args)
        {
            CreateSection();
            // AddSection();
            // GetSection();
            // GetEnumerator();
            // GetAllKeys();
            // GetKeys();
            // GetItems();

            // Remove();
            // Clear();
        }
    }
}
Imports System.Configuration
Imports System.Collections




' Define a custom section programmatically.

Public NotInheritable Class CustomSection
    Inherits ConfigurationSection
    ' The collection (property bag) that contains 
    ' the section properties.
    Private Shared _Properties _
    As ConfigurationPropertyCollection


    ' The FileName property.
    Private Shared _FileName _
    As New ConfigurationProperty("fileName", _
    GetType(String), "default.txt", _
    ConfigurationPropertyOptions.IsRequired)

    ' The MasUsers property.
    Private Shared _MaxUsers _
    As New ConfigurationProperty("maxUsers", _
    GetType(Long), Fix(1000), _
    ConfigurationPropertyOptions.None)

    ' The MaxIdleTime property.
    Private Shared _MaxIdleTime _
    As New ConfigurationProperty("maxIdleTime", _
    GetType(TimeSpan), TimeSpan.FromMinutes(5), _
    ConfigurationPropertyOptions.IsRequired)


    ' CustomSection constructor.
    Public Sub New()
        ' Property initialization
        _Properties = _
        New ConfigurationPropertyCollection()

        _Properties.Add(_FileName)
        _Properties.Add(_MaxUsers)
        _Properties.Add(_MaxIdleTime)
    End Sub


    ' This is a key customization. 
    ' It returns the initialized property bag.
    Protected Overrides ReadOnly Property Properties() _
    As ConfigurationPropertyCollection
        Get
            Return _Properties
        End Get
    End Property



    <StringValidator( _
    InvalidCharacters:=" ~!@#$%^&*()[]{}/;'""|\", _
    MinLength:=1, MaxLength:=60)> _
    Public Property FileName() As String
        Get
            Return CStr(Me("fileName"))
        End Get
        Set(ByVal value As String)

            Me("fileName") = value
        End Set
    End Property


    <LongValidator(MinValue:=1, _
    MaxValue:=1000000, ExcludeRange:=False)> _
    Public Property MaxUsers() As Long
        Get
            Return Fix(Me("maxUsers"))
        End Get
        Set(ByVal value As Long)
            Me("maxUsers") = value
        End Set
    End Property


    <TimeSpanValidator(MinValueString:="0:0:30", _
    MaxValueString:="5:00:0", ExcludeRange:=False)> _
    Public Property MaxIdleTime() As TimeSpan
        Get
            Return CType(Me("maxIdleTime"), TimeSpan)
        End Get
        Set(ByVal value As TimeSpan)
            Me("maxIdleTime") = value
        End Set
    End Property
End Class




Class UsingCustomSectionCollection


    ' Create a custom section.
    Shared Sub CreateSection()
        Try

            Dim customSection As CustomSection

            ' Get the current configuration file.
            Dim config _
            As System.Configuration.Configuration = _
            ConfigurationManager.OpenExeConfiguration( _
            ConfigurationUserLevel.None)

            ' Create the section entry  
            ' in the <configSections> and the 
            ' related target section in <configuration>.
            If config.Sections("CustomSection") Is Nothing Then
                customSection = New CustomSection()
                config.Sections.Add("CustomSection", customSection)
                customSection.SectionInformation.ForceSave = True
                config.Save(ConfigurationSaveMode.Full)
            End If
        Catch err As ConfigurationErrorsException
            Console.WriteLine(err.ToString())
        End Try
    End Sub


    Shared Sub GetAllKeys()

        Try
            Dim config _
            As System.Configuration.Configuration = _
            ConfigurationManager.OpenExeConfiguration( _
            ConfigurationUserLevel.None)


            Dim sections _
            As ConfigurationSectionCollection = _
            config.Sections

            Dim key As String
            For Each key In sections.Keys
                Console.WriteLine("Key value: {0}", key)
            Next key


        Catch err As ConfigurationErrorsException
            Console.WriteLine(err.ToString())
        End Try
    End Sub



    Shared Sub Clear()

        Try
            Dim config _
            As System.Configuration.Configuration = _
            ConfigurationManager.OpenExeConfiguration( _
            ConfigurationUserLevel.None)

            config.Sections.Clear()

            config.Save( _
            ConfigurationSaveMode.Full)
        Catch err As ConfigurationErrorsException
            Console.WriteLine(err.ToString())
        End Try
    End Sub


    Shared Sub GetSection()

        Try
            Dim customSection _
            As CustomSection = _
            ConfigurationManager.GetSection( _
            "CustomSection")

            If customSection Is Nothing Then
                Console.WriteLine("Failed to load CustomSection.")
            Else
                ' Display section information
                Console.WriteLine("Defaults:")
                Console.WriteLine("File Name:       {0}", _
                customSection.FileName)
                Console.WriteLine("Max Users:       {0}", _
                customSection.MaxUsers)
                Console.WriteLine("Max Idle Time:   {0}", _
                customSection.MaxIdleTime)
            End If


        Catch err As ConfigurationErrorsException
            Console.WriteLine(err.ToString())
        End Try
    End Sub

    Shared Sub GetEnumerator()

        Try
            Dim config _
            As System.Configuration.Configuration = _
            ConfigurationManager.OpenExeConfiguration( _
            ConfigurationUserLevel.None)

            Dim sections _
            As ConfigurationSectionCollection = _
            config.Sections

            Dim secEnum _
            As IEnumerator = sections.GetEnumerator()

            Dim i As Integer = 0
            While secEnum.MoveNext()
                Dim setionName _
                As String = sections.GetKey(i)
                Console.WriteLine( _
                "Section name: {0}", setionName)
                i += 1
            End While
        Catch err As ConfigurationErrorsException
            Console.WriteLine(err.ToString())
        End Try
    End Sub


    Shared Sub GetKeys()

        Try
            Dim config _
            As System.Configuration.Configuration = _
            ConfigurationManager.OpenExeConfiguration( _
            ConfigurationUserLevel.None)

            Dim sections _
            As ConfigurationSectionCollection = _
            config.Sections


            Dim key As String
            For Each key In sections.Keys


                Console.WriteLine("Key value: {0}", key)
            Next key


        Catch err As ConfigurationErrorsException
            Console.WriteLine(err.ToString())
        End Try
    End Sub


    Shared Sub GetItems()

        Try
            Dim config _
            As System.Configuration.Configuration = _
            ConfigurationManager.OpenExeConfiguration( _
            ConfigurationUserLevel.None)

            Dim sections _
            As ConfigurationSectionCollection = _
            config.Sections


            Dim section1 As ConfigurationSection = _
            sections.Item("runtime")

            Dim section2 As ConfigurationSection = _
            sections.Item(0)

            Console.WriteLine("Section1: {0}", _
            section1.SectionInformation.Name)

            Console.WriteLine("Section2: {0}", _
            section2.SectionInformation.Name)

        Catch err As ConfigurationErrorsException
            Console.WriteLine(err.ToString())
        End Try
    End Sub


    Shared Sub Remove()

        Try
            Dim config _
            As System.Configuration.Configuration = _
            ConfigurationManager.OpenExeConfiguration( _
            ConfigurationUserLevel.None)

            Dim customSection As CustomSection = _
            config.GetSection("CustomSection")


            If Not (customSection Is Nothing) Then
                config.Sections.Remove("CustomSection")
                customSection.SectionInformation.ForceSave = True
                config.Save(ConfigurationSaveMode.Full)
            Else
                Console.WriteLine( _
                "CustomSection does not exists.")
            End If

        Catch err As ConfigurationErrorsException
            Console.WriteLine(err.ToString())
        End Try
    End Sub


    Shared Sub AddSection()

        Try
            Dim config _
            As System.Configuration.Configuration = _
            ConfigurationManager.OpenExeConfiguration( _
            ConfigurationUserLevel.None)

            Dim customSection _
            As New CustomSection()


            Dim index As String = _
            config.Sections.Count.ToString()

            customSection.FileName = _
            "newFile" + index + ".txt"

            Dim sectionName As String = _
            "CustomSection" + index

            Dim ts As New TimeSpan(0, 15, 0)
            customSection.MaxIdleTime = ts
            customSection.MaxUsers = 100

            config.Sections.Add(sectionName, customSection)
            customSection.SectionInformation.ForceSave = True
            config.Save(ConfigurationSaveMode.Full)
        Catch err As ConfigurationErrorsException
            Console.WriteLine(err.ToString())
        End Try
    End Sub



    ' Exercise the collection.
    ' Uncomment the function you want to exercise.
    ' Start with CreateSection().
    Public Overloads Shared Sub Main(ByVal args() As String)
        CreateSection()
        ' AddSection()
        ' GetSection()
        ' GetEnumerator()
        ' GetAllKeys()
        ' GetKeys()
        GetItems()
        ' Clear()
        ' Remove()
    End Sub

End Class

다음 예제는 이전 예제에서 사용한 구성 파일의 발췌입니다.

<?xml version="1.0" encoding="utf-8"?>  
<configuration>  
  <configSections>  

    <section name="CustomSection"   
      type="Samples.AspNet.Configuration.CustomSection, ConfigurationSectionCollection, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" allowDefinition="Everywhere" allowExeDefinition="MachineToApplication" restartOnExternalChanges="true" />  

  </configSections>  

  <CustomSection fileName="default.txt" maxUsers="1000"   
    maxIdleTime="00:05:00" />  

</configuration>  

설명

클래스를 ConfigurationSectionCollection 사용하여 개체 컬렉션을 ConfigurationSection 반복합니다. 속성 또는 속성을 사용하여 이 개체 컬렉션에 SectionsSections 액세스할 수 있습니다.

클래스는 ConfigurationSectionCollection 클래스를 확장하는 ConfigurationSection 사용자 지정 형식을 만드는 데도 사용됩니다.

속성

Count

ConfigurationSectionCollection 개체에 있는 섹션의 수를 가져옵니다.

Count

NameObjectCollectionBase 인스턴스에 포함된 키/값 쌍의 수를 가져옵니다.

(다음에서 상속됨 NameObjectCollectionBase)
IsReadOnly

NameObjectCollectionBase 인스턴스가 읽기 전용인지 여부를 나타내는 값을 가져오거나 설정합니다.

(다음에서 상속됨 NameObjectCollectionBase)
Item[Int32]

지정된 ConfigurationSection 개체를 가져옵니다.

Item[String]

지정된 ConfigurationSection 개체를 가져옵니다.

Keys

ConfigurationSection에개체에 있는 모든 ConfigurationSectionCollection 개체에 대한 키를 가져옵니다.

Keys

NameObjectCollectionBase.KeysCollection 인스턴스의 모든 키를 포함하는 NameObjectCollectionBase 인스턴스를 가져옵니다.

(다음에서 상속됨 NameObjectCollectionBase)

메서드

Add(String, ConfigurationSection)

ConfigurationSection 개체를 ConfigurationSectionCollection 개체에 추가합니다.

BaseAdd(String, Object)

지정한 키와 값을 가지는 엔트리를 NameObjectCollectionBase 인스턴스에 추가합니다.

(다음에서 상속됨 NameObjectCollectionBase)
BaseClear()

NameObjectCollectionBase 인스턴스에서 모든 엔트리를 제거합니다.

(다음에서 상속됨 NameObjectCollectionBase)
BaseGet(Int32)

NameObjectCollectionBase 인스턴스의 지정한 인덱스에서 엔트리의 값을 가져옵니다.

(다음에서 상속됨 NameObjectCollectionBase)
BaseGet(String)

NameObjectCollectionBase 인스턴스에서 지정한 키를 갖는 첫 번째 엔트리 값을 가져옵니다.

(다음에서 상속됨 NameObjectCollectionBase)
BaseGetAllKeys()

NameObjectCollectionBase 인스턴스의 모든 키를 포함하는 String 배열을 반환합니다.

(다음에서 상속됨 NameObjectCollectionBase)
BaseGetAllValues()

NameObjectCollectionBase 인스턴스의 모든 값을 포함하는 Object 배열을 반환합니다.

(다음에서 상속됨 NameObjectCollectionBase)
BaseGetAllValues(Type)

NameObjectCollectionBase 인스턴스의 모든 값을 포함하는 지정한 형식의 배열을 반환합니다.

(다음에서 상속됨 NameObjectCollectionBase)
BaseGetKey(Int32)

NameObjectCollectionBase 인스턴스의 지정한 인덱스에서 엔트리의 키를 가져옵니다.

(다음에서 상속됨 NameObjectCollectionBase)
BaseHasKeys()

NameObjectCollectionBase 인스턴스에 null이 아닌 키를 갖는 엔트리가 있는지 여부를 나타내는 값을 가져옵니다.

(다음에서 상속됨 NameObjectCollectionBase)
BaseRemove(String)

NameObjectCollectionBase 인스턴스에서 지정한 키를 가지는 엔트리를 제거합니다.

(다음에서 상속됨 NameObjectCollectionBase)
BaseRemoveAt(Int32)

NameObjectCollectionBase 인스턴스의 지정한 인덱스에서 엔트리를 제거합니다.

(다음에서 상속됨 NameObjectCollectionBase)
BaseSet(Int32, Object)

NameObjectCollectionBase 인스턴스의 지정한 인덱스에서 엔트리의 값을 설정합니다.

(다음에서 상속됨 NameObjectCollectionBase)
BaseSet(String, Object)

지정한 키를 갖는 엔트리가 NameObjectCollectionBase 인스턴스에 있으면 첫 번째 엔트리의 값을 설정하고, 그러지 않으면 지정한 키와 값을 갖는 엔트리를 NameObjectCollectionBase 인스턴스에 추가합니다.

(다음에서 상속됨 NameObjectCollectionBase)
Clear()

ConfigurationSectionCollection 개체를 지웁니다.

CopyTo(ConfigurationSection[], Int32)

ConfigurationSectionCollection 개체를 배열에 복사합니다.

Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
Get(Int32)

ConfigurationSection 개체에 있는 지정된 ConfigurationSectionCollection 개체를 가져옵니다.

Get(String)

ConfigurationSection 개체에 있는 지정된 ConfigurationSectionCollection 개체를 가져옵니다.

GetEnumerator()

ConfigurationSectionCollection 개체를 반복할 수 있는 열거자를 가져옵니다.

GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetKey(Int32)

ConfigurationSection 개체에 있는 지정된 ConfigurationSectionCollection 개체의 키를 가져옵니다.

GetObjectData(SerializationInfo, StreamingContext)
사용되지 않음.

serialization 중 시스템에서 사용됩니다.

GetObjectData(SerializationInfo, StreamingContext)
사용되지 않음.

ISerializable 인터페이스를 구현하고 NameObjectCollectionBase 인스턴스를 직렬화하는 데 필요한 데이터를 반환합니다.

(다음에서 상속됨 NameObjectCollectionBase)
GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
OnDeserialization(Object)

ISerializable 인터페이스를 구현하고, deserialization이 완료되면 deserialization 이벤트를 발생시킵니다.

(다음에서 상속됨 NameObjectCollectionBase)
Remove(String)

ConfigurationSection 개체에서 지정된 ConfigurationSectionCollection 개체를 제거합니다.

RemoveAt(Int32)

ConfigurationSection 개체에서 지정된 ConfigurationSectionCollection 개체를 제거합니다.

ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

명시적 인터페이스 구현

ICollection.CopyTo(Array, Int32)

대상 배열의 지정된 인덱스에서 시작하여 전체 NameObjectCollectionBase을 호환되는 1차원 Array에 복사합니다.

(다음에서 상속됨 NameObjectCollectionBase)
ICollection.IsSynchronized

NameObjectCollectionBase 개체에 대한 액세스가 동기화되어 스레드로부터 안전하게 보호되는지 여부를 나타내는 값을 가져옵니다.

(다음에서 상속됨 NameObjectCollectionBase)
ICollection.SyncRoot

NameObjectCollectionBase 개체에 대한 액세스를 동기화하는 데 사용할 수 있는 개체를 가져옵니다.

(다음에서 상속됨 NameObjectCollectionBase)

확장 메서드

Cast<TResult>(IEnumerable)

IEnumerable의 요소를 지정된 형식으로 캐스팅합니다.

OfType<TResult>(IEnumerable)

지정된 형식에 따라 IEnumerable의 요소를 필터링합니다.

AsParallel(IEnumerable)

쿼리를 병렬화할 수 있도록 합니다.

AsQueryable(IEnumerable)

IEnumerableIQueryable로 변환합니다.

적용 대상

추가 정보