static IEnumerable <_IAttributeInfo> GetCustomAttributes(
            MethodInfo method,
            string assemblyQualifiedAttributeTypeName)
        {
            Guard.ArgumentNotNull(nameof(method), method);
            Guard.ArgumentNotNull(nameof(assemblyQualifiedAttributeTypeName), assemblyQualifiedAttributeTypeName);

            var attributeType = ReflectionAttributeNameCache.GetType(assemblyQualifiedAttributeTypeName);

            Guard.ArgumentValidNotNull(nameof(assemblyQualifiedAttributeTypeName), $"Could not load type: '{assemblyQualifiedAttributeTypeName}'", attributeType);

            return(GetCustomAttributes(method, attributeType, ReflectionAttributeInfo.GetAttributeUsage(attributeType)));
        }
示例#2
0
 /// <inheritdoc/>
 public IEnumerable <IAttributeInfo> GetCustomAttributes(string assemblyQualifiedAttributeTypeName)
 {
     return(ReflectionAttributeInfo.GetCustomAttributes(Type, assemblyQualifiedAttributeTypeName).ToList());
 }
示例#3
0
        /// <inheritdoc/>
        public IReadOnlyCollection <_IAttributeInfo> GetCustomAttributes(string assemblyQualifiedAttributeTypeName)
        {
            Guard.ArgumentNotNull(assemblyQualifiedAttributeTypeName);

            return(ReflectionAttributeInfo.GetCustomAttributes(Type, assemblyQualifiedAttributeTypeName).CastOrToList());
        }
示例#4
0
        static IEnumerable <IAttributeInfo> GetCustomAttributes(MethodInfo method, string assemblyQualifiedAttributeTypeName)
        {
            var attributeType = ReflectionAttributeNameCache.GetType(assemblyQualifiedAttributeTypeName);

            return(GetCustomAttributes(method, attributeType, ReflectionAttributeInfo.GetAttributeUsage(attributeType)));
        }
示例#5
0
        /// <inheritdoc/>
        public IEnumerable <_IAttributeInfo> GetCustomAttributes(string assemblyQualifiedAttributeTypeName)
        {
            Guard.ArgumentNotNull(nameof(assemblyQualifiedAttributeTypeName), assemblyQualifiedAttributeTypeName);

            return(ReflectionAttributeInfo.GetCustomAttributes(Type, assemblyQualifiedAttributeTypeName).CastOrToList());
        }