Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
NodeConstructingArgs.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 
7 namespace SiliconStudio.Quantum
8 {
9  /// <summary>
10  /// Arguments of the <see cref="INodeBuilder.NodeConstructing"/> event.
11  /// </summary>
13  {
14  /// <summary>
15  /// Initializes a new instance of the <see cref="NodeConstructingArgs"/> class.
16  /// </summary>
17  /// <param name="containerObjectDescriptor">The descriptor of the container of the member being constructed, or of the object itself it is a root object.</param>
18  /// <param name="memberDescriptor">The member descriptor of the object being constructed if it is a member, or <c>null</c> otherwise.</param>
19  public NodeConstructingArgs(ObjectDescriptor containerObjectDescriptor, MemberDescriptorBase memberDescriptor)
20  {
21  if (containerObjectDescriptor == null) throw new ArgumentNullException("containerObjectDescriptor");
22  ContainerObjectDescriptor = containerObjectDescriptor;
23  MemberDescriptor = memberDescriptor;
24  }
25 
26  /// <summary>
27  /// Gets the descriptor of the container of the member being constructed, or of the object itself it is a root object.
28  /// </summary>
29  public ObjectDescriptor ContainerObjectDescriptor { get; private set; }
30 
31  /// <summary>
32  /// Gets the member descriptor of the object being constructed if it is a member, or <c>null</c> otherwise.
33  /// </summary>
34  public MemberDescriptorBase MemberDescriptor { get; private set; }
35 
36  /// <summary>
37  /// Gets or sets whether this node should be discarded (not constructed).
38  /// </summary>
39  public bool Discard { get; set; }
40  }
41 }
NodeConstructingArgs(ObjectDescriptor containerObjectDescriptor, MemberDescriptorBase memberDescriptor)
Initializes a new instance of the NodeConstructingArgs class.
Default implementation of a ITypeDescriptor.
Base class for IMemberDescriptor for a MemberInfo
Arguments of the INodeBuilder.NodeConstructing event.