2 writes to _union
System.Private.Windows.Core (2)
System\Value.cs (2)
31_union = default; 681Unsafe.SkipInit(out _union);
84 references to _union
System.Private.Windows.Core (84)
System\Value.cs (80)
54if (_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; 717value = Unsafe.As<Union, T>(ref Unsafe.AsRef(in _union)); 722Color color = _union.PackedColor.Extract(); 728value = Unsafe.As<DateTime, T>(ref Unsafe.AsRef(in _union.DateTime)); 733DateTimeOffset dto = new(_union.Ticks, TimeSpan.Zero); 739DateTimeOffset dto = _union.PackedDateTimeOffset.Extract(); 779ulong bits = _union.UInt64; 783? new(byteArray, _union.Segment.Offset, _union.Segment.Count) 795ulong bits = _union.UInt64; 799? new(charArray, _union.Segment.Offset, _union.Segment.Count) 811int? @int = _union.Int32; 817long? @long = _union.Int64; 823bool? @bool = _union.Boolean; 829float? single = _union.Single; 835double? @double = _union.Double; 841uint? @uint = _union.UInt32; 847ulong? @ulong = _union.UInt64; 853char? @char = _union.Char; 859short? @short = _union.Int16; 865ushort? @ushort = _union.UInt16; 871byte? @byte = _union.Byte; 877sbyte? @sbyte = _union.SByte; 883Color? color = _union.PackedColor.Extract(); 889DateTime? dateTime = _union.DateTime; 895DateTimeOffset? dto = new DateTimeOffset(_union.Ticks, TimeSpan.Zero); 901DateTimeOffset? dto = _union.PackedDateTimeOffset.Extract(); 920NullableTemplate<byte> byteTemplate = new(_union.Byte); 925NullableTemplate<ushort> ushortTemplate = new(_union.UInt16); 930NullableTemplate<uint> uintTemplate = new(_union.UInt32); 935NullableTemplate<ulong> ulongTemplate = new(_union.UInt64); 967if (_union.UInt64 == 0 && _object is char[]) 981if (_union.UInt64 == 0 && _object is byte[]) 1001else if (_union.UInt64 != 0 && _object is char[] chars) 1003value = _union.UInt64 != ulong.MaxValue 1004? (T)(object)new ArraySegment<char>(chars, _union.Segment.Offset, _union.Segment.Count) 1008else if (_union.UInt64 != 0 && _object is byte[] bytes) 1010value = _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)
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.UtcDateTimeOffsetFlag.cs (1)
12public override DateTimeOffset To(in Value value) => new(new DateTime(value._union.Ticks, DateTimeKind.Utc));