Class Scope
Represents the scope.
Namespace: Platform.Scopes
Assembly: Platform.Scopes.dll
Syntax
public class Scope : DisposableBase
Constructors
| Improve this Doc View SourceScope()
Initializes a new Scope instance.
Declaration
public Scope()
Scope(Boolean)
Initializes a new Scope instance.
Declaration
public Scope(bool autoInclude)
Parameters
Type | Name | Description |
---|---|---|
Boolean | autoInclude | A auto include.
|
Scope(Boolean, Boolean)
Initializes a new Scope instance.
Declaration
public Scope(bool autoInclude, bool autoExplore)
Parameters
Type | Name | Description |
---|---|---|
Boolean | autoInclude | A auto include.
|
Boolean | autoExplore | A auto explore.
|
Fields
| Improve this Doc View SourceGlobal
The auto explore.
Declaration
public static readonly Scope Global
Field Value
Type | Description |
---|---|
Scope |
Methods
| Improve this Doc View SourceDispose(Boolean, Boolean)
Disposes the manual.
Declaration
protected override void Dispose(bool manual, bool wasDisposed)
Parameters
Type | Name | Description |
---|---|---|
Boolean | manual | The manual.
|
Boolean | wasDisposed | The was disposed.
|
Exclude(Object)
Excludes the object.
Declaration
public void Exclude(object object)
Parameters
Type | Name | Description |
---|---|---|
Object | object |
Exclude<T>()
Excludes this instance.
Declaration
public void Exclude<T>()
Type Parameters
Name | Description |
---|---|
T | The .
|
ExcludeAssembly(Assembly)
Excludes the assembly using the specified assembly.
Declaration
public void ExcludeAssembly(Assembly assembly)
Parameters
Type | Name | Description |
---|---|---|
Assembly | assembly | The assembly.
|
ExcludeAssemblyOf<T>()
Excludes the assembly of.
Declaration
public void ExcludeAssemblyOf<T>()
Type Parameters
Name | Description |
---|---|
T | The .
|
ExcludeAssemblyOfType(Type)
Excludes the assembly of type using the specified type.
Declaration
public void ExcludeAssemblyOfType(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The type.
|
Include(Object)
Includes the object.
Declaration
public void Include(object object)
Parameters
Type | Name | Description |
---|---|---|
Object | object |
Include<T>()
Includes this instance.
Declaration
public void Include<T>()
Type Parameters
Name | Description |
---|---|
T | The .
|
IncludeAssembly(Assembly)
Includes the assembly using the specified assembly.
Declaration
public void IncludeAssembly(Assembly assembly)
Parameters
Type | Name | Description |
---|---|---|
Assembly | assembly | The assembly.
|
IncludeAssemblyOf<T>()
Includes the assembly of.
Declaration
public void IncludeAssemblyOf<T>()
Type Parameters
Name | Description |
---|---|
T | The .
|
IncludeAssemblyOfType(Type)
Includes the assembly of type using the specified type.
Declaration
public void IncludeAssemblyOfType(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The type.
|
SortConstructors(List<ConstructorInfo>)
Sorts the constructors using the specified result constructors.
Declaration
protected virtual void SortConstructors(List<ConstructorInfo> resultConstructors)
Parameters
Type | Name | Description |
---|---|---|
List<ConstructorInfo> | resultConstructors | The result constructors.
|
TryResolve(Type, out Object)
Determines whether this instance try resolve.
Declaration
public bool TryResolve(Type requiredType, out object resolved)
Parameters
Type | Name | Description |
---|---|---|
Type | requiredType | The required type.
|
Object | resolved | The resolved.
|
Returns
Type | Description |
---|---|
Boolean | The bool
|
TryResolve<T>(out T)
Determines whether this instance try resolve.
Declaration
public bool TryResolve<T>(out T resolved)
Parameters
Type | Name | Description |
---|---|---|
T | resolved | The resolved.
|
Returns
Type | Description |
---|---|
Boolean | The result.
|
Type Parameters
Name | Description |
---|---|
T | The .
|
TryResolveInstance(List<ConstructorInfo>, out Object)
Determines whether this instance try resolve instance.
Declaration
protected virtual bool TryResolveInstance(List<ConstructorInfo> constructors, out object resolved)
Parameters
Type | Name | Description |
---|---|---|
List<ConstructorInfo> | constructors | The constructors.
|
Object | resolved | The resolved.
|
Returns
Type | Description |
---|---|
Boolean | The bool
|
Use(Object)
Uses the object.
Declaration
public void Use(object object)
Parameters
Type | Name | Description |
---|---|---|
Object | object |
Use<T>()
Declaration
public T Use<T>()
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T |
Remarks
TODO: Use Default[T].Instance if the only constructor object has is parameterless. TODO: Think of interface chaining IDoubletLinks[T] (default) -> IDoubletLinks[T] (checker) -> IDoubletLinks[T] (synchronizer) (may be UseChain[IDoubletLinks[T], Types[DefaultLinks, DefaultLinksDependencyChecker, DefaultSynchronizedLinks]] TODO: Add support for factories
UseAndReturn<T>(T)
Uses the and return using the specified object.
Declaration
public T UseAndReturn<T>(T object)
Parameters
Type | Name | Description |
---|---|---|
T | object |
Returns
Type | Description |
---|---|
T | The object.
|
Type Parameters
Name | Description |
---|---|
T | The .
|
UseSingleton<T>(IFactory<T>)
Uses the singleton using the specified factory.
Declaration
public T UseSingleton<T>(IFactory<T> factory)
Parameters
Type | Name | Description |
---|---|---|
IFactory<T> | factory | The factory.
|
Returns
Type | Description |
---|---|
T | The
|
Type Parameters
Name | Description |
---|---|
T | The .
|
UseSingleton<T>(Func<T>)
Uses the singleton using the specified creator.
Declaration
public T UseSingleton<T>(Func<T> creator)
Parameters
Type | Name | Description |
---|---|---|
Func<T> | creator | The creator.
|
Returns
Type | Description |
---|---|
T | The
|
Type Parameters
Name | Description |
---|---|
T | The .
|