Class Trie
This context type uses a tree to store elements. Although it seems more natural and intuitive, it's not quite efficient
Implements
ITypeDescriptorContext
Assembly: Xareus.Scenarios.dll
Syntax
public class Trie : IContext, ITypeDescriptorContext, IServiceProvider
Constructors
Trie()
Declaration
Properties
Container
Declaration
public virtual IContainer Container { get; }
Property Value
Type |
Description |
IContainer |
An System.ComponentModel.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.
|
NodeValue
The value of the current node
Declaration
public object NodeValue { get; set; }
Property Value
PropertyDescriptor
Gets the System.ComponentModel.PropertyDescriptor that is associated with the given context item.
Declaration
public virtual PropertyDescriptor PropertyDescriptor { get; }
Property Value
Type |
Description |
PropertyDescriptor |
The System.ComponentModel.PropertyDescriptor that describes the given context item; otherwise, null if there is no System.ComponentModel.PropertyDescriptor responsible for the call.
|
Methods
Add(string, Trie)
Declaration
public void Add(string key, Trie child)
Parameters
Type |
Name |
Description |
string |
key |
the key to the child trie
|
Trie |
child |
the child trie
|
Clear()
Declaration
GetPaths()
Declaration
public IEnumerable<string> GetPaths()
Returns
GetPaths(string, KeyValuePair<string, Trie>)
Declaration
protected List<string> GetPaths(string currentPath, KeyValuePair<string, Trie> current)
Parameters
Returns
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 serviceType .
-or-
null if there is no service object of type serviceType .
|
GetValue(string)
Declaration
public object GetValue(string path)
Parameters
Type |
Name |
Description |
string |
path |
|
Returns
GetValueOrDefault(string, object)
Declaration
public object GetValueOrDefault(string path, object defaultValue = null)
Parameters
Returns
HasPath(string)
Declaration
public bool HasPath(string path)
Parameters
Type |
Name |
Description |
string |
path |
|
Returns
OnComponentChanged()
Declaration
public virtual void OnComponentChanged()
OnComponentChanging()
Declaration
public virtual bool OnComponentChanging()
Returns
Type |
Description |
bool |
true if this object can be changed; otherwise, false.
|
SetValue(string, object)
Declaration
public void SetValue(string path, object value)
Parameters
ToString()
Declaration
public override string ToString()
Returns
Overrides
Union(string, IContext)
Declaration
public void Union(string path, IContext other)
Parameters
Union(IContext, bool)
Declaration
public void Union(IContext other, bool overrideDuplicates = true)
Parameters
Type |
Name |
Description |
IContext |
other |
|
bool |
overrideDuplicates |
|
Implements
System.ComponentModel.ITypeDescriptorContext