Module 클래스

정의

모듈에 리플렉션을 실행합니다.

public ref class Module abstract
public ref class Module abstract : System::Reflection::ICustomAttributeProvider, System::Runtime::Serialization::ISerializable
public ref class Module abstract : System::Reflection::ICustomAttributeProvider
public ref class Module : System::Reflection::ICustomAttributeProvider, System::Runtime::InteropServices::_Module, System::Runtime::Serialization::ISerializable
public ref class Module abstract : System::Reflection::ICustomAttributeProvider, System::Runtime::InteropServices::_Module, System::Runtime::Serialization::ISerializable
public abstract class Module
public abstract class Module : System.Reflection.ICustomAttributeProvider, System.Runtime.Serialization.ISerializable
public abstract class Module : System.Reflection.ICustomAttributeProvider
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)]
[System.Serializable]
public class Module : System.Reflection.ICustomAttributeProvider, System.Runtime.InteropServices._Module, System.Runtime.Serialization.ISerializable
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)]
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public class Module : System.Reflection.ICustomAttributeProvider, System.Runtime.InteropServices._Module, System.Runtime.Serialization.ISerializable
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)]
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public abstract class Module : System.Reflection.ICustomAttributeProvider, System.Runtime.InteropServices._Module, System.Runtime.Serialization.ISerializable
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)]
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public abstract class Module : System.Reflection.ICustomAttributeProvider, System.Runtime.Serialization.ISerializable
type Module = class
type Module = class
    interface ICustomAttributeProvider
    interface ISerializable
type Module = class
    interface ICustomAttributeProvider
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)>]
[<System.Serializable>]
type Module = class
    interface _Module
    interface ISerializable
    interface ICustomAttributeProvider
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)>]
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type Module = class
    interface _Module
    interface ISerializable
    interface ICustomAttributeProvider
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)>]
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type Module = class
    interface ISerializable
    interface ICustomAttributeProvider
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)>]
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type Module = class
    interface ISerializable
    interface ICustomAttributeProvider
    interface _Module
Public MustInherit Class Module
Public MustInherit Class Module
Implements ICustomAttributeProvider, ISerializable
Public MustInherit Class Module
Implements ICustomAttributeProvider
Public Class Module
Implements _Module, ICustomAttributeProvider, ISerializable
Public MustInherit Class Module
Implements _Module, ICustomAttributeProvider, ISerializable
상속
Module
파생
특성
구현

예제

다음 코드 예제에서는 리플렉션을 사용하여 모듈에 대한 정보를 가져오는 방법을 보여 줍니다.

using System.Reflection;
using System;
public class Program {

    public static void Main() {
        Class1 c1 = new Class1();
        //  Show the current module.
        Module m = c1.GetType().Module;
        Console.WriteLine("The current module is {0}.", m.Name);

        //  List all modules in the assembly.
        Assembly curAssembly = typeof(Program).Assembly;
        Console.WriteLine("The current executing assembly is {0}.", curAssembly);

        Module[] mods = curAssembly.GetModules();
        foreach (Module md in mods) {
            Console.WriteLine("This assembly contains the {0} module", md.Name);
        }
        Console.ReadLine();
    }
}
class Class1 {
}
Imports System.Reflection

Public Class Program
    Public Shared Sub Main()

        Dim c1 As New Class1

        ' Show the current module.

        ' Note the brackets around "[Module]" to differentiate 
        ' it from the Visual Basic "Module" keyword.
        Dim m As [Module] = c1.GetType().Module
        Console.WriteLine("The current module is {0}.", m.Name)

        ' List all modules in the assembly.
        Dim curAssembly As Assembly = GetType(Program).Assembly
        Console.WriteLine("The executing assembly is {0}.", curAssembly)

        Dim mods() As [Module] = curAssembly.GetModules()

        For Each md As [Module] In mods
            Console.WriteLine("This assembly contains the {0} module", md.Name)
        Next
        Console.ReadLine()
    End Sub


End Class
Class Class1

End Class

설명

모듈은 하나 이상의 클래스와 인터페이스로 구성된 type.dll 또는 application.exe 같은 이식 가능한 실행 파일입니다. 단일 모듈에 여러 네임스페이스가 포함될 수 있으며 네임스페이스는 여러 모듈에 걸쳐 있을 수 있습니다.

단위로 배포된 하나 이상의 모듈은 어셈블리를 구성합니다. 둘 이상의 모듈을 사용하여 어셈블리를 만드는 방법에 대한 자세한 내용은 다중 파일 어셈블리를 참조하세요.

