Source/NFX/GuidTypeResolver.cs
/// <summary>
/// Returns TypeGuidAttribute for a type.
/// If type is not decorated by the attribute then exception is thrown
/// </summary>
Returns TypeGuidAttribute for a type.
If type is not decorated by the attribute then exception is thrown
Returns TypeGuidAttribute for a type . If type is not decorated by the attribute then exception is thrown
public static A GetGuidTypeAttribute<T, A>(Type type) where A : GuidTypeAttribute
    {
      if (type == null || !typeof(T).IsAssignableFrom(type))
        throw new NFXException(StringConsts.ARGUMENT_ERROR + typeof(A).FullName + ".GetGuidTypeAttribute(todo=null|!" + typeof(T).FullName + ")");
      var result = getGuidTypeAttributeCore<A>(type);
      if (result == null)
        throw new NFXException(StringConsts.GUID_TYPE_RESOLVER_MISSING_ATTRIBUTE_ERROR.Args(type.FullName, typeof(A).FullName));
      return result;
    }
public static A GetGuidTypeAttribute < T , A > ( Type type ) where A : GuidTypeAttribute { if ( type == null || ! typeof ( T ) . IsAssignableFrom ( type ) ) throw new NFXException ( StringConsts . ARGUMENT_ERROR + typeof ( A ) . FullName + " " + typeof ( T ) . FullName + " " ) ; var result = getGuidTypeAttributeCore < A > ( type ) ; if ( result == null ) throw new NFXException ( StringConsts . GUID_TYPE_RESOLVER_MISSING_ATTRIBUTE_ERROR . Args ( type . FullName , typeof ( A ) . FullName ) ) ; return result ; }
Returns TypeGuidAttribute for a type.
Returns TypeGuidAttribute for a type .
type
Type