-
Notifications
You must be signed in to change notification settings - Fork 0
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 #3 from ajmcateer/experimental
Experimental
- Loading branch information
Showing
26 changed files
with
964 additions
and
604 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 |
---|---|---|
@@ -1,3 +1,10 @@ | ||
dotnet publish -f netcoreapp3.0 -r win-x64 -c Release /p:PublishSingleFile=true | ||
$path = Split-Path -parent $MyInvocation.MyCommand.Definition | ||
$folderToDelete = $path + '\bin\Release\netcoreapp3.0' | ||
|
||
Remove-Item $folderToDelete -Recurse -Force | ||
|
||
Set-Location -Path $path | ||
|
||
dotnet publish -f netcoreapp3.0 -r win-x64 -c Release /p:PublishSingleFile=true | ||
dotnet publish -f netcoreapp3.0 -r linux-x64 -c Release | ||
dotnet publish -f netcoreapp3.0 -r osx-x64 -c Release /p:PublishSingleFile=true | ||
dotnet publish -f netcoreapp3.0 -r osx-x64 -c Release |
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,34 @@ | ||
using gotifySharp.Models; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Diagnostics.CodeAnalysis; | ||
using System.Text; | ||
|
||
namespace GotifyDesktop.Comparer | ||
{ | ||
public class ApplicationComparer : IEqualityComparer<ApplicationModel> | ||
{ | ||
public bool Equals([AllowNull] ApplicationModel x, [AllowNull] ApplicationModel y) | ||
{ | ||
if (object.ReferenceEquals(x, y)) | ||
{ | ||
return true; | ||
} | ||
if (object.ReferenceEquals(x, null) || | ||
object.ReferenceEquals(y, null)) | ||
{ | ||
return false; | ||
} | ||
return x.id == y.id; | ||
} | ||
|
||
public int GetHashCode([DisallowNull] ApplicationModel obj) | ||
{ | ||
if (obj == null) | ||
{ | ||
return 0; | ||
} | ||
return obj.id.GetHashCode(); | ||
} | ||
} | ||
} |
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,34 @@ | ||
using gotifySharp.Models; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Diagnostics.CodeAnalysis; | ||
using System.Text; | ||
|
||
namespace GotifyDesktop.Comparer | ||
{ | ||
public class MessageComparer : IEqualityComparer<MessageModel> | ||
{ | ||
public bool Equals([AllowNull] MessageModel x, [AllowNull] MessageModel y) | ||
{ | ||
if (object.ReferenceEquals(x, y)) | ||
{ | ||
return true; | ||
} | ||
if (object.ReferenceEquals(x, null) || | ||
object.ReferenceEquals(y, null)) | ||
{ | ||
return false; | ||
} | ||
return x.id == y.id; | ||
} | ||
|
||
public int GetHashCode([DisallowNull] MessageModel obj) | ||
{ | ||
if (obj == null) | ||
{ | ||
return 0; | ||
} | ||
return obj.id.GetHashCode(); | ||
} | ||
} | ||
} |
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,16 @@ | ||
using Microsoft.EntityFrameworkCore; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace GotifyDesktop.Infrastructure | ||
{ | ||
public class DatabaseContextFactory | ||
{ | ||
public DatabaseContext CreateContext() | ||
{ | ||
DatabaseContext context = new DatabaseContext(); | ||
return context; | ||
} | ||
} | ||
} |
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,23 @@ | ||
using GotifyDesktop.Service; | ||
using Serilog; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace GotifyDesktop.Infrastructure | ||
{ | ||
public class GotifyServiceFactory | ||
{ | ||
ILogger _ilogger; | ||
|
||
public GotifyServiceFactory(ILogger ilogger) | ||
{ | ||
_ilogger = ilogger; | ||
} | ||
|
||
public GotifyService CreateNewGotifyService() | ||
{ | ||
return new GotifyService(_ilogger); | ||
} | ||
} | ||
} |
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
Oops, something went wrong.