Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
NodeConstructedArgs.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 using System;
4 
5 using SiliconStudio.Core.Reflection;
6 using SiliconStudio.Quantum.Contents;
7 
8 namespace SiliconStudio.Quantum
9 {
10  /// <summary>
11  /// Arguments of the <see cref="INodeBuilder.NodeConstructed"/> event.
12  /// </summary>
14  {
15  /// <summary>
16  /// Initializes a new instance of the <see cref="NodeConstructedArgs"/> class.
17  /// </summary>
18  /// <param name="content">The content of the node that has been constructed.</param>
19  public NodeConstructedArgs(IContent content)
20  {
21  TypeDescriptor = content.Descriptor;
22  MemberDescriptor = content is MemberContent ? ((MemberContent)content).Member : null;
23  }
24 
25  /// <summary>
26  /// Gets the type descriptor of the node that has been constructed.
27  /// </summary>
28  public ITypeDescriptor TypeDescriptor { get; private set; }
29 
30  /// <summary>
31  /// Gets the member of the node that has been constructed, if the node corresponds to a member of another object.
32  /// </summary>
33  public IMemberDescriptor MemberDescriptor { get; private set; }
34  }
35 }
Content of a IModelNode.
Definition: IContent.cs:13
An implementation of IContent that gives access to a member of an object.
NodeConstructedArgs(IContent content)
Initializes a new instance of the NodeConstructedArgs class.
Arguments of the INodeBuilder.NodeConstructed event.
Provides access members of a type.