Show / Hide Table of Contents

Class MefPartBuilder

A MEF part builder.

Inheritance
System.Object
MefPartBuilder
Implements
IPartBuilder
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Kephas.Composition.Mef.Conventions
Assembly: Kephas.Composition.Mef.dll
Syntax
public class MefPartBuilder : IPartBuilder

Constructors

| Improve this Doc View Source

MefPartBuilder(Type, Func<ICompositionContext, Object>)

Initializes a new instance of the MefPartBuilder class.

Declaration
public MefPartBuilder(Type contractType, Func<ICompositionContext, object> instanceFactory)
Parameters
Type Name Description
System.Type contractType

Type of the contract.

System.Func<ICompositionContext, System.Object> instanceFactory

The instance factory.

| Improve this Doc View Source

MefPartBuilder(Type, Object)

Initializes a new instance of the MefPartBuilder class.

Declaration
public MefPartBuilder(Type contractType, object instance)
Parameters
Type Name Description
System.Type contractType

Type of the contract.

System.Object instance

The instance.

Properties

| Improve this Doc View Source

ContractType

Gets the type of the contract.

Declaration
public Type ContractType { get; }
Property Value
Type Description
System.Type

The type of the contract.

| Improve this Doc View Source

Instance

Gets the instance.

Declaration
public object Instance { get; }
Property Value
Type Description
System.Object

The instance.

| Improve this Doc View Source

InstanceFactory

Gets the instance factory.

Declaration
public Func<ICompositionContext, object> InstanceFactory { get; }
Property Value
Type Description
System.Func<ICompositionContext, System.Object>

The instance factory.

| Improve this Doc View Source

IsScoped

Gets a value indicating whether this object is scoped.

Declaration
public bool IsScoped { get; }
Property Value
Type Description
System.Boolean

True if this object is scoped, false if not.

| Improve this Doc View Source

IsSingleton

Gets a value indicating whether this object is shared.

Declaration
public bool IsSingleton { get; }
Property Value
Type Description
System.Boolean

True if this object is shared, false if not.

Methods

| Improve this Doc View Source

Scoped()

Mark the part as being shared within the scope.

Declaration
public IPartBuilder Scoped()
Returns
Type Description
IPartBuilder

A part builder allowing further configuration of the part.

| Improve this Doc View Source

Singleton()

Mark the part as being shared within the entire composition.

Declaration
public IPartBuilder Singleton()
Returns
Type Description
IPartBuilder

A part builder allowing further configuration of the part.

Explicit Interface Implementations

| Improve this Doc View Source

IPartBuilder.AllowMultiple(Boolean)

Indicates that this service allows multiple registrations.

Declaration
IPartBuilder IPartBuilder.AllowMultiple(bool value)
Parameters
Type Name Description
System.Boolean value

True if multiple service registrations are allowed, false otherwise.

Returns
Type Description
IPartBuilder

A part builder allowing further configuration of the part.

Implements

IPartBuilder

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