Skip to content

Commit

Permalink
new round of yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
jphellemons committed Oct 24, 2018
1 parent d6c1fb8 commit 97f3bd7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ language: csharp
solution: CommandAsSql.sln
install:
- curl -L -o nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
- mono nuget restore CommandAsSql.sln
- nuget restore CommandAsSql.sln
- mono nuget install xunit.runners -Version 1.9.2 -OutputDirectory testrunner
script:
- msbuild /p:Configuration=Release CommandAsSql.sln
- mono ./testrunner/xunit.runners.1.9.2/tools/xunit.console.clr4.exe ./XUnitTestCommandAsSql/bin/Release/netcoreapp2.1/XUnitTestCommandAsSql.dll"
- msbuild /t:pack /p:Configuration=Release
- mono nuget.exe setApiKey $NUGET_API_KEY -Source $NUGET_SOURCE -Verbosity quiet
- mono nuget.exe push CommandAsSql.*.nupkg -Source $NUGET_SOURCE
- mono nuget setApiKey $NUGET_API_KEY -Source $NUGET_SOURCE -Verbosity quiet
- mono nuget push CommandAsSql.*.nupkg -Source $NUGET_SOURCE

#https://stackoverflow.com/a/48919604/169714
13 changes: 12 additions & 1 deletion CommandAsSql/ExtensionMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,23 @@ namespace CommandAsSql
public static class ExtensionMethods
{
#region Boolean Helpers

/// <summary>
/// extension method overload for a string
/// </summary>
/// <param name="s"></param>
/// <param name="defaultValue"></param>
/// <returns></returns>
public static bool ToBooleanOrDefault(this string s, bool defaultValue)
{
return ToBooleanOrDefault((object)s, defaultValue);
}

/// <summary>
/// extension method to get a bool value from an object
/// </summary>
/// <param name="o"></param>
/// <param name="defaultValue"></param>
/// <returns></returns>
public static bool ToBooleanOrDefault(this object o, bool defaultValue)
{
bool result = defaultValue;
Expand Down

0 comments on commit 97f3bd7

Please sign in to comment.