├── README.md ├── global.json ├── DependencyInjectionSample.App ├── src │ ├── DependencyInjectionSample.App │ │ ├── wwwroot │ │ │ ├── img │ │ │ │ └── technical.jpg │ │ │ └── web.config │ │ ├── Views │ │ │ └── Home │ │ │ │ └── Index.cshtml │ │ ├── MockQrService.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── project.json │ │ ├── Controllers │ │ │ └── HomeController.cs │ │ ├── DependencyInjectionSample.App.xproj │ │ ├── Startup.cs │ │ └── Project_Readme.html │ ├── ThatCSharpGuy.Sample.Services │ │ ├── DemoQrService.cs │ │ ├── IOnlineQrService.cs │ │ ├── project.json │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── ThatCSharpGuy.Sample.Services.xproj │ ├── FoundataGmbH.GoQr │ │ ├── project.json │ │ ├── GoQrService.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── FoundataGmbH.GoQr.xproj │ └── OtherNamespace.GoogleChart.Qr │ │ ├── project.json │ │ ├── GoogleChartQrService.cs │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ └── OtherNamespace.GoogleChart.Qr.xproj └── DependencyInjectionSample.App.sln ├── DependencyInjectionSample.App.sln ├── .gitattributes └── .gitignore /README.md: -------------------------------------------------------------------------------- 1 | # qr-dependency 2 | Dependency injection sample 3 | -------------------------------------------------------------------------------- /global.json: -------------------------------------------------------------------------------- 1 | { 2 | "projects": [ "src", "test" ], 3 | "sdk": { 4 | "version": "1.0.0-rc1-update1" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /DependencyInjectionSample.App/src/DependencyInjectionSample.App/wwwroot/img/technical.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thatcsharpguy/qr-dependency/master/DependencyInjectionSample.App/src/DependencyInjectionSample.App/wwwroot/img/technical.jpg -------------------------------------------------------------------------------- /DependencyInjectionSample.App/src/DependencyInjectionSample.App/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Dependency Injection Sample 4 | 5 | 6 | 7 |

Service used: @ViewBag.ServiceUsed

