# InstanceGenericFirstDependencyResolver

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-splat/service_location/struct-instancegenericfirstdependencyresolver/

**struct** · [`ferroui-splat`](/docs/0.5.0/api/ferroui-splat/) · v0.5.0

```rust
struct InstanceGenericFirstDependencyResolver
```

A resolver whose registrations belong to the instance, kept per service type and contract
(`InstanceGenericFirstDependencyResolver`). It is the resolver `AppLocator` starts with.

A registration runs the callbacks of its service type and contract; disposing the resolver
drops its registrations, disposes the constants and the created lazy singletons that were
registered as disposable, and runs every callback once more.



[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Splat/service_location/instance_generic_first/instance_generic_first_dependency_resolver.rs#L35)

## Members

- [`new`](#function-new)
- [`with_configuration`](#function-with_configuration)

<a id="function-new"></a>

### new

```rust
fn new() -> Self
```

An empty resolver.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Splat/service_location/instance_generic_first/instance_generic_first_dependency_resolver.rs#L50)

<a id="function-with_configuration"></a>

### with_configuration

```rust
fn with_configuration(configure: impl FnOnce(&dyn IMutableDependencyResolver) -> ()) -> Self
```

A resolver that `configure` registers services with first
(`InstanceGenericFirstDependencyResolver(Action<IMutableDependencyResolver>?)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Splat/service_location/instance_generic_first/instance_generic_first_dependency_resolver.rs#L61)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`IDependencyResolver`](/docs/0.5.0/api/ferroui-splat/service_location/trait-idependencyresolver/)
- [`ReadonlyDependencyResolverExt`](/docs/0.5.0/api/ferroui-splat/service_location/trait-readonlydependencyresolverext/)
- [`MutableDependencyResolverExt`](/docs/0.5.0/api/ferroui-splat/service_location/trait-mutabledependencyresolverext/)
- [`ResolverMixins`](/docs/0.5.0/api/ferroui-splat/service_location/trait-resolvermixins/)
- [`ServiceLocationInitializationExt`](/docs/0.5.0/api/ferroui-splat/service_location/trait-servicelocationinitializationext/)
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `Default`
- [`IReadonlyDependencyResolver`](/docs/0.5.0/api/ferroui-splat/service_location/trait-ireadonlydependencyresolver/)
- [`IMutableDependencyResolver`](/docs/0.5.0/api/ferroui-splat/service_location/trait-imutabledependencyresolver/)
- [`IDisposable`](/docs/0.5.0/api/ferroui-base/reactive/use-idisposable/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
