Class AutofacServiceResolver
Implementation of IGetsDecoratedServiceFromResolutionInfo which makes use of the functionality within an Autofac.IComponentContext to resolve services.
Inheritance
System.Object
AutofacServiceResolver
Implements
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: CSF.DecoratorBuilder
Assembly: CSF.DecoratorBuilder.Autofac.dll
Syntax
public class AutofacServiceResolver : IGetsSingleObjectFromResolutionInfo
Constructors
| Improve this Doc View SourceAutofacServiceResolver(ILifetimeScope)
Initialises a new instance of AutofacServiceResolver.
Declaration
public AutofacServiceResolver(ILifetimeScope scope)
Parameters
Type | Name | Description |
---|---|---|
Autofac.ILifetimeScope | scope | An autofac lifetime scope. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If |
Methods
| Improve this Doc View SourceGetService(Type, SingleObjectResolutionInfo, Object)
Resolve an instance of the object.
Declaration
public object GetService(Type serviceType, SingleObjectResolutionInfo resolutionInfo, object wrapped = null)
Parameters
Type | Name | Description |
---|---|---|
System.Type | serviceType | The overall service type. |
SingleObjectResolutionInfo | resolutionInfo | The resolution information for the object to resolve. |
System.Object | wrapped | An optional instance of a service to wrap. |
Returns
Type | Description |
---|---|
System.Object | The resolved object. |