Assembly.ReflectionOnlyLoad Yöntem
Tanım
Bir derlemeyi yalnızca yansıma bağlamına yükler, burada incelenir ancak yürütülmeyebilir.Loads an assembly into the reflection-only context, where it can be examined but not executed.
Aşırı Yüklemeler
ReflectionOnlyLoad(Byte[]) |
Bütünleştirilmiş kod içeren ortak nesne dosyası biçimi (COFF) tabanlı görüntüden derlemeyi yükler.Loads the assembly from a common object file format (COFF)-based image containing an emitted assembly. Derleme, çağıranın uygulama etki alanının yalnızca yansıma bağlamına yüklenir.The assembly is loaded into the reflection-only context of the caller's application domain. |
ReflectionOnlyLoad(String) |
Bir derlemeyi, görünen adı verildiğinde yalnızca yansıma bağlamına yükler.Loads an assembly into the reflection-only context, given its display name. |
ReflectionOnlyLoad(Byte[])
Bütünleştirilmiş kod içeren ortak nesne dosyası biçimi (COFF) tabanlı görüntüden derlemeyi yükler.Loads the assembly from a common object file format (COFF)-based image containing an emitted assembly. Derleme, çağıranın uygulama etki alanının yalnızca yansıma bağlamına yüklenir.The assembly is loaded into the reflection-only context of the caller's application domain.
public:
static System::Reflection::Assembly ^ ReflectionOnlyLoad(cli::array <System::Byte> ^ rawAssembly);
public static System.Reflection.Assembly ReflectionOnlyLoad (byte[] rawAssembly);
static member ReflectionOnlyLoad : byte[] -> System.Reflection.Assembly
Public Shared Function ReflectionOnlyLoad (rawAssembly As Byte()) As Assembly
Parametreler
- rawAssembly
- Byte[]
Yayılan bir derlemeyi içeren COFF tabanlı bir görüntü olan bir bayt dizisi.A byte array that is a COFF-based image containing an emitted assembly.
Döndürülenler
Yüklenen derleme.The loaded assembly.
Özel durumlar
rawAssembly
, null
değeridir.rawAssembly
is null
.
rawAssembly
geçerli bir derleme değil.rawAssembly
is not a valid assembly.
-veya--or-
Ortak dil çalışma zamanının sürüm 2,0 veya üzeri sürümü şu anda yüklü ve rawAssembly
daha sonraki bir sürümle derlendi.Version 2.0 or later of the common language runtime is currently loaded and rawAssembly
was compiled with a later version.
rawAssembly
yüklenemiyor.rawAssembly
cannot be loaded.
Yalnızca .NET 5 + ve .NET Core: Bu üye desteklenmez..NET 5+ and .NET Core only: This member is not supported.
Açıklamalar
Yalnızca yansıma bağlamına yüklenmiş bir derlemeden kod yürütemezsiniz.You cannot execute code from an assembly loaded into the reflection-only context. Kodu yürütmek için, derleme, yöntemi kullanılarak yürütme bağlamına de yüklenmelidir Load .To execute code, the assembly must be loaded into the execution context as well, using the Load method.
Yalnızca yansıma bağlamı diğer bağlamlardan farklı değildir.The reflection-only context is no different from other contexts. İçeriğe yüklenen derlemeler yalnızca uygulama etki alanı kaldırılırken kaldırılabilir.Assemblies that are loaded into the context can be unloaded only by unloading the application domain.
Şunlara uygulanır
ReflectionOnlyLoad(String)
Bir derlemeyi, görünen adı verildiğinde yalnızca yansıma bağlamına yükler.Loads an assembly into the reflection-only context, given its display name.
public:
static System::Reflection::Assembly ^ ReflectionOnlyLoad(System::String ^ assemblyString);
public static System.Reflection.Assembly ReflectionOnlyLoad (string assemblyString);
static member ReflectionOnlyLoad : string -> System.Reflection.Assembly
Public Shared Function ReflectionOnlyLoad (assemblyString As String) As Assembly
Parametreler
- assemblyString
- String
Özelliğin döndürdüğü şekilde derlemenin görünen adı FullName .The display name of the assembly, as returned by the FullName property.
Döndürülenler
Yüklenen derleme.The loaded assembly.
Özel durumlar
assemblyString
, null
değeridir.assemblyString
is null
.
assemblyString
boş bir dizedir ("").assemblyString
is an empty string ("").
assemblyString
bulunamadı.assemblyString
is not found.
assemblyString
bulundu, ancak yüklenemiyor.assemblyString
is found, but cannot be loaded.
assemblyString
geçerli bir derleme değil.assemblyString
is not a valid assembly.
-veya--or-
Ortak dil çalışma zamanının sürüm 2,0 veya üzeri sürümü şu anda yüklü ve assemblyString
daha sonraki bir sürümle derlendi.Version 2.0 or later of the common language runtime is currently loaded and assemblyString
was compiled with a later version.
Yalnızca .NET 5 + ve .NET Core: Bu üye desteklenmez..NET 5+ and .NET Core only: This member is not supported.
Açıklamalar
Bağımlılıklar yalnızca yansıma bağlamına otomatik olarak yüklenmez.Dependencies are not automatically loaded into the reflection-only context.
Yalnızca yansıma bağlamına yüklenmiş bir derlemeden kod yürütemezsiniz.You cannot execute code from an assembly loaded into the reflection-only context. Kodu yürütmek için, derleme, yöntemi kullanılarak yürütme bağlamına de yüklenmelidir Load .To execute code, the assembly must be loaded into the execution context as well, using the Load method.
Bir derlemeye belirli izinlerin verilip verilmediği kanıta göre belirlenir.Whether certain permissions are granted or not granted to an assembly is based on evidence. Derleme ve güvenlik kanıtı birleştirme kuralları aşağıdaki gibidir:The rules for assembly and security evidence merging are as follows:
Not
C++ ' da derlenen yürütülebilir dosyaları yansıtma bir oluşturabilir FileLoadException .Reflecting on executable files compiled in C++ might throw a FileLoadException. Bunun nedeni, C++ derleyicisinin, yürütülebilir dosyanızdaki yeniden konumlandırma adreslerini veya. reloc bölümünü sonuçlandırmasından kaynaklanmıştır.This is most likely caused by the C++ compiler stripping the relocation addresses or the .reloc section from your executable file. . Reloc adresini korumak için /fixed:no
bağlama sırasında belirtin.To preserve the .reloc address, specify /fixed:no
when you are linking.
Yalnızca yansıma bağlamı diğer bağlamlardan farklı değildir.The reflection-only context is no different from other contexts. İçeriğe yüklenen derlemeler yalnızca uygulama etki alanı kaldırılırken kaldırılabilir.Assemblies that are loaded into the context can be unloaded only by unloading the application domain.