Skip to content

)} )} )} )}

SplatContainerExtension.Register(Type, Type) method

Defined in

Type: SplatContainerExtension Namespace: Splat.Prism Assembly: Splat.Prism.dll

Applies to

net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net462, net481, net471

Overloads

  • 1. public IContainerRegistry Register(Type from, Type to)
  • 2. public IContainerRegistry Register(Type from, Type to, Func<object> defaultCreationFunc)
  • 3. public IContainerRegistry Register(Type from, Type to, string name)
  • 4. public IContainerRegistry Register(Type type, Func<object> factoryMethod)
  • 5. public IContainerRegistry Register(Type type, Func<IContainerProvider, object> factoryMethod)
  • 6. public IContainerRegistry Register(Type from, Type to, string name, Func<object> defaultCreationFunc)

1. Overload

public IContainerRegistry Register(Type from, Type to)

View source

Inherited documentation

These docs were inherited from IContainerRegistry. The member doesn't override them on this type.

Parameters

NameTypeDescription
fromType--
toType--

Returns: IContainerRegistry

2. Overload

public IContainerRegistry Register(Type from, Type to, Func<object> defaultCreationFunc)

View source

Summary: Registers an object with the default registration func.

Parameters

NameTypeDescription
fromTypeThe type to transform from.
toTypeThe type to transform to.
defaultCreationFuncFuncA creation func for generating the type.

Returns: IContainerRegistry -- The container registry for builder operations.

3. Overload

public IContainerRegistry Register(Type from, Type to, string name)

View source

Inherited documentation

These docs were inherited from IContainerRegistry. The member doesn't override them on this type.

Parameters

NameTypeDescription
fromType--
toType--
namestring--

Returns: IContainerRegistry

4. Overload

public IContainerRegistry Register(Type type, Func<object> factoryMethod)

View source

Inherited documentation

These docs were inherited from IContainerRegistry. The member doesn't override them on this type.

Parameters

NameTypeDescription
typeType--
factoryMethodFunc--

Returns: IContainerRegistry

5. Overload

public IContainerRegistry Register(Type type, Func<IContainerProvider, object> factoryMethod)

View source

Inherited documentation

These docs were inherited from IContainerRegistry. The member doesn't override them on this type.

Parameters

NameTypeDescription
typeType--
factoryMethodFunc--

Returns: IContainerRegistry

6. Overload

public IContainerRegistry Register(Type from, Type to, string name, Func<object> defaultCreationFunc)

View source

Summary: Registers an object with the default registration func.

Parameters

NameTypeDescription
fromTypeThe type to transform from.
toTypeThe type to transform to.
namestringThe contract name.
defaultCreationFuncFuncA creation func for generating the type.

Returns: IContainerRegistry -- The container registry for builder operations.