Show / Hide Table of Contents

Interface IActivator

Contract for a service used for object instantiation based on ITypeInfo.

Namespace: Kephas.Activation
Assembly: Kephas.Core.dll
Syntax
public interface IActivator

Methods

| Improve this Doc View Source

CreateInstance(ITypeInfo, IEnumerable<Object>, IContext)

Creates an instance of the provided ITypeInfo.

Declaration
object CreateInstance(ITypeInfo typeInfo, IEnumerable<object> args = null, IContext activationContext = null)
Parameters
Type Name Description
ITypeInfo typeInfo

Indicates the ITypeInfo used for the instantiation.

System.Collections.Generic.IEnumerable<System.Object> args

Constructor arguments.

IContext activationContext

Context for the activation.

Returns
Type Description
System.Object

An instance of the provided ITypeInfo.

Remarks

The typeInfo may be either an implementation type or an abstract type. If an abstract type is provided, then an implementation type is determined first and then instantiated.

| Improve this Doc View Source

GetImplementationType(ITypeInfo, IContext, Boolean)

Gets the type implementing the abstract type provided as the parameter.

Declaration
ITypeInfo GetImplementationType(ITypeInfo abstractType, IContext activationContext = null, bool throwOnNotFound = true)
Parameters
Type Name Description
ITypeInfo abstractType

Indicates the abstract type.

IContext activationContext

Context for the activation.

System.Boolean throwOnNotFound

Indicates whether to throw an exception if an implementation type is not found.

Returns
Type Description
ITypeInfo

The implementation type for the provided ITypeInfo.

Extension Methods

DynamicObjectExtensions.SetPropertyValue(Object, String, Object)
DynamicObjectExtensions.TrySetPropertyValue(Object, String, Object)
DynamicObjectExtensions.GetPropertyValue(Object, String)
DynamicObjectExtensions.TryGetPropertyValue(Object, String, out Object)
DynamicObjectExtensions.GetRuntimeTypeInfo(Object)
DynamicObjectExtensions.ToDynamic(Object)
DynamicObjectExtensions.ToExpando(Object)
BehaviorValue.ToBehaviorValue<TValue>(TValue)
CollectionExtensions.AddRange<T, TItem>(T, IEnumerable<TItem>)
LoggingExtensions.GetLogger(Object, IContext)
TypeExtensions.GetAbstractType(Object)
TypeExtensions.GetAbstractTypeInfo(Object)
ReflectionHelper.GetTypeInfo(Object)
EntityEntryExtensions.TryGetAttachedEntityEntry(Object)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX