public NativeQuery <TResult> Select <TResult>(Func <T, TResult> selector) where TResult : unmanaged { if (_length == 0) { return(new NativeQuery <TResult>(GetAllocator())); } int length = _length; Allocator allocator = GetAllocator() !; TResult * buffer = allocator.Allocate <TResult>(length); Enumerator enumerator = GetEnumerator(disposing: false); int i = 0; foreach (ref var e in this) { buffer[i++] = selector(e); } return(new NativeQuery <TResult>(buffer, length, allocator)); }
public HRESULT GetResults([NativeTypeName("TResult_abi *")] TResult *results) { return(((delegate * unmanaged <IAsyncOperation <TResult> *, TResult *, int>)(lpVtbl[8]))((IAsyncOperation <TResult> *)Unsafe.AsPointer(ref this), results)); }
public int GetResults([NativeTypeName("TResult_abi *")] TResult *results) { return(((delegate * unmanaged <IAsyncOperationWithProgress <TResult, TProgress> *, TResult *, int>)(lpVtbl[10]))((IAsyncOperationWithProgress <TResult, TProgress> *)Unsafe.AsPointer(ref this), results)); }