Ejemplo n.º 1
0
        public void Read(ITreeReader reader)
        {
            reader.ReadObject(this, setters);

            if (IsNull.Count == 0 && Values.Count > 0)
            {
                // Only wrote values means all values are non-null
                IsNull[Values.Count - 1] = false;
                IsNull.SetAll(false);
            }
            else if (IsNull.Count > 0 && Values.Count == 0)
            {
                // Only wrote nulls means all values are null
                Values[IsNull.Count - 1] = ArraySlice <byte> .Empty;
            }
        }
Ejemplo n.º 2
0
        public void Read(ITreeReader reader)
        {
            reader.ReadObject(this, setters);

            if (IsNull != null)
            {
                if (IsNull.Count == 0 && Values.Count > 0)
                {
                    // Only wrote values means all values are non-null
                    IsNull[Values.Count - 1] = false;
                    IsNull.SetAll(false);
                }
                else if (IsNull.Count > 0 && Values.Count == 0)
                {
                    // Only wrote nulls means all values are null
                    Values[IsNull.Count - 1] = default(T);
                }
            }
        }