• Articles
  • Api Documentation
Show / Hide Table of Contents
  • Authpb
    • AuthReflection
    • Permission
    • Permission.Types
    • Permission.Types.Type
    • Role
    • User
    • UserAddOptions
  • Etcd
    • DIExtensions
    • EtcdClient
    • EtcdClientCache
    • EtcdClientFactory
    • EtcdClientOptions
    • EtcdExtensions
    • EtcdWatcher
    • IEtcdClient
    • IEtcdClientFactory
    • StaticAddressResolverFactory
  • Etcd.Configuration
    • EtcdConfigurationOptions
  • Etcdserverpb
    • AlarmMember
    • AlarmRequest
    • AlarmRequest.Types
    • AlarmRequest.Types.AlarmAction
    • AlarmResponse
    • AlarmType
    • Auth
    • Auth.AuthClient
    • AuthDisableRequest
    • AuthDisableResponse
    • AuthEnableRequest
    • AuthEnableResponse
    • AuthRoleAddRequest
    • AuthRoleAddResponse
    • AuthRoleDeleteRequest
    • AuthRoleDeleteResponse
    • AuthRoleGetRequest
    • AuthRoleGetResponse
    • AuthRoleGrantPermissionRequest
    • AuthRoleGrantPermissionResponse
    • AuthRoleListRequest
    • AuthRoleListResponse
    • AuthRoleRevokePermissionRequest
    • AuthRoleRevokePermissionResponse
    • AuthStatusRequest
    • AuthStatusResponse
    • AuthUserAddRequest
    • AuthUserAddResponse
    • AuthUserChangePasswordRequest
    • AuthUserChangePasswordResponse
    • AuthUserDeleteRequest
    • AuthUserDeleteResponse
    • AuthUserGetRequest
    • AuthUserGetResponse
    • AuthUserGrantRoleRequest
    • AuthUserGrantRoleResponse
    • AuthUserListRequest
    • AuthUserListResponse
    • AuthUserRevokeRoleRequest
    • AuthUserRevokeRoleResponse
    • AuthenticateRequest
    • AuthenticateResponse
    • Cluster
    • Cluster.ClusterClient
    • CompactionRequest
    • CompactionResponse
    • Compare
    • Compare.TargetUnionOneofCase
    • Compare.Types
    • Compare.Types.CompareResult
    • Compare.Types.CompareTarget
    • DefragmentRequest
    • DefragmentResponse
    • DeleteRangeRequest
    • DeleteRangeResponse
    • DowngradeInfo
    • DowngradeRequest
    • DowngradeRequest.Types
    • DowngradeRequest.Types.DowngradeAction
    • DowngradeResponse
    • DowngradeVersionTestRequest
    • HashKVRequest
    • HashKVResponse
    • HashRequest
    • HashResponse
    • KV
    • KV.KVClient
    • Lease
    • Lease.LeaseClient
    • LeaseCheckpoint
    • LeaseCheckpointRequest
    • LeaseCheckpointResponse
    • LeaseGrantRequest
    • LeaseGrantResponse
    • LeaseKeepAliveRequest
    • LeaseKeepAliveResponse
    • LeaseLeasesRequest
    • LeaseLeasesResponse
    • LeaseRevokeRequest
    • LeaseRevokeResponse
    • LeaseStatus
    • LeaseTimeToLiveRequest
    • LeaseTimeToLiveResponse
    • Maintenance
    • Maintenance.MaintenanceClient
    • Member
    • MemberAddRequest
    • MemberAddResponse
    • MemberListRequest
    • MemberListResponse
    • MemberPromoteRequest
    • MemberPromoteResponse
    • MemberRemoveRequest
    • MemberRemoveResponse
    • MemberUpdateRequest
    • MemberUpdateResponse
    • MoveLeaderRequest
    • MoveLeaderResponse
    • PutRequest
    • PutResponse
    • RangeRequest
    • RangeRequest.Types
    • RangeRequest.Types.SortOrder
    • RangeRequest.Types.SortTarget
    • RangeResponse
    • RequestOp
    • RequestOp.RequestOneofCase
    • ResponseHeader
    • ResponseOp
    • ResponseOp.ResponseOneofCase
    • RpcReflection
    • SnapshotRequest
    • SnapshotResponse
    • StatusRequest
    • StatusResponse
    • TxnRequest
    • TxnResponse
    • Watch
    • Watch.WatchClient
    • WatchCancelRequest
    • WatchCreateRequest
    • WatchCreateRequest.Types
    • WatchCreateRequest.Types.FilterType
    • WatchProgressRequest
    • WatchRequest
    • WatchRequest.RequestUnionOneofCase
    • WatchResponse
  • Gogoproto
    • GogoExtensions
    • GogoReflection
  • Google.Api
    • Advice
    • AnnotationsExtensions
    • AnnotationsReflection
    • AuthProvider
    • AuthReflection
    • AuthRequirement
    • Authentication
    • AuthenticationRule
    • Backend
    • BackendReflection
    • BackendRule
    • BackendRule.AuthenticationOneofCase
    • BackendRule.Types
    • BackendRule.Types.PathTranslation
    • Billing
    • Billing.Types
    • Billing.Types.BillingDestination
    • BillingReflection
    • ChangeType
    • ClientExtensions
    • ClientLibraryDestination
    • ClientLibraryOrganization
    • ClientLibrarySettings
    • ClientReflection
    • CommonLanguageSettings
    • ConfigChange
    • ConfigChangeReflection
    • ConsumerReflection
    • Context
    • ContextReflection
    • ContextRule
    • Control
    • ControlReflection
    • CppSettings
    • CustomHttpPattern
    • Distribution
    • Distribution.Types
    • Distribution.Types.BucketOptions
    • Distribution.Types.BucketOptions.OptionsOneofCase
    • Distribution.Types.BucketOptions.Types
    • Distribution.Types.BucketOptions.Types.Explicit
    • Distribution.Types.BucketOptions.Types.Exponential
    • Distribution.Types.BucketOptions.Types.Linear
    • Distribution.Types.Exemplar
    • Distribution.Types.Range
    • DistributionReflection
    • Documentation
    • DocumentationReflection
    • DocumentationRule
    • DotnetSettings
    • Endpoint
    • EndpointReflection
    • ErrorReason
    • ErrorReasonReflection
    • FieldBehavior
    • FieldBehaviorExtensions
    • FieldBehaviorReflection
    • FieldInfo
    • FieldInfo.Types
    • FieldInfo.Types.Format
    • FieldInfoExtensions
    • FieldInfoReflection
    • FieldPolicy
    • GoSettings
    • Http
    • HttpBody
    • HttpReflection
    • HttpRule
    • HttpRule.PatternOneofCase
    • HttpbodyReflection
    • JavaSettings
    • JwtLocation
    • JwtLocation.InOneofCase
    • LabelDescriptor
    • LabelDescriptor.Types
    • LabelDescriptor.Types.ValueType
    • LabelReflection
    • LaunchStage
    • LaunchStageReflection
    • LogDescriptor
    • LogReflection
    • Logging
    • Logging.Types
    • Logging.Types.LoggingDestination
    • LoggingReflection
    • MethodPolicy
    • MethodSettings
    • MethodSettings.Types
    • MethodSettings.Types.LongRunning
    • Metric
    • MetricDescriptor
    • MetricDescriptor.Types
    • MetricDescriptor.Types.MetricDescriptorMetadata
    • MetricDescriptor.Types.MetricKind
    • MetricDescriptor.Types.ValueType
    • MetricReflection
    • MetricRule
    • MonitoredResource
    • MonitoredResourceDescriptor
    • MonitoredResourceMetadata
    • MonitoredResourceReflection
    • Monitoring
    • Monitoring.Types
    • Monitoring.Types.MonitoringDestination
    • MonitoringReflection
    • NodeSettings
    • OAuthRequirements
    • Page
    • PhpSettings
    • PolicyExtensions
    • PolicyReflection
    • ProjectProperties
    • Property
    • Property.Types
    • Property.Types.PropertyType
    • Publishing
    • PythonSettings
    • PythonSettings.Types
    • PythonSettings.Types.ExperimentalFeatures
    • Quota
    • QuotaLimit
    • QuotaReflection
    • ResourceDescriptor
    • ResourceDescriptor.Types
    • ResourceDescriptor.Types.History
    • ResourceDescriptor.Types.Style
    • ResourceExtensions
    • ResourceReference
    • ResourceReflection
    • RoutingExtensions
    • RoutingParameter
    • RoutingReflection
    • RoutingRule
    • RubySettings
    • Service
    • ServiceReflection
    • SourceInfo
    • SourceInfoReflection
    • SystemParameter
    • SystemParameterReflection
    • SystemParameterRule
    • SystemParameters
    • TypeReference
    • Usage
    • UsageReflection
    • UsageRule
    • Visibility
    • VisibilityExtensions
    • VisibilityReflection
    • VisibilityRule
  • Google.Protobuf
    • ByteString
    • CodedInputStream
    • CodedOutputStream
    • CodedOutputStream.OutOfSpaceException
    • Extension
    • ExtensionRegistry
    • ExtensionSet
    • ExtensionSet<TTarget>
    • Extension<TTarget, TValue>
    • FieldCodec
    • FieldCodec<T>
    • IBufferMessage
    • ICustomDiagnosticMessage
    • IDeepCloneable<T>
    • IExtendableMessage<T>
    • IMessage
    • IMessage<T>
    • InvalidJsonException
    • InvalidProtocolBufferException
    • JsonFormatter
    • JsonFormatter.Settings
    • JsonParser
    • JsonParser.Settings
    • MessageExtensions
    • MessageParser
    • MessageParser<T>
    • ParseContext
    • ProtoPreconditions
    • RepeatedExtension<TTarget, TValue>
    • RepeatedFieldExtensions
    • UnknownFieldSet
    • UnsafeByteOperations
    • UnsafeCollectionOperations
    • WireFormat
    • WireFormat.WireType
    • WriteContext
  • Google.Protobuf.Collections
    • Lists
    • MapField<TKey, TValue>
    • MapField<TKey, TValue>.Codec
    • ProtobufEqualityComparers
    • RepeatedField<T>
  • Google.Protobuf.Compiler
    • CodeGeneratorRequest
    • CodeGeneratorResponse
    • CodeGeneratorResponse.Types
    • CodeGeneratorResponse.Types.Feature
    • CodeGeneratorResponse.Types.File
    • PluginReflection
    • Version
  • Google.Protobuf.Reflection
    • CustomOptions
    • DescriptorBase
    • DescriptorDeclaration
    • DescriptorProto
    • DescriptorProto.Types
    • DescriptorProto.Types.ExtensionRange
    • DescriptorProto.Types.ReservedRange
    • DescriptorReflection
    • DescriptorValidationException
    • Edition
    • EnumDescriptor
    • EnumDescriptorProto
    • EnumDescriptorProto.Types
    • EnumDescriptorProto.Types.EnumReservedRange
    • EnumOptions
    • EnumValueDescriptor
    • EnumValueDescriptorProto
    • EnumValueOptions
    • ExtensionCollection
    • ExtensionRangeOptions
    • ExtensionRangeOptions.Types
    • ExtensionRangeOptions.Types.Declaration
    • ExtensionRangeOptions.Types.VerificationState
    • FeatureSet
    • FeatureSet.Types
    • FeatureSet.Types.EnforceNamingStyle
    • FeatureSet.Types.EnumType
    • FeatureSet.Types.FieldPresence
    • FeatureSet.Types.JsonFormat
    • FeatureSet.Types.MessageEncoding
    • FeatureSet.Types.RepeatedFieldEncoding
    • FeatureSet.Types.Utf8Validation
    • FeatureSetDefaults
    • FeatureSetDefaults.Types
    • FeatureSetDefaults.Types.FeatureSetEditionDefault
    • FieldDescriptor
    • FieldDescriptorProto
    • FieldDescriptorProto.Types
    • FieldDescriptorProto.Types.Label
    • FieldDescriptorProto.Types.Type
    • FieldOptions
    • FieldOptions.Types
    • FieldOptions.Types.CType
    • FieldOptions.Types.EditionDefault
    • FieldOptions.Types.FeatureSupport
    • FieldOptions.Types.JSType
    • FieldOptions.Types.OptionRetention
    • FieldOptions.Types.OptionTargetType
    • FieldType
    • FileDescriptor
    • FileDescriptorProto
    • FileDescriptorSet
    • FileOptions
    • FileOptions.Types
    • FileOptions.Types.OptimizeMode
    • GeneratedClrTypeInfo
    • GeneratedCodeInfo
    • GeneratedCodeInfo.Types
    • GeneratedCodeInfo.Types.Annotation
    • GeneratedCodeInfo.Types.Annotation.Types
    • GeneratedCodeInfo.Types.Annotation.Types.Semantic
    • IDescriptor
    • IFieldAccessor
    • MessageDescriptor
    • MessageDescriptor.FieldCollection
    • MessageOptions
    • MethodDescriptor
    • MethodDescriptorProto
    • MethodOptions
    • MethodOptions.Types
    • MethodOptions.Types.IdempotencyLevel
    • OneofAccessor
    • OneofDescriptor
    • OneofDescriptorProto
    • OneofOptions
    • OriginalNameAttribute
    • ServiceDescriptor
    • ServiceDescriptorProto
    • ServiceOptions
    • SourceCodeInfo
    • SourceCodeInfo.Types
    • SourceCodeInfo.Types.Location
    • Syntax
    • TypeRegistry
    • UninterpretedOption
    • UninterpretedOption.Types
    • UninterpretedOption.Types.NamePart
  • Google.Protobuf.WellKnownTypes
    • Any
    • AnyReflection
    • Api
    • ApiReflection
    • BoolValue
    • BytesValue
    • DoubleValue
    • Duration
    • DurationReflection
    • Empty
    • EmptyReflection
    • Enum
    • EnumValue
    • Field
    • Field.Types
    • Field.Types.Cardinality
    • Field.Types.Kind
    • FieldMask
    • FieldMask.MergeOptions
    • FieldMaskReflection
    • FloatValue
    • Int32Value
    • Int64Value
    • ListValue
    • Method
    • Mixin
    • NullValue
    • Option
    • SourceContext
    • SourceContextReflection
    • StringValue
    • Struct
    • StructReflection
    • Syntax
    • TimeExtensions
    • Timestamp
    • TimestampReflection
    • Type
    • TypeReflection
    • UInt32Value
    • UInt64Value
    • Value
    • Value.KindOneofCase
    • WrappersReflection
  • Google.Rpc
    • BadRequest
    • BadRequest.Types
    • BadRequest.Types.FieldViolation
    • Code
    • CodeReflection
    • DebugInfo
    • ErrorDetailsReflection
    • ErrorInfo
    • Help
    • Help.Types
    • Help.Types.Link
    • HttpHeader
    • HttpReflection
    • HttpRequest
    • HttpResponse
    • LocalizedMessage
    • PreconditionFailure
    • PreconditionFailure.Types
    • PreconditionFailure.Types.Violation
    • QuotaFailure
    • QuotaFailure.Types
    • QuotaFailure.Types.Violation
    • RequestInfo
    • ResourceInfo
    • RetryInfo
    • StandardErrorTypeRegistry
    • Status
    • StatusReflection
  • Google.Rpc.Context
    • AttributeContext
    • AttributeContext.Types
    • AttributeContext.Types.Api
    • AttributeContext.Types.Auth
    • AttributeContext.Types.Peer
    • AttributeContext.Types.Request
    • AttributeContext.Types.Resource
    • AttributeContext.Types.Response
    • AttributeContextReflection
    • AuditContext
    • AuditContextReflection
  • Google.Type
    • CalendarPeriod
    • CalendarPeriodReflection
    • Color
    • ColorReflection
    • Date
    • DateExtensions
    • DateReflection
    • DateTime
    • DateTime.TimeOffsetOneofCase
    • DatetimeReflection
    • DayOfWeek
    • DayofweekReflection
    • Decimal
    • DecimalReflection
    • Expr
    • ExprReflection
    • Fraction
    • FractionReflection
    • Interval
    • IntervalReflection
    • LatLng
    • LatlngReflection
    • LocalizedText
    • LocalizedTextReflection
    • Money
    • MoneyReflection
    • Month
    • MonthReflection
    • PhoneNumber
    • PhoneNumber.KindOneofCase
    • PhoneNumber.Types
    • PhoneNumber.Types.ShortCode
    • PhoneNumberReflection
    • PostalAddress
    • PostalAddressReflection
    • Quaternion
    • QuaternionReflection
    • TimeOfDay
    • TimeZone
    • TimeofdayReflection
  • Grpc.Core
    • AsyncAuthInterceptor
    • AsyncClientStreamingCall<TRequest, TResponse>
    • AsyncDuplexStreamingCall<TRequest, TResponse>
    • AsyncServerStreamingCall<TResponse>
    • AsyncStreamReaderExtensions
    • AsyncUnaryCall<TResponse>
    • AuthContext
    • AuthInterceptorContext
    • AuthProperty
    • BindServiceMethodAttribute
    • CallCredentials
    • CallCredentialsConfiguratorBase
    • CallInvoker
    • CallOptions
    • ChannelBase
    • ChannelCredentials
    • ChannelCredentialsConfiguratorBase
    • ClientBase
    • ClientBase.ClientBaseConfiguration
    • ClientBase<T>
    • ClientStreamingServerMethod<TRequest, TResponse>
    • ConnectivityState
    • ContextPropagationOptions
    • ContextPropagationToken
    • DeserializationContext
    • DuplexStreamingServerMethod<TRequest, TResponse>
    • IAsyncStreamReader<T>
    • IAsyncStreamWriter<T>
    • IClientStreamWriter<T>
    • IMethod
    • IServerStreamWriter<T>
    • KeyCertificatePair
    • Marshaller<T>
    • Marshallers
    • Metadata
    • Metadata.Entry
    • MethodType
    • Method<TRequest, TResponse>
    • RpcException
    • SerializationContext
    • ServerCallContext
    • ServerServiceDefinition
    • ServerServiceDefinition.Builder
    • ServerStreamingServerMethod<TRequest, TResponse>
    • ServiceBinderBase
    • SslCredentials
    • Status
    • StatusCode
    • UnaryServerMethod<TRequest, TResponse>
    • VerifyPeerCallback
    • VerifyPeerContext
    • VersionInfo
    • WriteFlags
    • WriteOptions
  • Grpc.Core.Interceptors
    • CallInvokerExtensions
    • ChannelExtensions
    • ClientInterceptorContext<TRequest, TResponse>
    • Interceptor
    • Interceptor.AsyncClientStreamingCallContinuation<TRequest, TResponse>
    • Interceptor.AsyncDuplexStreamingCallContinuation<TRequest, TResponse>
    • Interceptor.AsyncServerStreamingCallContinuation<TRequest, TResponse>
    • Interceptor.AsyncUnaryCallContinuation<TRequest, TResponse>
    • Interceptor.BlockingUnaryCallContinuation<TRequest, TResponse>
  • Grpc.Core.Utils
    • GrpcPreconditions
  • Grpc.Net.Client
    • GrpcChannel
    • GrpcChannelOptions
  • Grpc.Net.Client.Balancer
    • BalancerAddress
    • BalancerAttributes
    • BalancerAttributesKey<TValue>
    • BalancerState
    • ChannelState
    • CompletionContext
    • DnsResolverFactory
    • IBackoffPolicy
    • IBackoffPolicyFactory
    • IChannelControlHelper
    • ISubchannelCallTracker
    • LoadBalancer
    • LoadBalancerFactory
    • LoadBalancerOptions
    • PickContext
    • PickFirstBalancerFactory
    • PickResult
    • PickResultType
    • PollingResolver
    • Resolver
    • ResolverFactory
    • ResolverOptions
    • ResolverResult
    • RoundRobinBalancerFactory
    • StaticResolverFactory
    • Subchannel
    • SubchannelOptions
    • SubchannelPicker
    • SubchannelState
    • SubchannelsLoadBalancer
  • Grpc.Net.Client.Configuration
    • ConfigObject
    • HedgingPolicy
    • LoadBalancingConfig
    • MethodConfig
    • MethodName
    • PickFirstConfig
    • RetryPolicy
    • RetryThrottlingPolicy
    • RoundRobinConfig
    • ServiceConfig
  • Grpc.Net.Compression
    • DeflateCompressionProvider
    • GzipCompressionProvider
    • ICompressionProvider
  • Microsoft.Extensions.Configuration
    • ChainedBuilderExtensions
    • ChainedConfigurationProvider
    • ChainedConfigurationSource
    • ConfigurationBuilder
    • ConfigurationDebugViewContext
    • ConfigurationExtensions
    • ConfigurationKeyComparer
    • ConfigurationKeyNameAttribute
    • ConfigurationManager
    • ConfigurationPath
    • ConfigurationProvider
    • ConfigurationReloadToken
    • ConfigurationRoot
    • ConfigurationRootExtensions
    • ConfigurationSection
    • EtcdConfigurationExtensions
    • IConfiguration
    • IConfigurationBuilder
    • IConfigurationManager
    • IConfigurationProvider
    • IConfigurationRoot
    • IConfigurationSection
    • IConfigurationSource
    • MemoryConfigurationBuilderExtensions
    • StreamConfigurationProvider
    • StreamConfigurationSource
  • Microsoft.Extensions.Configuration.Memory
    • MemoryConfigurationProvider
    • MemoryConfigurationSource
  • Microsoft.Extensions.DependencyInjection
    • ActivatorUtilities
    • ActivatorUtilitiesConstructorAttribute
    • AsyncServiceScope
    • DefaultServiceProviderFactory
    • FromKeyedServicesAttribute
    • IKeyedServiceProvider
    • IServiceCollection
    • IServiceProviderFactory<TContainerBuilder>
    • IServiceProviderIsKeyedService
    • IServiceProviderIsService
    • IServiceScope
    • IServiceScopeFactory
    • ISupportRequiredService
    • KeyedService
    • ObjectFactory
    • ObjectFactory<T>
    • ServiceCollection
    • ServiceCollectionContainerBuilderExtensions
    • ServiceCollectionServiceExtensions
    • ServiceDescriptor
    • ServiceKeyAttribute
    • ServiceLifetime
    • ServiceProvider
    • ServiceProviderKeyedServiceExtensions
    • ServiceProviderOptions
    • ServiceProviderServiceExtensions
  • Microsoft.Extensions.DependencyInjection.Extensions
    • ServiceCollectionDescriptorExtensions
  • Microsoft.Extensions.Logging
    • EventId
    • IExternalScopeProvider
    • ILogger
    • ILoggerFactory
    • ILoggerProvider
    • ILogger<TCategoryName>
    • ISupportExternalScope
    • LogDefineOptions
    • LogLevel
    • LoggerExtensions
    • LoggerExternalScopeProvider
    • LoggerFactoryExtensions
    • LoggerMessage
    • LoggerMessageAttribute
    • Logger<T>
  • Microsoft.Extensions.Logging.Abstractions
    • LogEntry<TState>
    • NullLogger
    • NullLoggerFactory
    • NullLoggerProvider
    • NullLogger<T>
  • Microsoft.Extensions.Primitives
    • CancellationChangeToken
    • ChangeToken
    • CompositeChangeToken
    • Extensions
    • IChangeToken
    • StringSegment
    • StringSegmentComparer
    • StringTokenizer
    • StringTokenizer.Enumerator
    • StringValues
    • StringValues.Enumerator
  • Mvccpb
    • Event
    • Event.Types
    • Event.Types.EventType
    • KeyValue
    • KvReflection
  • Test
    • Testt
  • V3Electionpb
    • CampaignRequest
    • CampaignResponse
    • Election
    • Election.ElectionClient
    • ElectionReflection
    • LeaderKey
    • LeaderRequest
    • LeaderResponse
    • ProclaimRequest
    • ProclaimResponse
    • ResignRequest
    • ResignResponse
  • V3Lockpb
    • Lock
    • Lock.LockClient
    • LockReflection
    • LockRequest
    • LockResponse
    • UnlockRequest
    • UnlockResponse
  • Versionpb
    • VersionExtensions
    • VersionReflection

