Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
CompilerAttribute.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.Assets.Compiler
6 {
7  /// <summary>
8  /// Attribute to define for a <see cref="IAssetCompiler"/> for a <see cref="Asset"/>.
9  /// </summary>
10  [AttributeUsage(AttributeTargets.Class)]
11  public abstract class CompilerAttribute : Attribute
12  {
13  private readonly string typeName;
14 
15  /// <summary>
16  /// Gets the name of the <see cref="CompilerAttribute"/> type
17  /// </summary>
18  /// <value>The name of the serializable type.</value>
19  public string CompilerTypeName
20  {
21  get { return typeName; }
22  }
23 
24  /// <summary>
25  /// Initializes a new instance of the <see cref="CompilerAttribute"/> class.
26  /// </summary>
27  /// <param name="type">The type must be of type <see cref="IAssetCompiler"/>.</param>
28  protected CompilerAttribute(Type type)
29  {
30  typeName = type.AssemblyQualifiedName;
31  }
32 
33  /// <summary>
34  /// Initializes a new instance of the <see cref="CompilerAttribute"/> class.
35  /// </summary>
36  /// <param name="typeName">The type must be of type <see cref="IAssetCompiler"/>.</param>
37  protected CompilerAttribute(string typeName)
38  {
39  this.typeName = typeName;
40  }
41  }
42 }
CompilerAttribute(string typeName)
Initializes a new instance of the CompilerAttribute class.
CompilerAttribute(Type type)
Initializes a new instance of the CompilerAttribute class.
Attribute to define for a IAssetCompiler for a Asset.