We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Gets the service object of the specified type, or throws an exception if service not registered.
Namespace: CodeJam.ServicesAssembly: CodeJam.Blocks (in CodeJam.Blocks.dll) Version: 2.0.0.0
C#
public static Object GetRequiredService( this IServiceProvider provider, Type serviceType )
VB
<ExtensionAttribute> Public Shared Function GetRequiredService ( provider As IServiceProvider, serviceType As Type ) As Object
F#
[<ExtensionAttribute>] static member GetRequiredService : provider : IServiceProvider * serviceType : Type -> Object
Type: ObjectA service object of type serviceType.
In Visual Basic and C#, you can call this method as an instance method on any object of type IServiceProvider. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
ServiceProviderHelper ClassGetRequiredService OverloadCodeJam.Services Namespace