Skip to content

Commit

Permalink
Merge pull request #20 from TechieGuy12/Fixes
Browse files Browse the repository at this point in the history
Fixes
  • Loading branch information
TechieGuy12 authored May 3, 2022
2 parents bdd494d + 082204b commit c75e562
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 13 deletions.
23 changes: 11 additions & 12 deletions FileWatcher/Configuration/Notifications/Notification.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,22 @@ public HttpMethod Method
{
get
{
HttpMethod method = HttpMethod.Post;
if (string.IsNullOrEmpty(MethodString))
if (string.IsNullOrWhiteSpace(MethodString))
{
return method;
return HttpMethod.Post;
}

try
switch (MethodString.ToLower())
{
method = (HttpMethod)Enum.Parse(typeof(HttpMethod), MethodString.ToUpper(), true);
}
catch (Exception ex)
when (ex is ArgumentNullException || ex is ArgumentException || ex is OverflowException)
{
method = HttpMethod.Post;
case "get":
return HttpMethod.Get;
case "delete":
return HttpMethod.Delete;
case "put":
return HttpMethod.Put;
default:
return HttpMethod.Post;
}

return method;
}
}

Expand Down
16 changes: 16 additions & 0 deletions FileWatcher/Properties/PublishProfiles/linux-x64.pubxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>bin\Release\net6.0\publish\linux-x64</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<TargetFramework>net6.0</TargetFramework>
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishReadyToRun>False</PublishReadyToRun>
</PropertyGroup>
</Project>
16 changes: 16 additions & 0 deletions FileWatcher/Properties/PublishProfiles/macOS.pubxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>bin\Release\net6.0\publish\macOS</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<TargetFramework>net6.0</TargetFramework>
<RuntimeIdentifier>osx-x64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishReadyToRun>False</PublishReadyToRun>
</PropertyGroup>
</Project>
16 changes: 16 additions & 0 deletions FileWatcher/Properties/PublishProfiles/win-x64.pubxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>bin\Release\net6.0\publish\win-x64</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<TargetFramework>net6.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishReadyToRun>False</PublishReadyToRun>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion FileWatcher/Templates/config-template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<!--
Filters matching full paths. Similar to the folder names,
paths are relative to the path element and allow for exact file
path matching - for example, to exclude C:\Temp\TestFolder\thumbs.db,
path matching - for example, to include C:\Temp\TestFolder\thumbs.db,
specify TestFolder\thumbs.db.
-->
<paths>
Expand Down

0 comments on commit c75e562

Please sign in to comment.