43 instantiations of Value
System.Private.Windows.Core (43)
System\Value.cs (43)
107public static implicit operator Value(byte value) => new(value); 109public static implicit operator Value(byte? value) => new(value); 133public static implicit operator Value(sbyte value) => new(value); 135public static implicit operator Value(sbyte? value) => new(value); 159public static implicit operator Value(bool value) => new(value); 161public static implicit operator Value(bool? value) => new(value); 185public static implicit operator Value(char value) => new(value); 187public static implicit operator Value(char? value) => new(value); 211public static implicit operator Value(short value) => new(value); 213public static implicit operator Value(short? value) => new(value); 237public static implicit operator Value(int value) => new(value); 239public static implicit operator Value(int? value) => new(value); 263public static implicit operator Value(long value) => new(value); 265public static implicit operator Value(long? value) => new(value); 289public static implicit operator Value(ushort value) => new(value); 291public static implicit operator Value(ushort? value) => new(value); 315public static implicit operator Value(uint value) => new(value); 317public static implicit operator Value(uint? value) => new(value); 341public static implicit operator Value(ulong value) => new(value); 343public static implicit operator Value(ulong? value) => new(value); 367public static implicit operator Value(float value) => new(value); 369public static implicit operator Value(float? value) => new(value); 393public static implicit operator Value(double value) => new(value); 395public static implicit operator Value(double? value) => new(value); 419public static implicit operator Value(Size value) => new(value); 421public static implicit operator Value(Size? value) => new(value); 445public static implicit operator Value(Point value) => new(value); 447public static implicit operator Value(Point? value) => new(value); 474this = new(value.Value); 478public static implicit operator Value(Color value) => new(value); 480public static implicit operator Value(Color? value) => new(value); 513this = new(value.Value); 517public static implicit operator Value(DateTimeOffset value) => new(value); 519public static implicit operator Value(DateTimeOffset? value) => new(value); 543public static implicit operator Value(DateTime value) => new(value); 545public static implicit operator Value(DateTime? value) => new(value); 566public static implicit operator Value(ArraySegment<byte> value) => new(value); 585public static implicit operator Value(ArraySegment<char> value) => new(value); 590public static implicit operator Value(decimal value) => new(value); 592public static implicit operator Value(decimal? value) => value.HasValue ? new(value.Value) : new(value); 672return new Value(StraightCastFlag<T>.Instance, Unsafe.As<T, ulong>(ref value)); 675return new Value(value);
94 references to Value
System.Private.Windows.Core (94)
System\Value.cs (81)
25/// Creates a new <see cref="Value"/> with the given <see langword="object"/>. To avoid boxing enums, use the 35/// The <see cref="System.Type"/> of the value stored in this <see cref="Value"/>. 107public static implicit operator Value(byte value) => new(value); 108public static explicit operator byte(in Value value) => value.GetValue<byte>(); 109public static implicit operator Value(byte? value) => new(value); 110public static explicit operator byte?(in Value value) => value.GetValue<byte?>(); 133public static implicit operator Value(sbyte value) => new(value); 134public static explicit operator sbyte(in Value value) => value.GetValue<sbyte>(); 135public static implicit operator Value(sbyte? value) => new(value); 136public static explicit operator sbyte?(in Value value) => value.GetValue<sbyte?>(); 159public static implicit operator Value(bool value) => new(value); 160public static explicit operator bool(in Value value) => value.GetValue<bool>(); 161public static implicit operator Value(bool? value) => new(value); 162public static explicit operator bool?(in Value value) => value.GetValue<bool?>(); 185public static implicit operator Value(char value) => new(value); 186public static explicit operator char(in Value value) => value.GetValue<char>(); 187public static implicit operator Value(char? value) => new(value); 188public static explicit operator char?(in Value value) => value.GetValue<char?>(); 211public static implicit operator Value(short value) => new(value); 212public static explicit operator short(in Value value) => value.GetValue<short>(); 213public static implicit operator Value(short? value) => new(value); 214public static explicit operator short?(in Value value) => value.GetValue<short?>(); 237public static implicit operator Value(int value) => new(value); 238public static explicit operator int(in Value value) => value.GetValue<int>(); 239public static implicit operator Value(int? value) => new(value); 240public static explicit operator int?(in Value value) => value.GetValue<int?>(); 263public static implicit operator Value(long value) => new(value); 264public static explicit operator long(in Value value) => value.GetValue<long>(); 265public static implicit operator Value(long? value) => new(value); 266public static explicit operator long?(in Value value) => value.GetValue<long?>(); 289public static implicit operator Value(ushort value) => new(value); 290public static explicit operator ushort(in Value value) => value.GetValue<ushort>(); 291public static implicit operator Value(ushort? value) => new(value); 292public static explicit operator ushort?(in Value value) => value.GetValue<ushort?>(); 315public static implicit operator Value(uint value) => new(value); 316public static explicit operator uint(in Value value) => value.GetValue<uint>(); 317public static implicit operator Value(uint? value) => new(value); 318public static explicit operator uint?(in Value value) => value.GetValue<uint?>(); 341public static implicit operator Value(ulong value) => new(value); 342public static explicit operator ulong(in Value value) => value.GetValue<ulong>(); 343public static implicit operator Value(ulong? value) => new(value); 344public static explicit operator ulong?(in Value value) => value.GetValue<ulong?>(); 367public static implicit operator Value(float value) => new(value); 368public static explicit operator float(in Value value) => value.GetValue<float>(); 369public static implicit operator Value(float? value) => new(value); 370public static explicit operator float?(in Value value) => value.GetValue<float?>(); 393public static implicit operator Value(double value) => new(value); 394public static explicit operator double(in Value value) => value.GetValue<double>(); 395public static implicit operator Value(double? value) => new(value); 396public static explicit operator double?(in Value value) => value.GetValue<double?>(); 419public static implicit operator Value(Size value) => new(value); 420public static explicit operator Size(in Value value) => value.GetValue<Size>(); 421public static implicit operator Value(Size? value) => new(value); 422public static explicit operator Size?(in Value value) => value.GetValue<Size?>(); 445public static implicit operator Value(Point value) => new(value); 446public static explicit operator Point(in Value value) => value.GetValue<Point>(); 447public static implicit operator Value(Point? value) => new(value); 448public static explicit operator Point?(in Value value) => value.GetValue<Point?>(); 478public static implicit operator Value(Color value) => new(value); 479public static explicit operator Color(in Value value) => value.GetValue<Color>(); 480public static implicit operator Value(Color? value) => new(value); 481public static explicit operator Color?(in Value value) => value.GetValue<Color?>(); 517public static implicit operator Value(DateTimeOffset value) => new(value); 518public static explicit operator DateTimeOffset(in Value value) => value.GetValue<DateTimeOffset>(); 519public static implicit operator Value(DateTimeOffset? value) => new(value); 520public static explicit operator DateTimeOffset?(in Value value) => value.GetValue<DateTimeOffset?>(); 543public static implicit operator Value(DateTime value) => new(value); 544public static explicit operator DateTime(in Value value) => value.GetValue<DateTime>(); 545public static implicit operator Value(DateTime? value) => new(value); 546public static explicit operator DateTime?(in Value value) => value.GetValue<DateTime?>(); 566public static implicit operator Value(ArraySegment<byte> value) => new(value); 567public static explicit operator ArraySegment<byte>(in Value value) => value.GetValue<ArraySegment<byte>>(); 585public static implicit operator Value(ArraySegment<char> value) => new(value); 586public static explicit operator ArraySegment<char>(in Value value) => value.GetValue<ArraySegment<char>>(); 590public static implicit operator Value(decimal value) => new(value); 591public static explicit operator decimal(in Value value) => value.GetValue<decimal>(); 592public static implicit operator Value(decimal? value) => value.HasValue ? new(value.Value) : new(value); 593public static explicit operator decimal?(in Value value) => value.GetValue<decimal?>(); 599/// Creates a new <see cref="Value"/> with the given value. This method can always be used and avoids boxing enums. 601public static Value Create<T>(T value) 687/// Tries to get the value stored in this <see cref="Value"/> as the given type. Returns <see langword="true"/> if
System\Value.PackedColorFlag.cs (1)
14public override Color To(in Value value)
System\Value.PackedDateTimeOffsetFlag.cs (1)
12public override DateTimeOffset To(in Value value) => value._union.PackedDateTimeOffset.Extract();
System\Value.StraightCastFlag.cs (1)
18public override T To(in Value value) => Unsafe.As<Union, T>(ref Unsafe.AsRef(in value._union));
System\Value.TypeFlag.cs (6)
11/// A flag that represents the <see cref="System.Type"/> of a <see cref="Union"/> in a <see cref="Value"/>. 12/// Also provides the functionality to convert any <see cref="Value"/> to an <see langword="object"/> that 24/// Converts the given <see cref="Value"/> to an <see langword="object"/>. 26public abstract object ToObject(in Value value); 40public override object ToObject(in Value value) => To(value)!; 41public abstract T To(in Value value);
System\Value.Union.cs (2)
12/// Data union for the <see cref="Value"/> type. 17/// <see cref="Value"/> type.
System\Value.UtcDateTimeOffsetFlag.cs (1)
12public override DateTimeOffset To(in Value value) => new(new DateTime(value._union.Ticks, DateTimeKind.Utc));
Windows\Win32\Foundation\PWSTR.cs (1)
30char* p = Value;