Example #1
0
 public override int GetByteData(IFTStreamWriter writer)
 {
     if (_hasData)
     {
         return base.GetByteData(writer);
     }
     return 0;
 }
Example #2
0
        public virtual int GetByteData(IFTStreamWriter writer)
        {
            var children = Children;
            int count = 0;

            if(this is IFTTreeLeaf)
            {
                if (Children.Count != 0)
                    throw new NotSupportedException();
                count += ((IFTTreeLeaf)this).WriteLeafData(writer);
            }

            foreach (IFTTreeNode child in children)
            {
                if (child is IFTTreeLeaf)
                {
                    count += ((IFTTreeLeaf)child).WriteLeafData(writer);
                }
                else
                    count += child.GetByteData(writer);
            }
            if (count != BytesCount)
                throw new NotSupportedException();
            return count;
        }
Example #3
0
 public int GetByteData(IFTStreamWriter writer)
 {
     throw new NotImplementedException();
 }