public object RetrieveIdlInt2DimArray2x2AsAny([IdlArray(0L, 2)][IdlArrayDimension(0L, 1, 2)] System.Int32[,] arg) { // test with explicit typecode-creation IOrbServices orbServices = OrbServices.GetSingleton(); omg.org.CORBA.TypeCode innerArrayTC = orbServices.create_array_tc(2, orbServices.create_tc_for_type(typeof(int))); omg.org.CORBA.TypeCode arrayTC = orbServices.create_array_tc(2, innerArrayTC); Any arrayAsAny = new Any(arg, arrayTC); return(arrayAsAny); }
public void GetVoxels(System.Int32 planeIndex, System.Int32[,] preallocatedBuffer) { if ((XC.Instance) != (null)) { XC.Instance.Invoke(() => { _client.GetVoxels(planeIndex, preallocatedBuffer); } ); } else { _client.GetVoxels(planeIndex, preallocatedBuffer); } }
public void SetVoxels(System.Int32 planeIndex, System.Int32[,] values) { if ((XC.Instance) != (null)) { XC.Instance.Invoke(() => { _client.SetVoxels(planeIndex, values); } ); } else { _client.SetVoxels(planeIndex, values); } }
static StackObject *Get_1(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject *ptr_of_this_method; StackObject *__ret = ILIntepreter.Minus(__esp, 3); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Int32 a2 = ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 2); System.Int32 a1 = ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 3); System.Int32[,] instance_of_this_method = (System.Int32[, ]) typeof(System.Int32[, ]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method[a1, a2]; __ret->ObjectType = ObjectTypes.Integer; __ret->Value = result_of_this_method; return(__ret + 1); }
static StackObject *Set_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject *ptr_of_this_method; StackObject *__ret = ILIntepreter.Minus(__esp, 4); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Int32 a3 = ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 2); System.Int32 a2 = ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 3); System.Int32 a1 = ptr_of_this_method->Value; ptr_of_this_method = ILIntepreter.Minus(__esp, 4); System.Int32[,] instance_of_this_method = (System.Int32[, ]) typeof(System.Int32[, ]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0); __intp.Free(ptr_of_this_method); instance_of_this_method[a1, a2] = a3; return(__ret); }
public System.Int32[,] IdlLongArray5times3Echo([IdlArray(0L, 500)][IdlArrayDimension(0L, 1, 3)] System.Int32[,] arg) { return(arg); }
public System.Int32[,] EchoMultiDimIntArray(System.Int32[,] arg) { return(arg); }
/// <summary> /// 写入栅格数据。 /// </summary> public static void WriteRaster(IRasterLayer rasterLayer, float[,] datas) { int columnCount = rasterLayer.ColumnCount; int rowCount = rasterLayer.RowCount; IRaster2 raster = rasterLayer.Raster as IRaster2; IPnt fromPnt = new PntClass(); fromPnt.SetCoords(0, 0); IPnt blockSize = new PntClass(); blockSize.SetCoords(columnCount, rowCount); IPixelBlock pixelBlock = ((IRaster)raster).CreatePixelBlock(blockSize); rasterLayer.Raster.Read(fromPnt, pixelBlock); IPixelBlock3 pixelBlock3 = (IPixelBlock3)pixelBlock; object temp = pixelBlock3.get_PixelDataByRef(0); if ((pixelBlock3.get_PixelType(0) == rstPixelType.PT_CLONG) || (pixelBlock3.get_PixelType(0) == rstPixelType.PT_ULONG)) { System.Int32[,] pixelData = (System.Int32[, ])temp; for (int i = 0; i < rowCount; i++) { for (int j = 0; j < columnCount; j++) { if (datas[i, j] == -9999f) { pixelData[j, i] = 0; } else { if (pixelData[j, i] != Convert.ToInt32(datas[i, j])) { pixelData[j, i] = Convert.ToInt32(datas[i, j]); } } } } pixelBlock3.set_PixelData(0, pixelData); } else if ((pixelBlock3.get_PixelType(0) == rstPixelType.PT_SHORT) || (pixelBlock3.get_PixelType(0) == rstPixelType.PT_USHORT)) { System.Int16[,] pixelData = (System.Int16[, ])temp; for (int i = 0; i < rowCount; i++) { for (int j = 0; j < columnCount; j++) { if (datas[i, j] == -9999f) { pixelData[j, i] = 0; } else { if (pixelData[j, i] != Convert.ToInt16(datas[i, j])) { pixelData[j, i] = Convert.ToInt16(datas[i, j]); } } } } pixelBlock3.set_PixelData(0, pixelData); } else if ((pixelBlock3.get_PixelType(0) == rstPixelType.PT_CHAR) || (pixelBlock3.get_PixelType(0) == rstPixelType.PT_UCHAR)) { System.Byte[,] pixelData = (System.Byte[, ])temp; for (int i = 0; i < rowCount; i++) { for (int j = 0; j < columnCount; j++) { if (datas[i, j] == -9999f) { //pixelData[j, i] = 0; ; } else { if (pixelData[j, i] != Convert.ToByte(datas[i, j])) { pixelData[j, i] = Convert.ToByte(datas[i, j]); } } } } pixelBlock3.set_PixelData(0, pixelData); } else if (pixelBlock3.get_PixelType(0) == rstPixelType.PT_FLOAT) { System.Single[,] pixelData = (System.Single[, ])temp; for (int i = 0; i < rowCount; i++) { for (int j = 0; j < columnCount; j++) { if (datas[i, j] == -9999f) { //pixelData[j, i] =0; ; } else { if (pixelData[j, i] != Convert.ToSingle(datas[i, j])) { pixelData[j, i] = Convert.ToSingle(datas[i, j]); } } } } pixelBlock3.set_PixelData(0, pixelData); } ((IRasterEdit)rasterLayer.Raster).Write(fromPnt, (IPixelBlock)pixelBlock3); ((IRasterEdit)rasterLayer.Raster).Refresh(); }
public void SetDetailLayer(System.Int32 xBase, System.Int32 yBase, System.Int32 layer, System.Int32[,] details) { //Mock Data: if (m_functionCallCounts == null) { m_functionCallCounts = new Dictionary <string, int>(); } if (!m_functionCallCounts.ContainsKey("Void SetDetailLayer(Int32, Int32, Int32, System.Int32[,])")) { m_functionCallCounts.Add("Void SetDetailLayer(Int32, Int32, Int32, System.Int32[,])", 0); } m_functionCallCounts["Void SetDetailLayer(Int32, Int32, Int32, System.Int32[,])"]++; }