Beispiel #1
0
        public SecurityAttributeVM(SecurityAttribute sa, ModuleDef ownerModule, IDecompilerManager decompilerManager, TypeDef ownerType, MethodDef ownerMethod)
        {
            this.origSa             = sa;
            this.ownerModule        = ownerModule;
            this.CANamedArgumentsVM = new CANamedArgumentsVM(ownerModule, decompilerManager, 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();
        }
Beispiel #2
0
        public CustomAttributeVM(CustomAttributeOptions options, ModuleDef ownerModule, IDecompilerService decompilerService, TypeDef ownerType, MethodDef ownerMethod)
        {
            this.origOptions       = options;
            this.ownerModule       = ownerModule;
            this.decompilerService = decompilerService;
            this.ownerType         = ownerType;
            this.ownerMethod       = ownerMethod;

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

            Reinitialize();
        }
Beispiel #3
0
        public CustomAttributeVM(CustomAttributeOptions options, ModuleDef ownerModule, ILanguageManager languageManager, TypeDef ownerType, MethodDef ownerMethod)
        {
            this.origOptions     = options;
            this.ownerModule     = ownerModule;
            this.languageManager = languageManager;
            this.ownerType       = ownerType;
            this.ownerMethod     = ownerMethod;

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

            Reinitialize();
        }