FakeRedactionServiceCollectionExtensions.AddFakeRedaction 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
AddFakeRedaction(IServiceCollection) |
註冊一律會傳回假的 Redactor 實例的假 Redactor 提供者。 |
AddFakeRedaction(IServiceCollection, Action<FakeRedactorOptions>) |
註冊一律會傳回假的 Redactor 實例的假 Redactor 提供者。 |
AddFakeRedaction(IServiceCollection)
註冊一律會傳回假的 Redactor 實例的假 Redactor 提供者。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddFakeRedaction(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddFakeRedaction (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddFakeRedaction : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddFakeRedaction (services As IServiceCollection) As IServiceCollection
參數
- services
- IServiceCollection
用來註冊假修訂類別的容器。
傳回
services
的值。
例外狀況
services
為 null
。
適用於
AddFakeRedaction(IServiceCollection, Action<FakeRedactorOptions>)
註冊一律會傳回假的 Redactor 實例的假 Redactor 提供者。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddFakeRedaction(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Action<Microsoft::Extensions::Compliance::Testing::FakeRedactorOptions ^> ^ configure);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddFakeRedaction (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.Extensions.Compliance.Testing.FakeRedactorOptions> configure);
static member AddFakeRedaction : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.Extensions.Compliance.Testing.FakeRedactorOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddFakeRedaction (services As IServiceCollection, configure As Action(Of FakeRedactorOptions)) As IServiceCollection
參數
- services
- IServiceCollection
用來註冊假修訂類別的容器。
- configure
- Action<FakeRedactorOptions>
設定假的重做函式。
傳回
services
的值。
例外狀況
services
或 configure
> 為 null
。