-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from diegofrata/fields
Added support for fields.
- Loading branch information
Showing
90 changed files
with
671 additions
and
245 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/dotnet | ||
{ | ||
"name": "C# (.NET)", | ||
"image": "mcr.microsoft.com/devcontainers/dotnet:0-6.0", | ||
"features": { | ||
"ghcr.io/devcontainers/features/dotnet:1": {} | ||
} | ||
|
||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
// "features": {}, | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [5000, 5001], | ||
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
// "postCreateCommand": "dotnet restore", | ||
|
||
// Configure tool-specific properties. | ||
// "customizations": {}, | ||
|
||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. | ||
// "remoteUser": "root" | ||
} |
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
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
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
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
1 change: 1 addition & 0 deletions
1
Generator.Equals.SnapshotTests/Classes/FieldEquality.Diagnostics.verified.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[] |
65 changes: 65 additions & 0 deletions
65
Generator.Equals.SnapshotTests/Classes/FieldEquality.verified.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
//HintName: Generator.Equals.Tests.Classes.FieldEquality.Sample.Generator.Equals.g.cs | ||
|
||
#nullable enable | ||
#pragma warning disable CS0612,CS0618 | ||
|
||
namespace Generator.Equals.Tests.Classes | ||
{ | ||
partial class FieldEquality | ||
{ | ||
partial class Sample : global::System.IEquatable<Sample> | ||
{ | ||
/// <summary> | ||
/// Indicates whether the object on the left is equal to the object on the right. | ||
/// </summary> | ||
/// <param name="left">The left object</param> | ||
/// <param name="right">The right object</param> | ||
/// <returns>true if the objects are equal; otherwise, false.</returns> | ||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Generator.Equals", "1.0.0.0")] | ||
public static bool operator ==( | ||
global::Generator.Equals.Tests.Classes.FieldEquality.Sample? left, | ||
global::Generator.Equals.Tests.Classes.FieldEquality.Sample? right) => | ||
global::System.Collections.Generic.EqualityComparer<global::Generator.Equals.Tests.Classes.FieldEquality.Sample?>.Default | ||
.Equals(left, right); | ||
|
||
/// <summary> | ||
/// Indicates whether the object on the left is not equal to the object on the right. | ||
/// </summary> | ||
/// <param name="left">The left object</param> | ||
/// <param name="right">The right object</param> | ||
/// <returns>true if the objects are not equal; otherwise, false.</returns> | ||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Generator.Equals", "1.0.0.0")] | ||
public static bool operator !=(global::Generator.Equals.Tests.Classes.FieldEquality.Sample? left, global::Generator.Equals.Tests.Classes.FieldEquality.Sample? right) => | ||
!(left == right); | ||
|
||
/// <inheritdoc/> | ||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Generator.Equals", "1.0.0.0")] | ||
public override bool Equals(object? obj) => | ||
Equals(obj as global::Generator.Equals.Tests.Classes.FieldEquality.Sample); | ||
|
||
/// <inheritdoc/> | ||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Generator.Equals", "1.0.0.0")] | ||
public bool Equals(global::Generator.Equals.Tests.Classes.FieldEquality.Sample? other) | ||
{ | ||
return | ||
!ReferenceEquals(other, null) && this.GetType() == other.GetType() | ||
&& global::Generator.Equals.OrderedEqualityComparer<string>.Default.Equals(this._addresses!, other._addresses!) | ||
; | ||
} | ||
|
||
/// <inheritdoc/> | ||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Generator.Equals", "1.0.0.0")] | ||
public override int GetHashCode() | ||
{ | ||
var hashCode = new global::System.HashCode(); | ||
|
||
hashCode.Add(this.GetType()); | ||
hashCode.Add( | ||
this._addresses!, | ||
global::Generator.Equals.OrderedEqualityComparer<string>.Default); | ||
|
||
return hashCode.ToHashCode(); | ||
} | ||
} | ||
} | ||
} |
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
1 change: 1 addition & 0 deletions
1
Generator.Equals.SnapshotTests/RecordStructs/FieldEquality.Diagnostics.verified.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[] |
35 changes: 35 additions & 0 deletions
35
Generator.Equals.SnapshotTests/RecordStructs/FieldEquality.verified.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
//HintName: Generator.Equals.Tests.RecordsStructs.FieldEquality.Sample.Generator.Equals.g.cs | ||
|
||
#nullable enable | ||
#pragma warning disable CS0612,CS0618 | ||
|
||
namespace Generator.Equals.Tests.RecordsStructs | ||
{ | ||
partial class FieldEquality | ||
{ | ||
partial record struct Sample | ||
{ | ||
/// <inheritdoc/> | ||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Generator.Equals", "1.0.0.0")] | ||
public bool Equals(global::Generator.Equals.Tests.RecordsStructs.FieldEquality.Sample other) | ||
{ | ||
return true | ||
&& global::Generator.Equals.OrderedEqualityComparer<string>.Default.Equals(this._addresses!, other._addresses!) | ||
; | ||
} | ||
|
||
/// <inheritdoc/> | ||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Generator.Equals", "1.0.0.0")] | ||
public override int GetHashCode() | ||
{ | ||
var hashCode = new global::System.HashCode(); | ||
|
||
hashCode.Add( | ||
this._addresses!, | ||
global::Generator.Equals.OrderedEqualityComparer<string>.Default); | ||
|
||
return hashCode.ToHashCode(); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.