Example #1
0
 public ScriptValue.Str CreateScriptValue(string value)
 {
     if (StrValues.ContainsKey(value))
     {
         return(StrValues[value]);
     }
     return(StrValues[value] = new ScriptValue.Str(value));
 }
Example #2
0
 public ScriptValue.Str GetString(uint offset)
 {
     if (StrElements.ContainsKey(offset))
     {
         return(StrElements[offset]);
     }
     return(StrElements[offset] = new ScriptValue.Str(Reader.Seek(offset).ReadNullTerminatedString()));
 }
Example #3
0
        public uint Write(ScriptValue.Str value)
        {
            if (Offsets.ContainsKey(value))
            {
                return(Offsets[value]);
            }
            uint offset = (uint)Stream.Position;

            Writer.WriteNullTerminatedString(value.StringValue);
            return(Offsets[value] = offset);
        }