GetIndex() public method

public GetIndex ( string name ) : int
name string
return int
Exemplo n.º 1
0
            private void WriteStruct(RubyStruct /*!*/ obj)
            {
                WriteSubclassData(obj, typeof(RubyStruct));
                _writer.Write((byte)'S');
                RubyClass theClass = _context.GetClassOf(obj);

                TestForAnonymous(theClass);
                WriteModuleName(theClass);
                var names = obj.GetNames();

                WriteInt32(names.Count);
                foreach (string name in names)
                {
                    int index = obj.GetIndex(name);
                    // TODO (encoding):
                    WriteSymbol(name, _context.GetIdentifierEncoding());
                    WriteAnObject(obj[index]);
                }
            }
Exemplo n.º 2
0
            private void WriteStruct(RubyStruct /*!*/ obj)
            {
                SubclassData instanceWriter = new SubclassData(this, obj, typeof(RubyStruct));

                _writer.Write((byte)'S');
                RubyClass theClass = _context.GetClassOf(obj);

                TestForAnonymous(theClass);
                WriteSymbol(theClass.Name);
                var names = obj.GetNames();

                WriteInt32(names.Count);
                foreach (string name in names)
                {
                    int index = obj.GetIndex(name);
                    WriteSymbol(name);
                    WriteAnObject(obj[index]);
                }
            }
Exemplo n.º 3
0
 private void WriteStruct(RubyStruct/*!*/ obj) {
     WriteSubclassData(obj, typeof(RubyStruct));
     _writer.Write((byte)'S');
     RubyClass theClass = _context.GetClassOf(obj);
     TestForAnonymous(theClass);
     WriteModuleName(theClass);
     var names = obj.GetNames();
     WriteInt32(names.Count);
     foreach (string name in names) {
         int index = obj.GetIndex(name);
         // TODO (encoding):
         WriteSymbol(name, _context.GetIdentifierEncoding());
         WriteAnObject(obj[index]);
     }
 }
Exemplo n.º 4
0
 private void WriteStruct(RubyStruct/*!*/ obj) {
     SubclassData instanceWriter = new SubclassData(this, obj, typeof(RubyStruct));
     _writer.Write((byte)'S');
     RubyClass theClass = _context.GetClassOf(obj);
     TestForAnonymous(theClass);
     WriteSymbol(theClass.Name);
     var names = obj.GetNames();
     WriteInt32(names.Count);
     foreach (string name in names) {
         int index = obj.GetIndex(name);
         WriteSymbol(name);
         WriteAnObject(obj[index]);
     }
 }