Ejemplo n.º 1
0
		private void WriteNullBitmap(IWriteBuffer context, BitMap4 bitMap)
		{
			context.WriteBytes(bitMap.Bytes());
		}
Ejemplo n.º 2
0
 protected override void WriteElements(IWriteContext context, object obj, ArrayInfo
     info)
 {
     var objects = AllElements(Container(context), obj);
     if (HasNullBitmap(info))
     {
         var nullBitMap = new BitMap4(info.ElementCount());
         var nullBitMapBuffer = context.Reserve(nullBitMap.MarshalledLength());
         var currentElement = 0;
         while (objects.MoveNext())
         {
             var current = objects.Current;
             if (current == null)
             {
                 nullBitMap.SetTrue(currentElement);
             }
             else
             {
                 context.WriteObject(DelegateTypeHandler(), current);
             }
             currentElement++;
         }
         nullBitMapBuffer.WriteBytes(nullBitMap.Bytes());
     }
     else
     {
         while (objects.MoveNext())
         {
             context.WriteObject(DelegateTypeHandler(), objects.Current);
         }
     }
 }