Files
Xune/UIX.RenderApi.Skia/Microsoft/Iris/Render/Protocol/ContextID.cs
T

35 lines
1.2 KiB
C#
Raw Normal View History

2021-07-11 22:59:29 -05:00
// Decompiled with JetBrains decompiler
// Type: Microsoft.Iris.Render.Protocol.ContextID
// Assembly: UIX.RenderApi, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217
// MVID: D47658B8-A8EA-43D6-8837-ECE823BFFFC1
// Assembly location: C:\Program Files\Zune\UIX.RenderApi.dll
using System;
using System.Runtime.InteropServices;
namespace Microsoft.Iris.Render.Protocol
{
2021-07-11 23:04:40 -05:00
[ComVisible(false)]
[Serializable]
internal struct ContextID
{
public static readonly ContextID NULL = new ContextID();
public static readonly ContextID CURRENT = new ContextID(uint.MaxValue);
private uint value;
2021-07-11 22:59:29 -05:00
2021-07-11 23:04:40 -05:00
private ContextID(uint value) => this.value = value;
2021-07-11 22:59:29 -05:00
2021-07-11 23:04:40 -05:00
public static bool operator ==(ContextID hl, ContextID hr) => (int)hl.value == (int)hr.value;
2021-07-11 22:59:29 -05:00
2021-07-11 23:04:40 -05:00
public static bool operator !=(ContextID hl, ContextID hr) => (int)hl.value != (int)hr.value;
2021-07-11 22:59:29 -05:00
2021-07-11 23:04:40 -05:00
public override bool Equals(object oCompare) => oCompare is ContextID contextId && (int)this.value == (int)contextId.value;
2021-07-11 22:59:29 -05:00
2021-07-11 23:04:40 -05:00
public override int GetHashCode() => (int)this.value;
2021-07-11 22:59:29 -05:00
2021-07-11 23:04:40 -05:00
public static ContextID FromUInt32(uint value) => new ContextID(value);
2021-07-11 22:59:29 -05:00
2021-07-11 23:04:40 -05:00
public static uint ToUInt32(ContextID handle) => handle.value;
}
2021-07-11 22:59:29 -05:00
}