Class ServiceCollectionServiceExtensions

Inheritance
object
ServiceCollectionServiceExtensions
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Microsoft.Extensions.DependencyInjection
Assembly: Microsoft.Extensions.DependencyInjection.Abstractions.dll
Syntax
public static class ServiceCollectionServiceExtensions

Methods

AddKeyedScoped(IServiceCollection, Type, object?)

Declaration
public static IServiceCollection AddKeyedScoped(this IServiceCollection services, Type serviceType, object? serviceKey)
Parameters
Type Name Description
IServiceCollection services
Type serviceType
object serviceKey
Returns
Type Description
IServiceCollection

AddKeyedScoped(IServiceCollection, Type, object?, Func<IServiceProvider, object?, object>)

Declaration
public static IServiceCollection AddKeyedScoped(this IServiceCollection services, Type serviceType, object? serviceKey, Func<IServiceProvider, object?, object> implementationFactory)
Parameters
Type Name Description
IServiceCollection services
Type serviceType
object serviceKey
Func<IServiceProvider, object, object> implementationFactory
Returns
Type Description
IServiceCollection

AddKeyedScoped(IServiceCollection, Type, object?, Type)

Declaration
public static IServiceCollection AddKeyedScoped(this IServiceCollection services, Type serviceType, object? serviceKey, Type implementationType)
Parameters
Type Name Description
IServiceCollection services
Type serviceType
object serviceKey
Type implementationType
Returns
Type Description
IServiceCollection

