public static void Main(string[] args) { for (nuint i = 0; i < (nuint)2; i++) { System.Console.WriteLine(i); } }
public MPMediaQuerySection GetSection(xint index) { using (var array = new NSArray (Messaging.IntPtr_objc_msgSend (Handle, Selector.GetHandle ("itemSections")))) return array.GetItem<MPMediaQuerySection> (index); }
public MPMediaItem GetItem(xint index) { using (var array = new NSArray (Messaging.IntPtr_objc_msgSend (Handle, Selector.GetHandle ("items")))) return array.GetItem<MPMediaItem> (index); }
public UrhoString(System.nuint value) { Runtime.Validate(typeof(UrhoString)); handle = UrhoString_String7(value); OnUrhoStringCreated(); }
internal static extern IntPtr UrhoString_String7(System.nuint value);
private static bool TryConvertFromTruncating <TOther>(TOther value, out ushort result) where TOther : INumberBase <TOther> { // In order to reduce overall code duplication and improve the inlinabilty of these // methods for the corelib types we have `ConvertFrom` handle the same sign and // `ConvertTo` handle the opposite sign. However, since there is an uneven split // between signed and unsigned types, the one that handles unsigned will also // handle `Decimal`. // // That is, `ConvertFrom` for `ushort` will handle the other unsigned types and // `ConvertTo` will handle the signed types if (typeof(TOther) == typeof(byte)) { byte actualValue = (byte)(object)value; result = actualValue; return(true); } else if (typeof(TOther) == typeof(char)) { char actualValue = (char)(object)value; result = actualValue; return(true); } else if (typeof(TOther) == typeof(decimal)) { decimal actualValue = (decimal)(object)value; result = (actualValue >= MaxValue) ? MaxValue : (actualValue <= MinValue) ? MinValue : (ushort)actualValue; return(true); } else if (typeof(TOther) == typeof(uint)) { uint actualValue = (uint)(object)value; result = (ushort)actualValue; return(true); } else if (typeof(TOther) == typeof(ulong)) { ulong actualValue = (ulong)(object)value; result = (ushort)actualValue; return(true); } else if (typeof(TOther) == typeof(UInt128)) { UInt128 actualValue = (UInt128)(object)value; result = (ushort)actualValue; return(true); } else if (typeof(TOther) == typeof(nuint)) { nuint actualValue = (nuint)(object)value; result = (ushort)actualValue; return(true); } else { result = default; return(false); } }
public unsafe nuint PreRealloc(void *pRequest, nuint cbRequest, void **ppNewRequest, BOOL fSpyed) => CurrentSpy?.PreRealloc(pRequest, cbRequest, ppNewRequest, fSpyed) ?? cbRequest;
private static extern unsafe void __Memmove(byte *dest, byte *src, nuint len);
internal static void BulkMoveWithWriteBarrier(ref byte dmem, ref byte smem, nuint size) => RuntimeImports.RhBulkMoveWithWriteBarrier(ref dmem, ref smem, size);
private static void _BulkMoveWithWriteBarrier(ref byte destination, ref byte source, nuint byteCount) { Debug.Assert(byteCount > BulkMoveWithWriteBarrierChunk); if (Unsafe.AreSame(ref source, ref destination)) { return; } // This is equivalent to: (destination - source) >= byteCount || (destination - source) < 0 if ((nuint)(nint)Unsafe.ByteOffset(ref source, ref destination) >= byteCount) { // Copy forwards do { byteCount -= BulkMoveWithWriteBarrierChunk; __BulkMoveWithWriteBarrier(ref destination, ref source, BulkMoveWithWriteBarrierChunk); destination = ref Unsafe.AddByteOffset(ref destination, BulkMoveWithWriteBarrierChunk); source = ref Unsafe.AddByteOffset(ref source, BulkMoveWithWriteBarrierChunk); }while (byteCount > BulkMoveWithWriteBarrierChunk); } else { // Copy backwards do { byteCount -= BulkMoveWithWriteBarrierChunk; __BulkMoveWithWriteBarrier(ref Unsafe.AddByteOffset(ref destination, byteCount), ref Unsafe.AddByteOffset(ref source, byteCount), BulkMoveWithWriteBarrierChunk); }while (byteCount > BulkMoveWithWriteBarrierChunk); } __BulkMoveWithWriteBarrier(ref destination, ref source, byteCount); }
private static extern void __BulkMoveWithWriteBarrier(ref byte destination, ref byte source, nuint byteCount);
internal static void BulkMoveWithWriteBarrier(ref byte destination, ref byte source, nuint byteCount) { if (byteCount <= BulkMoveWithWriteBarrierChunk) { __BulkMoveWithWriteBarrier(ref destination, ref source, byteCount); } else { _BulkMoveWithWriteBarrier(ref destination, ref source, byteCount); } }
private static extern unsafe void __ZeroMemory(void *b, nuint byteLength);
public nuint PostGetSize(nuint cbActual, BOOL fSpyed) => CurrentSpy?.PostGetSize(cbActual, fSpyed) ?? cbActual;
public MPMediaItem GetItem(xint index) { using (var array = new NSArray(Messaging.IntPtr_objc_msgSend(Handle, Selector.GetHandle("items")))) return(array.GetItem <MPMediaItem> (index)); }
private static unsafe void __Memmove(byte *dest, byte *src, nuint len) => RuntimeImports.memmove(dest, src, len);
public MPMediaItemCollection GetCollection(xint index) { using (var array = new NSArray(Messaging.IntPtr_objc_msgSend(Handle, Selector.GetHandle("collections")))) return(array.GetItem <MPMediaItemCollection> (index)); }
public nuint PreAlloc(nuint cbRequest) => CurrentSpy?.PreAlloc(cbRequest) ?? cbRequest;