예제 #1
0
 public static object Microsoft_Robotics_Services_Sample_BlobTracker_Proxy_ImageProcessedRequest_TO_Microsoft_Robotics_Services_Sample_BlobTracker_ImageProcessedRequest(object transformFrom)
 {
     global::Microsoft.Robotics.Services.Sample.BlobTracker.ImageProcessedRequest       target = new global::Microsoft.Robotics.Services.Sample.BlobTracker.ImageProcessedRequest();
     global::Microsoft.Robotics.Services.Sample.BlobTracker.Proxy.ImageProcessedRequest from   = ((global::Microsoft.Robotics.Services.Sample.BlobTracker.Proxy.ImageProcessedRequest)(transformFrom));
     target.TimeStamp = from.TimeStamp;
     if ((from.Results != null))
     {
         int count = from.Results.Count;
         global::System.Collections.Generic.List <global::Microsoft.Robotics.Services.Sample.BlobTracker.FoundBlob> tmp = new global::System.Collections.Generic.List <global::Microsoft.Robotics.Services.Sample.BlobTracker.FoundBlob>(count);
         for (int index = 0; (index < count); index = (index + 1))
         {
             global::Microsoft.Robotics.Services.Sample.BlobTracker.FoundBlob tmp0 = default(global::Microsoft.Robotics.Services.Sample.BlobTracker.FoundBlob);
             if ((from.Results[index] != null))
             {
                 tmp0 = ((global::Microsoft.Robotics.Services.Sample.BlobTracker.FoundBlob)(Microsoft_Robotics_Services_Sample_BlobTracker_Proxy_FoundBlob_TO_Microsoft_Robotics_Services_Sample_BlobTracker_FoundBlob(from.Results[index])));
             }
             else
             {
                 tmp0 = null;
             }
             tmp.Add(tmp0);
         }
         target.Results = tmp;
     }
     else
     {
         target.Results = null;
     }
     return(target);
 }
예제 #2
0
 public static object Microsoft_Robotics_Services_Sample_BlobTracker_FoundBlob_TO_Microsoft_Robotics_Services_Sample_BlobTracker_Proxy_FoundBlob(object transformFrom)
 {
     global::Microsoft.Robotics.Services.Sample.BlobTracker.Proxy.FoundBlob target = new global::Microsoft.Robotics.Services.Sample.BlobTracker.Proxy.FoundBlob();
     global::Microsoft.Robotics.Services.Sample.BlobTracker.FoundBlob       from   = ((global::Microsoft.Robotics.Services.Sample.BlobTracker.FoundBlob)(transformFrom));
     int[] tmp = from.XProjection;
     if ((tmp != null))
     {
         int   count = tmp.Length;
         int[] tmp0  = new int[count];
         global::System.Buffer.BlockCopy(tmp, 0, tmp0, 0, global::System.Buffer.ByteLength(tmp));
         target.XProjection = tmp0;
     }
     int[] tmp1 = from.YProjection;
     if ((tmp1 != null))
     {
         int   count0 = tmp1.Length;
         int[] tmp2   = new int[count0];
         global::System.Buffer.BlockCopy(tmp1, 0, tmp2, 0, global::System.Buffer.ByteLength(tmp1));
         target.YProjection = tmp2;
     }
     target.Name    = from.Name;
     target.MeanX   = from.MeanX;
     target.MeanY   = from.MeanY;
     target.StdDevX = from.StdDevX;
     target.StdDevY = from.StdDevY;
     target.SkewX   = from.SkewX;
     target.SkewY   = from.SkewY;
     target.Area    = from.Area;
     return(target);
 }