AddKeyedScoped<TService>(IServiceCollection, object?)

Declaration
public static IServiceCollection AddKeyedScoped<TService>(this IServiceCollection services, object? serviceKey) where TService : class
Parameters
Type Name Description
IServiceCollection services
object serviceKey
Returns
Type Description
IServiceCollection
Type Parameters
Name Description
TService

AddKeyedScoped<TService>(IServiceCollection, object?, Func<IServiceProvider, object?, TService>)

Declaration
public static IServiceCollection AddKeyedScoped<TService>(this IServiceCollection services, object? serviceKey, Func<IServiceProvider, object?, TService> implementationFactory) where TService : class
Parameters
Type Name Description
IServiceCollection services
object serviceKey
Func<IServiceProvider, object, TService> implementationFactory
Returns
Type Description
IServiceCollection
Type Parameters
Name Description
TService

AddKeyedScoped<TService, TImplementation>(IServiceCollection, object?)

Declaration
public static IServiceCollection AddKeyedScoped<TService, TImplementation>(this IServiceCollection services, object? serviceKey) where TService : class where TImplementation : class, TService
Parameters
Type Name Description
IServiceCollection services
object serviceKey
Returns
Type Description
IServiceCollection
Type Parameters
Name Description
TService
TImplementation

AddKeyedScoped<TService, TImplementation>(IServiceCollection, object?, Func<IServiceProvider, object?, TImplementation>)

