public IILGen Catch(Type exceptionType) { _sourceCodeWriter.CloseScope(); _sourceCodeWriter.MarkAndWriteLine(_ilGenerator, $"catch ({exceptionType.FullName})"); _sourceCodeWriter.OpenScope(); _ilGenerator.BeginCatchBlock(exceptionType); return(this); }
void CloseInScope() { if (_sourceCodeWriter.Indent <= TypeLevelIndent) { return; } _sourceCodeWriter.CloseScope(); _sourceCodeWriter.WriteLine(""); }
void CloseInScope() { if (!_inScope) { return; } _sourceCodeWriter.CloseScope(); _sourceCodeWriter.WriteLine(""); _inScope = false; }
Type FinishType() { var finalType = _typeBuilder.CreateType(); _forbidenInstructions.FinishType(finalType); _assemblyBuilder.Save(_moduleBuilder.ScopeName); _sourceCodeWriter.CloseScope(); _sourceCodeWriter.Dispose(); //CheckInPeVerify(); return(finalType); }