Ejemplo n.º 1
0
 public static object Microsoft_Robotics_Services_Sample_ColorSegment_ColorDefinition_TO_Microsoft_Robotics_Services_Sample_ColorSegment_Proxy_ColorDefinition(object transformFrom)
 {
     global::Microsoft.Robotics.Services.Sample.ColorSegment.Proxy.ColorDefinition target = new global::Microsoft.Robotics.Services.Sample.ColorSegment.Proxy.ColorDefinition();
     global::Microsoft.Robotics.Services.Sample.ColorSegment.ColorDefinition       from   = ((global::Microsoft.Robotics.Services.Sample.ColorSegment.ColorDefinition)(transformFrom));
     target.Name    = from.Name;
     target.Y       = from.Y;
     target.Cb      = from.Cb;
     target.Cr      = from.Cr;
     target.SigmaY  = from.SigmaY;
     target.SigmaCb = from.SigmaCb;
     target.SigmaCr = from.SigmaCr;
     target.R       = from.R;
     target.G       = from.G;
     target.B       = from.B;
     return(target);
 }
Ejemplo n.º 2
0
 public static object Microsoft_Robotics_Services_Sample_ColorSegment_ColorSet_TO_Microsoft_Robotics_Services_Sample_ColorSegment_Proxy_ColorSet(object transformFrom)
 {
     global::Microsoft.Robotics.Services.Sample.ColorSegment.Proxy.ColorSet target = new global::Microsoft.Robotics.Services.Sample.ColorSegment.Proxy.ColorSet();
     global::Microsoft.Robotics.Services.Sample.ColorSegment.ColorSet       from   = ((global::Microsoft.Robotics.Services.Sample.ColorSegment.ColorSet)(transformFrom));
     target.Name = from.Name;
     global::System.Collections.Generic.List <global::Microsoft.Robotics.Services.Sample.ColorSegment.ColorDefinition> tmp = from.Colors;
     if ((tmp != null))
     {
         int count = tmp.Count;
         global::System.Collections.Generic.List <global::Microsoft.Robotics.Services.Sample.ColorSegment.Proxy.ColorDefinition> tmp0 = new global::System.Collections.Generic.List <global::Microsoft.Robotics.Services.Sample.ColorSegment.Proxy.ColorDefinition>(count);
         for (int index = 0; (index < count); index = (index + 1))
         {
             global::Microsoft.Robotics.Services.Sample.ColorSegment.Proxy.ColorDefinition tmp1 = default(global::Microsoft.Robotics.Services.Sample.ColorSegment.Proxy.ColorDefinition);
             global::Microsoft.Robotics.Services.Sample.ColorSegment.ColorDefinition       tmp2 = tmp[index];
             if ((tmp2 != null))
             {
                 tmp1 = ((global::Microsoft.Robotics.Services.Sample.ColorSegment.Proxy.ColorDefinition)(Microsoft_Robotics_Services_Sample_ColorSegment_ColorDefinition_TO_Microsoft_Robotics_Services_Sample_ColorSegment_Proxy_ColorDefinition(tmp2)));
             }
             tmp0.Add(tmp1);
         }
         target.Colors = tmp0;
     }
     return(target);
 }