Mono.Cecil.Cil.CodeWriter.ComputeExceptionHandlerStackSize C# (CSharp) Method

ComputeExceptionHandlerStackSize() private method

private ComputeExceptionHandlerStackSize ( int>.Dictionary &stack_sizes ) : void
stack_sizes int>.Dictionary
return void
        void ComputeExceptionHandlerStackSize(ref Dictionary<Instruction, int> stack_sizes)
        {
            var exception_handlers = body.ExceptionHandlers;

            for (int i = 0; i < exception_handlers.Count; i++) {
                var exception_handler = exception_handlers [i];

                switch (exception_handler.HandlerType) {
                case ExceptionHandlerType.Catch:
                    AddExceptionStackSize (exception_handler.HandlerStart, ref stack_sizes);
                    break;
                case ExceptionHandlerType.Filter:
                    AddExceptionStackSize (exception_handler.FilterStart, ref stack_sizes);
                    AddExceptionStackSize (exception_handler.HandlerStart, ref stack_sizes);
                    break;
                }
            }
        }