CalculationContext Class |
Namespace: AGI.Foundation.Infrastructure
The CalculationContext type exposes the following members.
Name | Description | |
---|---|---|
CalculationContext |
Initializes a new calculation context with default facets.
| |
CalculationContext(CalculationContext, CopyContext) | Initializes a new instance as a copy of an existing instance. |
Name | Description | |
---|---|---|
CalculationContextStorageStrategy |
Gets or sets the strategy that is used to store calculation contexts.
The default strategy ensures that each thread has its own context.
| |
DefaultForNewContexts |
Gets or sets the calculation context to use for contexts that do not yet have a calculation context.
When using the default CalculationContextStorageStrategy, a context
is a thread so this property specifies the calculation context that will be used for new
threads that do not yet have a CalculationContext.
| |
Instance |
Gets or sets the current calculation context.
By default, each thread has its own context.
| |
IsThreadSafe |
Gets a value indicating whether the methods on this instance are safe to call from
multiple threads simultaneously.
|
Name | Description | |
---|---|---|
AddFacet |
Adds a facet to the context.
| |
Clone |
Clones this object using the specified context.
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetFacet |
Gets the facet with the given ID.
| |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetNextFacetId |
Gets the next available facet ID. Each time this method is called a unique ID is returned.
It is safe to call this method from multiple threads simultaneously.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
CalculationContexts start off empty. It is up to each facet to decide what to do when the facet does not yet exist in the context. See the documentation for each facet for more information about that specific facet's behavior.