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); }
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); }