コード例 #1
0
 public static object PololuMaestro_DeviceListItem_TO_PololuMaestro_Proxy_DeviceListItem(object transformFrom) {
     global::PololuMaestro.Proxy.DeviceListItem target = new global::PololuMaestro.Proxy.DeviceListItem();
     global::PololuMaestro.DeviceListItem from = ((global::PololuMaestro.DeviceListItem)(transformFrom));
     target.SerialNumber = from.SerialNumber;
     target.DisplayName = from.DisplayName;
     target.ProductId = from.ProductId;
     target.Guid = from.Guid;
     return target;
 }
コード例 #2
0
 public static object PololuMaestro_GetDeviceListResponseType_TO_PololuMaestro_Proxy_GetDeviceListResponseType(object transformFrom) {
     global::PololuMaestro.Proxy.GetDeviceListResponseType target = new global::PololuMaestro.Proxy.GetDeviceListResponseType();
     global::PololuMaestro.GetDeviceListResponseType from = ((global::PololuMaestro.GetDeviceListResponseType)(transformFrom));
     PololuMaestro.DeviceListItem[] tmp = from.Devices;
     if ((tmp != null)) {
         int count = tmp.Length;
         global::PololuMaestro.Proxy.DeviceListItem[] tmp0 = new global::PololuMaestro.Proxy.DeviceListItem[count];
         for (int index = 0; (index < count); index = (index + 1)) {
             global::PololuMaestro.Proxy.DeviceListItem tmp1 = default(global::PololuMaestro.Proxy.DeviceListItem);
             global::PololuMaestro.DeviceListItem tmp2 = tmp[index];
             if ((tmp2 != null)) {
                 tmp1 = ((global::PololuMaestro.Proxy.DeviceListItem)(PololuMaestro_DeviceListItem_TO_PololuMaestro_Proxy_DeviceListItem(tmp2)));
             }
             tmp0[index] = tmp1;
         }
         target.Devices = tmp0;
     }
     return target;
 }