Class Enhancing.Enhancer<TEnhancement>
Wrap and unwrap the instances of model classes with enhancement.
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: AasCore.Aas3_0
Assembly: AasCore.Aas3_0.dll
Syntax
public class Enhancer<TEnhancement> : Enhancing.Unwrapper<TEnhancement> where TEnhancement : class
Type Parameters
Name | Description |
---|---|
TEnhancement | type of the enhancement |
Constructors
| Improve this Doc View SourceEnhancer(Func<IClass, TEnhancement>)
Declaration
public Enhancer(Func<IClass, TEnhancement> enhancementFactory)
Parameters
Type | Name | Description |
---|---|---|
System.Func<IClass, TEnhancement> | enhancementFactory | how to enhance the instances. If it returns |
Methods
| Improve this Doc View SourceWrap(IClass)
Wrap the instance with an enhancement.
Declaration
public IClass Wrap(IClass that)
Parameters
Type | Name | Description |
---|---|---|
IClass | that | model instance to be wrapped |
Returns
Type | Description |
---|---|
IClass |
|
Remarks
Double wraps are not allowed to prevent runtime leakage.
If you use references to the instance objects, you have to update them after the wrapping, as the wrapping is recursive.
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown when |