/// <summary> /// Creates a new instance of the attributed type resolver. /// </summary> /// <param name="types">An enumerable of attributed types.</param> /// <param name="inherit">A boolean flag to search the type's inheritance chain to find the attribute.</param> /// <returns>Returns a new instance of the attributed type resolver.</returns> public static AttributedTypeResolver <TAttribute> Create(IEnumerable <Type> types, bool inherit = false) { var resolver = new AttributedTypeResolver <TAttribute>(); resolver.Initialize(types, inherit); return(resolver); }