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
public interface IExpensesCalculator | |
{ | |
double Calculate(PrintOrder order); | |
} |
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
public class PrintOrder | |
{ | |
public EditionType EditionType { get; } | |
public CoverType CoverType { get; } | |
public PageSize PageSize { get; } | |
public PaperType PaperType { get; } | |
public Illustration[] Illustrations { get; } | |
public int FontSize { get; } | |
public int CopiesCount { get; } | |
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
#!/usr/bin/env bash | |
SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) | |
TOOLS_DIR=$SCRIPT_DIR/tools | |
CLI_DIR=$SCRIPT_DIR/cli | |
DOTNET_PATH=$CLI_DIR/dotnet | |
TEMP_DIR=$SCRIPT_DIR/tmp | |
TEMP_PROJECT=$TEMP_DIR/tmp.csproj | |
SCRIPT="build.cake" |
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
[CmdletBinding()] | |
Param( | |
[string]$Script = "build.cake", | |
[string]$Target = "Default", | |
[ValidateSet("Release", "Debug")] | |
[string]$Configuration = "Release", | |
[ValidateSet("Quiet", "Minimal", "Normal", "Verbose", "Diagnostic")] | |
[string]$Verbosity = "Verbose", | |
[Alias("DryRun","Noop")] | |
[switch]$WhatIf, |
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
// Target - The task you want to start. Runs the Default task if not specified. | |
var target = Argument("Target", "Default"); | |
// Configuration - The build configuration (Debug/Release) to use. | |
var configuration = | |
HasArgument("Configuration") | |
? Argument<string>("Configuration") | |
: EnvironmentVariable("Configuration") ?? "Release"; | |
// The build number to use in the version number of the built NuGet packages. |
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
// Target - The task you want to start. Runs the Default task if not specified. | |
var target = Argument("Target", "Default"); | |
// Configuration - The build configuration (Debug/Release) to use. | |
var configuration = | |
HasArgument("Configuration") | |
? Argument<string>("Configuration") | |
: EnvironmentVariable("Configuration") ?? "Release"; | |
// The build number to use in the version number of the built NuGet packages. |
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
// Target - The task you want to start. Runs the Default task if not specified. | |
var target = Argument("Target", "Default"); | |
// Configuration - The build configuration (Debug/Release) to use. | |
var configuration = | |
HasArgument("Configuration") | |
? Argument<string>("Configuration") | |
: EnvironmentVariable("Configuration") ?? "Release"; | |
// The build number to use in the version number of the built NuGet packages. |
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
[HttpPost] | |
public async Task Post([FromBody] DockerRequest request) | |
{ | |
var body = @" | |
{ | |
""request"": { | |
""branch"":""<ImageValidatorBranch>"", | |
""config"": { | |
""env"": { | |
""IMAGE_TAG"": ""<ImageTag>"" |
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
language: csharp | |
env: | |
- IMAGE_TAG=latest | |
services: | |
- docker | |
mono: none | |
dotnet: 1.0.4 | |
dist: trusty | |
branches: | |
only: |
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
namespace ImageValidator | |
{ | |
using System; | |
using System.IO; | |
using System.Linq; | |
using System.Reflection; | |
using System.Threading; | |
using Dapper; | |
using JetBrains.Annotations; | |
using Microsoft.Extensions.Configuration; |