Aracılığıyla paylaş


AssemblyFlagsAttribute Oluşturucular

Tanım

AssemblyFlagsAttribute sınıfının yeni bir örneğini başlatır.

Aşırı Yüklemeler

Name Description
AssemblyFlagsAttribute(Int32)
Geçersiz.
Geçersiz.
Geçersiz.

Sınıfın AssemblyFlagsAttribute yeni bir örneğini belirtilen bayrak bileşimiyle AssemblyNameFlags başlatır ve tamsayı değeri olarak yayınlar.

AssemblyFlagsAttribute(AssemblyNameFlags)

Belirtilen bayrak bileşimiyle sınıfının yeni bir örneğini AssemblyFlagsAttributeAssemblyNameFlags başlatır.

AssemblyFlagsAttribute(UInt32)
Geçersiz.
Geçersiz.
Geçersiz.

Belirtilen bayrak bileşimiyle AssemblyNameFlags sınıfın AssemblyFlagsAttribute yeni bir örneğini başlatır ve işaretsiz bir tamsayı değeri olarak yayınlanır.

AssemblyFlagsAttribute(Int32)

Kaynak:
AssemblyFlagsAttribute.cs
Kaynak:
AssemblyFlagsAttribute.cs
Kaynak:
AssemblyFlagsAttribute.cs
Kaynak:
AssemblyFlagsAttribute.cs
Kaynak:
AssemblyFlagsAttribute.cs

Dikkat

This constructor has been deprecated. Use AssemblyFlagsAttribute(AssemblyNameFlags) instead.

Dikkat

This constructor has been deprecated. Please use AssemblyFlagsAttribute(AssemblyNameFlags) instead. https://go.microsoft.com/fwlink/?linkid=14202

Dikkat

This constructor has been deprecated. Please use AssemblyFlagsAttribute(AssemblyNameFlags) instead. http://go.microsoft.com/fwlink/?linkid=14202

Sınıfın AssemblyFlagsAttribute yeni bir örneğini belirtilen bayrak bileşimiyle AssemblyNameFlags başlatır ve tamsayı değeri olarak yayınlar.

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)

Parametreler

assemblyFlags
Int32

Tam zamanında (JIT) derleyici seçeneklerini, uzun ömürlülüğü, derlemenin AssemblyNameFlags yeniden gezinilebilir olup olmadığını ve tam veya belirteçli bir ortak anahtarı olup olmadığını temsil eden, tamsayı değeri olarak türemiş bayrakların bit düzeyinde birleşimi.

Öznitelikler

Açıklamalar

Bu yazılmamış oluşturucu artık kullanımdan kaldırıldı. Kullanmayın.

Şunlara uygulanır

AssemblyFlagsAttribute(AssemblyNameFlags)

Kaynak:
AssemblyFlagsAttribute.cs
Kaynak:
AssemblyFlagsAttribute.cs
Kaynak:
AssemblyFlagsAttribute.cs
Kaynak:
AssemblyFlagsAttribute.cs
Kaynak:
AssemblyFlagsAttribute.cs

Belirtilen bayrak bileşimiyle sınıfının yeni bir örneğini AssemblyFlagsAttributeAssemblyNameFlags başlatır.

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)

Parametreler

assemblyFlags
AssemblyNameFlags

Tam zamanında (JIT) derleyici seçeneklerini temsil eden bayrakların AssemblyNameFlags bit düzeyinde birleşimi, uzun ömürlülük, derlemenin yeniden gezinilebilir olup olmadığı ve tam veya belirteçli ortak anahtarı olup olmadığı.

Örnekler

Aşağıdaki kod örneği, 'nin AssemblyFlagsAttribute bir derlemeye nasıl uygulanacağını ve çalışma zamanında bayrakların nasıl okunacağını gösterir. Örnek ayrıca özniteliğin bir örneğini oluşturur ve bayrakları görüntülemek için özelliğini kullanır AssemblyFlags . 'nin dinamik derlemeye nasıl uygulanacağını AssemblyFlagsAttribute gösteren bir örnek için özelliğine AssemblyName.Flags bakın.

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

Ayrıca bkz.

Şunlara uygulanır

AssemblyFlagsAttribute(UInt32)

Kaynak:
AssemblyFlagsAttribute.cs
Kaynak:
AssemblyFlagsAttribute.cs
Kaynak:
AssemblyFlagsAttribute.cs
Kaynak:
AssemblyFlagsAttribute.cs
Kaynak:
AssemblyFlagsAttribute.cs

Dikkat

This constructor has been deprecated. Use AssemblyFlagsAttribute(AssemblyNameFlags) instead.

Dikkat

This constructor has been deprecated. Please use AssemblyFlagsAttribute(AssemblyNameFlags) instead. https://go.microsoft.com/fwlink/?linkid=14202

Dikkat

This constructor has been deprecated. Please use AssemblyFlagsAttribute(AssemblyNameFlags) instead. http://go.microsoft.com/fwlink/?linkid=14202

Önemli

Bu API, CLS uyumlu değildir.

CLS uyumlu alternatif
System.Reflection.AssemblyFlagsAttribute.AssemblyFlagsAttribute(AssemblyNameFlags)

Belirtilen bayrak bileşimiyle AssemblyNameFlags sınıfın AssemblyFlagsAttribute yeni bir örneğini başlatır ve işaretsiz bir tamsayı değeri olarak yayınlanır.

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)

Parametreler

flags
UInt32

Tam zamanında (JIT) derleyici seçeneklerini, uzun ömürlülüğü, derlemenin AssemblyNameFlags yeniden gezinilebilir olup olmadığını ve tam veya belirteçli ortak anahtarı olup olmadığını temsil eden işaretsiz bir tamsayı değeri olarak türeyen bayrakların bit düzeyinde birleşimi.

Öznitelikler

Açıklamalar

Bu yazılmamış oluşturucu artık kullanımdan kaldırıldı. Kullanmayın.

Şunlara uygulanır