Ejemplo n.º 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();
		}
Ejemplo n.º 2
0
        public CustomAttributeVM(CustomAttributeOptions options, ModuleDef ownerModule, Language language, TypeDef ownerType, MethodDef ownerMethod)
        {
            this.origOptions = options;
            this.ownerModule = ownerModule;
            this.language = language;
            this.ownerType = ownerType;
            this.ownerMethod = ownerMethod;

            this.rawData = new HexStringVM(a => HasErrorUpdated());
            this.caNamedArgumentsVM = new CANamedArgumentsVM(ownerModule, language, ownerType, ownerMethod, a => !IsRawData && a.Collection.Count < ushort.MaxValue);
            ConstructorArguments.CollectionChanged += Args_CollectionChanged;
            CANamedArgumentsVM.Collection.CollectionChanged += Args_CollectionChanged;

            Reinitialize();
        }
Ejemplo n.º 3
0
		public CustomAttributeVM(CustomAttributeOptions options, ModuleDef ownerModule, IDecompilerService decompilerService, TypeDef ownerType, MethodDef ownerMethod) {
			origOptions = options;
			this.ownerModule = ownerModule;
			this.decompilerService = decompilerService;
			this.ownerType = ownerType;
			this.ownerMethod = ownerMethod;

			RawData = new HexStringVM(a => HasErrorUpdated());
			CANamedArgumentsVM = new CANamedArgumentsVM(ownerModule, decompilerService, ownerType, ownerMethod, a => !IsRawData && a.Collection.Count < ushort.MaxValue);
			ConstructorArguments.CollectionChanged += Args_CollectionChanged;
			CANamedArgumentsVM.Collection.CollectionChanged += Args_CollectionChanged;

			Reinitialize();
		}