public void AssertIsAssignableFrom(IHasType other) { if (!IsAssignableFrom(other)) { throw new TypeMismatchException(this, other); } }
public static bool Is(this IHasType hasType, string typeFullName) { return(hasType.Type.FullName == typeFullName); }
public static IEnumerable <ICommonType> GetInheritanceCommonTypesFromThisAssembly(this ICommonAssembly commonAssembly, IHasType baseHasType) { return(commonAssembly.GetInheritanceCommonTypesFromThisAssembly(baseHasType.Type)); }
public static bool TryGetCommonTypeFromThisAssembly(this ICommonAssembly commonAssembly, IHasType hasType, out ICommonType foundCommonType) { return((foundCommonType = commonAssembly.GetCommonTypeFromThisAssembly(hasType)) != null); }
public bool IsAssignableFrom(IHasType other) { return(Equals(other.GetType())); }
public static bool TryGetAttribute(this IHasAttributes hasAttributes, IHasType attributeHasType, out ICommonAttribute foundCommonAttribute) { return((foundCommonAttribute = hasAttributes.GetAttribute(attributeHasType)) != null); }
public static IEnumerable <ICommonAttribute> GetAttributes(this IHasAttributes hasAttributes, IHasType attributeHasType) { return(hasAttributes.GetAttributes(attributeHasType.Type)); }
public static bool TryGetReflectionAttribute <TAttribute>(this IHasType hasType, out TAttribute foundAttribute) where TAttribute : Attribute { return((foundAttribute = hasType.GetReflectionAttribute <TAttribute>()) != null); }
public static TAttribute GetReflectionAttribute <TAttribute>(this IHasType hasType, bool throwExceptionIfNotFound = false) where TAttribute : Attribute { return((TAttribute)hasType.GetReflectionAttribute(typeof(TAttribute), throwExceptionIfNotFound)); }
public static bool IsNotInheritedFrom(this IHasType hasType, IHasType thatHasType) { return(!hasType.IsInheritedFrom(thatHasType)); }
public static IEnumerable <TAttribute> GetReflectionAttributes <TAttribute>(this IHasType hasType) where TAttribute : Attribute { return(hasType.Type.GetCustomAttributes <TAttribute>(false)); }
public static bool IsInheritedFrom(this IHasType hasType, Type type) { return(type.IsAssignableFrom(hasType.Type)); }
public static bool IsNot(this IHasType hasType, IHasType thatHasType) { return(!hasType.Is(thatHasType)); }
public static bool IsNot(this IHasType hasType, string typeFullName) { return(!hasType.Is(typeFullName)); }
public static FakeCommonTypeBuilder Create(string typeName, IHasType commonBaseType) { return(new FakeCommonTypeBuilder(typeName, commonBaseType?.Type)); }
public static Attribute GetReflectionAttribute(this IHasType hasType, Type attributeType, bool throwExceptionIfNotFound = false) { return((Attribute)hasType.Type.GetCustomAttributes(attributeType, false).SingleOrDefault(throwExceptionIfNotFound, attributeType.FullName)); }
public static bool NotContainsAttribute(this IHasAttributes hasAttributes, IHasType attributeHasType) { return(!hasAttributes.ContainsAttribute(attributeHasType)); }
public static bool ContainsReflectionAttribute <TAttribute>(this IHasType hasType) where TAttribute : Attribute { return(hasType.ContainsReflectionAttribute(typeof(TAttribute))); }
public static ICommonAttribute GetAttribute(this IHasAttributes hasAttributes, IHasType attributeHasType, bool throwExceptionIfNotFound = false) { return(hasAttributes.GetAttribute(attributeHasType.Type, throwExceptionIfNotFound)); }
public static bool ContainsReflectionAttribute(this IHasType hasType, Type attributeType) { return(hasType.Type.GetCustomAttributes(attributeType, false).Any()); }
public static IEnumerable <ICommonProperty> GetProperties(this IHasProperties hasProperties, IHasType hasType) { return(hasProperties.GetProperties(hasType.Type)); }
public static bool ContainsReflectionAttribute(this IHasType hasType, IHasType attributeHasType) { return(hasType.ContainsReflectionAttribute(attributeHasType.Type)); }
public bool IsAssignableTo(IHasType other) { return(other.GetType().IsAssignableFrom(this)); }
public static bool NotContainsReflectionAttribute <TAttribute>(this IHasType hasType) where TAttribute : Attribute { return(!hasType.ContainsReflectionAttribute <TAttribute>()); }
public void AssertIsAssignableTo(IHasType other) { other.GetType().AssertIsAssignableFrom(this); }
public static bool NotContainsReflectionAttribute(this ICommonConstructor commonConstructor, IHasType attributeHasType) { return(!commonConstructor.ContainsReflectionAttribute(attributeHasType)); }
public static ICommonType GetCommonTypeFromThisAssembly(this ICommonAssembly commonAssembly, IHasType hasType, bool throwExceptionIfNotFound = false) { return(commonAssembly.GetCommonTypeFromThisAssembly(hasType.Type, throwExceptionIfNotFound)); }
public static ISymbol GetSymbol(this IHasType type, GenerationOptions opts) { return(opts.SymbolTable[type.Type.CType]); }
public static bool NotContainsReflectionAttribute(this ICommonAssembly commonAssembly, IHasType attributeHasType) { return(!commonAssembly.ContainsReflectionAttribute(attributeHasType)); }
public static bool NotContainsReflectionAttribute(this IHasType hasType, Type attributeType) { return(!hasType.ContainsReflectionAttribute(attributeType)); }