AssemblyFlagsAttribute 생성자
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
AssemblyFlagsAttribute 클래스의 새 인스턴스를 초기화합니다.
오버로드
| Name | Description |
|---|---|
| AssemblyFlagsAttribute(Int32) |
사용되지 않음.
사용되지 않음.
사용되지 않음.
지정된 플래그 조합을 AssemblyNameFlags 사용하여 클래스의 AssemblyFlagsAttribute 새 인스턴스를 초기화하고 정수 값으로 캐스팅합니다. |
| AssemblyFlagsAttribute(AssemblyNameFlags) |
지정된 플래그 조합을 AssemblyNameFlags 사용하여 클래스의 AssemblyFlagsAttribute 새 인스턴스를 초기화합니다. |
| AssemblyFlagsAttribute(UInt32) |
사용되지 않음.
사용되지 않음.
사용되지 않음.
지정된 플래그 조합을 AssemblyNameFlags 사용하여 클래스의 AssemblyFlagsAttribute 새 인스턴스를 초기화하고 부호 없는 정수 값으로 캐스팅합니다. |
AssemblyFlagsAttribute(Int32)
- Source:
- AssemblyFlagsAttribute.cs
- Source:
- AssemblyFlagsAttribute.cs
- Source:
- AssemblyFlagsAttribute.cs
- Source:
- AssemblyFlagsAttribute.cs
- Source:
- AssemblyFlagsAttribute.cs
주의
This constructor has been deprecated. Use AssemblyFlagsAttribute(AssemblyNameFlags) instead.
주의
This constructor has been deprecated. Please use AssemblyFlagsAttribute(AssemblyNameFlags) instead. https://go.microsoft.com/fwlink/?linkid=14202
주의
This constructor has been deprecated. Please use AssemblyFlagsAttribute(AssemblyNameFlags) instead. http://go.microsoft.com/fwlink/?linkid=14202
지정된 플래그 조합을 AssemblyNameFlags 사용하여 클래스의 AssemblyFlagsAttribute 새 인스턴스를 초기화하고 정수 값으로 캐스팅합니다.
public:
AssemblyFlagsAttribute(int assemblyFlags);
[System.Obsolete("This constructor has been deprecated. Use AssemblyFlagsAttribute(AssemblyNameFlags) instead.")]
public AssemblyFlagsAttribute(int assemblyFlags);
[System.Obsolete("This constructor has been deprecated. Please use AssemblyFlagsAttribute(AssemblyNameFlags) instead. https://go.microsoft.com/fwlink/?linkid=14202")]
public AssemblyFlagsAttribute(int assemblyFlags);
[System.Obsolete("This constructor has been deprecated. Please use AssemblyFlagsAttribute(AssemblyNameFlags) instead. http://go.microsoft.com/fwlink/?linkid=14202")]
public AssemblyFlagsAttribute(int assemblyFlags);
public AssemblyFlagsAttribute(int assemblyFlags);
[<System.Obsolete("This constructor has been deprecated. Use AssemblyFlagsAttribute(AssemblyNameFlags) instead.")>]
new System.Reflection.AssemblyFlagsAttribute : int -> System.Reflection.AssemblyFlagsAttribute
[<System.Obsolete("This constructor has been deprecated. Please use AssemblyFlagsAttribute(AssemblyNameFlags) instead. https://go.microsoft.com/fwlink/?linkid=14202")>]
new System.Reflection.AssemblyFlagsAttribute : int -> System.Reflection.AssemblyFlagsAttribute
[<System.Obsolete("This constructor has been deprecated. Please use AssemblyFlagsAttribute(AssemblyNameFlags) instead. http://go.microsoft.com/fwlink/?linkid=14202")>]
new System.Reflection.AssemblyFlagsAttribute : int -> System.Reflection.AssemblyFlagsAttribute
new System.Reflection.AssemblyFlagsAttribute : int -> System.Reflection.AssemblyFlagsAttribute
Public Sub New (assemblyFlags As Integer)
매개 변수
- assemblyFlags
- Int32
JIT(Just-In-Time) 컴파일러 옵션, 장수, 어셈블리가 AssemblyNameFlags 대상을 변경할 수 있는지 여부 및 전체 또는 토큰화된 공개 키가 있는지 여부를 나타내는 정수 값으로 캐스팅되는 플래그의 비트 조합입니다.
- 특성
설명
이 형식화되지 않은 생성자는 이제 사용되지 않습니다. 사용하지 마세요.
적용 대상
AssemblyFlagsAttribute(AssemblyNameFlags)
- Source:
- AssemblyFlagsAttribute.cs
- Source:
- AssemblyFlagsAttribute.cs
- Source:
- AssemblyFlagsAttribute.cs
- Source:
- AssemblyFlagsAttribute.cs
- Source:
- AssemblyFlagsAttribute.cs
지정된 플래그 조합을 AssemblyNameFlags 사용하여 클래스의 AssemblyFlagsAttribute 새 인스턴스를 초기화합니다.
public:
AssemblyFlagsAttribute(System::Reflection::AssemblyNameFlags assemblyFlags);
public AssemblyFlagsAttribute(System.Reflection.AssemblyNameFlags assemblyFlags);
new System.Reflection.AssemblyFlagsAttribute : System.Reflection.AssemblyNameFlags -> System.Reflection.AssemblyFlagsAttribute
Public Sub New (assemblyFlags As AssemblyNameFlags)
매개 변수
- assemblyFlags
- AssemblyNameFlags
JIT(Just-In-Time) 컴파일러 옵션, 수명, 어셈블리의 대상을 변경할 수 있는지 여부 및 전체 또는 토큰화된 공개 키가 있는지 여부를 나타내는 플래그의 비트 조합 AssemblyNameFlags 입니다.
예제
다음 코드 예제에서는 어셈블리에 적용 AssemblyFlagsAttribute 하는 방법과 런타임에 플래그를 읽는 방법을 보여 있습니다. 또한 이 예제에서는 특성의 인스턴스를 만들고 속성을 사용하여 AssemblyFlags 플래그를 표시합니다. 동적 어셈블리에 적용 AssemblyFlagsAttribute 하는 방법의 예제는 속성을 참조하세요 AssemblyName.Flags .
using System;
using System.Reflection;
// Specify a combination of AssemblyNameFlags for this
// assembly.
[assembly:AssemblyFlagsAttribute(
AssemblyNameFlags.EnableJITcompileOptimizer |
AssemblyNameFlags.Retargetable)]
public class Example
{
public static void Main()
{
// Get this assembly.
Assembly thisAsm = typeof(Example).Assembly;
// Get the AssemblyName for this assembly.
AssemblyName thisAsmName = thisAsm.GetName(false);
// Display the flags that were set for this assembly.
ListFlags(thisAsmName.Flags);
// Create an instance of AssemblyFlagsAttribute with the
// same combination of flags that was specified for this
// assembly. Note that PublicKey is included automatically
// for the assembly, but not for this instance of
// AssemblyFlagsAttribute.
AssemblyFlagsAttribute afa = new AssemblyFlagsAttribute(
AssemblyNameFlags.EnableJITcompileOptimizer |
AssemblyNameFlags.Retargetable);
// Get the flags. The property returns an integer, so
// the return value must be cast to AssemblyNameFlags.
AssemblyNameFlags anf = (AssemblyNameFlags) afa.AssemblyFlags;
// Display the flags.
Console.WriteLine();
ListFlags(anf);
}
private static void ListFlags(AssemblyNameFlags anf)
{
if (anf == AssemblyNameFlags.None)
{
Console.WriteLine("AssemblyNameFlags.None");
}
else
{
if (0!=(anf & AssemblyNameFlags.Retargetable))
Console.WriteLine("AssemblyNameFlags.Retargetable");
if (0!=(anf & AssemblyNameFlags.PublicKey))
Console.WriteLine("AssemblyNameFlags.PublicKey");
if (0!=(anf & AssemblyNameFlags.EnableJITcompileOptimizer))
Console.WriteLine("AssemblyNameFlags.EnableJITcompileOptimizer");
if (0!=(anf & AssemblyNameFlags.EnableJITcompileTracking))
Console.WriteLine("AssemblyNameFlags.EnableJITcompileTracking");
}
}
}
/* This code example produces the following output:
AssemblyNameFlags.Retargetable
AssemblyNameFlags.PublicKey
AssemblyNameFlags.EnableJITcompileOptimizer
AssemblyNameFlags.Retargetable
AssemblyNameFlags.EnableJITcompileOptimizer
*/
Imports System.Reflection
' Specify a combination of AssemblyNameFlags for this
' assembly.
<Assembly:AssemblyFlagsAttribute( _
AssemblyNameFlags.EnableJITcompileOptimizer _
Or AssemblyNameFlags.Retargetable)>
Public Class Example
Public Shared Sub Main()
' Get this assembly.
Dim thisAsm As Assembly = GetType(Example).Assembly
' Get the AssemblyName for this assembly.
Dim thisAsmName As AssemblyName = thisAsm.GetName(False)
' Display the flags that were set for this assembly.
ListFlags(thisAsmName.Flags)
' Create an instance of AssemblyFlagsAttribute with the
' same combination of flags that was specified for this
' assembly. Note that PublicKey is included automatically
' for the assembly, but not for this instance of
' AssemblyFlagsAttribute.
Dim afa As New AssemblyFlagsAttribute( _
AssemblyNameFlags.EnableJITcompileOptimizer _
Or AssemblyNameFlags.Retargetable)
' Get the flags. The property returns an integer, so
' the return value must be cast to AssemblyNameFlags.
Dim anf As AssemblyNameFlags = _
CType(afa.AssemblyFlags, AssemblyNameFlags)
' Display the flags.
Console.WriteLine()
ListFlags(anf)
End Sub
Private Shared Sub ListFlags(ByVal anf As AssemblyNameFlags)
If anf = AssemblyNameFlags.None Then
Console.WriteLine("AssemblyNameFlags.None")
Else
If 0 <> (anf And AssemblyNameFlags.Retargetable) Then _
Console.WriteLine("AssemblyNameFlags.Retargetable")
If 0 <> (anf And AssemblyNameFlags.PublicKey) Then _
Console.WriteLine("AssemblyNameFlags.PublicKey")
If 0 <> (anf And AssemblyNameFlags.EnableJITcompileOptimizer) Then _
Console.WriteLine("AssemblyNameFlags.EnableJITcompileOptimizer")
If 0 <> (anf And AssemblyNameFlags.EnableJITcompileTracking) Then _
Console.WriteLine("AssemblyNameFlags.EnableJITcompileTracking")
End If
End SUb
End Class
' This code example produces the following output:
'
'AssemblyNameFlags.Retargetable
'AssemblyNameFlags.PublicKey
'AssemblyNameFlags.EnableJITcompileOptimizer
'
'AssemblyNameFlags.Retargetable
'AssemblyNameFlags.EnableJITcompileOptimizer
추가 정보
적용 대상
AssemblyFlagsAttribute(UInt32)
- Source:
- AssemblyFlagsAttribute.cs
- Source:
- AssemblyFlagsAttribute.cs
- Source:
- AssemblyFlagsAttribute.cs
- Source:
- AssemblyFlagsAttribute.cs
- Source:
- AssemblyFlagsAttribute.cs
주의
This constructor has been deprecated. Use AssemblyFlagsAttribute(AssemblyNameFlags) instead.
주의
This constructor has been deprecated. Please use AssemblyFlagsAttribute(AssemblyNameFlags) instead. https://go.microsoft.com/fwlink/?linkid=14202
주의
This constructor has been deprecated. Please use AssemblyFlagsAttribute(AssemblyNameFlags) instead. http://go.microsoft.com/fwlink/?linkid=14202
Important
이 API는 CLS 규격이 아닙니다.
지정된 플래그 조합을 AssemblyNameFlags 사용하여 클래스의 AssemblyFlagsAttribute 새 인스턴스를 초기화하고 부호 없는 정수 값으로 캐스팅합니다.
public:
AssemblyFlagsAttribute(System::UInt32 flags);
[System.CLSCompliant(false)]
[System.Obsolete("This constructor has been deprecated. Use AssemblyFlagsAttribute(AssemblyNameFlags) instead.")]
public AssemblyFlagsAttribute(uint flags);
[System.CLSCompliant(false)]
[System.Obsolete("This constructor has been deprecated. Please use AssemblyFlagsAttribute(AssemblyNameFlags) instead. https://go.microsoft.com/fwlink/?linkid=14202")]
public AssemblyFlagsAttribute(uint flags);
[System.CLSCompliant(false)]
[System.Obsolete("This constructor has been deprecated. Please use AssemblyFlagsAttribute(AssemblyNameFlags) instead. http://go.microsoft.com/fwlink/?linkid=14202")]
public AssemblyFlagsAttribute(uint flags);
[System.CLSCompliant(false)]
public AssemblyFlagsAttribute(uint flags);
[<System.CLSCompliant(false)>]
[<System.Obsolete("This constructor has been deprecated. Use AssemblyFlagsAttribute(AssemblyNameFlags) instead.")>]
new System.Reflection.AssemblyFlagsAttribute : uint32 -> System.Reflection.AssemblyFlagsAttribute
[<System.CLSCompliant(false)>]
[<System.Obsolete("This constructor has been deprecated. Please use AssemblyFlagsAttribute(AssemblyNameFlags) instead. https://go.microsoft.com/fwlink/?linkid=14202")>]
new System.Reflection.AssemblyFlagsAttribute : uint32 -> System.Reflection.AssemblyFlagsAttribute
[<System.CLSCompliant(false)>]
[<System.Obsolete("This constructor has been deprecated. Please use AssemblyFlagsAttribute(AssemblyNameFlags) instead. http://go.microsoft.com/fwlink/?linkid=14202")>]
new System.Reflection.AssemblyFlagsAttribute : uint32 -> System.Reflection.AssemblyFlagsAttribute
[<System.CLSCompliant(false)>]
new System.Reflection.AssemblyFlagsAttribute : uint32 -> System.Reflection.AssemblyFlagsAttribute
Public Sub New (flags As UInteger)
매개 변수
- flags
- UInt32
JIT(Just-In-Time) 컴파일러 옵션, 장수, 어셈블리가 AssemblyNameFlags 대상을 변경할 수 있는지 여부 및 전체 또는 토큰화된 공개 키가 있는지 여부를 나타내는 부호 없는 정수 값으로 캐스팅되는 플래그의 비트 조합입니다.
- 특성
설명
이 형식화되지 않은 생성자는 이제 사용되지 않습니다. 사용하지 마세요.