public override void ApplyAttributeBuilder (Attribute a, MethodSpec ctor, byte[] cdata, PredefinedAttributes pa) { if (a.IsValidSecurityAttribute ()) { if (declarative_security == null) declarative_security = new Dictionary<SecurityAction, PermissionSet> (); a.ExtractSecurityPermissionSet (declarative_security); return; } if (a.Type == pa.StructLayout) { PartialContainer.HasStructLayout = true; if (a.GetLayoutKindValue () == LayoutKind.Explicit) PartialContainer.HasExplicitLayout = true; } if (a.Type == pa.Dynamic) { a.Error_MisusedDynamicAttribute (); return; } base.ApplyAttributeBuilder (a, ctor, cdata, pa); }
public override void ApplyAttributeBuilder (Attribute a, CustomAttributeBuilder cb, PredefinedAttributes pa) { if (a.IsValidSecurityAttribute ()) { if (declarative_security == null) declarative_security = new ListDictionary (); a.ExtractSecurityPermissionSet (declarative_security); return; } if (a.Type == pa.StructLayout) { PartialContainer.HasStructLayout = true; if (a.GetLayoutKindValue () == LayoutKind.Explicit) PartialContainer.HasExplicitLayout = true; } base.ApplyAttributeBuilder (a, cb, pa); }