Ejemplo n.º 1
0
        public void Clear()
        {
            tmpEntry = new Storage.Entry("foobar");
            storage?.Dispose();
            storage = new Storage();
            outgoing.Clear();

            HookOutgoing();

            string s = "\0\x03\x05\n";
            string specialLargeDigits = "\0\xAE\xFF\n";

            storage.SetEntryTypeValue("boolean/true", Value.MakeBoolean(true));
            storage.SetEntryTypeValue("boolean/false", Value.MakeBoolean(false));
            storage.SetEntryTypeValue("double/neg", Value.MakeDouble(-1.5));
            storage.SetEntryTypeValue("double/zero", Value.MakeDouble(0.0));
            storage.SetEntryTypeValue("double/big", Value.MakeDouble(1.3e8));
            storage.SetEntryTypeValue("string/empty", Value.MakeString(""));
            storage.SetEntryTypeValue("string/normal", Value.MakeString("hello"));
            storage.SetEntryTypeValue("string/special",
                                      Value.MakeString(s));
            storage.SetEntryTypeValue("string/speciallarge",
                                      Value.MakeString(specialLargeDigits));
            storage.SetEntryTypeValue("string/paranth", Value.MakeString("M\"Q"));
            storage.SetEntryTypeValue("raw/empty", Value.MakeRaw());
            storage.SetEntryTypeValue("raw/normal", Value.MakeRaw(Encoding.UTF8.GetBytes("hello")));
            storage.SetEntryTypeValue("raw/special",
                                      Value.MakeRaw(Encoding.UTF8.GetBytes(s)));
            storage.SetEntryTypeValue("raw/speciallarge",
                                      Value.MakeRaw(Encoding.UTF8.GetBytes(specialLargeDigits)));
            storage.SetEntryTypeValue("booleanarr/empty",
                                      Value.MakeBooleanArray());
            storage.SetEntryTypeValue("booleanarr/one",
                                      Value.MakeBooleanArray(true));
            storage.SetEntryTypeValue("booleanarr/two",
                                      Value.MakeBooleanArray(true, false));
            storage.SetEntryTypeValue("doublearr/empty",
                                      Value.MakeDoubleArray());
            storage.SetEntryTypeValue("doublearr/one",
                                      Value.MakeDoubleArray(0.5));
            storage.SetEntryTypeValue(
                "doublearr/two",
                Value.MakeDoubleArray(0.5, -0.25));
            storage.SetEntryTypeValue(
                "stringarr/empty", Value.MakeStringArray());
            storage.SetEntryTypeValue(
                "stringarr/one",
                Value.MakeStringArray("hello"));
            storage.SetEntryTypeValue(
                "stringarr/two",
                Value.MakeStringArray("hello", "world\n"));
            storage.SetEntryTypeValue(s,
                                      Value.MakeBoolean(true));
            storage.SetEntryTypeValue(specialLargeDigits,
                                      Value.MakeBoolean(false));
            storage.SetEntryTypeValue("=", Value.MakeBoolean(true));
            outgoing.Clear();
        }
Ejemplo n.º 2
0
        public void Clear()
        {
            tmpEntry = new Storage.Entry("foobar");
            storage?.Dispose();
            storage = new Storage();
            outgoing.Clear();

            HookOutgoing();
        }
Ejemplo n.º 3
0
 internal Storage.Entry GetEntry(string name)
 {
     Storage.Entry i = null;
     if (Entries.TryGetValue(name, out i))
     {
         return(i);
     }
     return(tmpEntry);
 }
        public void Clear()
        {
            tmpEntry = new Storage.Entry("foobar");
            storage?.Dispose();
            storage = new Storage();
            outgoing.Clear();

            HookOutgoing();

            storage.SetEntryTypeValue("foo", Value.MakeBoolean(true));
            outgoing.Clear();
        }