Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
SiliconStudio.Quantum.ModelNodeExtensions Class Reference

Static Public Member Functions

static IModelNode GetChild (this IModelNode modelNode, string name)
 Retrieve the child node of the given IModelNode that matches the given name. More...
 
static IModelNode GetReferencedChild (this IModelNode modelNode, string name)
 Retrieve the child node of the given IModelNode that matches the given name. If the node represents an object reference, it returns the referenced object. More...
 
static IModelNode GetChildThroughReferences (this IModelNode modelNode, string name)
 Gets the child of the given node that matches the given name. If the given node holds an object reference, resolve the target of the reference and gets the child of the target node that matches the given name. More...
 
static IModelNode ResolveTarget (this IModelNode modelNode)
 Gets the target node of the given IModelNode if it holds an object reference, or returns the node itself otherwise More...
 
static bool IsPrimitiveCollection (this ITypeDescriptor descriptor)
 Gets whether a given ITypeDescriptor represents a collection or a dictionary of primitive values. More...
 

Detailed Description

Definition at line 11 of file ModelNodeExtensions.cs.

Member Function Documentation

static IModelNode SiliconStudio.Quantum.ModelNodeExtensions.GetChild ( this IModelNode  modelNode,
string  name 
)
static

Retrieve the child node of the given IModelNode that matches the given name.

Parameters
modelNodeThe view model node to look into.
nameThe name of the child to retrieve.
Returns
The child node that matches the given name, or null if no child matches.

Definition at line 19 of file ModelNodeExtensions.cs.

static IModelNode SiliconStudio.Quantum.ModelNodeExtensions.GetChildThroughReferences ( this IModelNode  modelNode,
string  name 
)
static

Gets the child of the given node that matches the given name. If the given node holds an object reference, resolve the target of the reference and gets the child of the target node that matches the given name.

Parameters
modelNodeThe model node.
nameThe name of the child to retrieve.
Returns

Definition at line 43 of file ModelNodeExtensions.cs.

static IModelNode SiliconStudio.Quantum.ModelNodeExtensions.GetReferencedChild ( this IModelNode  modelNode,
string  name 
)
static

Retrieve the child node of the given IModelNode that matches the given name. If the node represents an object reference, it returns the referenced object.

Parameters
modelNodeThe view model node to look into.
nameThe name of the child to retrieve.
Returns
The child node that matches the given name, or the referenced node if the child hold an object reference, or null if no child matches.

Definition at line 30 of file ModelNodeExtensions.cs.

static bool SiliconStudio.Quantum.ModelNodeExtensions.IsPrimitiveCollection ( this ITypeDescriptor  descriptor)
static

Gets whether a given ITypeDescriptor represents a collection or a dictionary of primitive values.

Parameters
descriptorThe type descriptor to check.
Returns
true if the given ITypeDescriptor represents a collection or a dictionary of primitive values, false otherwise.

Definition at line 66 of file ModelNodeExtensions.cs.

References SiliconStudio.Core.Reflection.Nullable.

static IModelNode SiliconStudio.Quantum.ModelNodeExtensions.ResolveTarget ( this IModelNode  modelNode)
static

Gets the target node of the given IModelNode if it holds an object reference, or returns the node itself otherwise

Parameters
modelNodeThe node that may contains an object reference.
Returns
The target node of the given IModelNode if it holds an object reference, or the node itself otherwise.

Definition at line 54 of file ModelNodeExtensions.cs.


The documentation for this class was generated from the following file: