System.Reflection.PseudoCustomAttribute.GetSecurityAttributes C# (CSharp) Method

GetSecurityAttributes() static private method

static private GetSecurityAttributes ( ModuleHandle module, int token, object &securityAttributes ) : void
module System.ModuleHandle
token int
securityAttributes object
return void
        unsafe internal static void GetSecurityAttributes(ModuleHandle module, int token, out object[] securityAttributes)
        {
            _GetSecurityAttributes(module.Value, token, out securityAttributes);
        }
        #endregion

Usage Example

Esempio n. 1
0
        internal static Attribute[] GetCustomAttributes(RuntimeConstructorInfo ctor, RuntimeType caType, bool includeSecCa, out int count)
        {
            count = 0;
            bool flag = caType == (RuntimeType)typeof(object) || caType == (RuntimeType)typeof(Attribute);

            if (!flag && PseudoCustomAttribute.s_pca.GetValueOrDefault(caType) == null && !PseudoCustomAttribute.IsSecurityAttribute(caType))
            {
                return(new Attribute[0]);
            }
            List <Attribute> list = new List <Attribute>();

            if (includeSecCa && (flag || PseudoCustomAttribute.IsSecurityAttribute(caType)))
            {
                object[] array;
                PseudoCustomAttribute.GetSecurityAttributes(ctor.Module.ModuleHandle.GetRuntimeModule(), ctor.MetadataToken, false, out array);
                if (array != null)
                {
                    foreach (object obj in array)
                    {
                        if (caType == obj.GetType() || obj.GetType().IsSubclassOf(caType))
                        {
                            list.Add((Attribute)obj);
                        }
                    }
                }
            }
            count = list.Count;
            return(list.ToArray());
        }
All Usage Examples Of System.Reflection.PseudoCustomAttribute::GetSecurityAttributes