2 writes to _union
System.Private.Windows.Core (2)
System\Value.cs (2)
31
_union
= default;
681
Unsafe.SkipInit(out
_union
);
84 references to _union
System.Private.Windows.Core (84)
System\Value.cs (80)
54
if (
_union
.UInt64 != 0)
91
_union
.Byte = value;
99
_union
.Byte = value.Value;
117
_union
.SByte = value;
125
_union
.SByte = value.Value;
143
_union
.Boolean = value;
151
_union
.Boolean = value.Value;
169
_union
.Char = value;
177
_union
.Char = value.Value;
195
_union
.Int16 = value;
203
_union
.Int16 = value.Value;
221
_union
.Int32 = value;
229
_union
.Int32 = value.Value;
247
_union
.Int64 = value;
255
_union
.Int64 = value.Value;
273
_union
.UInt16 = value;
281
_union
.UInt16 = value.Value;
299
_union
.UInt32 = value;
307
_union
.UInt32 = value.Value;
325
_union
.UInt64 = value;
333
_union
.UInt64 = value.Value;
351
_union
.Single = value;
359
_union
.Single = value.Value;
377
_union
.Double = value;
385
_union
.Double = value.Value;
403
_union
.Size = value;
411
_union
.Size = value.Value;
429
_union
.Point = value;
437
_union
.Point = value.Value;
457
_union
.PackedColor = packed;
491
_union
.Ticks = value.Ticks;
496
_union
.PackedDateTimeOffset = packed;
526
_union
.DateTime = value;
535
_union
.DateTime = value.Value;
558
_union
.UInt64 = ulong.MaxValue;
562
_union
.Segment = (segment.Offset, segment.Count);
577
_union
.UInt64 = ulong.MaxValue;
581
_union
.Segment = (segment.Offset, segment.Count);
683
_union
.UInt64 = u;
717
value = Unsafe.As<Union, T>(ref Unsafe.AsRef(in
_union
));
722
Color color =
_union
.PackedColor.Extract();
728
value = Unsafe.As<DateTime, T>(ref Unsafe.AsRef(in
_union
.DateTime));
733
DateTimeOffset dto = new(
_union
.Ticks, TimeSpan.Zero);
739
DateTimeOffset dto =
_union
.PackedDateTimeOffset.Extract();
779
ulong bits =
_union
.UInt64;
783
? new(byteArray,
_union
.Segment.Offset,
_union
.Segment.Count)
795
ulong bits =
_union
.UInt64;
799
? new(charArray,
_union
.Segment.Offset,
_union
.Segment.Count)
811
int? @int =
_union
.Int32;
817
long? @long =
_union
.Int64;
823
bool? @bool =
_union
.Boolean;
829
float? single =
_union
.Single;
835
double? @double =
_union
.Double;
841
uint? @uint =
_union
.UInt32;
847
ulong? @ulong =
_union
.UInt64;
853
char? @char =
_union
.Char;
859
short? @short =
_union
.Int16;
865
ushort? @ushort =
_union
.UInt16;
871
byte? @byte =
_union
.Byte;
877
sbyte? @sbyte =
_union
.SByte;
883
Color? color =
_union
.PackedColor.Extract();
889
DateTime? dateTime =
_union
.DateTime;
895
DateTimeOffset? dto = new DateTimeOffset(
_union
.Ticks, TimeSpan.Zero);
901
DateTimeOffset? dto =
_union
.PackedDateTimeOffset.Extract();
920
NullableTemplate<byte> byteTemplate = new(
_union
.Byte);
925
NullableTemplate<ushort> ushortTemplate = new(
_union
.UInt16);
930
NullableTemplate<uint> uintTemplate = new(
_union
.UInt32);
935
NullableTemplate<ulong> ulongTemplate = new(
_union
.UInt64);
967
if (
_union
.UInt64 == 0 && _object is char[])
981
if (
_union
.UInt64 == 0 && _object is byte[])
1001
else if (
_union
.UInt64 != 0 && _object is char[] chars)
1003
value =
_union
.UInt64 != ulong.MaxValue
1004
? (T)(object)new ArraySegment<char>(chars,
_union
.Segment.Offset,
_union
.Segment.Count)
1008
else if (
_union
.UInt64 != 0 && _object is byte[] bytes)
1010
value =
_union
.UInt64 != ulong.MaxValue
1011
? (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)
18
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));