using System;
namespace UnityEngineInternal
{
public enum TypeInferenceRules
{
///
/// (typeof(T)) as T
///
TypeReferencedByFirstArgument,
///
/// (, typeof(T)) as T
///
TypeReferencedBySecondArgument,
///
/// (typeof(T)) as (T)
///
ArrayOfTypeReferencedByFirstArgument,
///
/// (T) as T
///
TypeOfFirstArgument,
}
///
/// Adds a special type inference rule to a method.
///
[Serializable]
[AttributeUsage(AttributeTargets.Method)]
public class TypeInferenceRuleAttribute : Attribute
{
private readonly string _rule;
public TypeInferenceRuleAttribute(TypeInferenceRules rule)
: this(rule.ToString())
{
}
public TypeInferenceRuleAttribute(string rule)
{
_rule = rule;
}
public override string ToString()
{
return _rule;
}
}
}