2 writes to _union
System.Private.Windows.Core (2)
System\Value.cs (2)
30
_union
= default;
680
Unsafe.SkipInit(out
_union
);
84 references to _union
System.Private.Windows.Core (84)
System\Value.cs (80)
53
if (
_union
.UInt64 != 0)
90
_union
.Byte = value;
98
_union
.Byte = value.Value;
116
_union
.SByte = value;
124
_union
.SByte = value.Value;
142
_union
.Boolean = value;
150
_union
.Boolean = value.Value;
168
_union
.Char = value;
176
_union
.Char = value.Value;
194
_union
.Int16 = value;
202
_union
.Int16 = value.Value;
220
_union
.Int32 = value;
228
_union
.Int32 = value.Value;
246
_union
.Int64 = value;
254
_union
.Int64 = value.Value;
272
_union
.UInt16 = value;
280
_union
.UInt16 = value.Value;
298
_union
.UInt32 = value;
306
_union
.UInt32 = value.Value;
324
_union
.UInt64 = value;
332
_union
.UInt64 = value.Value;
350
_union
.Single = value;
358
_union
.Single = value.Value;
376
_union
.Double = value;
384
_union
.Double = value.Value;
402
_union
.Size = value;
410
_union
.Size = value.Value;
428
_union
.Point = value;
436
_union
.Point = value.Value;
456
_union
.PackedColor = packed;
490
_union
.Ticks = value.Ticks;
495
_union
.PackedDateTimeOffset = packed;
525
_union
.DateTime = value;
534
_union
.DateTime = value.Value;
557
_union
.UInt64 = ulong.MaxValue;
561
_union
.Segment = (segment.Offset, segment.Count);
576
_union
.UInt64 = ulong.MaxValue;
580
_union
.Segment = (segment.Offset, segment.Count);
682
_union
.UInt64 = u;
716
value = Unsafe.As<Union, T>(ref Unsafe.AsRef(in
_union
));
721
Color color =
_union
.PackedColor.Extract();
727
value = Unsafe.As<DateTime, T>(ref Unsafe.AsRef(in
_union
.DateTime));
732
DateTimeOffset dto = new(
_union
.Ticks, TimeSpan.Zero);
738
DateTimeOffset dto =
_union
.PackedDateTimeOffset.Extract();
778
ulong bits =
_union
.UInt64;
782
? new(byteArray,
_union
.Segment.Offset,
_union
.Segment.Count)
794
ulong bits =
_union
.UInt64;
798
? new(charArray,
_union
.Segment.Offset,
_union
.Segment.Count)
810
int? @int =
_union
.Int32;
816
long? @long =
_union
.Int64;
822
bool? @bool =
_union
.Boolean;
828
float? single =
_union
.Single;
834
double? @double =
_union
.Double;
840
uint? @uint =
_union
.UInt32;
846
ulong? @ulong =
_union
.UInt64;
852
char? @char =
_union
.Char;
858
short? @short =
_union
.Int16;
864
ushort? @ushort =
_union
.UInt16;
870
byte? @byte =
_union
.Byte;
876
sbyte? @sbyte =
_union
.SByte;
882
Color? color =
_union
.PackedColor.Extract();
888
DateTime? dateTime =
_union
.DateTime;
894
DateTimeOffset? dto = new DateTimeOffset(
_union
.Ticks, TimeSpan.Zero);
900
DateTimeOffset? dto =
_union
.PackedDateTimeOffset.Extract();
919
NullableTemplate<byte> byteTemplate = new(
_union
.Byte);
924
NullableTemplate<ushort> ushortTemplate = new(
_union
.UInt16);
929
NullableTemplate<uint> uintTemplate = new(
_union
.UInt32);
934
NullableTemplate<ulong> ulongTemplate = new(
_union
.UInt64);
966
if (
_union
.UInt64 == 0 && _object is char[])
980
if (
_union
.UInt64 == 0 && _object is byte[])
1000
else if (
_union
.UInt64 != 0 && _object is char[] chars)
1002
value =
_union
.UInt64 != ulong.MaxValue
1003
? (T)(object)new ArraySegment<char>(chars,
_union
.Segment.Offset,
_union
.Segment.Count)
1007
else if (
_union
.UInt64 != 0 && _object is byte[] bytes)
1009
value =
_union
.UInt64 != ulong.MaxValue
1010
? (T)(object)new ArraySegment<byte>(bytes,
_union
.Segment.Offset,
_union
.Segment.Count)
System\Value.PackedColorFlag.cs (1)
15
=> value.
_union
.PackedColor.Extract();
System\Value.PackedDateTimeOffsetFlag.cs (1)
12
public override DateTimeOffset To(in Value value) => value.
_union
.PackedDateTimeOffset.Extract();
System\Value.StraightCastFlag.cs (1)
16
public override T To(in Value value) => Unsafe.As<Union, T>(ref Unsafe.AsRef(in value.
_union
));
System\Value.UtcDateTimeOffsetFlag.cs (1)
12
public override DateTimeOffset To(in Value value) => new(new DateTime(value.
_union
.Ticks, DateTimeKind.Utc));