This file contains hidden or 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 dockerfile utilizes components licensed by their respective owners/authors. | |
| # Prior to utilizing this file or resulting images please review the respective licenses at: http://nginx.org/LICENSE | |
| FROM microsoft/windowsservercore | |
| LABEL Description="Nginx" Version="1.0.13" | |
| RUN powershell -Command \ | |
| $ErrorActionPreference = 'Stop'; \ | |
| Invoke-WebRequest -Method Get -Uri http://nginx.org/download/nginx-1.9.13.zip -OutFile c:\nginx-1.9.13.zip ; \ | |
| Expand-Archive -Path c:\nginx-1.9.13.zip -DestinationPath c:\ ; \ |
This file contains hidden or 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
| FROM microsoft/powershell:nanoserver AS builder | |
| ARG NODE_VERSION=8.9.1 | |
| LABEL Description="Windows Server 2016 Nano Server base OS image for Windows containers" Version="${NODE_VERSION}" | |
| LABEL Maintainer=mihai.lazar@evozon.com | |
| ADD https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-win-x64.zip C:\\build\\node-v${NODE_VERSION}-win-x64.zip | |
| RUN pwsh -Command Expand-Archive C:\build\node-v8.9.1-win-x64.zip C:\; Rename-Item C:\node-v8.9.1-win-x64 node | |
| FROM microsoft/nanoserver:1709 |
This file contains hidden or 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 USTaxStrategy : ITaxStrategy | |
| { | |
| public decimal FindTaxAmount(Order order) | |
| { | |
| } | |
| } | |
| public class UKTaxStrategy : ITaxStrategy | |
| { | |
| public decimal FindTaxAmount(Order order) |
This file contains hidden or 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 DiscountCalculatorAdapter : IDiscountCalculator | |
| { | |
| public decimal CalculateDiscount(Order order) | |
| { | |
| return DiscountCalculator.CalculateDiscount(order); | |
| } | |
| } |
This file contains hidden or 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 IDiscountCalculator | |
| { | |
| decimal CalculateDiscount(Order order); | |
| } | |
| public interface ITaxStrategy | |
| { | |
| decimal FindTaxAmount(Order order); | |
| } |
This file contains hidden or 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 OrderProcessor | |
| { | |
| public decimal CalculateTotal(Order order) | |
| { | |
| decimal itemTotal = order.GetItemTotal(); | |
| decimal discountAmount = DiscountCalculator.CalculateDiscount(order | |
| decimal taxAmount = 0.0M; | |
| if (order.Country == "US") |
This file contains hidden or 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 CustomMembershipProvider : MembershipProvider | |
| { | |
| public override string ApplicationName | |
| { | |
| get | |
| { | |
| throw new Exception("The method or operation is not implemented."); | |
| } | |
| set |
This file contains hidden or 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 void SaveEntity(IEntity entity) | |
| { | |
| if( (entity as WidgetEntity) != null ){ | |
| GenerateWidgetAuditEntry((WidgetEntity) entity); | |
| } | |
| if ((entity as ChocolateEntity) != null){ | |
| GenerateChocolateAuditEntry((ChocolateEntity)entity); | |
| } |