Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dc12a9d
commit 51a219e
Showing
8 changed files
with
298 additions
and
5 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,20 @@ | ||
name: CI | ||
on: [push] | ||
jobs: | ||
build: | ||
runs-on: windows-2019 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: '6.0.x' | ||
dotnet-quality: 'preview' | ||
env: | ||
NUGET_AUTH_TOKEN: ${{secrets.NUGET_AUTH_TOKEN}} | ||
|
||
- name: Run Build | ||
run: dotnet build src/ABSmartly.Sdk | ||
|
||
- name: Run Tests | ||
run: dotnet test |
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,30 @@ | ||
name: Publish Nuget | ||
on: | ||
push: | ||
branches: | ||
- "main" | ||
tags: | ||
- v* | ||
jobs: | ||
build: | ||
runs-on: windows-2019 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: '5.0.x' | ||
dotnet-quality: 'preview' | ||
env: | ||
NUGET_AUTH_TOKEN: ${{secrets.NUGET_AUTH_TOKEN}} | ||
|
||
- name: Run Build | ||
run: dotnet build | ||
env: | ||
NUGET_AUTH_TOKEN: ${{secrets.NUGET_AUTH_TOKEN}} | ||
|
||
- name: Run Release | ||
run: dotnet nuget push bin/Debug/ --api-key $NUGET_AUTH_TOKEN --source https://api.nuget.org/v3/index.json | ||
env: | ||
NUGET_AUTH_TOKEN: ${{secrets.NUGET_AUTH_TOKEN}} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
using System.Diagnostics; | ||
|
||
namespace ABSmartly.Models; | ||
|
||
[DebuggerDisplay("{DebugView},nq")] | ||
public class CustomFieldValue | ||
{ | ||
public string Name { get; set; } | ||
public string Type { get; set; } | ||
public string Value { get; set; } | ||
|
||
private string DebugView => $"ExperimentVariant{{name={Name}, type={Type}, value={Value}}}"; | ||
|
||
public override string ToString() | ||
{ | ||
return DebugView; | ||
} | ||
|
||
|
||
#region Equality members | ||
|
||
protected bool Equals(CustomFieldValue other) | ||
{ | ||
return Name == other.Name && | ||
Type == other.Type&& | ||
Value == other.Value; | ||
} | ||
|
||
public override bool Equals(object obj) | ||
{ | ||
if (ReferenceEquals(null, obj)) return false; | ||
if (ReferenceEquals(this, obj)) return true; | ||
if (obj.GetType() != GetType()) return false; | ||
return Equals((CustomFieldValue)obj); | ||
} | ||
|
||
public override int GetHashCode() | ||
{ | ||
unchecked | ||
{ | ||
return ((Name?.GetHashCode() ?? 0) * 397) ^ (Type?.GetHashCode() ?? 0) ^ (Value?.GetHashCode() ?? 0); | ||
} | ||
} | ||
|
||
#endregion | ||
} |
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
Oops, something went wrong.