43 instantiations of Value
System.Private.Windows.Core (43)
System\Value.cs (43)
107
public static implicit operator Value(byte value) =>
new
(value);
109
public static implicit operator Value(byte? value) =>
new
(value);
133
public static implicit operator Value(sbyte value) =>
new
(value);
135
public static implicit operator Value(sbyte? value) =>
new
(value);
159
public static implicit operator Value(bool value) =>
new
(value);
161
public static implicit operator Value(bool? value) =>
new
(value);
185
public static implicit operator Value(char value) =>
new
(value);
187
public static implicit operator Value(char? value) =>
new
(value);
211
public static implicit operator Value(short value) =>
new
(value);
213
public static implicit operator Value(short? value) =>
new
(value);
237
public static implicit operator Value(int value) =>
new
(value);
239
public static implicit operator Value(int? value) =>
new
(value);
263
public static implicit operator Value(long value) =>
new
(value);
265
public static implicit operator Value(long? value) =>
new
(value);
289
public static implicit operator Value(ushort value) =>
new
(value);
291
public static implicit operator Value(ushort? value) =>
new
(value);
315
public static implicit operator Value(uint value) =>
new
(value);
317
public static implicit operator Value(uint? value) =>
new
(value);
341
public static implicit operator Value(ulong value) =>
new
(value);
343
public static implicit operator Value(ulong? value) =>
new
(value);
367
public static implicit operator Value(float value) =>
new
(value);
369
public static implicit operator Value(float? value) =>
new
(value);
393
public static implicit operator Value(double value) =>
new
(value);
395
public static implicit operator Value(double? value) =>
new
(value);
419
public static implicit operator Value(Size value) =>
new
(value);
421
public static implicit operator Value(Size? value) =>
new
(value);
445
public static implicit operator Value(Point value) =>
new
(value);
447
public static implicit operator Value(Point? value) =>
new
(value);
474
this =
new
(value.Value);
478
public static implicit operator Value(Color value) =>
new
(value);
480
public static implicit operator Value(Color? value) =>
new
(value);
513
this =
new
(value.Value);
517
public static implicit operator Value(DateTimeOffset value) =>
new
(value);
519
public static implicit operator Value(DateTimeOffset? value) =>
new
(value);
543
public static implicit operator Value(DateTime value) =>
new
(value);
545
public static implicit operator Value(DateTime? value) =>
new
(value);
566
public static implicit operator Value(ArraySegment<byte> value) =>
new
(value);
585
public static implicit operator Value(ArraySegment<char> value) =>
new
(value);
590
public static implicit operator Value(decimal value) =>
new
(value);
592
public static implicit operator Value(decimal? value) => value.HasValue ?
new
(value.Value) :
new
(value);
672
return new
Value
(StraightCastFlag<T>.Instance, Unsafe.As<T, ulong>(ref value));
675
return 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
"/>.
107
public static implicit operator
Value
(byte value) => new(value);
108
public static explicit operator byte(in
Value
value) => value.GetValue<byte>();
109
public static implicit operator
Value
(byte? value) => new(value);
110
public static explicit operator byte?(in
Value
value) => value.GetValue<byte?>();
133
public static implicit operator
Value
(sbyte value) => new(value);
134
public static explicit operator sbyte(in
Value
value) => value.GetValue<sbyte>();
135
public static implicit operator
Value
(sbyte? value) => new(value);
136
public static explicit operator sbyte?(in
Value
value) => value.GetValue<sbyte?>();
159
public static implicit operator
Value
(bool value) => new(value);
160
public static explicit operator bool(in
Value
value) => value.GetValue<bool>();
161
public static implicit operator
Value
(bool? value) => new(value);
162
public static explicit operator bool?(in
Value
value) => value.GetValue<bool?>();
185
public static implicit operator
Value
(char value) => new(value);
186
public static explicit operator char(in
Value
value) => value.GetValue<char>();
187
public static implicit operator
Value
(char? value) => new(value);
188
public static explicit operator char?(in
Value
value) => value.GetValue<char?>();
211
public static implicit operator
Value
(short value) => new(value);
212
public static explicit operator short(in
Value
value) => value.GetValue<short>();
213
public static implicit operator
Value
(short? value) => new(value);
214
public static explicit operator short?(in
Value
value) => value.GetValue<short?>();
237
public static implicit operator
Value
(int value) => new(value);
238
public static explicit operator int(in
Value
value) => value.GetValue<int>();
239
public static implicit operator
Value
(int? value) => new(value);
240
public static explicit operator int?(in
Value
value) => value.GetValue<int?>();
263
public static implicit operator
Value
(long value) => new(value);
264
public static explicit operator long(in
Value
value) => value.GetValue<long>();
265
public static implicit operator
Value
(long? value) => new(value);
266
public static explicit operator long?(in
Value
value) => value.GetValue<long?>();
289
public static implicit operator
Value
(ushort value) => new(value);
290
public static explicit operator ushort(in
Value
value) => value.GetValue<ushort>();
291
public static implicit operator
Value
(ushort? value) => new(value);
292
public static explicit operator ushort?(in
Value
value) => value.GetValue<ushort?>();
315
public static implicit operator
Value
(uint value) => new(value);
316
public static explicit operator uint(in
Value
value) => value.GetValue<uint>();
317
public static implicit operator
Value
(uint? value) => new(value);
318
public static explicit operator uint?(in
Value
value) => value.GetValue<uint?>();
341
public static implicit operator
Value
(ulong value) => new(value);
342
public static explicit operator ulong(in
Value
value) => value.GetValue<ulong>();
343
public static implicit operator
Value
(ulong? value) => new(value);
344
public static explicit operator ulong?(in
Value
value) => value.GetValue<ulong?>();
367
public static implicit operator
Value
(float value) => new(value);
368
public static explicit operator float(in
Value
value) => value.GetValue<float>();
369
public static implicit operator
Value
(float? value) => new(value);
370
public static explicit operator float?(in
Value
value) => value.GetValue<float?>();
393
public static implicit operator
Value
(double value) => new(value);
394
public static explicit operator double(in
Value
value) => value.GetValue<double>();
395
public static implicit operator
Value
(double? value) => new(value);
396
public static explicit operator double?(in
Value
value) => value.GetValue<double?>();
419
public static implicit operator
Value
(Size value) => new(value);
420
public static explicit operator Size(in
Value
value) => value.GetValue<Size>();
421
public static implicit operator
Value
(Size? value) => new(value);
422
public static explicit operator Size?(in
Value
value) => value.GetValue<Size?>();
445
public static implicit operator
Value
(Point value) => new(value);
446
public static explicit operator Point(in
Value
value) => value.GetValue<Point>();
447
public static implicit operator
Value
(Point? value) => new(value);
448
public static explicit operator Point?(in
Value
value) => value.GetValue<Point?>();
478
public static implicit operator
Value
(Color value) => new(value);
479
public static explicit operator Color(in
Value
value) => value.GetValue<Color>();
480
public static implicit operator
Value
(Color? value) => new(value);
481
public static explicit operator Color?(in
Value
value) => value.GetValue<Color?>();
517
public static implicit operator
Value
(DateTimeOffset value) => new(value);
518
public static explicit operator DateTimeOffset(in
Value
value) => value.GetValue<DateTimeOffset>();
519
public static implicit operator
Value
(DateTimeOffset? value) => new(value);
520
public static explicit operator DateTimeOffset?(in
Value
value) => value.GetValue<DateTimeOffset?>();
543
public static implicit operator
Value
(DateTime value) => new(value);
544
public static explicit operator DateTime(in
Value
value) => value.GetValue<DateTime>();
545
public static implicit operator
Value
(DateTime? value) => new(value);
546
public static explicit operator DateTime?(in
Value
value) => value.GetValue<DateTime?>();
566
public static implicit operator
Value
(ArraySegment<byte> value) => new(value);
567
public static explicit operator ArraySegment<byte>(in
Value
value) => value.GetValue<ArraySegment<byte>>();
585
public static implicit operator
Value
(ArraySegment<char> value) => new(value);
586
public static explicit operator ArraySegment<char>(in
Value
value) => value.GetValue<ArraySegment<char>>();
590
public static implicit operator
Value
(decimal value) => new(value);
591
public static explicit operator decimal(in
Value
value) => value.GetValue<decimal>();
592
public static implicit operator
Value
(decimal? value) => value.HasValue ? new(value.Value) : new(value);
593
public 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.
601
public 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)
14
public override Color To(in
Value
value)
System\Value.PackedDateTimeOffsetFlag.cs (1)
12
public override DateTimeOffset To(in
Value
value) => value._union.PackedDateTimeOffset.Extract();
System\Value.StraightCastFlag.cs (1)
18
public 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"/>.
26
public abstract object ToObject(in
Value
value);
40
public override object ToObject(in
Value
value) => To(value)!;
41
public 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)
12
public override DateTimeOffset To(in
Value
value) => new(new DateTime(value._union.Ticks, DateTimeKind.Utc));
Windows\Win32\Foundation\PWSTR.cs (1)
30
char* p =
Value
;