Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
DataSerializerAttribute.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 namespace SiliconStudio.Core.Serialization.Serializers
6 {
7  /// <summary>
8  /// Use this attribute on a class to specify its data serializer type.
9  /// </summary>
10  [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct)]
12  {
13  /// <summary>
14  /// Initializes a new instance of the <see cref="DataSerializerAttribute"/> class.
15  /// </summary>
16  /// <param name="dataSerializerType">Type of the data serializer.</param>
17  public DataSerializerAttribute(Type dataSerializerType)
18  {
19  DataSerializerType = dataSerializerType;
20  }
21 
22  /// <summary>
23  /// Gets the type of the data serializer.
24  /// </summary>
25  /// <value>
26  /// The type of the data serializer.
27  /// </value>
29 
31  }
32 }
DataSerializerAttribute(Type dataSerializerType)
Initializes a new instance of the DataSerializerAttribute class.
DataSerializerGenericMode
Defines what generic parameters to pass to the serializer.
The type of the serialized type will be passed as a generic arguments of the serializer. Example: serializer of A becomes instantiated as Serializer{A}.
Use this attribute on a class to specify its data serializer type.