AppDomain.ResourceResolve イベント
定義
リソースが正しくリンクされていなかったり、アセンブリに埋め込まれているなどの理由からリソースの解決に失敗した場合に発生します。Occurs when the resolution of a resource fails because the resource is not a valid linked or embedded resource in the assembly.
public:
event ResolveEventHandler ^ ResourceResolve;
public:
virtual event ResolveEventHandler ^ ResourceResolve;
public event ResolveEventHandler? ResourceResolve;
public event ResolveEventHandler ResourceResolve;
[add: System.Security.SecurityCritical]
[remove: System.Security.SecurityCritical]
public event ResolveEventHandler ResourceResolve;
member this.ResourceResolve : ResolveEventHandler
[<add: System.Security.SecurityCritical>]
[<remove: System.Security.SecurityCritical>]
member this.ResourceResolve : ResolveEventHandler
Public Custom Event ResourceResolve As ResolveEventHandler
イベントの種類
実装
- 属性
注釈
ResolveEventHandlerこのイベントのは、リソースを含むアセンブリを見つけて返すことができます。The ResolveEventHandler for this event can attempt to locate the assembly containing the resource and return it.
重要
有効なリンクされたリソースのファイルが見つからないために解決が失敗した場合、このイベントは発生しません。This event is not raised if resolution fails because no file can be found for a valid linked resource. このイベントは、マニフェストリソースストリームが見つからない場合に発生しますが、個々のリソースキーが見つからない場合には発生しません。It is raised if a manifest resource stream cannot be found, but it is not raised if an individual resource key cannot be found.
.NET Framework 4 以降では、 ResolveEventArgs.RequestingAssembly リソースを要求したアセンブリがプロパティに格納されます。Beginning with the .NET Framework 4, the ResolveEventArgs.RequestingAssembly property contains the assembly that requested the resource. 詳細については、「ResolveEventArgs.RequestingAssembly」を参照してください。For more information, see ResolveEventArgs.RequestingAssembly.
このイベントのイベントハンドラーを登録するには、必要なアクセス許可を持っているか、がスローされている必要があり SecurityException ます。To register an event handler for this event, you must have the required permissions, or a SecurityException is thrown.
イベントの処理の詳細については、「処理とイベントの発生」を参照してください。For more information about handling events, see Handling and Raising Events.