コード例 #1
0
 public static object Microsoft_Robotics_Services_Sample_ColorSegment_Proxy_ColorSet_TO_Microsoft_Robotics_Services_Sample_ColorSegment_ColorSet(object transformFrom)
 {
     global::Microsoft.Robotics.Services.Sample.ColorSegment.ColorSet       target = new global::Microsoft.Robotics.Services.Sample.ColorSegment.ColorSet();
     global::Microsoft.Robotics.Services.Sample.ColorSegment.Proxy.ColorSet from   = ((global::Microsoft.Robotics.Services.Sample.ColorSegment.Proxy.ColorSet)(transformFrom));
     target.Name = from.Name;
     if ((from.Colors != null))
     {
         int count = from.Colors.Count;
         global::System.Collections.Generic.List <global::Microsoft.Robotics.Services.Sample.ColorSegment.ColorDefinition> tmp = new global::System.Collections.Generic.List <global::Microsoft.Robotics.Services.Sample.ColorSegment.ColorDefinition>(count);
         for (int index = 0; (index < count); index = (index + 1))
         {
             global::Microsoft.Robotics.Services.Sample.ColorSegment.ColorDefinition tmp0 = default(global::Microsoft.Robotics.Services.Sample.ColorSegment.ColorDefinition);
             if ((from.Colors[index] != null))
             {
                 tmp0 = ((global::Microsoft.Robotics.Services.Sample.ColorSegment.ColorDefinition)(Microsoft_Robotics_Services_Sample_ColorSegment_Proxy_ColorDefinition_TO_Microsoft_Robotics_Services_Sample_ColorSegment_ColorDefinition(from.Colors[index])));
             }
             else
             {
                 tmp0 = null;
             }
             tmp.Add(tmp0);
         }
         target.Colors = tmp;
     }
     else
     {
         target.Colors = null;
     }
     return(target);
 }
コード例 #2
0
 public static object Microsoft_Robotics_Services_Sample_ColorSegment_Proxy_ColorSegmentState_TO_Microsoft_Robotics_Services_Sample_ColorSegment_ColorSegmentState(object transformFrom)
 {
     global::Microsoft.Robotics.Services.Sample.ColorSegment.ColorSegmentState       target = new global::Microsoft.Robotics.Services.Sample.ColorSegment.ColorSegmentState();
     global::Microsoft.Robotics.Services.Sample.ColorSegment.Proxy.ColorSegmentState from   = ((global::Microsoft.Robotics.Services.Sample.ColorSegment.Proxy.ColorSegmentState)(transformFrom));
     target.Processing    = from.Processing;
     target.FrameCount    = from.FrameCount;
     target.DroppedFrames = from.DroppedFrames;
     target.ImageSource   = from.ImageSource;
     if ((from.Settings != null))
     {
         target.Settings = ((global::Microsoft.Robotics.Services.Sample.ColorSegment.Settings)(Microsoft_Robotics_Services_Sample_ColorSegment_Proxy_Settings_TO_Microsoft_Robotics_Services_Sample_ColorSegment_Settings(from.Settings)));
     }
     else
     {
         target.Settings = null;
     }
     if ((from.Colors != null))
     {
         int count = from.Colors.Count;
         global::System.Collections.Generic.List <global::Microsoft.Robotics.Services.Sample.ColorSegment.ColorSet> tmp0 = new global::System.Collections.Generic.List <global::Microsoft.Robotics.Services.Sample.ColorSegment.ColorSet>(count);
         for (int index = 0; (index < count); index = (index + 1))
         {
             global::Microsoft.Robotics.Services.Sample.ColorSegment.ColorSet tmp1 = default(global::Microsoft.Robotics.Services.Sample.ColorSegment.ColorSet);
             if ((from.Colors[index] != null))
             {
                 tmp1 = ((global::Microsoft.Robotics.Services.Sample.ColorSegment.ColorSet)(Microsoft_Robotics_Services_Sample_ColorSegment_Proxy_ColorSet_TO_Microsoft_Robotics_Services_Sample_ColorSegment_ColorSet(from.Colors[index])));
             }
             else
             {
                 tmp1 = null;
             }
             tmp0.Add(tmp1);
         }
         target.Colors = tmp0;
     }
     else
     {
         target.Colors = null;
     }
     if ((from.SegmentedImage != null))
     {
         target.SegmentedImage = ((global::Microsoft.Robotics.Services.Sample.ColorSegment.SegmentedImage)(Microsoft_Robotics_Services_Sample_ColorSegment_Proxy_SegmentedImage_TO_Microsoft_Robotics_Services_Sample_ColorSegment_SegmentedImage(from.SegmentedImage)));
     }
     else
     {
         target.SegmentedImage = null;
     }
     if ((from.FoundColorAreas != null))
     {
         target.FoundColorAreas = ((global::Microsoft.Robotics.Services.Sample.ColorSegment.FoundColorAreas)(Microsoft_Robotics_Services_Sample_ColorSegment_Proxy_FoundColorAreas_TO_Microsoft_Robotics_Services_Sample_ColorSegment_FoundColorAreas(from.FoundColorAreas)));
     }
     else
     {
         target.FoundColorAreas = null;
     }
     return(target);
 }
