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); }
public static object Microsoft_Robotics_Services_Sample_ColorSegment_FoundColorAreas_TO_Microsoft_Robotics_Services_Sample_ColorSegment_Proxy_FoundColorAreas(object transformFrom) { global::Microsoft.Robotics.Services.Sample.ColorSegment.Proxy.FoundColorAreas target = new global::Microsoft.Robotics.Services.Sample.ColorSegment.Proxy.FoundColorAreas(); global::Microsoft.Robotics.Services.Sample.ColorSegment.FoundColorAreas from = ((global::Microsoft.Robotics.Services.Sample.ColorSegment.FoundColorAreas)(transformFrom)); target.TimeStamp = from.TimeStamp; global::System.Collections.Generic.List <global::Microsoft.Robotics.Services.Sample.ColorSegment.ColorArea> tmp = from.Areas; if ((tmp != null)) { int count = tmp.Count; global::System.Collections.Generic.List <global::Microsoft.Robotics.Services.Sample.ColorSegment.Proxy.ColorArea> tmp0 = new global::System.Collections.Generic.List <global::Microsoft.Robotics.Services.Sample.ColorSegment.Proxy.ColorArea>(count); for (int index = 0; (index < count); index = (index + 1)) { global::Microsoft.Robotics.Services.Sample.ColorSegment.Proxy.ColorArea tmp1 = default(global::Microsoft.Robotics.Services.Sample.ColorSegment.Proxy.ColorArea); global::Microsoft.Robotics.Services.Sample.ColorSegment.ColorArea tmp2 = tmp[index]; if ((tmp2 != null)) { tmp1 = ((global::Microsoft.Robotics.Services.Sample.ColorSegment.Proxy.ColorArea)(Microsoft_Robotics_Services_Sample_ColorSegment_ColorArea_TO_Microsoft_Robotics_Services_Sample_ColorSegment_Proxy_ColorArea(tmp2))); } tmp0.Add(tmp1); } target.Areas = tmp0; } return(target); }