Skip to content

@)} @)}

IGetServices.TryGetLazyService(Lazy) method

Defined in

Type: IGetServices Namespace: ReactiveMarbles.Locator Assembly: ReactiveMarbles.Locator.dll

Applies to

net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.0

Overloads

  • 1. bool TryGetLazyService<T>(out Lazy<T> service)
  • 2. bool TryGetLazyService<T>(string contract, out Lazy<T> service)

1. Overload

bool TryGetLazyService<T>(out Lazy<T> service)

Summary: Try and get the lazy service.

Type parameters

NameDescription
TThe service type.

Parameters

NameTypeDescription
out serviceLazyThe lazy service.

Returns: bool -- A value indicating whether the service exists.

2. Overload

bool TryGetLazyService<T>(string contract, out Lazy<T> service)

Summary: Try and get the lazy service.

Type parameters

NameDescription
TThe service type.

Parameters

NameTypeDescription
contractstringThe contract.
out serviceLazyThe lazy service.

Returns: bool -- A value indicating whether the service exists.