System.MonoCustomAttrs.GetCustomAttributesBase C# (CSharp) Метод

GetCustomAttributesBase() статический приватный Метод

static private GetCustomAttributesBase ( ICustomAttributeProvider obj, Type attributeType ) : object[]
obj ICustomAttributeProvider
attributeType Type
Результат object[]
		internal static object[] GetCustomAttributesBase (ICustomAttributeProvider obj, Type attributeType)
		{
			object[] attrs;
			if (IsUserCattrProvider (obj))
				attrs = obj.GetCustomAttributes (attributeType, true);
			else
				attrs = GetCustomAttributesInternal (obj, attributeType, false);

			object[] pseudoAttrs = GetPseudoCustomAttributes (obj, attributeType);
			if (pseudoAttrs != null) {
				object[] res = new object [attrs.Length + pseudoAttrs.Length];
				System.Array.Copy (attrs, res, attrs.Length);
				System.Array.Copy (pseudoAttrs, 0, res, attrs.Length, pseudoAttrs.Length);
				return res;
			}
			else
				return attrs;
		}

Usage Example

Пример #1
0
 internal static object[] GetCustomAttributes(ICustomAttributeProvider obj, bool inherit)
 {
     if (obj == null)
     {
         throw new ArgumentNullException("obj");
     }
     if (!inherit)
     {
         return((object[])MonoCustomAttrs.GetCustomAttributesBase(obj, null).Clone());
     }
     return(MonoCustomAttrs.GetCustomAttributes(obj, typeof(MonoCustomAttrs), inherit));
 }
All Usage Examples Of System.MonoCustomAttrs::GetCustomAttributesBase