Declaration
public static IServiceCollection AddKeyedScoped<TService, TImplementation>(this IServiceCollection services, object? serviceKey, Func<IServiceProvider, object?, TImplementation> implementationFactory) where TService : class where TImplementation : class, TService
Parameters
Type Name Description
IServiceCollection services
object serviceKey
Func<IServiceProvider, object, TImplementation> implementationFactory
Returns
Type Description
IServiceCollection
Type Parameters
Name Description
TService
TImplementation

AddKeyedSingleton(IServiceCollection, Type, object?)

Declaration
public static IServiceCollection AddKeyedSingleton(this IServiceCollection services, Type serviceType, object? serviceKey)
Parameters
Type Name Description
IServiceCollection services
Type serviceType
object serviceKey
Returns
Type Description
IServiceCollection

AddKeyedSingleton(IServiceCollection, Type, object?, Func<IServiceProvider, object?, object>)

Declaration
public static IServiceCollection AddKeyedSingleton(this IServiceCollection services, Type serviceType, object? serviceKey, Func<IServiceProvider, object?, object> implementationFactory)
Parameters
Type Name Description
IServiceCollection services
Type serviceType
object serviceKey
Func<IServiceProvider, object, object> implementationFactory
Returns
Type Description
IServiceCollection

AddKeyedSingleton(IServiceCollection, Type, object?, object)

