Condividi tramite


FileConfigurationExtensions.SetFileLoadExceptionHandler Metodo

Definizione

Imposta un'azione predefinita da richiamare per i provider basati su file quando si verifica un errore.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Configuration::IConfigurationBuilder ^ SetFileLoadExceptionHandler(Microsoft::Extensions::Configuration::IConfigurationBuilder ^ builder, Action<Microsoft::Extensions::Configuration::FileLoadExceptionContext ^> ^ handler);
public static Microsoft.Extensions.Configuration.IConfigurationBuilder SetFileLoadExceptionHandler (this Microsoft.Extensions.Configuration.IConfigurationBuilder builder, Action<Microsoft.Extensions.Configuration.FileLoadExceptionContext> handler);
static member SetFileLoadExceptionHandler : Microsoft.Extensions.Configuration.IConfigurationBuilder * Action<Microsoft.Extensions.Configuration.FileLoadExceptionContext> -> Microsoft.Extensions.Configuration.IConfigurationBuilder
<Extension()>
Public Function SetFileLoadExceptionHandler (builder As IConfigurationBuilder, handler As Action(Of FileLoadExceptionContext)) As IConfigurationBuilder

Parametri

builder
IConfigurationBuilder

Oggetto IConfigurationBuilder in cui effettuare l'aggiunta.

handler
Action<FileLoadExceptionContext>

Azione da richiamare per un'eccezione di caricamento file.

Restituisce

Oggetto IConfigurationBuilder.

Si applica a