Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
ObjectContent.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.References;
7 
8 namespace SiliconStudio.Quantum.Contents
9 {
10  /// <summary>
11  /// An implementation of <see cref="IContent"/> that gives access to an object or a boxed struct.
12  /// </summary>
13  /// <remarks>This content is not serialized by default.</remarks>
14  public class ObjectContent : ContentBase
15  {
16  private object value;
17 
18  public ObjectContent(object value, ITypeDescriptor descriptor, bool isPrimitive, IReference reference)
19  : base(descriptor.Type, descriptor, isPrimitive, reference)
20  {
21  SerializeFlags = ViewModelContentSerializeFlags.None;
22  this.value = value;
23  }
24 
25  public override object Value { get { return value; } set { this.value = value; } }
26  }
27 }
A base abstract implementation of the IContent interface.
Definition: ContentBase.cs:13
An implementation of IContent that gives access to an object or a boxed struct.
ObjectContent(object value, ITypeDescriptor descriptor, bool isPrimitive, IReference reference)
Provides access members of a type.