Example #1
0
		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();
		}
Example #2
0
 void Add(SecurityAttribute obj)
 {
     AddToStack(obj);
 }
Example #3
0
 void Add(SecurityAttribute secAttr)
 {
     if (secAttr == null)
         return;
     Add(secAttr.AttributeType);
     Add(secAttr.NamedArguments);
 }
Example #4
0
 void InitializeFrom(SecurityAttribute sa)
 {
     AttributeType = sa.AttributeType;
     CANamedArgumentsVM.InitializeFrom(sa.NamedArguments);
 }
Example #5
0
 public SecurityAttribute CreateSecurityAttribute()
 {
     var sa = new SecurityAttribute(AttributeType);
     sa.NamedArguments.AddRange(CANamedArgumentsVM.Collection.Select(a => a.CreateCANamedArgument()));
     return sa;
 }