.NET Framework 모듈은 함수 및 애플리케이션에서 서브루틴을 구성 하는 프로그래머에 게 사용 되는 Visual basic의 경우 모듈 동일 참고 합니다.

생성자

Module()

Module 클래스의 새 인스턴스를 초기화합니다.

필드

FilterTypeName

이름을 기준으로 이 모듈에 정의된 형식의 목록을 필터링하는 TypeFilter 개체입니다. 이 필드는 대/소문자를 구분하며 읽기 전용입니다.

FilterTypeNameIgnoreCase

이름을 기준으로 이 모듈에 정의된 형식의 목록을 필터링하는 TypeFilter 개체입니다. 이 필드는 대/소문자를 구분하며 읽기 전용입니다.

속성

Assembly

Assembly의 이 인스턴스에 적합한 Module를 가져옵니다.

CustomAttributes

이 모듈의 사용자 지정 특성을 포함하는 컬렉션을 가져옵니다.

FullyQualifiedName

이 모듈의 정규화된 이름과 경로를 나타내는 문자열을 가져옵니다.

MDStreamVersion

메타데이터 스트림 버전을 가져옵니다.

MetadataToken

메타데이터에 있는 모듈을 식별하는 토큰을 가져옵니다.

ModuleHandle

모듈에 대한 핸들을 가져옵니다.

ModuleVersionId

모듈의 두 버전 간을 구분하는 데 사용할 수 있는 UUID(범용 고유 식별자)를 가져옵니다.

Name

경로가 제거된 모듈의 이름을 나타내는 String을 가져옵니다.

ScopeName

모듈의 이름을 나타내는 문자열을 가져옵니다.

메서드

Equals(Object)

이 모듈과 지정된 개체가 서로 같은지 여부를 확인합니다.

Equals(Object)

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

(다음에서 상속됨 Object)
FindTypes(TypeFilter, Object)

지정한 필터 및 필터 조건에서 허용하는 클래스 배열을 반환합니다.

GetCustomAttributes(Boolean)

모든 사용자 지정 특성을 반환합니다.

GetCustomAttributes(Type, Boolean)

지정한 형식의 사용자 지정 특성을 가져옵니다.

GetCustomAttributesData()

리플렉션 전용 컨텍스트에서 사용할 수 있는 현재 모듈에 대한 CustomAttributeData 개체 목록을 반환합니다.

GetField(String)

지정된 이름을 갖는 필드를 반환합니다.

GetField(String, BindingFlags)

지정된 이름 및 바인딩 특성을 갖는 필드를 반환합니다.

GetFields()

모듈에 정의된 전역 필드를 반환합니다.

GetFields(BindingFlags)

지정된 바인딩 플래그와 일치하는 모듈에 정의된 전역 필드를 반환합니다.

GetHashCode()

이 인스턴스의 해시 코드를 반환합니다.

GetHashCode()

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

(다음에서 상속됨 Object)
GetMethod(String)

지정된 이름이 있는 메서드를 반환합니다.

GetMethod(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])

지정된 이름, 바인딩 정보, 호출 규칙, 매개 변수 형식 및 한정자가 있는 메서드를 반환합니다.

GetMethod(String, Type[])

지정된 이름과 매개 변수 형식이 있는 메서드를 반환합니다.

GetMethodImpl(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])

지정한 기준을 만족하는 메서드 구현을 반환합니다.

GetMethods()

모듈에 정의된 전역 메서드를 반환합니다.

GetMethods(BindingFlags)

지정된 바인딩 플래그와 일치하는 모듈에 정의된 전역 메서드를 반환합니다.

GetObjectData(SerializationInfo, StreamingContext)

serialize된 개체에 ISerializable을 구현합니다.

GetPEKind(PortableExecutableKinds, ImageFileMachine)

모듈의 코드 특성과 대상 플랫폼을 나타내는 값 쌍을 가져옵니다.

GetSignerCertificate()

이 모듈이 속한 어셈블리의 Authenticode 서명에 포함된 인증서에 해당하는 X509Certificate 개체를 반환합니다. 어셈블리가 Authenticode로 서명되지 않은 경우에는 null을 반환합니다.

GetType()

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

(다음에서 상속됨 Object)
GetType(String)

대/소문자 구분을 수행하여 지정된 형식을 반환합니다.

GetType(String, Boolean)

지정된 형식을 반환하고 지정된 대/소문자를 사용하여 모듈을 검색합니다.

GetType(String, Boolean, Boolean)

