Skip to content

Commit

Permalink
Updated AppVeyor config to Visual Studio 2019
Browse files Browse the repository at this point in the history
Added missing DateRange
Added VSCode tasks.json
  • Loading branch information
oskardudycz committed Jan 9, 2020
1 parent 7beb264 commit 364fdbb
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 1 deletion.
24 changes: 24 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "shell",
"args": [
"build",
// Ask dotnet build to generate full paths for file names.
"/property:GenerateFullPaths=true",
// Do not generate summary otherwise it leads to duplicate errors in Problems panel
"/consoleloggerparameters:NoSummary"
],
"group": "build",
"presentation": {
"reveal": "silent"
},
"problemMatcher": "$msCompile"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using System;

namespace MeetingsManagement.Meetings.ValueObjects
{
public class DateRange
{
public DateTime Start { get; }
public DateTime End { get; }

public DateRange(DateTime start, DateTime end)
{
Start = start;
End = end;
}

public static DateRange Create(DateTime start, DateTime end)
{
if (start == default(DateTime))
throw new ArgumentException($"{nameof(start)} needs to be defined.");

if (end == default(DateTime))
throw new ArgumentException($"{nameof(end)} needs to be defined.");

if (start > end)
throw new ArgumentException($"{nameof(start)} needs to be earlier or equal {nameof(end)}.");

return new DateRange(start, end);
}
}
}
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version: 1.0.{build}
image: Visual Studio 2017
image: Visual Studio 2019
before_build:
- cmd: dotnet restore
build:
Expand Down

0 comments on commit 364fdbb

Please sign in to comment.