예제 #3
0
 public static object Microsoft_Robotics_Services_Sample_BlobTracker_Proxy_BlobTrackerState_TO_Microsoft_Robotics_Services_Sample_BlobTracker_BlobTrackerState(object transformFrom)
 {
     global::Microsoft.Robotics.Services.Sample.BlobTracker.BlobTrackerState       target = new global::Microsoft.Robotics.Services.Sample.BlobTracker.BlobTrackerState();
     global::Microsoft.Robotics.Services.Sample.BlobTracker.Proxy.BlobTrackerState from   = ((global::Microsoft.Robotics.Services.Sample.BlobTracker.Proxy.BlobTrackerState)(transformFrom));
     if ((from.ColorBins != null))
     {
         int count = from.ColorBins.Count;
         global::System.Collections.Generic.List <global::Microsoft.Robotics.Services.Sample.BlobTracker.ColorBin> tmp = new global::System.Collections.Generic.List <global::Microsoft.Robotics.Services.Sample.BlobTracker.ColorBin>(count);
         for (int index = 0; (index < count); index = (index + 1))
         {
             global::Microsoft.Robotics.Services.Sample.BlobTracker.ColorBin tmp0 = default(global::Microsoft.Robotics.Services.Sample.BlobTracker.ColorBin);
             if ((from.ColorBins[index] != null))
             {
                 tmp0 = ((global::Microsoft.Robotics.Services.Sample.BlobTracker.ColorBin)(Microsoft_Robotics_Services_Sample_BlobTracker_Proxy_ColorBin_TO_Microsoft_Robotics_Services_Sample_BlobTracker_ColorBin(from.ColorBins[index])));
             }
             else
             {
                 tmp0 = null;
             }
             tmp.Add(tmp0);
         }
         target.ColorBins = tmp;
     }
     else
     {
         target.ColorBins = null;
     }
     target.TimeStamp = from.TimeStamp;
     if ((from.Results != null))
     {
         int count0 = from.Results.Count;
         global::System.Collections.Generic.List <global::Microsoft.Robotics.Services.Sample.BlobTracker.FoundBlob> tmp1 = new global::System.Collections.Generic.List <global::Microsoft.Robotics.Services.Sample.BlobTracker.FoundBlob>(count0);
         for (int index0 = 0; (index0 < count0); index0 = (index0 + 1))
         {
             global::Microsoft.Robotics.Services.Sample.BlobTracker.FoundBlob tmp2 = default(global::Microsoft.Robotics.Services.Sample.BlobTracker.FoundBlob);
             if ((from.Results[index0] != null))
             {
                 tmp2 = ((global::Microsoft.Robotics.Services.Sample.BlobTracker.FoundBlob)(Microsoft_Robotics_Services_Sample_BlobTracker_Proxy_FoundBlob_TO_Microsoft_Robotics_Services_Sample_BlobTracker_FoundBlob(from.Results[index0])));
             }
             else
             {
                 tmp2 = null;
             }
             tmp1.Add(tmp2);
         }
         target.Results = tmp1;
     }
     else
     {
         target.Results = null;
     }
     return(target);
 }
예제 #4
0
 public static object Microsoft_Robotics_Services_Sample_BlobTracker_BlobTrackerState_TO_Microsoft_Robotics_Services_Sample_BlobTracker_Proxy_BlobTrackerState(object transformFrom)
 {
     global::Microsoft.Robotics.Services.Sample.BlobTracker.Proxy.BlobTrackerState target = new global::Microsoft.Robotics.Services.Sample.BlobTracker.Proxy.BlobTrackerState();
     global::Microsoft.Robotics.Services.Sample.BlobTracker.BlobTrackerState       from   = ((global::Microsoft.Robotics.Services.Sample.BlobTracker.BlobTrackerState)(transformFrom));
     global::System.Collections.Generic.List <global::Microsoft.Robotics.Services.Sample.BlobTracker.ColorBin> tmp = from.ColorBins;
     if ((tmp != null))
     {
         int count = tmp.Count;
         global::System.Collections.Generic.List <global::Microsoft.Robotics.Services.Sample.BlobTracker.Proxy.ColorBin> tmp0 = new global::System.Collections.Generic.List <global::Microsoft.Robotics.Services.Sample.BlobTracker.Proxy.ColorBin>(count);
         for (int index = 0; (index < count); index = (index + 1))
         {
             global::Microsoft.Robotics.Services.Sample.BlobTracker.Proxy.ColorBin tmp1 = default(global::Microsoft.Robotics.Services.Sample.BlobTracker.Proxy.ColorBin);
             global::Microsoft.Robotics.Services.Sample.BlobTracker.ColorBin       tmp2 = tmp[index];
             if ((tmp2 != null))
             {
                 tmp1 = ((global::Microsoft.Robotics.Services.Sample.BlobTracker.Proxy.ColorBin)(Microsoft_Robotics_Services_Sample_BlobTracker_ColorBin_TO_Microsoft_Robotics_Services_Sample_BlobTracker_Proxy_ColorBin(tmp2)));
             }
             tmp0.Add(tmp1);
         }
         target.ColorBins = tmp0;
     }
     target.TimeStamp = from.TimeStamp;
     global::System.Collections.Generic.List <global::Microsoft.Robotics.Services.Sample.BlobTracker.FoundBlob> tmp3 = from.Results;
     if ((tmp3 != null))
     {
         int count0 = tmp3.Count;
         global::System.Collections.Generic.List <global::Microsoft.Robotics.Services.Sample.BlobTracker.Proxy.FoundBlob> tmp4 = new global::System.Collections.Generic.List <global::Microsoft.Robotics.Services.Sample.BlobTracker.Proxy.FoundBlob>(count0);
         for (int index0 = 0; (index0 < count0); index0 = (index0 + 1))
         {
             global::Microsoft.Robotics.Services.Sample.BlobTracker.Proxy.FoundBlob tmp5 = default(global::Microsoft.Robotics.Services.Sample.BlobTracker.Proxy.FoundBlob);
             global::Microsoft.Robotics.Services.Sample.BlobTracker.FoundBlob       tmp6 = tmp3[index0];
             if ((tmp6 != null))
             {
                 tmp5 = ((global::Microsoft.Robotics.Services.Sample.BlobTracker.Proxy.FoundBlob)(Microsoft_Robotics_Services_Sample_BlobTracker_FoundBlob_TO_Microsoft_Robotics_Services_Sample_BlobTracker_Proxy_FoundBlob(tmp6)));
             }
             tmp4.Add(tmp5);
         }
         target.Results = tmp4;
     }
     return(target);
 }