Mono.CompilerServices.SymbolWriter.MonoSymbolFile.GetAnonymousScope C# (CSharp) Method

GetAnonymousScope() public method

public GetAnonymousScope ( int id ) : AnonymousScopeEntry
id int
return AnonymousScopeEntry
        public AnonymousScopeEntry GetAnonymousScope(int id)
        {
            if (reader == null)
                throw new InvalidOperationException ();

            AnonymousScopeEntry scope;
            lock (this) {
                if (anonymous_scopes != null) {
                    anonymous_scopes.TryGetValue (id, out scope);
                    return scope;
                }

                anonymous_scopes = new Dictionary<int, AnonymousScopeEntry> ();
                reader.BaseStream.Position = ot.AnonymousScopeTableOffset;
                for (int i = 0; i < ot.AnonymousScopeCount; i++) {
                    scope = new AnonymousScopeEntry (reader);
                    anonymous_scopes.Add (scope.ID, scope);
                }

                return anonymous_scopes [id];
            }
        }