public static void Serialize(TextWriter writer, SkeletonFrameAlternative frame)
 {
     writer.Write(frame.FrameNumber);
     writer.Write(frame.Skeletons.Length);
     foreach (SkeletonDataAlternative data in frame.Skeletons)
     {
         SkeletonDataSerializer.Serialize(writer, data);
     }
 }
 public static byte[] Serialize(SkeletonFrameAlternative frame)
 {
     byte[] bytes = null;
     using (BinaryStreamWriter w = new BinaryStreamWriter(new MemoryStream()))
     {
         w.Write(frame.FrameNumber);
         w.Write(frame.Skeletons.Length);
         foreach (SkeletonDataAlternative data in frame.Skeletons)
         {
             w.Write(SkeletonDataSerializer.Serialize(data));
         }
         bytes = ((MemoryStream)w.Stream).ToArray();
         w.Close();
     }
     return bytes;
 }
 public KinectProtocolNotification(byte[] data, int offset)
     : base(KinectProtocolCommandType.Notification)
 {
     skeletonFrame = null;
     rawData = new byte[data.Length - offset];
     data.CopyTo(rawData, 0);
 }
 public KinectProtocolNotification(byte[] data)
     : base(KinectProtocolCommandType.Notification)
 {
     skeletonFrame = null;
     rawData = data;
 }
 public KinectProtocolNotification(SkeletonFrameAlternative frame)
     : base(KinectProtocolCommandType.Notification)
 {
     skeletonFrame = frame;
     rawData = null;
 }