Created
December 7, 2022 16:56
-
-
Save aemloviji/dd74d6c1b500bbe85c63bf82cd507f12 to your computer and use it in GitHub Desktop.
Lowered version of record type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Reflection; | |
using System.Runtime.CompilerServices; | |
using System.Security; | |
using System.Security.Permissions; | |
using System.Text; | |
using Microsoft.CodeAnalysis; | |
[assembly: CompilationRelaxations(8)] | |
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] | |
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] | |
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] | |
[assembly: AssemblyVersion("0.0.0.0")] | |
[module: UnverifiableCode] | |
[module: System.Runtime.CompilerServices.RefSafetyRules(11)] | |
[CompilerGenerated] | |
internal class Program | |
{ | |
private static void <Main>$(string[] args) | |
{ | |
new Device("DELL", "f8078ddc-2d59-4902-9acd-8cd88649186d").<Clone>$().Identifier = "aea8be94-788a-4b01-a569-9f496904a49c"; | |
} | |
} | |
[System.Runtime.CompilerServices.NullableContext(1)] | |
[System.Runtime.CompilerServices.Nullable(0)] | |
public class Device : IEquatable<Device> | |
{ | |
[CompilerGenerated] | |
private readonly string <Manufacturer>k__BackingField; | |
[CompilerGenerated] | |
private readonly string <Identifier>k__BackingField; | |
[CompilerGenerated] | |
protected virtual Type EqualityContract | |
{ | |
[CompilerGenerated] | |
get | |
{ | |
return typeof(Device); | |
} | |
} | |
public string Manufacturer | |
{ | |
[CompilerGenerated] | |
get | |
{ | |
return <Manufacturer>k__BackingField; | |
} | |
[CompilerGenerated] | |
init | |
{ | |
<Manufacturer>k__BackingField = value; | |
} | |
} | |
public string Identifier | |
{ | |
[CompilerGenerated] | |
get | |
{ | |
return <Identifier>k__BackingField; | |
} | |
[CompilerGenerated] | |
init | |
{ | |
<Identifier>k__BackingField = value; | |
} | |
} | |
public Device(string Manufacturer, string Identifier) | |
{ | |
<Manufacturer>k__BackingField = Manufacturer; | |
<Identifier>k__BackingField = Identifier; | |
base..ctor(); | |
} | |
[CompilerGenerated] | |
public override string ToString() | |
{ | |
StringBuilder stringBuilder = new StringBuilder(); | |
stringBuilder.Append("Device"); | |
stringBuilder.Append(" { "); | |
if (PrintMembers(stringBuilder)) | |
{ | |
stringBuilder.Append(' '); | |
} | |
stringBuilder.Append('}'); | |
return stringBuilder.ToString(); | |
} | |
[CompilerGenerated] | |
protected virtual bool PrintMembers(StringBuilder builder) | |
{ | |
RuntimeHelpers.EnsureSufficientExecutionStack(); | |
builder.Append("Manufacturer = "); | |
builder.Append((object)Manufacturer); | |
builder.Append(", Identifier = "); | |
builder.Append((object)Identifier); | |
return true; | |
} | |
[System.Runtime.CompilerServices.NullableContext(2)] | |
[CompilerGenerated] | |
public static bool operator !=(Device left, Device right) | |
{ | |
return !(left == right); | |
} | |
[System.Runtime.CompilerServices.NullableContext(2)] | |
[CompilerGenerated] | |
public static bool operator ==(Device left, Device right) | |
{ | |
if ((object)left != right) | |
{ | |
if ((object)left != null) | |
{ | |
return left.Equals(right); | |
} | |
return false; | |
} | |
return true; | |
} | |
[CompilerGenerated] | |
public override int GetHashCode() | |
{ | |
return (EqualityComparer<Type>.Default.GetHashCode(EqualityContract) * -1521134295 + EqualityComparer<string>.Default.GetHashCode(<Manufacturer>k__BackingField)) * -1521134295 + EqualityComparer<string>.Default.GetHashCode(<Identifier>k__BackingField); | |
} | |
[System.Runtime.CompilerServices.NullableContext(2)] | |
[CompilerGenerated] | |
public override bool Equals(object obj) | |
{ | |
return Equals(obj as Device); | |
} | |
[System.Runtime.CompilerServices.NullableContext(2)] | |
[CompilerGenerated] | |
public virtual bool Equals(Device other) | |
{ | |
if ((object)this != other) | |
{ | |
if ((object)other != null && EqualityContract == other.EqualityContract && EqualityComparer<string>.Default.Equals(<Manufacturer>k__BackingField, other.<Manufacturer>k__BackingField)) | |
{ | |
return EqualityComparer<string>.Default.Equals(<Identifier>k__BackingField, other.<Identifier>k__BackingField); | |
} | |
return false; | |
} | |
return true; | |
} | |
[CompilerGenerated] | |
public virtual Device <Clone>$() | |
{ | |
return new Device(this); | |
} | |
[CompilerGenerated] | |
protected Device(Device original) | |
{ | |
<Manufacturer>k__BackingField = original.<Manufacturer>k__BackingField; | |
<Identifier>k__BackingField = original.<Identifier>k__BackingField; | |
} | |
[CompilerGenerated] | |
public void Deconstruct(out string Manufacturer, out string Identifier) | |
{ | |
Manufacturer = this.Manufacturer; | |
Identifier = this.Identifier; | |
} | |
} | |
namespace Microsoft.CodeAnalysis | |
{ | |
[CompilerGenerated] | |
[Embedded] | |
internal sealed class EmbeddedAttribute : Attribute | |
{ | |
} | |
} | |
namespace System.Runtime.CompilerServices | |
{ | |
[CompilerGenerated] | |
[Microsoft.CodeAnalysis.Embedded] | |
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] | |
internal sealed class NullableAttribute : Attribute | |
{ | |
public readonly byte[] NullableFlags; | |
public NullableAttribute(byte P_0) | |
{ | |
byte[] array = new byte[1]; | |
array[0] = P_0; | |
NullableFlags = array; | |
} | |
public NullableAttribute(byte[] P_0) | |
{ | |
NullableFlags = P_0; | |
} | |
} | |
[CompilerGenerated] | |
[Microsoft.CodeAnalysis.Embedded] | |
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] | |
internal sealed class NullableContextAttribute : Attribute | |
{ | |
public readonly byte Flag; | |
public NullableContextAttribute(byte P_0) | |
{ | |
Flag = P_0; | |
} | |
} | |
[CompilerGenerated] | |
[Microsoft.CodeAnalysis.Embedded] | |
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] | |
internal sealed class RefSafetyRulesAttribute : Attribute | |
{ | |
public readonly int Version; | |
public RefSafetyRulesAttribute(int P_0) | |
{ | |
Version = P_0; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment