protected SystemTreeReader(IIonValue value)
 {
     _systemSymbols = SharedSymbolTable.GetSystem(1);
     _current       = null;
     _eof           = false;
     _top           = 0;
     if (value.Type() == IonType.Datagram)
     {
         _parent = value;
         _next   = null;
         _iter   = value.GetEnumerator();
     }
     else
     {
         _parent = null;
         _next   = value;
     }
 }
 protected SystemTreeReader(IIonValue value)
 {
     this.systemSymbols = SharedSymbolTable.GetSystem(1);
     this.current       = null;
     this.eof           = false;
     this.top           = 0;
     if (value.Type() == IonType.Datagram)
     {
         this.parent = value;
         this.next   = null;
         this.iter   = value.GetEnumerator();
     }
     else
     {
         this.parent = null;
         this.next   = value;
     }
 }
Exemple #3
0
        internal T FromIonToType <T>(IIonValue ionValue)
        {
            Object obj;

            if (ionValue.Type() == IonType.Datagram)
            {
                ionValue = ionValue.GetElementAt(0);
            }

            if (Type.GetTypeCode(typeof(T)) == TypeCode.Object)
            {
                obj = DeserializeObject(typeof(T), ionValue);
                return((T)obj);
            }
            else
            {
                obj = DeserializingMappers(typeof(T), ionValue);
                return((T)obj);
            }
        }
Exemple #4
0
        private void CascadingSymtabAssertion(IIonValue ionValue, int itemNumber)
        {
            Assert.AreEqual(IonType.Symbol, ionValue.Type());
            var token = ionValue.SymbolValue;

            switch (itemNumber)
            {
            case 0:
                Assert.AreEqual(13, token.Sid);
                Assert.IsNull(token.Text);
                break;

            case 1:
                Assert.AreEqual(10, token.Sid);
                Assert.AreEqual("rock", token.Text);
                break;

            case 2:
                Assert.AreEqual(10, token.Sid);
                Assert.IsNull(token.Text);
                break;
            }
        }