모듈을 검색할 때 대/소문자를 구분할지 여부와 형식을 찾을 수 없을 때 예외를 throw할지 여부를 지정하여 지정된 형식을 반환합니다.

GetTypes()

이 모듈 내에 정의된 모든 형식을 반환합니다.

IsDefined(Type, Boolean)

이 모듈에 지정된 특성 형식이 적용되었는지 여부를 나타내는 값을 반환합니다.

IsResource()

이 개체가 리소스인지 여부를 나타내는 값을 가져옵니다.

MemberwiseClone()

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

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

지정된 메타데이터 토큰으로 식별되는 필드를 반환합니다.

ResolveField(Int32, Type[], Type[])

지정된 제네릭 형식 매개 변수로 정의되는 컨텍스트에서 지정된 메타데이터 토큰으로 식별되는 필드를 반환합니다.

ResolveMember(Int32)

지정된 메타데이터 토큰으로 식별되는 형식이나 멤버를 반환합니다.

ResolveMember(Int32, Type[], Type[])

지정된 제네릭 형식 매개 변수로 정의되는 컨텍스트에서 지정된 메타데이터 토큰으로 식별되는 형식 또는 멤버를 반환합니다.

ResolveMethod(Int32)

지정된 메타데이터 토큰으로 식별되는 메서드나 생성자를 반환합니다.

ResolveMethod(Int32, Type[], Type[])

지정된 제네릭 형식 매개 변수로 정의되는 컨텍스트에서 지정된 메타데이터 토큰으로 식별되는 메서드 또는 생성자를 반환합니다.

ResolveSignature(Int32)

메타데이터 토큰으로 식별되는 시그니처 blob을 반환합니다.

ResolveString(Int32)

지정된 메타데이터 토큰으로 식별되는 문자열을 반환합니다.

ResolveType(Int32)

지정된 메타데이터 토큰으로 식별되는 형식을 반환합니다.

ResolveType(Int32, Type[], Type[])

지정된 제네릭 형식 매개 변수로 정의되는 컨텍스트에서 지정된 메타데이터 토큰으로 식별되는 형식을 반환합니다.

ToString()

모듈의 이름을 반환합니다.

연산자

Equality(Module, Module)

Module 개체가 같은지를 나타냅니다.

Inequality(Module, Module)

Module 개체가 같지 않은지를 나타냅니다.

명시적 인터페이스 구현

_Module.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

이름 집합을 해당하는 디스패치 식별자 집합에 매핑합니다.

_Module.GetTypeInfo(UInt32, UInt32, IntPtr)

인터페이스의 형식 정보를 가져오는 데 사용할 수 있는 개체의 형식 정보를 검색합니다.

_Module.GetTypeInfoCount(UInt32)

개체에서 제공하는 형식 정보 인터페이스의 수를 검색합니다(0 또는 1).

_Module.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

개체에서 노출하는 메서드와 속성에 대한 액세스를 제공합니다.

ICustomAttributeProvider.GetCustomAttributes(Boolean)

명명된 특성을 제외하고 이 멤버에 정의된 모든 사용자 지정 특성의 배열을 반환하거나 사용자 지정 특성이 없는 경우 빈 배열을 반환합니다.

ICustomAttributeProvider.GetCustomAttributes(Type, Boolean)

형식으로 식별되는 이 멤버에 정의된 사용자 지정 특성의 배열을 반환하거나 해당 형식의 사용자 지정 특성이 없는 경우 빈 배열을 반환합니다.

ICustomAttributeProvider.IsDefined(Type, Boolean)

하나 이상의 attributeType 인스턴스가 이 멤버에 대해 정의되는지 여부를 나타냅니다.

확장 메서드

GetCustomAttribute(Module, Type)

지정된 모듈에 적용된 지정된 형식의 사용자 지정 특성을 검색합니다.

GetCustomAttribute<T>(Module)

지정된 모듈에 적용된 지정된 형식의 사용자 지정 특성을 검색합니다.

GetCustomAttributes(Module)

지정된 모듈에 적용된 사용자 지정 특성 컬렉션을 검색합니다.

GetCustomAttributes(Module, Type)

지정된 모듈에 적용된 지정된 형식의 사용자 지정 특성 컬렉션을 검색합니다.

GetCustomAttributes<T>(Module)

지정된 모듈에 적용된 지정된 형식의 사용자 지정 특성 컬렉션을 검색합니다.

IsDefined(Module, Type)

지정된 형식의 사용자 지정 특성이 지정된 모듈에 적용되었는지 여부를 나타냅니다.

GetModuleVersionId(Module)
HasModuleVersionId(Module)

적용 대상