Declaration
public static IServiceCollection AddKeyedSingleton(this IServiceCollection services, Type serviceType, object? serviceKey, object implementationInstance)
Parameters
Type Name Description
IServiceCollection services
Type serviceType
object serviceKey
object implementationInstance
Returns
Type Description
IServiceCollection

AddKeyedSingleton(IServiceCollection, Type, object?, Type)

Declaration
public static IServiceCollection AddKeyedSingleton(this IServiceCollection services, Type serviceType, object? serviceKey, Type implementationType)
Parameters
Type Name Description
IServiceCollection services
Type serviceType
object serviceKey
Type implementationType
Returns
Type Description
IServiceCollection

AddKeyedSingleton<TService>(IServiceCollection, object?)

Declaration
public static IServiceCollection AddKeyedSingleton<TService>(this IServiceCollection services, object? serviceKey) where TService : class
Parameters
Type Name Description
IServiceCollection services
object serviceKey
Returns
Type Description
IServiceCollection
Type Parameters
Name Description
TService

AddKeyedSingleton<TService>(IServiceCollection, object?, Func<IServiceProvider, object?, TService>)

Declaration
public static IServiceCollection AddKeyedSingleton<TService>(this IServiceCollection services, object? serviceKey, Func<IServiceProvider, object?, TService> implementationFactory) where TService : class
Parameters
Type Name Description
IServiceCollection services
object serviceKey
Func<IServiceProvider, object, TService> implementationFactory
Returns
Type Description
IServiceCollection
Type Parameters
Name Description
TService

