共用方式為


HttpDiagnosticsServiceCollectionExtensions.AddDownstreamDependencyMetadata 方法

定義

多載

AddDownstreamDependencyMetadata(IServiceCollection, IDownstreamDependencyMetadata)

新增相依性元數據。

AddDownstreamDependencyMetadata<T>(IServiceCollection)

新增相依性元數據。

AddDownstreamDependencyMetadata(IServiceCollection, IDownstreamDependencyMetadata)

來源:
HttpDiagnosticsServiceCollectionExtensions.cs

新增相依性元數據。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddDownstreamDependencyMetadata(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Microsoft::Extensions::Http::Diagnostics::IDownstreamDependencyMetadata ^ downstreamDependencyMetadata);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddDownstreamDependencyMetadata (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Extensions.Http.Diagnostics.IDownstreamDependencyMetadata downstreamDependencyMetadata);
static member AddDownstreamDependencyMetadata : Microsoft.Extensions.DependencyInjection.IServiceCollection * Microsoft.Extensions.Http.Diagnostics.IDownstreamDependencyMetadata -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddDownstreamDependencyMetadata (services As IServiceCollection, downstreamDependencyMetadata As IDownstreamDependencyMetadata) As IServiceCollection

參數

services
IServiceCollection

IServiceCollection 物件實例。

downstreamDependencyMetadata
IDownstreamDependencyMetadata

要新增的 DownstreamDependencyMetadata 物件。

傳回

services 的值。

適用於

AddDownstreamDependencyMetadata<T>(IServiceCollection)

來源:
HttpDiagnosticsServiceCollectionExtensions.cs

新增相依性元數據。

public:
generic <typename T>
 where T : class, Microsoft::Extensions::Http::Diagnostics::IDownstreamDependencyMetadata[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddDownstreamDependencyMetadata(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddDownstreamDependencyMetadata<T> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services) where T : class, Microsoft.Extensions.Http.Diagnostics.IDownstreamDependencyMetadata;
static member AddDownstreamDependencyMetadata : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'T : null and 'T :> Microsoft.Extensions.Http.Diagnostics.IDownstreamDependencyMetadata)
<Extension()>
Public Function AddDownstreamDependencyMetadata(Of T As {Class, IDownstreamDependencyMetadata}) (services As IServiceCollection) As IServiceCollection

類型參數

T

IDownstreamDependencyMetadata 要註冊的實例。

參數

services
IServiceCollection

IServiceCollection 物件實例。

傳回

services 的值。

適用於