├── MyProject.Domain ├── Common │ ├── IUnitOfWork.cs │ ├── IAggregateRoot.cs │ ├── IRepository.cs │ ├── Enumeration.cs │ ├── Entity.cs │ └── ValueObject.cs ├── Validation │ ├── ISpecification.cs │ ├── domain_validation.md │ └── SpecificationExtensions.cs ├── Events │ └── domain_events.md ├── Exceptions │ └── domain_exception.md ├── MyProject.Domain.csproj └── Aggregates │ └── domain_aggregates.md ├── MyProject.API ├── Application │ ├── Queries │ │ └── Query.md │ ├── ViewModels │ │ └── viewmodels.md │ ├── Commands │ │ └── Command.md │ └── DomianEventHandlers │ │ └── domainevent_handler.md ├── Controllers │ └── controller.md ├── appsettings.Development.json ├── appsettings.json ├── Program.cs ├── Properties │ └── launchSettings.json ├── MyProject.API.csproj └── Startup.cs ├── MyProject.UnitTest ├── UnitTest1.cs └── MyProject.UnitTests.csproj ├── MyProject.Infrastructure ├── MyProject.Infrastructure.csproj └── Repositories │ └── repository.md ├── .template.config └── template.json ├── .gitattributes ├── MicroservicesTemplate.sln └── .gitignore /MyProject.Domain/Common/IUnitOfWork.cs: -------------------------------------------------------------------------------- 1 | namespace MyProject.Domain.Common 2 | { 3 | public interface IUnitOfWork 4 | { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /MyProject.Domain/Common/IAggregateRoot.cs: -------------------------------------------------------------------------------- 1 | namespace MyProject.Domain.Common 2 | { 3 | public interface IAggregateRoot 4 | { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /MyProject.API/Application/Queries/Query.md: -------------------------------------------------------------------------------- 1 | #Queries 2 | 3 | Can act fetch data directly from the infrastructure layer and will not change anything in the domain. -------------------------------------------------------------------------------- /MyProject.API/Controllers/controller.md: -------------------------------------------------------------------------------- 1 | #API endpoints 2 | 3 | Just a normal api that will act on the domian through the ApplicationLayer's Commands, queries and EventHandlers. 4 | 5 | -------------------------------------------------------------------------------- /MyProject.API/Application/ViewModels/viewmodels.md: -------------------------------------------------------------------------------- 1 | #View models 2 | 3 | Is an aggregatin of all data rquired by a specific view/ or end point and can be a combination of domain entities. 4 | 5 | 6 | -------------------------------------------------------------------------------- /MyProject.Domain/Validation/ISpecification.cs: -------------------------------------------------------------------------------- 1 | namespace MyProject.Domain.Validation 2 | { 3 | public interface ISpecification 4 | { 5 | bool IsSatisfiedBy(T entity); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /MyProject.Domain/Common/IRepository.cs: -------------------------------------------------------------------------------- 1 | namespace MyProject.Domain.Common 2 | { 3 | public interface IRepository where T : IAggregateRoot 4 | { 5 | IUnitOfWork UnitOfWork { get; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /MyProject.API/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /MyProject.UnitTest/UnitTest1.cs: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | 3 | namespace MyProject.UnitTests 4 | { 5 | public class UnitTest1 6 | { 7 | [Fact] 8 | public void Test1() 9 | { 10 | 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /MyProject.API/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /MyProject.Domain/Events/domain_events.md: -------------------------------------------------------------------------------- 1 | #Domain validation 2 | 3 | domain validation could implement the ISpecification which helps in always keeping the domian in a valid state. 4 | 5 | public class OrderCancelledDomainEvent : INotification 6 | { 7 | ... 8 | } 9 | -------------------------------------------------------------------------------- /MyProject.Domain/Validation/domain_validation.md: -------------------------------------------------------------------------------- 1 | #Domain validation 2 | 3 | domain validation could implement the ISpecification which helps in always keeping the domian in a valid state. 4 | 5 | public class OrderCreationSpecification : INotification 6 | { 7 | ... 8 | } 9 | -------------------------------------------------------------------------------- /MyProject.Domain/Exceptions/domain_exception.md: -------------------------------------------------------------------------------- 1 | #Domain exceptions 2 | 3 | each domain entity should have specific exceptions thrown so that other layers that is dependent on the Domain kan act acordingly. 4 | 5 | public class OrderDomainException : Exception 6 | { 7 | ... 8 | } -------------------------------------------------------------------------------- /MyProject.API/Application/Commands/Command.md: -------------------------------------------------------------------------------- 1 | #Commands 2 | 3 | Command implements `IRequest` from the [Mediatr](https://github.com/jbogard/MediatR "MediatR") library. 4 | 5 | [DataContract] 6 | public class CreateOrderCommand : IRequest 7 | { 8 | //Properties... 9 | } -------------------------------------------------------------------------------- /MyProject.Infrastructure/MyProject.Infrastructure.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /MyProject.Domain/MyProject.Domain.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /MyProject.Domain/Aggregates/domain_aggregates.md: -------------------------------------------------------------------------------- 1 | #Domain model 2 | 3 | An aggregate is an encapsulation of entities and value objects (domain objects) which conceptually belong together (Bounded context). 4 | It should also contain a set of operations which those domain objects can be operated on. An entity without methods is an anemic model. 5 | 6 | An aggregate should have one AggregateRoot which can contain other entities and value types. 7 | -------------------------------------------------------------------------------- /MyProject.API/Application/DomianEventHandlers/domainevent_handler.md: -------------------------------------------------------------------------------- 1 | #Domain event handlers 2 | 3 | the events raised within the domian is using the `INotificationHandler` from the [Mediatr](https://github.com/jbogard/MediatR "MediatR") library. 4 | 5 | public class OrderShippedDomainEventHandler : INotificationHandler 6 | { 7 | //handle event 8 | //save data 9 | //interact with outser microservices 10 | } -------------------------------------------------------------------------------- /MyProject.Infrastructure/Repositories/repository.md: -------------------------------------------------------------------------------- 1 | #Repositories 2 | 3 | all repositories implements interface `IRepository` located in the Domain, where T is of type `IAggregateRoot` 4 | 5 | public class OrderRepository : IRepository 6 | { 7 | //IRepository Methods 8 | } 9 | 10 | where `IRepository` looks like 11 | 12 | public interface IRepository where T : IAggregateRoot 13 | { 14 | IUnitOfWork UnitOfWork { get; } 15 | } 16 | 17 | -------------------------------------------------------------------------------- /MyProject.API/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Hosting; 2 | using Microsoft.Extensions.Hosting; 3 | 4 | namespace MyProject.API 5 | { 6 | public class Program 7 | { 8 | public static void Main(string[] args) 9 | { 10 | CreateHostBuilder(args).Build().Run(); 11 | } 12 | 13 | public static IHostBuilder CreateHostBuilder(string[] args) => 14 | Host.CreateDefaultBuilder(args) 15 | .ConfigureWebHostDefaults(webBuilder => 16 | { 17 | webBuilder.UseStartup(); 18 | }); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /MyProject.API/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:53555", 7 | "sslPort": 44319 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "API": { 19 | "commandName": "Project", 20 | "launchBrowser": true, 21 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 22 | "environmentVariables": { 23 | "ASPNETCORE_ENVIRONMENT": "Development" 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /MyProject.UnitTest/MyProject.UnitTests.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | 6 | false 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /MyProject.API/MyProject.API.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /.template.config/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/template", 3 | "author": "Señor Developer", 4 | "classifications": [ "Common", "Web", "Library" ], 5 | "name": "Microservice domain driven design template using mediatr", 6 | "identity": "MyProject.MicroService.CSharp", 7 | "groupIdentity":"MyProject.MicroService", 8 | "shortName": "micro", 9 | "tags": { 10 | "language": "C#", 11 | "type":"project" 12 | }, 13 | "sourceName": "MyProject", 14 | "preferNameDirectory": true, 15 | "symbols":{ 16 | "includetest": { 17 | "type": "parameter", 18 | "datatype": "bool", 19 | "defaultValue": "true" 20 | } 21 | }, 22 | "sources":[{ 23 | "modifiers": [{ 24 | "condition": "(!includetest)", 25 | "exclude": [ "MyProject.UnitTests/**/*"] 26 | } 27 | ] 28 | }], 29 | "postActions": [ 30 | { 31 | "condition": "(!skipRestore)", 32 | "description": "Restore NuGet packages required by this project.", 33 | "manualInstructions": [ 34 | { "text": "Run 'dotnet restore'" } 35 | ], 36 | "actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025", 37 | "continueOnError": true 38 | }] 39 | } -------------------------------------------------------------------------------- /MyProject.Domain/Common/Enumeration.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Reflection; 5 | 6 | namespace MyProject.Domain.Common 7 | { 8 | public abstract class Enumeration : IComparable 9 | { 10 | public string Name { get; } 11 | 12 | public int Id { get; } 13 | 14 | protected Enumeration(int id, string name) 15 | { 16 | Id = id; 17 | Name = name; 18 | } 19 | 20 | public override string ToString() => Name; 21 | 22 | public static IEnumerable GetAll() where T : Enumeration 23 | { 24 | var fields = typeof(T).GetFields(BindingFlags.Public | 25 | BindingFlags.Static | 26 | BindingFlags.DeclaredOnly); 27 | 28 | return fields.Select(f => f.GetValue(null)).Cast(); 29 | } 30 | 31 | public override bool Equals(object obj) 32 | { 33 | if (!(obj is Enumeration otherValue)) 34 | return false; 35 | 36 | var typeMatches = GetType() == obj.GetType(); 37 | var valueMatches = Id.Equals(otherValue.Id); 38 | 39 | return typeMatches && valueMatches; 40 | } 41 | 42 | public int CompareTo(object other) => Id.CompareTo(((Enumeration)other).Id); 43 | 44 | public override int GetHashCode() => base.GetHashCode(); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /MyProject.API/Startup.cs: -------------------------------------------------------------------------------- 1 | using System.Net.Mime; 2 | using Microsoft.AspNetCore.Builder; 3 | using Microsoft.AspNetCore.Hosting; 4 | using Microsoft.Extensions.DependencyInjection; 5 | using Microsoft.Extensions.Hosting; 6 | using Microsoft.OpenApi.Models; 7 | 8 | namespace MyProject.API 9 | { 10 | public class Startup 11 | { 12 | // This method gets called by the runtime. Use this method to add services to the container. 13 | // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 14 | public void ConfigureServices(IServiceCollection services) 15 | { 16 | services.AddCors(); 17 | services.AddSwaggerGen(c => 18 | { 19 | c.SwaggerDoc("v1", new OpenApiInfo { Title = nameof(MediaTypeNames.Application), Version = "v1" }); 20 | }); 21 | 22 | services.AddControllers(); 23 | } 24 | 25 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. 26 | public void Configure(IApplicationBuilder app, IWebHostEnvironment env) 27 | { 28 | if (env.IsDevelopment()) 29 | { 30 | app.UseSwagger(); 31 | app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "Content Service V1"); }); 32 | app.UseCors(); 33 | app.UseDeveloperExceptionPage(); 34 | } 35 | 36 | app.UseRouting(); 37 | 38 | app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /MyProject.Domain/Common/Entity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using MediatR; 4 | 5 | namespace MyProject.Domain.Common 6 | { 7 | public abstract class Entity 8 | { 9 | private int? _requestedHashCode; 10 | public virtual int Id { get; protected set; } 11 | 12 | public List DomainEvents { get; private set; } 13 | 14 | public void AddDomainEvent(INotification eventItem) 15 | { 16 | DomainEvents ??= new List(); 17 | DomainEvents.Add(eventItem); 18 | } 19 | public void RemoveDomainEvent(INotification eventItem) 20 | { 21 | DomainEvents?.Remove(eventItem); 22 | } 23 | 24 | public bool IsTransient() 25 | { 26 | return Id == default; 27 | } 28 | 29 | public override bool Equals(object obj) 30 | { 31 | if (!(obj is Entity)) 32 | return false; 33 | if (ReferenceEquals(this, obj)) 34 | return true; 35 | if (GetType() != obj.GetType()) 36 | return false; 37 | var item = (Entity)obj; 38 | if (item.IsTransient() || IsTransient()) 39 | return false; 40 | else 41 | return item.Id == Id; 42 | } 43 | 44 | public override int GetHashCode() 45 | { 46 | if (!IsTransient()) 47 | { 48 | if (!_requestedHashCode.HasValue) 49 | _requestedHashCode = Id.GetHashCode() ^ 31; 50 | // XOR for random distribution. See: 51 | // https://docs.microsoft.com/archive/blogs/ericlippert/guidelines-and-rules-for-gethashcode 52 | return _requestedHashCode.Value; 53 | } 54 | else 55 | return base.GetHashCode(); 56 | } 57 | public static bool operator ==(Entity left, Entity right) 58 | { 59 | return left?.Equals(right) ?? Equals(right, null); 60 | } 61 | public static bool operator !=(Entity left, Entity right) 62 | { 63 | return !(left == right); 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /MyProject.Domain/Common/ValueObject.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | 4 | namespace MyProject.Domain.Common 5 | { 6 | public abstract class ValueObject 7 | { 8 | protected static bool EqualOperator(ValueObject left, ValueObject right) 9 | { 10 | if (ReferenceEquals(left, null) ^ ReferenceEquals(right, null)) 11 | { 12 | return false; 13 | } 14 | return ReferenceEquals(left, null) || left.Equals(right); 15 | } 16 | 17 | protected static bool NotEqualOperator(ValueObject left, ValueObject right) 18 | { 19 | return !(EqualOperator(left, right)); 20 | } 21 | 22 | protected abstract IEnumerable GetAtomicValues(); 23 | 24 | public override bool Equals(object obj) 25 | { 26 | if (obj == null || obj.GetType() != GetType()) 27 | { 28 | return false; 29 | } 30 | 31 | var other = (ValueObject)obj; 32 | var thisValues = GetAtomicValues().GetEnumerator(); 33 | var otherValues = other.GetAtomicValues().GetEnumerator(); 34 | while (thisValues.MoveNext() && otherValues.MoveNext()) 35 | { 36 | if (ReferenceEquals(thisValues.Current, null) ^ 37 | ReferenceEquals(otherValues.Current, null)) 38 | { 39 | return false; 40 | } 41 | 42 | if (thisValues.Current != null && 43 | !thisValues.Current.Equals(otherValues.Current)) 44 | { 45 | return false; 46 | } 47 | } 48 | return !thisValues.MoveNext() && !otherValues.MoveNext(); 49 | } 50 | 51 | public override int GetHashCode() 52 | { 53 | return GetAtomicValues() 54 | .Select(x => x != null ? x.GetHashCode() : 0) 55 | .Aggregate((x, y) => x ^ y); 56 | } 57 | // Other utility methods 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /MyProject.Domain/Validation/SpecificationExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MyProject.Domain.Validation 4 | { 5 | public static class SpecificationExtensions 6 | { 7 | public static ISpecification And(this ISpecification spec1, ISpecification spec2) 8 | { 9 | return new AndSpecification(spec1, spec2); 10 | } 11 | 12 | public static ISpecification Or(this ISpecification spec1, ISpecification spec2) 13 | { 14 | return new OrSpecification(spec1, spec2); 15 | } 16 | 17 | public static ISpecification Not(this ISpecification spec) 18 | { 19 | return new NotSpecification(spec); 20 | } 21 | } 22 | 23 | public class AndSpecification : ISpecification 24 | { 25 | private readonly ISpecification _spec1; 26 | private readonly ISpecification _spec2; 27 | 28 | public AndSpecification(ISpecification spec1, ISpecification spec2) 29 | { 30 | _spec1 = spec1 ?? throw new ArgumentNullException(nameof(spec1)); 31 | _spec2 = spec2 ?? throw new ArgumentNullException(nameof(spec2)); 32 | } 33 | 34 | public bool IsSatisfiedBy(T candidate) 35 | { 36 | return _spec1.IsSatisfiedBy(candidate) && _spec2.IsSatisfiedBy(candidate); 37 | } 38 | } 39 | 40 | public class OrSpecification : ISpecification 41 | { 42 | private readonly ISpecification _spec1; 43 | private readonly ISpecification _spec2; 44 | 45 | public OrSpecification(ISpecification spec1, ISpecification spec2) 46 | { 47 | _spec1 = spec1 ?? throw new ArgumentNullException(nameof(spec1)); 48 | _spec2 = spec2 ?? throw new ArgumentNullException(nameof(spec2)); 49 | } 50 | 51 | public bool IsSatisfiedBy(T candidate) 52 | { 53 | return _spec1.IsSatisfiedBy(candidate) || _spec2.IsSatisfiedBy(candidate); 54 | } 55 | } 56 | 57 | public class NotSpecification : ISpecification 58 | { 59 | private readonly ISpecification _spec1; 60 | 61 | public NotSpecification(ISpecification spec1) 62 | { 63 | _spec1 = spec1 ?? throw new ArgumentNullException(nameof(spec1)); 64 | } 65 | 66 | public bool IsSatisfiedBy(T candidate) 67 | { 68 | return !_spec1.IsSatisfiedBy(candidate); 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /MicroservicesTemplate.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.0.31912.275 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyProject.API", "MyProject.API\MyProject.API.csproj", "{61DF4C0A-1E45-41C0-80B2-DCEDBB6AAB38}" 7 | EndProject 8 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyProject.Domain", "MyProject.Domain\MyProject.Domain.csproj", "{00F1A3F2-FEC5-457B-8199-1B7516BC2787}" 9 | EndProject 10 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyProject.Infrastructure", "MyProject.Infrastructure\MyProject.Infrastructure.csproj", "{2551103F-F0E9-4E39-8893-C6FD49CA8FC2}" 11 | EndProject 12 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyProject.UnitTests", "MyProject.UnitTest\MyProject.UnitTests.csproj", "{190F71E4-2880-42FE-8A32-DA242C8399B3}" 13 | EndProject 14 | Global 15 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 16 | Debug|Any CPU = Debug|Any CPU 17 | Release|Any CPU = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 20 | {61DF4C0A-1E45-41C0-80B2-DCEDBB6AAB38}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {61DF4C0A-1E45-41C0-80B2-DCEDBB6AAB38}.Debug|Any CPU.Build.0 = Debug|Any CPU 22 | {61DF4C0A-1E45-41C0-80B2-DCEDBB6AAB38}.Release|Any CPU.ActiveCfg = Release|Any CPU 23 | {61DF4C0A-1E45-41C0-80B2-DCEDBB6AAB38}.Release|Any CPU.Build.0 = Release|Any CPU 24 | {00F1A3F2-FEC5-457B-8199-1B7516BC2787}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 25 | {00F1A3F2-FEC5-457B-8199-1B7516BC2787}.Debug|Any CPU.Build.0 = Debug|Any CPU 26 | {00F1A3F2-FEC5-457B-8199-1B7516BC2787}.Release|Any CPU.ActiveCfg = Release|Any CPU 27 | {00F1A3F2-FEC5-457B-8199-1B7516BC2787}.Release|Any CPU.Build.0 = Release|Any CPU 28 | {2551103F-F0E9-4E39-8893-C6FD49CA8FC2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 29 | {2551103F-F0E9-4E39-8893-C6FD49CA8FC2}.Debug|Any CPU.Build.0 = Debug|Any CPU 30 | {2551103F-F0E9-4E39-8893-C6FD49CA8FC2}.Release|Any CPU.ActiveCfg = Release|Any CPU 31 | {2551103F-F0E9-4E39-8893-C6FD49CA8FC2}.Release|Any CPU.Build.0 = Release|Any CPU 32 | {190F71E4-2880-42FE-8A32-DA242C8399B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 33 | {190F71E4-2880-42FE-8A32-DA242C8399B3}.Debug|Any CPU.Build.0 = Debug|Any CPU 34 | {190F71E4-2880-42FE-8A32-DA242C8399B3}.Release|Any CPU.ActiveCfg = Release|Any CPU 35 | {190F71E4-2880-42FE-8A32-DA242C8399B3}.Release|Any CPU.Build.0 = Release|Any CPU 36 | EndGlobalSection 37 | GlobalSection(SolutionProperties) = preSolution 38 | HideSolutionNode = FALSE 39 | EndGlobalSection 40 | GlobalSection(ExtensibilityGlobals) = postSolution 41 | SolutionGuid = {D7866E3A-2413-4288-830A-39EE12E2BB20} 42 | EndGlobalSection 43 | EndGlobal 44 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Ww][Ii][Nn]32/ 27 | [Aa][Rr][Mm]/ 28 | [Aa][Rr][Mm]64/ 29 | bld/ 30 | [Bb]in/ 31 | [Oo]bj/ 32 | [Oo]ut/ 33 | [Ll]og/ 34 | [Ll]ogs/ 35 | 36 | # Visual Studio 2015/2017 cache/options directory 37 | .vs/ 38 | # Uncomment if you have tasks that create the project's static files in wwwroot 39 | #wwwroot/ 40 | 41 | # Visual Studio 2017 auto generated files 42 | Generated\ Files/ 43 | 44 | # MSTest test Results 45 | [Tt]est[Rr]esult*/ 46 | [Bb]uild[Ll]og.* 47 | 48 | # NUnit 49 | *.VisualState.xml 50 | TestResult.xml 51 | nunit-*.xml 52 | 53 | # Build Results of an ATL Project 54 | [Dd]ebugPS/ 55 | [Rr]eleasePS/ 56 | dlldata.c 57 | 58 | # Benchmark Results 59 | BenchmarkDotNet.Artifacts/ 60 | 61 | # .NET Core 62 | project.lock.json 63 | project.fragment.lock.json 64 | artifacts/ 65 | 66 | # ASP.NET Scaffolding 67 | ScaffoldingReadMe.txt 68 | 69 | # StyleCop 70 | StyleCopReport.xml 71 | 72 | # Files built by Visual Studio 73 | *_i.c 74 | *_p.c 75 | *_h.h 76 | *.ilk 77 | *.meta 78 | *.obj 79 | *.iobj 80 | *.pch 81 | *.pdb 82 | *.ipdb 83 | *.pgc 84 | *.pgd 85 | *.rsp 86 | *.sbr 87 | *.tlb 88 | *.tli 89 | *.tlh 90 | *.tmp 91 | *.tmp_proj 92 | *_wpftmp.csproj 93 | *.log 94 | *.vspscc 95 | *.vssscc 96 | .builds 97 | *.pidb 98 | *.svclog 99 | *.scc 100 | 101 | # Chutzpah Test files 102 | _Chutzpah* 103 | 104 | # Visual C++ cache files 105 | ipch/ 106 | *.aps 107 | *.ncb 108 | *.opendb 109 | *.opensdf 110 | *.sdf 111 | *.cachefile 112 | *.VC.db 113 | *.VC.VC.opendb 114 | 115 | # Visual Studio profiler 116 | *.psess 117 | *.vsp 118 | *.vspx 119 | *.sap 120 | 121 | # Visual Studio Trace Files 122 | *.e2e 123 | 124 | # TFS 2012 Local Workspace 125 | $tf/ 126 | 127 | # Guidance Automation Toolkit 128 | *.gpState 129 | 130 | # ReSharper is a .NET coding add-in 131 | _ReSharper*/ 132 | *.[Rr]e[Ss]harper 133 | *.DotSettings.user 134 | 135 | # TeamCity is a build add-in 136 | _TeamCity* 137 | 138 | # DotCover is a Code Coverage Tool 139 | *.dotCover 140 | 141 | # AxoCover is a Code Coverage Tool 142 | .axoCover/* 143 | !.axoCover/settings.json 144 | 145 | # Coverlet is a free, cross platform Code Coverage Tool 146 | coverage*.json 147 | coverage*.xml 148 | coverage*.info 149 | 150 | # Visual Studio code coverage results 151 | *.coverage 152 | *.coveragexml 153 | 154 | # NCrunch 155 | _NCrunch_* 156 | .*crunch*.local.xml 157 | nCrunchTemp_* 158 | 159 | # MightyMoose 160 | *.mm.* 161 | AutoTest.Net/ 162 | 163 | # Web workbench (sass) 164 | .sass-cache/ 165 | 166 | # Installshield output folder 167 | [Ee]xpress/ 168 | 169 | # DocProject is a documentation generator add-in 170 | DocProject/buildhelp/ 171 | DocProject/Help/*.HxT 172 | DocProject/Help/*.HxC 173 | DocProject/Help/*.hhc 174 | DocProject/Help/*.hhk 175 | DocProject/Help/*.hhp 176 | DocProject/Help/Html2 177 | DocProject/Help/html 178 | 179 | # Click-Once directory 180 | publish/ 181 | 182 | # Publish Web Output 183 | *.[Pp]ublish.xml 184 | *.azurePubxml 185 | # Note: Comment the next line if you want to checkin your web deploy settings, 186 | # but database connection strings (with potential passwords) will be unencrypted 187 | *.pubxml 188 | *.publishproj 189 | 190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 191 | # checkin your Azure Web App publish settings, but sensitive information contained 192 | # in these scripts will be unencrypted 193 | PublishScripts/ 194 | 195 | # NuGet Packages 196 | *.nupkg 197 | # NuGet Symbol Packages 198 | *.snupkg 199 | # The packages folder can be ignored because of Package Restore 200 | **/[Pp]ackages/* 201 | # except build/, which is used as an MSBuild target. 202 | !**/[Pp]ackages/build/ 203 | # Uncomment if necessary however generally it will be regenerated when needed 204 | #!**/[Pp]ackages/repositories.config 205 | # NuGet v3's project.json files produces more ignorable files 206 | *.nuget.props 207 | *.nuget.targets 208 | 209 | # Microsoft Azure Build Output 210 | csx/ 211 | *.build.csdef 212 | 213 | # Microsoft Azure Emulator 214 | ecf/ 215 | rcf/ 216 | 217 | # Windows Store app package directories and files 218 | AppPackages/ 219 | BundleArtifacts/ 220 | Package.StoreAssociation.xml 221 | _pkginfo.txt 222 | *.appx 223 | *.appxbundle 224 | *.appxupload 225 | 226 | # Visual Studio cache files 227 | # files ending in .cache can be ignored 228 | *.[Cc]ache 229 | # but keep track of directories ending in .cache 230 | !?*.[Cc]ache/ 231 | 232 | # Others 233 | ClientBin/ 234 | ~$* 235 | *~ 236 | *.dbmdl 237 | *.dbproj.schemaview 238 | *.jfm 239 | *.pfx 240 | *.publishsettings 241 | orleans.codegen.cs 242 | 243 | # Including strong name files can present a security risk 244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 245 | #*.snk 246 | 247 | # Since there are multiple workflows, uncomment next line to ignore bower_components 248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 249 | #bower_components/ 250 | 251 | # RIA/Silverlight projects 252 | Generated_Code/ 253 | 254 | # Backup & report files from converting an old project file 255 | # to a newer Visual Studio version. Backup files are not needed, 256 | # because we have git ;-) 257 | _UpgradeReport_Files/ 258 | Backup*/ 259 | UpgradeLog*.XML 260 | UpgradeLog*.htm 261 | ServiceFabricBackup/ 262 | *.rptproj.bak 263 | 264 | # SQL Server files 265 | *.mdf 266 | *.ldf 267 | *.ndf 268 | 269 | # Business Intelligence projects 270 | *.rdl.data 271 | *.bim.layout 272 | *.bim_*.settings 273 | *.rptproj.rsuser 274 | *- [Bb]ackup.rdl 275 | *- [Bb]ackup ([0-9]).rdl 276 | *- [Bb]ackup ([0-9][0-9]).rdl 277 | 278 | # Microsoft Fakes 279 | FakesAssemblies/ 280 | 281 | # GhostDoc plugin setting file 282 | *.GhostDoc.xml 283 | 284 | # Node.js Tools for Visual Studio 285 | .ntvs_analysis.dat 286 | node_modules/ 287 | 288 | # Visual Studio 6 build log 289 | *.plg 290 | 291 | # Visual Studio 6 workspace options file 292 | *.opt 293 | 294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 295 | *.vbw 296 | 297 | # Visual Studio LightSwitch build output 298 | **/*.HTMLClient/GeneratedArtifacts 299 | **/*.DesktopClient/GeneratedArtifacts 300 | **/*.DesktopClient/ModelManifest.xml 301 | **/*.Server/GeneratedArtifacts 302 | **/*.Server/ModelManifest.xml 303 | _Pvt_Extensions 304 | 305 | # Paket dependency manager 306 | .paket/paket.exe 307 | paket-files/ 308 | 309 | # FAKE - F# Make 310 | .fake/ 311 | 312 | # CodeRush personal settings 313 | .cr/personal 314 | 315 | # Python Tools for Visual Studio (PTVS) 316 | __pycache__/ 317 | *.pyc 318 | 319 | # Cake - Uncomment if you are using it 320 | # tools/** 321 | # !tools/packages.config 322 | 323 | # Tabs Studio 324 | *.tss 325 | 326 | # Telerik's JustMock configuration file 327 | *.jmconfig 328 | 329 | # BizTalk build output 330 | *.btp.cs 331 | *.btm.cs 332 | *.odx.cs 333 | *.xsd.cs 334 | 335 | # OpenCover UI analysis results 336 | OpenCover/ 337 | 338 | # Azure Stream Analytics local run output 339 | ASALocalRun/ 340 | 341 | # MSBuild Binary and Structured Log 342 | *.binlog 343 | 344 | # NVidia Nsight GPU debugger configuration file 345 | *.nvuser 346 | 347 | # MFractors (Xamarin productivity tool) working folder 348 | .mfractor/ 349 | 350 | # Local History for Visual Studio 351 | .localhistory/ 352 | 353 | # BeatPulse healthcheck temp database 354 | healthchecksdb 355 | 356 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 357 | MigrationBackup/ 358 | 359 | # Ionide (cross platform F# VS Code tools) working folder 360 | .ionide/ 361 | 362 | # Fody - auto-generated XML schema 363 | FodyWeavers.xsd --------------------------------------------------------------------------------