AddKeyedSingleton<TService>(IServiceCollection, object?, TService)

Declaration
public static IServiceCollection AddKeyedSingleton<TService>(this IServiceCollection services, object? serviceKey, TService implementationInstance) where TService : class
Parameters
Type Name Description
IServiceCollection services
object serviceKey
TService implementationInstance
Returns
Type Description
IServiceCollection
Type Parameters
Name Description
TService

AddKeyedSingleton<TService, TImplementation>(IServiceCollection, object?)

Declaration
public static IServiceCollection AddKeyedSingleton<TService, TImplementation>(this IServiceCollection services, object? serviceKey) where TService : class where TImplementation : class, TService
Parameters
Type Name Description
IServiceCollection services
object serviceKey
Returns
Type Description
IServiceCollection
Type Parameters
Name Description
TService
TImplementation

AddKeyedSingleton<TService, TImplementation>(IServiceCollection, object?, Func<IServiceProvider, object?, TImplementation>)

Declaration
public static IServiceCollection AddKeyedSingleton<TService, TImplementation>(this IServiceCollection services, object? serviceKey, Func<IServiceProvider, object?, TImplementation> implementationFactory) where TService : class where TImplementation : class, TService
Parameters
Type Name Description
IServiceCollection services
object serviceKey
Func<IServiceProvider, object, TImplementation> implementationFactory
Returns
Type Description
IServiceCollection
Type Parameters
Name Description
TService
TImplementation

AddKeyedTransient(IServiceCollection, Type, object?)

Declaration
public static IServiceCollection AddKeyedTransient(this IServiceCollection services, Type serviceType, object? serviceKey)
Parameters
Type Name Description
IServiceCollection services
Type serviceType
object serviceKey
Returns
Type Description
IServiceCollection

AddKeyedTransient(IServiceCollection, Type, object?, Func<IServiceProvider, object?, object>)

Declaration
public static IServiceCollection AddKeyedTransient(this IServiceCollection services, Type serviceType, object? serviceKey, Func<IServiceProvider, object?, object> implementationFactory)
Parameters
Type Name Description
IServiceCollection services
Type serviceType
object serviceKey
Func<IServiceProvider, object, object> implementationFactory
Returns
Type Description
IServiceCollection

AddKeyedTransient(IServiceCollection, Type, object?, Type)

Declaration
public static IServiceCollection AddKeyedTransient(this IServiceCollection services, Type serviceType, object? serviceKey, Type implementationType)
Parameters
Type Name Description
IServiceCollection services
Type serviceType
object serviceKey
Type implementationType
Returns
Type Description
IServiceCollection

AddKeyedTransient<TService>(IServiceCollection, object?)

Declaration
public static IServiceCollection AddKeyedTransient<TService>(this IServiceCollection services, object? serviceKey) where TService : class
Parameters
Type Name Description
IServiceCollection services
object serviceKey
Returns
Type Description
IServiceCollection
Type Parameters
Name Description
TService

AddKeyedTransient<TService>(IServiceCollection, object?, Func<IServiceProvider, object?, TService>)

Declaration
public static IServiceCollection AddKeyedTransient<TService>(this IServiceCollection services, object? serviceKey, Func<IServiceProvider, object?, TService> implementationFactory) where TService : class
Parameters
Type Name Description
IServiceCollection services
object serviceKey
Func<IServiceProvider, object, TService> implementationFactory
Returns
Type Description
IServiceCollection
Type Parameters
Name Description
TService

AddKeyedTransient<TService, TImplementation>(IServiceCollection, object?)

Declaration
public static IServiceCollection AddKeyedTransient<TService, TImplementation>(this IServiceCollection services, object? serviceKey) where TService : class where TImplementation : class, TService
Parameters
Type Name Description
IServiceCollection services
object serviceKey
Returns
Type Description
IServiceCollection
Type Parameters
Name Description
TService
TImplementation

AddKeyedTransient<TService, TImplementation>(IServiceCollection, object?, Func<IServiceProvider, object?, TImplementation>)

Declaration
public static IServiceCollection AddKeyedTransient<TService, TImplementation>(this IServiceCollection services, object? serviceKey, Func<IServiceProvider, object?, TImplementation> implementationFactory) where TService : class where TImplementation : class, TService
Parameters
Type Name Description
IServiceCollection services
object serviceKey
Func<IServiceProvider, object, TImplementation> implementationFactory
Returns
Type Description
IServiceCollection
Type Parameters
Name Description
TService
TImplementation

AddScoped(IServiceCollection, Type)

Declaration
public static IServiceCollection AddScoped(this IServiceCollection services, Type serviceType)
Parameters
Type Name Description
IServiceCollection services
Type serviceType
Returns
Type Description
IServiceCollection

AddScoped(IServiceCollection, Type, Func<IServiceProvider, object>)

Declaration
public static IServiceCollection AddScoped(this IServiceCollection services, Type serviceType, Func<IServiceProvider, object> implementationFactory)
Parameters
Type Name Description
IServiceCollection services
Type serviceType
Func<IServiceProvider, object> implementationFactory
Returns
Type Description
IServiceCollection

AddScoped(IServiceCollection, Type, Type)

Declaration
public static IServiceCollection AddScoped(this IServiceCollection services, Type serviceType, Type implementationType)
Parameters
Type Name Description
IServiceCollection services
Type serviceType
Type implementationType
Returns
Type Description
IServiceCollection

AddScoped<TService>(IServiceCollection)

Declaration
public static IServiceCollection AddScoped<TService>(this IServiceCollection services) where TService : class
Parameters
Type Name Description
IServiceCollection services
Returns
Type Description
IServiceCollection
Type Parameters
Name Description
TService

AddScoped<TService>(IServiceCollection, Func<IServiceProvider, TService>)

Declaration
public static IServiceCollection AddScoped<TService>(this IServiceCollection services, Func<IServiceProvider, TService> implementationFactory) where TService : class
Parameters
Type Name Description
IServiceCollection services
Func<IServiceProvider, TService> implementationFactory
Returns
Type Description
IServiceCollection
Type Parameters
Name Description
TService

AddScoped<TService, TImplementation>(IServiceCollection)

Declaration
public static IServiceCollection AddScoped<TService, TImplementation>(this IServiceCollection services) where TService : class where TImplementation : class, TService
Parameters
Type Name Description
IServiceCollection services
Returns
Type Description
IServiceCollection
Type Parameters
Name Description
TService
TImplementation

AddScoped<TService, TImplementation>(IServiceCollection, Func<IServiceProvider, TImplementation>)

Declaration
public static IServiceCollection AddScoped<TService, TImplementation>(this IServiceCollection services, Func<IServiceProvider, TImplementation> implementationFactory) where TService : class where TImplementation : class, TService
Parameters
Type Name Description
IServiceCollection services
Func<IServiceProvider, TImplementation> implementationFactory
Returns
Type Description
IServiceCollection
Type Parameters
Name Description
TService
TImplementation

AddSingleton(IServiceCollection, Type)

Declaration
public static IServiceCollection AddSingleton(this IServiceCollection services, Type serviceType)
Parameters
Type Name Description
IServiceCollection services
Type serviceType
Returns
Type Description
IServiceCollection

AddSingleton(IServiceCollection, Type, Func<IServiceProvider, object>)

