public static ref Vector128 <byte> MyAsByte <T>(this in Vector128 <T> vector) where T : unmanaged
Beispiel #2
0
 public static Vector3 ToVector3(this in Vector2Int value) => new Vector3(value.x, value.y);
Beispiel #3
0
 public static bool isRunning <T>(this in UniTask <T> task) => task.Status == UniTaskStatus.Pending;
Beispiel #4
0
 public static void AssertCompleted <T>(this in ValueTask <T> valueTask)
Beispiel #5
0
 public static Vector3Int ToVector3Int(this in Vector2Int value) => new Vector3Int(value.x, value.y, 0);
Beispiel #6
0
 /// <summary>
 /// アサーションするための <see cref="ResultAssertions"/> を返します。
 /// </summary>
 /// <param name="instance">アサーションする対象の <see cref="Result"/> インスタンス</param>
 /// <returns><see cref="ResultAssertions"/></returns>
 public static ResultAssertions Should(this in Result instance)
 {
     return(new(instance));
 }
 /// <summary>
 /// Converts to 16 hex string. (eg. #F0F8FF)
 /// </summary>
 /// <param name="color">value</param>
 /// <returns></returns>
 public static string ToHex(this in Color color)
 => $"#{color.R:X2}{color.G:X2}{color.B:X2}";
Beispiel #8
0
 public static ref TComponent GetData <TComponent>(this in Entity entity, bool createIfNotExists = true) where TComponent : struct, IStructComponent
Beispiel #9
0
 public static T ElementAt <T>(
     this in NativeArray <T> source,
Beispiel #10
0
 // slice of a slice helper function:
 //      s = s[2:]    => s = s.slice(2)
 //      s = s[3:5]   => s = s.slice(3, 5);
 //      s = s[:4]    => s = s.slice(high:4)
 //      s = s[1:3:5] => s = s.slice(1, 3, 5) // Full slice expression
 public static slice <T> slice <T>(this in slice <T> slice, nint low = -1, nint high = -1, nint max = -1)
Beispiel #11
0
 public static void CopyTo <T>(this in System.Buffers.ReadOnlySequence <T> source, System.Span <T> destination)
Beispiel #12
0
 public static ConfiguredValueTaskAwaitable <T> ForAwait <T>(this in ValueTask <T> task) => task.ConfigureAwait(false);
Beispiel #13
0
 public static ConfiguredValueTaskAwaitable ForAwait(this in ValueTask task) => task.ConfigureAwait(false);
Beispiel #14
0
 public static bool IsConstructor(this in MethodDefinition method, MetadataReader reader)
Beispiel #15
0
 private static ref readonly InternalDecimal ToInternalRepresentation(this in decimal d)
 => ref Unsafe.As <decimal, InternalDecimal>(ref Unsafe.AsRef(d));
Beispiel #16
0
 public static bool IsNullPacket(this in AVPacket packet)
 => packet.data is null;
Beispiel #17
0
 public static bool All <T>(this in ReadOnlySpan <T?> values, Predicate <T?> predicate)
Beispiel #18
0
 static void Foo(this in int src)
 {
     D p = (in int a) => {};
 }
Beispiel #19
0
 /// <summary>
 /// アサーションするための <see cref="ResultAssertions{T}"/> を返します。
 /// </summary>
 /// <param name="instance">アサーションする対象の <see cref="Result{T}"/> インスタンス</param>
 /// <typeparam name="T">成功の値の型</typeparam>
 /// <returns><see cref="ResultAssertions{T}"/></returns>
 public static ResultAssertions <T> Should <T>(this in Result <T> instance)
Beispiel #20
0
 public static SharpDX.Vector2 ToVector2(this in System.Drawing.Point point) => new SharpDX.Vector2(point.X, point.Y);
 /// <summary>
 /// Transform value.
 /// </summary>
 public static Vector3 Transform(this in Matrix matrix, Vector3 value)
Beispiel #22
0
 public static ArraySegmentSelectAtRefEnumerable <TSource, TResult, FunctionInWrapper <TSource, int, TResult> > Select <TSource, TResult>(this in ArraySegment <TSource> source, FunctionIn <TSource, int, TResult> selector)
Beispiel #23
0
 OrderByDescending <T, TKey, TKeySelector, TComparer>(
     this in NativeArray <T> source,
Beispiel #24
0
 /// <summary>
 /// 成功だった場合に新しい値を持った結果を作成します。失敗の場合は、失敗がそのまま返ります。
 /// </summary>
 /// <param name="source">もととなる結果</param>
 /// <param name="ok">新しい結果の値を作成する処理</param>
 /// <typeparam name="TResult">新しい成功の型</typeparam>
 /// <returns>新しい値を持った結果</returns>
 public static Result <TResult> FlatMap <TResult>(this in Result source, Func <Result <TResult> > ok)
Beispiel #25
0
 public static Vector2 ToVector2(this in Vector3Int value) => new Vector2(value.x, value.y);
Beispiel #26
0
 public static bool IsInteger(this in decimal d)
 => d.ToInternalRepresentation().IsInteger();
Beispiel #27
0
 public static Vector3Int ToVector3Int(this in Vector3 value) => new Vector3Int((int)value.x, (int)value.y, 0);
Beispiel #28
0
 public static (long value, byte scale) Decompose(this in decimal d)
 => d.ToInternalRepresentation().Decompose();
Beispiel #29
0
 /// <summary>
 /// If a result is successful, returns it, otherwise <see langword="null"/>.
 /// </summary>
 /// <typeparam name="T">Value type.</typeparam>
 /// <param name="result">The result.</param>
 /// <returns>Nullable value.</returns>
 public static T?OrNull <T>(this in Result <T> result)
Beispiel #30
0
 public static IResponse Parse(this in ReadOnlySequence <byte> buffer)