public SecurityAttributeVM(SecurityAttribute sa, ModuleDef ownerModule, IDecompilerService decompilerService, TypeDef ownerType, MethodDef ownerMethod) { origSa = sa; this.ownerModule = ownerModule; CANamedArgumentsVM = new CANamedArgumentsVM(ownerModule, decompilerService, ownerType, ownerMethod, a => { // The named args blob length must also be at most 0x1FFFFFFF bytes but we can't verify it here return a.Collection.Count < ModelUtils.COMPRESSED_UINT32_MAX; }); CANamedArgumentsVM.Collection.CollectionChanged += Args_CollectionChanged; Reinitialize(); }
void Add(SecurityAttribute obj) { AddToStack(obj); }
void Add(SecurityAttribute secAttr) { if (secAttr == null) return; Add(secAttr.AttributeType); Add(secAttr.NamedArguments); }
void InitializeFrom(SecurityAttribute sa) { AttributeType = sa.AttributeType; CANamedArgumentsVM.InitializeFrom(sa.NamedArguments); }
public SecurityAttribute CreateSecurityAttribute() { var sa = new SecurityAttribute(AttributeType); sa.NamedArguments.AddRange(CANamedArgumentsVM.Collection.Select(a => a.CreateCANamedArgument())); return sa; }