Esempio n. 1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="decompilerOptionsVersion">Decompiler options version number. This version number should get incremented when the options change.</param>
 /// <param name="method">Method</param>
 public MethodDebugInfoBuilder(int decompilerOptionsVersion, MethodDef method)
 {
     this.decompilerOptionsVersion = decompilerOptionsVersion;
     this.method = method ?? throw new ArgumentNullException(nameof(method));
     statements  = new List <SourceStatement>();
     Scope       = new MethodDebugScopeBuilder();
     Scope.Span  = BinSpan.FromBounds(0, (uint)method.Body.GetCodeSize());
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="decompilerSettingsVersion">Decompiler settings version number. This version number should get incremented when the settings change.</param>
 /// <param name="stateMachineKind">State machine kind</param>
 /// <param name="method">Method</param>
 /// <param name="kickoffMethod">Kickoff method or null</param>
 public MethodDebugInfoBuilder(int decompilerSettingsVersion, StateMachineKind stateMachineKind, MethodDef method, MethodDef?kickoffMethod)
 {
     this.decompilerSettingsVersion = decompilerSettingsVersion;
     this.stateMachineKind          = stateMachineKind;
     this.method        = method ?? throw new ArgumentNullException(nameof(method));
     this.kickoffMethod = kickoffMethod;
     statements         = new List <SourceStatement>();
     Scope      = new MethodDebugScopeBuilder();
     Scope.Span = ILSpan.FromBounds(0, (uint)method.Body.GetCodeSize());
     if (method == kickoffMethod)
     {
         throw new ArgumentException();
     }
 }