ServiceLocatorMixins.GetServiceWithContract(IServiceLocator, string?) method¶
Defined in
Type: ServiceLocatorMixins
Namespace: ReactiveMarbles.Locator
Assembly: ReactiveMarbles.ViewModel.Core.dll
Applies to
net8.0, net8.0-android34.0, net8.0-ios17.2, net8.0-windows10.0.19041, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, net8.0-maccatalyst17.2, netstandard2.0, net462
public static T GetServiceWithContract<T>(this IServiceLocator serviceLocator, string? contract = null)
Summary: Gets the service.
Type parameters
| Name | Description |
|---|---|
T | The type. |
Parameters
| Name | Type | Description |
|---|---|---|
serviceLocator | [IServiceLocator](# | The service locator. |
contract = null | string? | The contract. |
Returns: T -- An instance of T.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | serviceLocator. |