public static object Microsoft_Robotics_Services_SonarSensorArray_Proxy_SonarSensorArrayState_TO_Microsoft_Robotics_Services_SonarSensorArray_Proxy_SonarSensorArrayState(object transformFrom)
 {
     global::Microsoft.Robotics.Services.SonarSensorArray.SonarSensorArrayState       target = new global::Microsoft.Robotics.Services.SonarSensorArray.SonarSensorArrayState();
     global::Microsoft.Robotics.Services.SonarSensorArray.Proxy.SonarSensorArrayState from   = ((global::Microsoft.Robotics.Services.SonarSensorArray.Proxy.SonarSensorArrayState)(transformFrom));
     if ((from.Sensors != null))
     {
         int count = from.Sensors.Count;
         global::System.Collections.Generic.List <global::Microsoft.Robotics.Services.Sonar.SonarState> tmp = new global::System.Collections.Generic.List <global::Microsoft.Robotics.Services.Sonar.SonarState>(count);
         for (int index = 0; (index < count); index = (index + 1))
         {
             global::Microsoft.Robotics.Services.Sonar.SonarState tmp0 = default(global::Microsoft.Robotics.Services.Sonar.SonarState);
             if ((from.Sensors[index] != null))
             {
                 tmp0 = ((global::Microsoft.Robotics.Services.Sonar.SonarState)(Microsoft_Robotics_Services_Sonar_Proxy_SonarState_TO_Microsoft_Robotics_Services_Sonar_Proxy_SonarState(from.Sensors[index])));
             }
             else
             {
                 tmp0 = null;
             }
             tmp.Add(tmp0);
         }
         target.Sensors = tmp;
     }
     else
     {
         target.Sensors = null;
     }
     return(target);
 }
 public static object Microsoft_Robotics_Services_Sonar_Proxy_SonarState_TO_Microsoft_Robotics_Services_Sonar_Proxy_SonarState0(object transformFrom)
 {
     global::Microsoft.Robotics.Services.Sonar.Proxy.SonarState target = new global::Microsoft.Robotics.Services.Sonar.Proxy.SonarState();
     global::Microsoft.Robotics.Services.Sonar.SonarState       from   = ((global::Microsoft.Robotics.Services.Sonar.SonarState)(transformFrom));
     target.TimeStamp           = from.TimeStamp;
     target.HardwareIdentifier  = from.HardwareIdentifier;
     target.MaxDistance         = from.MaxDistance;
     target.DistanceMeasurement = from.DistanceMeasurement;
     target.AngularRange        = from.AngularRange;
     target.AngularResolution   = from.AngularResolution;
     global::Microsoft.Robotics.PhysicalModel.Pose tmp = from.Pose;
     target.Pose = ((global::Microsoft.Robotics.PhysicalModel.Proxy.Pose)(Microsoft_Robotics_PhysicalModel_Proxy_Pose_TO_Microsoft_Robotics_PhysicalModel_Proxy_Pose0(tmp)));
     double[] tmp0 = from.DistanceMeasurements;
     if ((tmp0 != null))
     {
         int      count = tmp0.Length;
         double[] tmp1  = new double[count];
         global::System.Buffer.BlockCopy(tmp0, 0, tmp1, 0, global::System.Buffer.ByteLength(tmp0));
         target.DistanceMeasurements = tmp1;
     }
     return(target);
 }