8 | 9 | 10 | -------------------------------------------------------------------------------- /DependencyInjectionSample.App/src/DependencyInjectionSample.App/wwwroot/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /DependencyInjectionSample.App/src/ThatCSharpGuy.Sample.Services/DemoQrService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace ThatCSharpGuy.Sample.Services 7 | { 8 | public class DemoQrService : IOnlineQrService 9 | { 10 | public string Name => "Demo"; 11 | public string GetUrl(string data, int size) 12 | { 13 | return $"http://placehold.it/{size}?text={data}"; 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /DependencyInjectionSample.App/src/DependencyInjectionSample.App/MockQrService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using ThatCSharpGuy.Sample.Services; 6 | 7 | namespace DependencyInjectionSample.App 8 | { 9 | public class MockQrService : IOnlineQrService 10 | { 11 | public string Name => "Mock"; 12 | public string GetUrl(string data, int size) 13 | { 14 | // ignore all 15 | return @"\img\technical.jpg"; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /DependencyInjectionSample.App/src/ThatCSharpGuy.Sample.Services/IOnlineQrService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace ThatCSharpGuy.Sample.Services 7 | { 8 | // This project can output the Class library as a NuGet Package. 9 | // To enable this option, right-click on the project and select the Properties menu item. In the Build tab select "Produce outputs on build". 10 | public interface IOnlineQrService 11 | { 12 | string Name { get; } 13 | 14 | string GetUrl(string data, int size); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /DependencyInjectionSample.App/src/ThatCSharpGuy.Sample.Services/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.0-*", 3 | "description": "ThatCSharpGuy.Sample.Services Class Library", 4 | "authors": [ "fferegrino" ], 5 | "tags": [ "" ], 6 | "projectUrl": "", 7 | "licenseUrl": "", 8 | 9 | "frameworks": { 10 | "net451": { }, 11 | "dotnet5.4": { 12 | "dependencies": { 13 | "Microsoft.CSharp": "4.0.1-beta-23516", 14 | "System.Collections": "4.0.11-beta-23516", 15 | "System.Linq": "4.0.1-beta-23516", 16 | "System.Runtime": "4.0.21-beta-23516", 17 | "System.Threading": "4.0.11-beta-23516" 18 | } 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /DependencyInjectionSample.App/src/DependencyInjectionSample.App/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:53067/", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "Hosting:Environment": "Development" 16 | } 17 | }, 18 | "web": { 19 | "commandName": "web", 20 | "environmentVariables": { 21 | "Hosting:Environment": "Development" 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /DependencyInjectionSample.App/src/FoundataGmbH.GoQr/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.0-*", 3 | "description": "FoundataGmbH.GoQr Class Library", 4 | "authors": [ "fferegrino" ], 5 | "tags": [ "" ], 6 | "projectUrl": "", 7 | "licenseUrl": "", 8 | "frameworks": { 9 | "net451": { }, 10 | "dotnet5.4": { 11 | "dependencies": { 12 | "Microsoft.CSharp": "4.0.1-beta-23516", 13 | "System.Collections": "4.0.11-beta-23516", 14 | "System.Linq": "4.0.1-beta-23516", 15 | "System.Runtime": "4.0.21-beta-23516", 16 | "System.Threading": "4.0.11-beta-23516" 17 | } 18 | } 19 | }, 20 | "dependencies": { 21 | "ThatCSharpGuy.Sample.Services": "1.0.0-*" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /DependencyInjectionSample.App/src/OtherNamespace.GoogleChart.Qr/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.0-*", 3 | "description": "OtherNamespace.GoogleChart.Qr Class Library", 4 | "authors": [ "fferegrino" ], 5 | "tags": [ "" ], 6 | "projectUrl": "", 7 | "licenseUrl": "", 8 | "frameworks": { 9 | "net451": { }, 10 | "dotnet5.4": { 11 | "dependencies": { 12 | "Microsoft.CSharp": "4.0.1-beta-23516", 13 | "System.Collections": "4.0.11-beta-23516", 14 | "System.Linq": "4.0.1-beta-23516", 15 | "System.Runtime": "4.0.21-beta-23516", 16 | "System.Threading": "4.0.11-beta-23516" 17 | } 18 | } 19 | }, 20 | "dependencies": { 21 | "ThatCSharpGuy.Sample.Services": "1.0.0-*" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /DependencyInjectionSample.App/src/OtherNamespace.GoogleChart.Qr/GoogleChartQrService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using ThatCSharpGuy.Sample.Services; 6 | 7 | namespace OtherNamespace.GoogleChart.Qr 8 | { 9 | // This project can output the Class library as a NuGet Package. 10 | // To enable this option, right-click on the project and select the Properties menu item. In the Build tab select "Produce outputs on build". 11 | public class GoogleChartQrService : IOnlineQrService 12 | { 13 | public string Name => "Google Charts"; 14 | public string GetUrl(string data, int size) 15 | { 16 | return $"https://chart.googleapis.com/chart?cht=qr&chs={size}x{size}&chl={data}"; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /DependencyInjectionSample.App/src/FoundataGmbH.GoQr/GoQrService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using ThatCSharpGuy.Sample.Services; 6 | 7 | namespace FoundataGmbH.GoQr 8 | { 9 | // This project can output the Class library as a NuGet Package. 10 | // To enable this option, right-click on the project and select the Properties menu item. In the Build tab select "Produce outputs on build". 11 | public class GoQrService : IOnlineQrService 12 | { 13 | public GoQrService() 14 | { 15 | } 16 | 17 | public string Name { get; } = "Go QR"; 18 | public string GetUrl(string data, int size) 19 | { 20 | return $"https://api.qrserver.com/v1/create-qr-code/?size={size}x{size}&data={data}"; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /DependencyInjectionSample.App/src/DependencyInjectionSample.App/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.0-*", 3 | "compilationOptions": { 4 | "emitEntryPoint": true 5 | }, 6 | 7 | "dependencies": { 8 | "Microsoft.AspNet.Mvc": "6.0.0-rc1-final", 9 | "Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-rc1-final", 10 | "Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final", 11 | "Microsoft.AspNet.Tooling.Razor": "1.0.0-rc1-final", 12 | "Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final", 13 | "ThatCSharpGuy.Sample.Services": "1.0.0-*", 14 | "OtherNamespace.GoogleChart.Qr": "1.0.0-*", 15 | "FoundataGmbH.GoQr": "1.0.0-*" 16 | }, 17 | 18 | "commands": { 19 | "web": "Microsoft.AspNet.Server.Kestrel" 20 | }, 21 | 22 | "frameworks": { 23 | "dnx451": { }, 24 | "dnxcore50": { } 25 | }, 26 | 27 | "exclude": [ 28 | "wwwroot", 29 | "node_modules" 30 | ], 31 | "publishExclude": [ 32 | "**.user", 33 | "**.vspscc" 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /DependencyInjectionSample.App/src/DependencyInjectionSample.App/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNet.Mvc; 6 | using ThatCSharpGuy.Sample.Services; 7 | 8 | // For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860 9 | 10 | namespace DependencyInjectionSample.App.Controllers 11 | { 12 | public class HomeController : Controller 13 | { 14 | private readonly IOnlineQrService _onlineQrService; 15 | 16 | public HomeController(IOnlineQrService onlineQrService) 17 | { 18 | _onlineQrService = onlineQrService; 19 | } 20 | 21 | // GET: // 22 | public IActionResult Index() 23 | { 24 | ViewBag.ServiceUsed = _onlineQrService.Name; 25 | ViewBag.QrUrl = _onlineQrService.GetUrl("Hola mundo!", 300); 26 | return View(); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /DependencyInjectionSample.App/src/FoundataGmbH.GoQr/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("FoundataGmbH.GoQr")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("FoundataGmbH.GoQr")] 13 | [assembly: AssemblyCopyright("Copyright © 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("7f1863a5-283c-45b0-acf5-7566355407b4")] 24 | -------------------------------------------------------------------------------- /DependencyInjectionSample.App/src/OtherNamespace.GoogleChart.Qr/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("OtherNamespace.GoogleChart.Qr")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("OtherNamespace.GoogleChart.Qr")] 13 | [assembly: AssemblyCopyright("Copyright © 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("a2c25135-2ed6-42a9-ab50-6fcc2499c0c7")] 24 | -------------------------------------------------------------------------------- /DependencyInjectionSample.App/src/ThatCSharpGuy.Sample.Services/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("ThatCSharpGuy.Sample.Services")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("ThatCSharpGuy.Sample.Services")] 13 | [assembly: AssemblyCopyright("Copyright © 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("d9970996-b6f8-4fa4-aae1-5793816ccd71")] 24 | -------------------------------------------------------------------------------- /DependencyInjectionSample.App/src/FoundataGmbH.GoQr/FoundataGmbH.GoQr.xproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 10 | 7f1863a5-283c-45b0-acf5-7566355407b4 11 | FoundataGmbH.GoQr 12 | ..\..\artifacts\obj\$(MSBuildProjectName) 13 | ..\..\artifacts\bin\$(MSBuildProjectName)\ 14 | 15 | 16 | 17 | 2.0 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /DependencyInjectionSample.App/src/OtherNamespace.GoogleChart.Qr/OtherNamespace.GoogleChart.Qr.xproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 10 | a2c25135-2ed6-42a9-ab50-6fcc2499c0c7 11 | OtherNamespace.GoogleChart.Qr 12 | ..\..\artifacts\obj\$(MSBuildProjectName) 13 | ..\..\artifacts\bin\$(MSBuildProjectName)\ 14 | 15 | 16 | 17 | 2.0 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /DependencyInjectionSample.App/src/ThatCSharpGuy.Sample.Services/ThatCSharpGuy.Sample.Services.xproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 10 | d9970996-b6f8-4fa4-aae1-5793816ccd71 11 | ThatCSharpGuy.Sample.Services 12 | ..\..\artifacts\obj\$(MSBuildProjectName) 13 | ..\..\artifacts\bin\$(MSBuildProjectName)\ 14 | 15 | 16 | 17 | 2.0 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /DependencyInjectionSample.App/src/DependencyInjectionSample.App/DependencyInjectionSample.App.xproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 10 | 1e766e3b-fa0f-49bf-b818-1038e4311b2e 11 | DependencyInjectionSample.App 12 | ..\..\artifacts\obj\$(MSBuildProjectName) 13 | ..\..\artifacts\bin\$(MSBuildProjectName)\ 14 | 15 | 16 | 17 | 2.0 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /DependencyInjectionSample.App.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.24720.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C419D37E-4254-43D1-8F80-AEB954AB9381}" 7 | EndProject 8 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2CB8FAB3-B543-4586-9691-19D14EBFFDEC}" 9 | ProjectSection(SolutionItems) = preProject 10 | global.json = global.json 11 | EndProjectSection 12 | EndProject 13 | Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "DependencyInjectionSample.App", "src\DependencyInjectionSample.App\DependencyInjectionSample.App.xproj", "{1E766E3B-FA0F-49BF-B818-1038E4311B2E}" 14 | EndProject 15 | Global 16 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 17 | Debug|Any CPU = Debug|Any CPU 18 | Release|Any CPU = Release|Any CPU 19 | EndGlobalSection 20 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 21 | {1E766E3B-FA0F-49BF-B818-1038E4311B2E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 22 | {1E766E3B-FA0F-49BF-B818-1038E4311B2E}.Debug|Any CPU.Build.0 = Debug|Any CPU 23 | {1E766E3B-FA0F-49BF-B818-1038E4311B2E}.Release|Any CPU.ActiveCfg = Release|Any CPU 24 | {1E766E3B-FA0F-49BF-B818-1038E4311B2E}.Release|Any CPU.Build.0 = Release|Any CPU 25 | EndGlobalSection 26 | GlobalSection(SolutionProperties) = preSolution 27 | HideSolutionNode = FALSE 28 | EndGlobalSection 29 | GlobalSection(NestedProjects) = preSolution 30 | {1E766E3B-FA0F-49BF-B818-1038E4311B2E} = {C419D37E-4254-43D1-8F80-AEB954AB9381} 31 | EndGlobalSection 32 | EndGlobal 33 | -------------------------------------------------------------------------------- /DependencyInjectionSample.App/src/DependencyInjectionSample.App/Startup.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using FoundataGmbH.GoQr; 6 | using Microsoft.AspNet.Builder; 7 | using Microsoft.AspNet.Hosting; 8 | using Microsoft.AspNet.Http; 9 | using Microsoft.Extensions.DependencyInjection; 10 | using OtherNamespace.GoogleChart.Qr; 11 | using ThatCSharpGuy.Sample.Services; 12 | 13 | namespace DependencyInjectionSample.App 14 | { 15 | public class Startup 16 | { 17 | // This method gets called by the runtime. Use this method to add services to the container. 18 | // For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID=398940 19 | public void ConfigureServices(IServiceCollection services) 20 | { 21 | services.AddMvc(); 22 | 23 | services.AddTransient(); 24 | } 25 | 26 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. 27 | public void Configure(IApplicationBuilder app) 28 | { 29 | 30 | app.UseStaticFiles(); 31 | app.UseMvc(config => 32 | { 33 | config.MapRoute( 34 | name: "Default", 35 | template: "{controller}/{action}/{id?}", 36 | defaults: new { controller = "home", action = "index" } 37 | ); 38 | } 39 | ); 40 | } 41 | 42 | // Entry point for the application. 43 | public static void Main(string[] args) => WebApplication.Run(args); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /DependencyInjectionSample.App/DependencyInjectionSample.App.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.24720.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C419D37E-4254-43D1-8F80-AEB954AB9381}" 7 | EndProject 8 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2CB8FAB3-B543-4586-9691-19D14EBFFDEC}" 9 | ProjectSection(SolutionItems) = preProject 10 | global.json = global.json 11 | EndProjectSection 12 | EndProject 13 | Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "DependencyInjectionSample.App", "src\DependencyInjectionSample.App\DependencyInjectionSample.App.xproj", "{1E766E3B-FA0F-49BF-B818-1038E4311B2E}" 14 | EndProject 15 | Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ThatCSharpGuy.Sample.Services", "src\ThatCSharpGuy.Sample.Services\ThatCSharpGuy.Sample.Services.xproj", "{D9970996-B6F8-4FA4-AAE1-5793816CCD71}" 16 | EndProject 17 | Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "OtherNamespace.GoogleChart.Qr", "src\OtherNamespace.GoogleChart.Qr\OtherNamespace.GoogleChart.Qr.xproj", "{A2C25135-2ED6-42A9-AB50-6FCC2499C0C7}" 18 | EndProject 19 | Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "FoundataGmbH.GoQr", "src\FoundataGmbH.GoQr\FoundataGmbH.GoQr.xproj", "{7F1863A5-283C-45B0-ACF5-7566355407B4}" 20 | EndProject 21 | Global 22 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 23 | Debug|Any CPU = Debug|Any CPU 24 | Release|Any CPU = Release|Any CPU 25 | EndGlobalSection 26 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 27 | {1E766E3B-FA0F-49BF-B818-1038E4311B2E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 28 | {1E766E3B-FA0F-49BF-B818-1038E4311B2E}.Debug|Any CPU.Build.0 = Debug|Any CPU 29 | {1E766E3B-FA0F-49BF-B818-1038E4311B2E}.Release|Any CPU.ActiveCfg = Release|Any CPU 30 | {1E766E3B-FA0F-49BF-B818-1038E4311B2E}.Release|Any CPU.Build.0 = Release|Any CPU 31 | {D9970996-B6F8-4FA4-AAE1-5793816CCD71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 32 | {D9970996-B6F8-4FA4-AAE1-5793816CCD71}.Debug|Any CPU.Build.0 = Debug|Any CPU 33 | {D9970996-B6F8-4FA4-AAE1-5793816CCD71}.Release|Any CPU.ActiveCfg = Release|Any CPU 34 | {D9970996-B6F8-4FA4-AAE1-5793816CCD71}.Release|Any CPU.Build.0 = Release|Any CPU 35 | {A2C25135-2ED6-42A9-AB50-6FCC2499C0C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 36 | {A2C25135-2ED6-42A9-AB50-6FCC2499C0C7}.Debug|Any CPU.Build.0 = Debug|Any CPU 37 | {A2C25135-2ED6-42A9-AB50-6FCC2499C0C7}.Release|Any CPU.ActiveCfg = Release|Any CPU 38 | {A2C25135-2ED6-42A9-AB50-6FCC2499C0C7}.Release|Any CPU.Build.0 = Release|Any CPU 39 | {7F1863A5-283C-45B0-ACF5-7566355407B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 40 | {7F1863A5-283C-45B0-ACF5-7566355407B4}.Debug|Any CPU.Build.0 = Debug|Any CPU 41 | {7F1863A5-283C-45B0-ACF5-7566355407B4}.Release|Any CPU.ActiveCfg = Release|Any CPU 42 | {7F1863A5-283C-45B0-ACF5-7566355407B4}.Release|Any CPU.Build.0 = Release|Any CPU 43 | EndGlobalSection 44 | GlobalSection(SolutionProperties) = preSolution 45 | HideSolutionNode = FALSE 46 | EndGlobalSection 47 | GlobalSection(NestedProjects) = preSolution 48 | {1E766E3B-FA0F-49BF-B818-1038E4311B2E} = {C419D37E-4254-43D1-8F80-AEB954AB9381} 49 | {D9970996-B6F8-4FA4-AAE1-5793816CCD71} = {C419D37E-4254-43D1-8F80-AEB954AB9381} 50 | {A2C25135-2ED6-42A9-AB50-6FCC2499C0C7} = {C419D37E-4254-43D1-8F80-AEB954AB9381} 51 | {7F1863A5-283C-45B0-ACF5-7566355407B4} = {C419D37E-4254-43D1-8F80-AEB954AB9381} 52 | EndGlobalSection 53 | EndGlobal 54 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | bld/ 21 | [Bb]in/ 22 | [Oo]bj/ 23 | 24 | # Visual Studio 2015 cache/options directory 25 | .vs/ 26 | # Uncomment if you have tasks that create the project's static files in wwwroot 27 | #wwwroot/ 28 | 29 | # MSTest test Results 30 | [Tt]est[Rr]esult*/ 31 | [Bb]uild[Ll]og.* 32 | 33 | # NUNIT 34 | *.VisualState.xml 35 | TestResult.xml 36 | 37 | # Build Results of an ATL Project 38 | [Dd]ebugPS/ 39 | [Rr]eleasePS/ 40 | dlldata.c 41 | 42 | # DNX 43 | project.lock.json 44 | artifacts/ 45 | 46 | *_i.c 47 | *_p.c 48 | *_i.h 49 | *.ilk 50 | *.meta 51 | *.obj 52 | *.pch 53 | *.pdb 54 | *.pgc 55 | *.pgd 56 | *.rsp 57 | *.sbr 58 | *.tlb 59 | *.tli 60 | *.tlh 61 | *.tmp 62 | *.tmp_proj 63 | *.log 64 | *.vspscc 65 | *.vssscc 66 | .builds 67 | *.pidb 68 | *.svclog 69 | *.scc 70 | 71 | # Chutzpah Test files 72 | _Chutzpah* 73 | 74 | # Visual C++ cache files 75 | ipch/ 76 | *.aps 77 | *.ncb 78 | *.opendb 79 | *.opensdf 80 | *.sdf 81 | *.cachefile 82 | 83 | # Visual Studio profiler 84 | *.psess 85 | *.vsp 86 | *.vspx 87 | *.sap 88 | 89 | # TFS 2012 Local Workspace 90 | $tf/ 91 | 92 | # Guidance Automation Toolkit 93 | *.gpState 94 | 95 | # ReSharper is a .NET coding add-in 96 | _ReSharper*/ 97 | *.[Rr]e[Ss]harper 98 | *.DotSettings.user 99 | 100 | # JustCode is a .NET coding add-in 101 | .JustCode 102 | 103 | # TeamCity is a build add-in 104 | _TeamCity* 105 | 106 | # DotCover is a Code Coverage Tool 107 | *.dotCover 108 | 109 | # NCrunch 110 | _NCrunch_* 111 | .*crunch*.local.xml 112 | nCrunchTemp_* 113 | 114 | # MightyMoose 115 | *.mm.* 116 | AutoTest.Net/ 117 | 118 | # Web workbench (sass) 119 | .sass-cache/ 120 | 121 | # Installshield output folder 122 | [Ee]xpress/ 123 | 124 | # DocProject is a documentation generator add-in 125 | DocProject/buildhelp/ 126 | DocProject/Help/*.HxT 127 | DocProject/Help/*.HxC 128 | DocProject/Help/*.hhc 129 | DocProject/Help/*.hhk 130 | DocProject/Help/*.hhp 131 | DocProject/Help/Html2 132 | DocProject/Help/html 133 | 134 | # Click-Once directory 135 | publish/ 136 | 137 | # Publish Web Output 138 | *.[Pp]ublish.xml 139 | *.azurePubxml 140 | # TODO: Comment the next line if you want to checkin your web deploy settings 141 | # but database connection strings (with potential passwords) will be unencrypted 142 | *.pubxml 143 | *.publishproj 144 | 145 | # NuGet Packages 146 | *.nupkg 147 | # The packages folder can be ignored because of Package Restore 148 | **/packages/* 149 | # except build/, which is used as an MSBuild target. 150 | !**/packages/build/ 151 | # Uncomment if necessary however generally it will be regenerated when needed 152 | #!**/packages/repositories.config 153 | # NuGet v3's project.json files produces more ignoreable files 154 | *.nuget.props 155 | *.nuget.targets 156 | 157 | # Microsoft Azure Build Output 158 | csx/ 159 | *.build.csdef 160 | 161 | # Microsoft Azure Emulator 162 | ecf/ 163 | rcf/ 164 | 165 | # Microsoft Azure ApplicationInsights config file 166 | ApplicationInsights.config 167 | 168 | # Windows Store app package directory 169 | AppPackages/ 170 | BundleArtifacts/ 171 | 172 | # Visual Studio cache files 173 | # files ending in .cache can be ignored 174 | *.[Cc]ache 175 | # but keep track of directories ending in .cache 176 | !*.[Cc]ache/ 177 | 178 | # Others 179 | ClientBin/ 180 | ~$* 181 | *~ 182 | *.dbmdl 183 | *.dbproj.schemaview 184 | *.pfx 185 | *.publishsettings 186 | node_modules/ 187 | orleans.codegen.cs 188 | 189 | # RIA/Silverlight projects 190 | Generated_Code/ 191 | 192 | # Backup & report files from converting an old project file 193 | # to a newer Visual Studio version. Backup files are not needed, 194 | # because we have git ;-) 195 | _UpgradeReport_Files/ 196 | Backup*/ 197 | UpgradeLog*.XML 198 | UpgradeLog*.htm 199 | 200 | # SQL Server files 201 | *.mdf 202 | *.ldf 203 | 204 | # Business Intelligence projects 205 | *.rdl.data 206 | *.bim.layout 207 | *.bim_*.settings 208 | 209 | # Microsoft Fakes 210 | FakesAssemblies/ 211 | 212 | # GhostDoc plugin setting file 213 | *.GhostDoc.xml 214 | 215 | # Node.js Tools for Visual Studio 216 | .ntvs_analysis.dat 217 | 218 | # Visual Studio 6 build log 219 | *.plg 220 | 221 | # Visual Studio 6 workspace options file 222 | *.opt 223 | 224 | # Visual Studio LightSwitch build output 225 | **/*.HTMLClient/GeneratedArtifacts 226 | **/*.DesktopClient/GeneratedArtifacts 227 | **/*.DesktopClient/ModelManifest.xml 228 | **/*.Server/GeneratedArtifacts 229 | **/*.Server/ModelManifest.xml 230 | _Pvt_Extensions 231 | 232 | # Paket dependency manager 233 | .paket/paket.exe 234 | 235 | # FAKE - F# Make 236 | .fake/ 237 | -------------------------------------------------------------------------------- /DependencyInjectionSample.App/src/DependencyInjectionSample.App/Project_Readme.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Welcome to ASP.NET 5 6 | 127 | 128 | 129 | 130 | 138 | 139 |
140 |
141 |

This application consists of:

142 |
    143 |
  • Sample pages using ASP.NET MVC 6
  • 144 |
  • Gulp and Bower for managing client-side libraries
  • 145 |
  • Theming using Bootstrap
  • 146 |
147 |
148 | 160 | 172 | 181 | 182 | 185 |
186 | 187 | 188 | 189 | --------------------------------------------------------------------------------