mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-19 20:39:01 +00:00
Compiler fixes. Updated project.json files. Removed *.lock.json files and updated gitignore to ignore them. Updated some Cosmos.Debug projects.
24 lines
699 B
C#
24 lines
699 B
C#
using System;
|
|
using System.Reflection;
|
|
|
|
namespace Cosmos.IL2CPU
|
|
{
|
|
[AttributeUsage(AttributeTargets.Assembly, Inherited=false, AllowMultiple=true)]
|
|
public class CompilerExtensionAttribute: Attribute
|
|
{
|
|
public readonly Type Type;
|
|
|
|
public CompilerExtensionAttribute(Type type)
|
|
{
|
|
if (type == null)
|
|
{
|
|
throw new ArgumentNullException("type");
|
|
}
|
|
if (!type.GetTypeInfo().IsSubclassOf(typeof(CompilerExtensionBase)))
|
|
{
|
|
throw new ArgumentException("CompilerExtensions should inherit from CompilerExtensionBase!", "type");
|
|
}
|
|
Type = type;
|
|
}
|
|
}
|
|
}
|