Class BackwardCompatibilityContext
This class embeds previous event context format (of type object) in order to be backward compatible
Inherited Members
Namespace: Xareus.Scenarios.Context
Assembly: Xareus.Scenarios.dll
Syntax
[Serializable]
public class BackwardCompatibilityContext : IContext, ITypeDescriptorContext, IServiceProvider
Constructors
BackwardCompatibilityContext(object)
Constructor
Declaration
public BackwardCompatibilityContext(object @event)
Parameters
Type | Name | Description |
---|---|---|
object | event |
Properties
Container
Gets the container representing this TypeDescriptor request.
Declaration
public virtual IContainer Container { get; }
Property Value
Type | Description |
---|---|
IContainer | An IContainer with the set of objects for this TypeDescriptor; otherwise, null if there is no container or if the TypeDescriptor does not use outside objects. |
Instance
Gets the object that is connected with this type descriptor request.
Declaration
public virtual object Instance { get; }
Property Value
Type | Description |
---|---|
object | The object that invokes the method on the TypeDescriptor; otherwise, null if there is no object responsible for the call. |
PropertyDescriptor
Gets the PropertyDescriptor that is associated with the given context item.
Declaration
public virtual PropertyDescriptor PropertyDescriptor { get; }
Property Value
Type | Description |
---|---|
PropertyDescriptor | The PropertyDescriptor that describes the given context item; otherwise, null if there is no PropertyDescriptor responsible for the call. |
Methods
Clear()
Clears the context
Declaration
public void Clear()
GetPaths()
Not supported
Declaration
public IEnumerable<string> GetPaths()
Returns
Type | Description |
---|---|
IEnumerable<string> |
GetService(Type)
Gets the service object of the specified type.
Declaration
public virtual object GetService(Type serviceType)
Parameters
Type | Name | Description |
---|---|---|
Type | serviceType | An object that specifies the type of service object to get. |
Returns
Type | Description |
---|---|
object | A service object of type |
GetValue(string)
Find the value for the given path in all IValueParser implementations found
Declaration
public object GetValue(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path |
Returns
Type | Description |
---|---|
object |
GetValueOrDefault(string, object)
Try to find the value for the given path in all IValueParser implementations found
Declaration
public object GetValueOrDefault(string path, object defaultValue = null)
Parameters
Type | Name | Description |
---|---|---|
string | path | |
object | defaultValue |
Returns
Type | Description |
---|---|
object |
HasPath(string)
Checks that the given path exists
Declaration
public bool HasPath(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path |
Returns
Type | Description |
---|---|
bool |
OnComponentChanged()
Raises the ComponentChanged event.
Declaration
public virtual void OnComponentChanged()
OnComponentChanging()
Raises the ComponentChanging event.
Declaration
public virtual bool OnComponentChanging()
Returns
Type | Description |
---|---|
bool |
SetValue(string, object)
Changes or sets the value at the given path
Declaration
public void SetValue(string path, object value)
Parameters
Type | Name | Description |
---|---|---|
string | path | |
object | value |
Union(string, IContext)
Merges the given context into this one at the given path
Declaration
public void Union(string path, IContext other)
Parameters
Type | Name | Description |
---|---|---|
string | path | |
IContext | other |
Union(IContext, bool)
Merges the given context into this one
Declaration
public void Union(IContext other, bool overrideDuplicates = true)
Parameters
Type | Name | Description |
---|---|---|
IContext | other | |
bool | overrideDuplicates | Overrides the values in the current object if the same path is found in the givne context |