protected override void ProcessMethodBody(IMethodDefinition method) { if (method.HasBody() && !metadataWriter.MetadataOnly) { var body = method.GetBody(Context); if (body != null) { this.Visit(body); for (IImportScope scope = body.ImportScope; scope != null; scope = scope.Parent) { if (_alreadySeenScopes.Add(scope)) { VisitImports(scope.GetUsedNamespaces()); } else { break; } } } else if (!metadataWriter.MetadataOnly) { throw ExceptionUtilities.Unreachable; } } }
protected override void ProcessMethodBody(IMethodDefinition method) { if (method.HasBody()) { var body = method.GetBody(Context); if (body != null) { this.Visit(body); } else if (!metadataWriter.allowMissingMethodBodies) { throw ExceptionUtilities.Unreachable; } } }
protected override void ProcessMethodBody(IMethodDefinition method) { if (method.HasBody()) { var body = method.GetBody(Context); if (body != null) { this.Visit(body); for (IImportScope scope = body.ImportScope; scope != null; scope = scope.Parent) { if (_alreadySeenScopes.Add(scope)) { VisitImports(scope.GetUsedNamespaces(Context)); } else { break; } } } else if (!metadataWriter.allowMissingMethodBodies) { throw ExceptionUtilities.Unreachable; } } }