Declaration
public static IServiceCollection AddSingleton(this IServiceCollection services, Type serviceType, Func<IServiceProvider, object> implementationFactory)
Parameters
Type Name Description
IServiceCollection services
Type serviceType
Func<IServiceProvider, object> implementationFactory
Returns
Type Description
IServiceCollection

AddSingleton(IServiceCollection, Type, object)

Declaration
public static IServiceCollection AddSingleton(this IServiceCollection services, Type serviceType, object implementationInstance)
Parameters
Type Name Description
IServiceCollection services
Type serviceType
object implementationInstance
Returns
Type Description
IServiceCollection

AddSingleton(IServiceCollection, Type, Type)

Declaration
public static IServiceCollection AddSingleton(this IServiceCollection services, Type serviceType, Type implementationType)
Parameters
Type Name Description
IServiceCollection services
Type serviceType
Type implementationType
Returns
Type Description
IServiceCollection

AddSingleton<TService>(IServiceCollection)

Declaration
public static IServiceCollection AddSingleton<TService>(this IServiceCollection services) where TService : class
Parameters
Type Name Description
IServiceCollection services
Returns
Type Description
IServiceCollection
Type Parameters
Name Description
TService

AddSingleton<TService>(IServiceCollection, Func<IServiceProvider, TService>)

Declaration
public static IServiceCollection AddSingleton<TService>(this IServiceCollection services, Func<IServiceProvider, TService> implementationFactory) where TService : class
Parameters
Type Name Description
IServiceCollection services
Func<IServiceProvider, TService> implementationFactory
Returns
Type Description
IServiceCollection
Type Parameters
Name Description
TService

AddSingleton<TService>(IServiceCollection, TService)

Declaration
public static IServiceCollection AddSingleton<TService>(this IServiceCollection services, TService implementationInstance) where TService : class
Parameters
Type Name Description
IServiceCollection services
TService implementationInstance
Returns
Type Description
IServiceCollection
Type Parameters
Name Description
TService

AddSingleton<TService, TImplementation>(IServiceCollection)

Declaration
public static IServiceCollection AddSingleton<TService, TImplementation>(this IServiceCollection services) where TService : class where TImplementation : class, TService
Parameters
Type Name Description
IServiceCollection services
Returns
Type Description
IServiceCollection
Type Parameters
Name Description
TService
TImplementation

AddSingleton<TService, TImplementation>(IServiceCollection, Func<IServiceProvider, TImplementation>)

Declaration
public static IServiceCollection AddSingleton<TService, TImplementation>(this IServiceCollection services, Func<IServiceProvider, TImplementation> implementationFactory) where TService : class where TImplementation : class, TService
Parameters
Type Name Description
IServiceCollection services
Func<IServiceProvider, TImplementation> implementationFactory
Returns
Type Description
IServiceCollection
Type Parameters
Name Description
TService
TImplementation

AddTransient(IServiceCollection, Type)

Declaration
public static IServiceCollection AddTransient(this IServiceCollection services, Type serviceType)
Parameters
Type Name Description
IServiceCollection services
Type serviceType
Returns
Type Description
IServiceCollection

AddTransient(IServiceCollection, Type, Func<IServiceProvider, object>)

Declaration
public static IServiceCollection AddTransient(this IServiceCollection services, Type serviceType, Func<IServiceProvider, object> implementationFactory)
Parameters
Type Name Description
IServiceCollection services
Type serviceType
Func<IServiceProvider, object> implementationFactory
Returns
Type Description
IServiceCollection

AddTransient(IServiceCollection, Type, Type)

Declaration
public static IServiceCollection AddTransient(this IServiceCollection services, Type serviceType, Type implementationType)
Parameters
Type Name Description
IServiceCollection services
Type serviceType
Type implementationType
Returns
Type Description
IServiceCollection

AddTransient<TService>(IServiceCollection)

Declaration
public static IServiceCollection AddTransient<TService>(this IServiceCollection services) where TService : class
Parameters
Type Name Description
IServiceCollection services
Returns
Type Description
IServiceCollection
Type Parameters
Name Description
TService

AddTransient<TService>(IServiceCollection, Func<IServiceProvider, TService>)

Declaration
public static IServiceCollection AddTransient<TService>(this IServiceCollection services, Func<IServiceProvider, TService> implementationFactory) where TService : class
Parameters
Type Name Description
IServiceCollection services
Func<IServiceProvider, TService> implementationFactory
Returns
Type Description
IServiceCollection
Type Parameters
Name Description
TService

AddTransient<TService, TImplementation>(IServiceCollection)

Declaration
public static IServiceCollection AddTransient<TService, TImplementation>(this IServiceCollection services) where TService : class where TImplementation : class, TService
Parameters
Type Name Description
IServiceCollection services
Returns
Type Description
IServiceCollection
Type Parameters
Name Description
TService
TImplementation

AddTransient<TService, TImplementation>(IServiceCollection, Func<IServiceProvider, TImplementation>)

Declaration
public static IServiceCollection AddTransient<TService, TImplementation>(this IServiceCollection services, Func<IServiceProvider, TImplementation> implementationFactory) where TService : class where TImplementation : class, TService
Parameters
Type Name Description
IServiceCollection services
Func<IServiceProvider, TImplementation> implementationFactory
Returns
Type Description
IServiceCollection
Type Parameters
Name Description
TService
TImplementation
In this article
Back to top Generated by DocFX