-
-
Save misha130/8ef19c016b02c8030317808e262172cc to your computer and use it in GitHub Desktop.
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
public record C(int i); |
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.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] | |
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] | |
[assembly: AssemblyVersion("0.0.0.0")] | |
[module: UnverifiableCode] | |
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; | |
} | |
} | |
} | |
[System.Runtime.CompilerServices.NullableContext(1)] | |
[System.Runtime.CompilerServices.Nullable(0)] | |
public class C : IEquatable<C> | |
{ | |
[CompilerGenerated] | |
[DebuggerBrowsable(DebuggerBrowsableState.Never)] | |
private readonly int <i>k__BackingField; | |
protected virtual Type EqualityContract | |
{ | |
[CompilerGenerated] | |
get | |
{ | |
return typeof(C); | |
} | |
} | |
public int i | |
{ | |
[CompilerGenerated] | |
get | |
{ | |
return <i>k__BackingField; | |
} | |
[CompilerGenerated] | |
init | |
{ | |
<i>k__BackingField = value; | |
} | |
} | |
public C(int i) | |
{ | |
<i>k__BackingField = i; | |
base..ctor(); | |
} | |
[System.Runtime.CompilerServices.NullableContext(0)] | |
public override string ToString() | |
{ | |
StringBuilder stringBuilder = new StringBuilder(); | |
stringBuilder.Append("C"); | |
stringBuilder.Append(" { "); | |
if (PrintMembers(stringBuilder)) | |
{ | |
stringBuilder.Append(" "); | |
} | |
stringBuilder.Append("}"); | |
return stringBuilder.ToString(); | |
} | |
protected virtual bool PrintMembers(StringBuilder builder) | |
{ | |
builder.Append("i"); | |
builder.Append(" = "); | |
builder.Append(i.ToString()); | |
return true; | |
} | |
[System.Runtime.CompilerServices.NullableContext(2)] | |
public static bool operator !=(C r1, C r2) | |
{ | |
return !(r1 == r2); | |
} | |
[System.Runtime.CompilerServices.NullableContext(2)] | |
public static bool operator ==(C r1, C r2) | |
{ | |
return (object)r1 == r2 || ((object)r1 != null && r1.Equals(r2)); | |
} | |
public override int GetHashCode() | |
{ | |
return EqualityComparer<Type>.Default.GetHashCode(EqualityContract) * -1521134295 + EqualityComparer<int>.Default.GetHashCode(<i>k__BackingField); | |
} | |
[System.Runtime.CompilerServices.NullableContext(2)] | |
public override bool Equals(object obj) | |
{ | |
return Equals(obj as C); | |
} | |
[System.Runtime.CompilerServices.NullableContext(2)] | |
public virtual bool Equals(C other) | |
{ | |
return (object)other != null && EqualityContract == other.EqualityContract && EqualityComparer<int>.Default.Equals(<i>k__BackingField, other.<i>k__BackingField); | |
} | |
public virtual C <Clone>$() | |
{ | |
return new C(this); | |
} | |
protected C(C original) | |
{ | |
<i>k__BackingField = original.<i>k__BackingField; | |
} | |
public void Deconstruct(out int i) | |
{ | |
i = this.i; | |
} | |
} |
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
{ | |
"version": 1, | |
"target": "C#", | |
"mode": "Debug" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment