Exemplo n.º 1
0
        public ExceptionHandlerVM(TypeSigCreatorOptions typeSigCreatorOptions, ExceptionHandlerOptions options)
        {
            this.typeSigCreatorOptions = typeSigCreatorOptions.Clone("Create an Exception Catch Type");
            this.typeSigCreatorOptions.IsLocal = false;
            this.typeSigCreatorOptions.NullTypeSigAllowed = true;
            this.origOptions = options;
            this.handlerTypeVM = new EnumListVM(exceptionHandlerTypeList);
            this.tryStartVM = new ListVM<InstructionVM>((a, b) => OnSelectionChanged()) { DataErrorInfoDelegate = VerifyInstruction };
            this.tryEndVM = new ListVM<InstructionVM>((a, b) => OnSelectionChanged()) { DataErrorInfoDelegate = VerifyInstruction };
            this.filterStartVM = new ListVM<InstructionVM>((a, b) => OnSelectionChanged()) { DataErrorInfoDelegate = VerifyInstruction };
            this.handlerStartVM = new ListVM<InstructionVM>((a, b) => OnSelectionChanged()) { DataErrorInfoDelegate = VerifyInstruction };
            this.handlerEndVM = new ListVM<InstructionVM>((a, b) => OnSelectionChanged()) { DataErrorInfoDelegate = VerifyInstruction };

            Reinitialize();
        }
Exemplo n.º 2
0
 public void InitializeFrom(ExceptionHandlerOptions options)
 {
     this.TryStartVM.SelectedItem = options.TryStart ?? InstructionVM.Null;
     this.TryEndVM.SelectedItem = options.TryEnd ?? InstructionVM.Null;
     this.FilterStartVM.SelectedItem = options.FilterStart ?? InstructionVM.Null;
     this.HandlerStartVM.SelectedItem = options.HandlerStart ?? InstructionVM.Null;
     this.HandlerEndVM.SelectedItem = options.HandlerEnd ?? InstructionVM.Null;
     this.CatchType = options.CatchType;
     this.HandlerTypeVM.SelectedItem = options.HandlerType;
 }
Exemplo n.º 3
0
 public ExceptionHandlerOptions CopyTo(ExceptionHandlerOptions options)
 {
     options.TryStart = RemoveNullInstance(this.TryStartVM.SelectedItem);
     options.TryEnd = RemoveNullInstance(this.TryEndVM.SelectedItem);
     options.FilterStart = RemoveNullInstance(this.FilterStartVM.SelectedItem);
     options.HandlerStart = RemoveNullInstance(this.HandlerStartVM.SelectedItem);
     options.HandlerEnd = RemoveNullInstance(this.HandlerEndVM.SelectedItem);
     options.CatchType = this.CatchType;
     options.HandlerType = (ExceptionHandlerType)this.HandlerTypeVM.SelectedItem;
     return options;
 }