コード例 #3
0
 public static object Microsoft_Robotics_Services_Sample_ColorSegment_ColorSegmentState_TO_Microsoft_Robotics_Services_Sample_ColorSegment_Proxy_ColorSegmentState(object transformFrom)
 {
     global::Microsoft.Robotics.Services.Sample.ColorSegment.Proxy.ColorSegmentState target = new global::Microsoft.Robotics.Services.Sample.ColorSegment.Proxy.ColorSegmentState();
     global::Microsoft.Robotics.Services.Sample.ColorSegment.ColorSegmentState       from   = ((global::Microsoft.Robotics.Services.Sample.ColorSegment.ColorSegmentState)(transformFrom));
     target.Processing    = from.Processing;
     target.FrameCount    = from.FrameCount;
     target.DroppedFrames = from.DroppedFrames;
     global::System.Uri tmp = from.ImageSource;
     target.ImageSource = tmp;
     global::Microsoft.Robotics.Services.Sample.ColorSegment.Settings tmp1 = from.Settings;
     if ((tmp1 != null))
     {
         target.Settings = ((global::Microsoft.Robotics.Services.Sample.ColorSegment.Proxy.Settings)(Microsoft_Robotics_Services_Sample_ColorSegment_Settings_TO_Microsoft_Robotics_Services_Sample_ColorSegment_Proxy_Settings(tmp1)));
     }
     global::System.Collections.Generic.List <global::Microsoft.Robotics.Services.Sample.ColorSegment.ColorSet> tmp2 = from.Colors;
     if ((tmp2 != null))
     {
         int count = tmp2.Count;
         global::System.Collections.Generic.List <global::Microsoft.Robotics.Services.Sample.ColorSegment.Proxy.ColorSet> tmp3 = new global::System.Collections.Generic.List <global::Microsoft.Robotics.Services.Sample.ColorSegment.Proxy.ColorSet>(count);
         for (int index = 0; (index < count); index = (index + 1))
         {
             global::Microsoft.Robotics.Services.Sample.ColorSegment.Proxy.ColorSet tmp4 = default(global::Microsoft.Robotics.Services.Sample.ColorSegment.Proxy.ColorSet);
             global::Microsoft.Robotics.Services.Sample.ColorSegment.ColorSet       tmp5 = tmp2[index];
             if ((tmp5 != null))
             {
                 tmp4 = ((global::Microsoft.Robotics.Services.Sample.ColorSegment.Proxy.ColorSet)(Microsoft_Robotics_Services_Sample_ColorSegment_ColorSet_TO_Microsoft_Robotics_Services_Sample_ColorSegment_Proxy_ColorSet(tmp5)));
             }
             tmp3.Add(tmp4);
         }
         target.Colors = tmp3;
     }
     global::Microsoft.Robotics.Services.Sample.ColorSegment.SegmentedImage tmp6 = from.SegmentedImage;
     if ((tmp6 != null))
     {
         target.SegmentedImage = ((global::Microsoft.Robotics.Services.Sample.ColorSegment.Proxy.SegmentedImage)(Microsoft_Robotics_Services_Sample_ColorSegment_SegmentedImage_TO_Microsoft_Robotics_Services_Sample_ColorSegment_Proxy_SegmentedImage(tmp6)));
     }
     global::Microsoft.Robotics.Services.Sample.ColorSegment.FoundColorAreas tmp7 = from.FoundColorAreas;
     if ((tmp7 != null))
     {
         target.FoundColorAreas = ((global::Microsoft.Robotics.Services.Sample.ColorSegment.Proxy.FoundColorAreas)(Microsoft_Robotics_Services_Sample_ColorSegment_FoundColorAreas_TO_Microsoft_Robotics_Services_Sample_ColorSegment_Proxy_FoundColorAreas(tmp7)));
     }
     return(target);
 }