From fcef0dd8274c1b6fc12e9ae39b947f95813d1fec Mon Sep 17 00:00:00 2001 From: Cyprien Autexier Date: Wed, 18 May 2016 17:34:03 +0200 Subject: [PATCH 1/2] rc2 support --- GeekLearning.Storage.sln | 17 +- global.json | 6 - .../Controllers/ValuesController.cs | 53 +++++ .../GeekLearning.Storage.BasicSample.xproj | 19 ++ .../Program.cs | 25 +++ .../Project_Readme.html | 187 ++++++++++++++++++ .../Properties/launchSettings.json | 28 +++ .../Startup.cs | 46 +++++ .../Templates/json.json | 3 + .../TemplatesStore.cs | 14 ++ .../appsettings.json | 10 + .../project.json | 62 ++++++ .../web.config | 14 ++ .../AzureStorageProvider.cs | 1 - .../GeekLearning.Storage.Azure.nuspec | 22 --- .../GeekLearning.Storage.Azure.xproj | 16 +- src/GeekLearning.Storage.Azure/project.json | 38 ++-- .../GeekLearning.Storage.BasicSample.xproj | 15 +- .../project.json | 78 +++++--- .../FileSystemStorageProvider.cs | 9 +- .../GeekLearning.FileSystem.nuspec | 22 --- .../GeekLearning.Storage.FileSystem.xproj | 16 +- .../project.json | 35 ++-- .../GeekLearning.Storage.nuspec | 19 -- .../GeekLearning.Storage.xproj | 16 +- src/GeekLearning.Storage/StorageFactory.cs | 2 +- src/GeekLearning.Storage/project.json | 39 ++-- 27 files changed, 599 insertions(+), 213 deletions(-) delete mode 100644 global.json create mode 100644 samples/GeekLearning.Storage.BasicSample/Controllers/ValuesController.cs create mode 100644 samples/GeekLearning.Storage.BasicSample/GeekLearning.Storage.BasicSample.xproj create mode 100644 samples/GeekLearning.Storage.BasicSample/Program.cs create mode 100644 samples/GeekLearning.Storage.BasicSample/Project_Readme.html create mode 100644 samples/GeekLearning.Storage.BasicSample/Properties/launchSettings.json create mode 100644 samples/GeekLearning.Storage.BasicSample/Startup.cs create mode 100644 samples/GeekLearning.Storage.BasicSample/Templates/json.json create mode 100644 samples/GeekLearning.Storage.BasicSample/TemplatesStore.cs create mode 100644 samples/GeekLearning.Storage.BasicSample/appsettings.json create mode 100644 samples/GeekLearning.Storage.BasicSample/project.json create mode 100644 samples/GeekLearning.Storage.BasicSample/web.config delete mode 100644 src/GeekLearning.Storage.Azure/GeekLearning.Storage.Azure.nuspec delete mode 100644 src/GeekLearning.Storage.FileSystem/GeekLearning.FileSystem.nuspec delete mode 100644 src/GeekLearning.Storage/GeekLearning.Storage.nuspec diff --git a/GeekLearning.Storage.sln b/GeekLearning.Storage.sln index 41a94fe..aa49871 100644 --- a/GeekLearning.Storage.sln +++ b/GeekLearning.Storage.sln @@ -5,18 +5,13 @@ VisualStudioVersion = 14.0.25123.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "GeekLearning.Storage", "src\GeekLearning.Storage\GeekLearning.Storage.xproj", "{1F419C53-73C6-4460-B284-6A49AE41C596}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{FFFDF8A8-A519-481E-8A4B-6AE80D3E950D}" - ProjectSection(SolutionItems) = preProject - global.json = global.json - EndProjectSection -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{FBAC4C17-D755-49A9-959D-18FD6B95B543}" EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "GeekLearning.Storage.Azure", "src\GeekLearning.Storage.Azure\GeekLearning.Storage.Azure.xproj", "{FD8BB8F9-9AF5-4C12-B962-9E08C30B01E2}" EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "GeekLearning.Storage.FileSystem", "src\GeekLearning.Storage.FileSystem\GeekLearning.Storage.FileSystem.xproj", "{4A12B042-76B3-471B-9235-F653E1ABE3C0}" EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "GeekLearning.Storage.BasicSample", "src\GeekLearning.Storage.BasicSample\GeekLearning.Storage.BasicSample.xproj", "{3AB29F6F-D32B-49D1-8CE1-5B61A12B78CC}" +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "GeekLearning.Storage.BasicSample", "samples\GeekLearning.Storage.BasicSample\GeekLearning.Storage.BasicSample.xproj", "{63416AEA-DA51-4D62-B566-DB7D9BC800DC}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -36,15 +31,15 @@ Global {4A12B042-76B3-471B-9235-F653E1ABE3C0}.Debug|Any CPU.Build.0 = Debug|Any CPU {4A12B042-76B3-471B-9235-F653E1ABE3C0}.Release|Any CPU.ActiveCfg = Release|Any CPU {4A12B042-76B3-471B-9235-F653E1ABE3C0}.Release|Any CPU.Build.0 = Release|Any CPU - {3AB29F6F-D32B-49D1-8CE1-5B61A12B78CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3AB29F6F-D32B-49D1-8CE1-5B61A12B78CC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3AB29F6F-D32B-49D1-8CE1-5B61A12B78CC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3AB29F6F-D32B-49D1-8CE1-5B61A12B78CC}.Release|Any CPU.Build.0 = Release|Any CPU + {63416AEA-DA51-4D62-B566-DB7D9BC800DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {63416AEA-DA51-4D62-B566-DB7D9BC800DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {63416AEA-DA51-4D62-B566-DB7D9BC800DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {63416AEA-DA51-4D62-B566-DB7D9BC800DC}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {3AB29F6F-D32B-49D1-8CE1-5B61A12B78CC} = {FBAC4C17-D755-49A9-959D-18FD6B95B543} + {63416AEA-DA51-4D62-B566-DB7D9BC800DC} = {FBAC4C17-D755-49A9-959D-18FD6B95B543} EndGlobalSection EndGlobal diff --git a/global.json b/global.json deleted file mode 100644 index 2613181..0000000 --- a/global.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "sdk": { - "version": "1.0.0-rc1-final" - }, - "projects": [ "src", "samples" ] -} \ No newline at end of file diff --git a/samples/GeekLearning.Storage.BasicSample/Controllers/ValuesController.cs b/samples/GeekLearning.Storage.BasicSample/Controllers/ValuesController.cs new file mode 100644 index 0000000..e163a5f --- /dev/null +++ b/samples/GeekLearning.Storage.BasicSample/Controllers/ValuesController.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; + +namespace GeekLearning.Storage.BasicSample.Controllers +{ + [Route("api/[controller]")] + public class ValuesController : Controller + { + // GET api/values + private TemplatesStore templates; + + public ValuesController(TemplatesStore templates) + { + this.templates = templates; + } + + // GET: api/values + [HttpGet] + public async Task> Get() + { + + return new string[] { await templates.Store.ReadAllText("json.json"), "value2" }; + } + + // GET api/values/5 + [HttpGet("{id}")] + public string Get(int id) + { + return "value"; + } + + // POST api/values + [HttpPost] + public void Post([FromBody]string value) + { + } + + // PUT api/values/5 + [HttpPut("{id}")] + public void Put(int id, [FromBody]string value) + { + } + + // DELETE api/values/5 + [HttpDelete("{id}")] + public void Delete(int id) + { + } + } +} diff --git a/samples/GeekLearning.Storage.BasicSample/GeekLearning.Storage.BasicSample.xproj b/samples/GeekLearning.Storage.BasicSample/GeekLearning.Storage.BasicSample.xproj new file mode 100644 index 0000000..1a43cd3 --- /dev/null +++ b/samples/GeekLearning.Storage.BasicSample/GeekLearning.Storage.BasicSample.xproj @@ -0,0 +1,19 @@ + + + + 14.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + 63416aea-da51-4d62-b566-db7d9bc800dc + GeekLearning.Storage.BasicSample + .\obj + .\bin\ + v4.5.2 + + + 2.0 + + + diff --git a/samples/GeekLearning.Storage.BasicSample/Program.cs b/samples/GeekLearning.Storage.BasicSample/Program.cs new file mode 100644 index 0000000..0efd76e --- /dev/null +++ b/samples/GeekLearning.Storage.BasicSample/Program.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Builder; + +namespace GeekLearning.Storage.BasicSample +{ + public class Program + { + public static void Main(string[] args) + { + var host = new WebHostBuilder() + .UseKestrel() + .UseContentRoot(Directory.GetCurrentDirectory()) + .UseIISIntegration() + .UseStartup() + .Build(); + + host.Run(); + } + } +} diff --git a/samples/GeekLearning.Storage.BasicSample/Project_Readme.html b/samples/GeekLearning.Storage.BasicSample/Project_Readme.html new file mode 100644 index 0000000..bddf864 --- /dev/null +++ b/samples/GeekLearning.Storage.BasicSample/Project_Readme.html @@ -0,0 +1,187 @@ + + + + + Welcome to ASP.NET Core + + + + + + + + + + diff --git a/samples/GeekLearning.Storage.BasicSample/Properties/launchSettings.json b/samples/GeekLearning.Storage.BasicSample/Properties/launchSettings.json new file mode 100644 index 0000000..562ed08 --- /dev/null +++ b/samples/GeekLearning.Storage.BasicSample/Properties/launchSettings.json @@ -0,0 +1,28 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:11149/", + "sslPort": 0 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "launchUrl": "api/values", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "GeekLearning.Storage.BasicSample": { + "commandName": "Project", + "launchBrowser": true, + "launchUrl": "http://localhost:5000/api/values", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} \ No newline at end of file diff --git a/samples/GeekLearning.Storage.BasicSample/Startup.cs b/samples/GeekLearning.Storage.BasicSample/Startup.cs new file mode 100644 index 0000000..055a4e2 --- /dev/null +++ b/samples/GeekLearning.Storage.BasicSample/Startup.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; + +namespace GeekLearning.Storage.BasicSample +{ + public class Startup + { + public Startup(IHostingEnvironment env) + { + var builder = new ConfigurationBuilder() + .SetBasePath(env.ContentRootPath) + .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) + .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true) + .AddEnvironmentVariables(); + Configuration = builder.Build(); + } + + public IConfigurationRoot Configuration { get; } + + // This method gets called by the runtime. Use this method to add services to the container. + public void ConfigureServices(IServiceCollection services) + { + // Add framework services. + services.AddMvc(); + + services.AddStorage().AddAzureStorage().AddFileSystemStorage(); + services.Configure(Configuration.GetSection("Storage")); + } + + // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. + public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) + { + loggerFactory.AddConsole(Configuration.GetSection("Logging")); + loggerFactory.AddDebug(); + + app.UseMvc(); + } + } +} diff --git a/samples/GeekLearning.Storage.BasicSample/Templates/json.json b/samples/GeekLearning.Storage.BasicSample/Templates/json.json new file mode 100644 index 0000000..0ee3874 --- /dev/null +++ b/samples/GeekLearning.Storage.BasicSample/Templates/json.json @@ -0,0 +1,3 @@ +{ + "toto": "blabla" +} diff --git a/samples/GeekLearning.Storage.BasicSample/TemplatesStore.cs b/samples/GeekLearning.Storage.BasicSample/TemplatesStore.cs new file mode 100644 index 0000000..13fd8d5 --- /dev/null +++ b/samples/GeekLearning.Storage.BasicSample/TemplatesStore.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace GeekLearning.Storage.BasicSample +{ + public class TemplatesStore : StoreBase + { + public TemplatesStore(IStorageFactory storageFactory) : base("Templates", storageFactory) + { + } + } +} diff --git a/samples/GeekLearning.Storage.BasicSample/appsettings.json b/samples/GeekLearning.Storage.BasicSample/appsettings.json new file mode 100644 index 0000000..fa8ce71 --- /dev/null +++ b/samples/GeekLearning.Storage.BasicSample/appsettings.json @@ -0,0 +1,10 @@ +{ + "Logging": { + "IncludeScopes": false, + "LogLevel": { + "Default": "Debug", + "System": "Information", + "Microsoft": "Information" + } + } +} diff --git a/samples/GeekLearning.Storage.BasicSample/project.json b/samples/GeekLearning.Storage.BasicSample/project.json new file mode 100644 index 0000000..0266fa1 --- /dev/null +++ b/samples/GeekLearning.Storage.BasicSample/project.json @@ -0,0 +1,62 @@ +{ + "dependencies": { + "Microsoft.NETCore.App": { + "version": "1.0.0-rc2-3002702", + "type": "platform" + }, + "Microsoft.AspNetCore.Mvc": "1.0.0-rc2-final", + "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-rc2-final", + "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-final", + "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0-rc2-final", + "Microsoft.Extensions.Configuration.FileExtensions": "1.0.0-rc2-final", + "Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-final", + "Microsoft.Extensions.Logging": "1.0.0-rc2-final", + "Microsoft.Extensions.Logging.Console": "1.0.0-rc2-final", + "Microsoft.Extensions.Logging.Debug": "1.0.0-rc2-final", + "Microsoft.Extensions.Options": "1.0.0-rc2-final", + "Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0-rc2-final", + "GeekLearning.Storage": "*", + "GeekLearning.Storage.Azure": "*", + "GeekLearning.Storage.FileSystem": "*" + }, + + "tools": { + "Microsoft.AspNetCore.Server.IISIntegration.Tools": { + "version": "1.0.0-preview1-final", + "imports": "portable-net45+win8+dnxcore50" + } + }, + + "frameworks": { + "netcoreapp1.0": { + "imports": [ + "dotnet5.6", + "dnxcore50", + "portable-net45+win8" + ] + } + }, + + "buildOptions": { + "emitEntryPoint": true, + "preserveCompilationContext": true + }, + + "runtimeOptions": { + "gcServer": true + }, + + "publishOptions": { + "include": [ + "wwwroot", + "Views", + "appsettings.json", + "web.config", + "Templates" + ] + }, + + "scripts": { + "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ] + } +} diff --git a/samples/GeekLearning.Storage.BasicSample/web.config b/samples/GeekLearning.Storage.BasicSample/web.config new file mode 100644 index 0000000..dc0514f --- /dev/null +++ b/samples/GeekLearning.Storage.BasicSample/web.config @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/src/GeekLearning.Storage.Azure/AzureStorageProvider.cs b/src/GeekLearning.Storage.Azure/AzureStorageProvider.cs index c2e3b53..6746607 100644 --- a/src/GeekLearning.Storage.Azure/AzureStorageProvider.cs +++ b/src/GeekLearning.Storage.Azure/AzureStorageProvider.cs @@ -1,5 +1,4 @@ using GeekLearning.Storage; -using Microsoft.Extensions.OptionsModel; using Microsoft.WindowsAzure.Storage; using System; using System.Collections.Generic; diff --git a/src/GeekLearning.Storage.Azure/GeekLearning.Storage.Azure.nuspec b/src/GeekLearning.Storage.Azure/GeekLearning.Storage.Azure.nuspec deleted file mode 100644 index f38495c..0000000 --- a/src/GeekLearning.Storage.Azure/GeekLearning.Storage.Azure.nuspec +++ /dev/null @@ -1,22 +0,0 @@ - - - - GeekLearning.Storage.Azure - $version$ - Geek Learning - Geek Learning - Geek Learning Azure Storage Provider - false - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/GeekLearning.Storage.Azure/GeekLearning.Storage.Azure.xproj b/src/GeekLearning.Storage.Azure/GeekLearning.Storage.Azure.xproj index 8732985..7a8c151 100644 --- a/src/GeekLearning.Storage.Azure/GeekLearning.Storage.Azure.xproj +++ b/src/GeekLearning.Storage.Azure/GeekLearning.Storage.Azure.xproj @@ -4,18 +4,18 @@ 14.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - + + fd8bb8f9-9af5-4c12-b962-9e08c30b01e2 GeekLearning.Storage.Azure - ..\artifacts\obj\$(MSBuildProjectName) - ..\artifacts\bin\$(MSBuildProjectName)\ + .\obj + .\bin\ + v4.5.2 + 2.0 - - True - - - \ No newline at end of file + + diff --git a/src/GeekLearning.Storage.Azure/project.json b/src/GeekLearning.Storage.Azure/project.json index e61d766..3e7a40e 100644 --- a/src/GeekLearning.Storage.Azure/project.json +++ b/src/GeekLearning.Storage.Azure/project.json @@ -2,34 +2,22 @@ "version": "0.0.1-*", "description": "GeekLearning.Storage.Azure Class Library", "authors": [ "autex" ], - "tags": [ "" ], - "projectUrl": "", - "licenseUrl": "", - "dependencies": { - "GeekLearning.Storage": "", - "Microsoft.Extensions.DependencyInjection.Abstractions": "1.0.0-rc1-final", - "Microsoft.Extensions.OptionsModel": "1.0.0-rc1-final", - "WindowsAzure.Storage": "6.2.2-preview" + "packOptions": { + "tags": [ ], + "projectUrl": "", + "licenseUrl": "" }, "frameworks": { "net451": { }, - "dnxcore50": { - "dependencies": { - "Microsoft.CSharp": "4.0.1-beta-23516", - "System.Collections": "4.0.11-beta-23516", - "System.Linq": "4.0.1-beta-23516", - "System.Runtime": "4.0.21-beta-23516", - "System.Threading": "4.0.11-beta-23516" - } - }, - "dotnet5.4": { - "dependencies": { - "Microsoft.CSharp": "4.0.1-beta-23516", - "System.Collections": "4.0.11-beta-23516", - "System.Linq": "4.0.1-beta-23516", - "System.Runtime": "4.0.21-beta-23516", - "System.Threading": "4.0.11-beta-23516" - } + "netstandard1.5": { + "imports": [ "dotnet", "dnxcore50", "portable-net45+win8" ] } + }, + "dependencies": { + "Microsoft.Extensions.DependencyInjection.Abstractions": "1.0.0-rc2-final", + "Microsoft.Extensions.Options": "1.0.0-rc2-final", + "NETStandard.Library": "1.5.0-rc2-24027", + "WindowsAzure.Storage": "7.0.1-preview", + "GeekLearning.Storage": "*" } } diff --git a/src/GeekLearning.Storage.BasicSample/GeekLearning.Storage.BasicSample.xproj b/src/GeekLearning.Storage.BasicSample/GeekLearning.Storage.BasicSample.xproj index 2a147e0..56c5e21 100644 --- a/src/GeekLearning.Storage.BasicSample/GeekLearning.Storage.BasicSample.xproj +++ b/src/GeekLearning.Storage.BasicSample/GeekLearning.Storage.BasicSample.xproj @@ -4,15 +4,22 @@ 14.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - + 3ab29f6f-d32b-49d1-8ce1-5b61a12b78cc GeekLearning.Storage.BasicSample - ..\..\artifacts\obj\$(MSBuildProjectName) - ..\..\artifacts\bin\$(MSBuildProjectName)\ + .\obj + .\bin\ + v4.5.2 2.0 - + + + + + + + diff --git a/src/GeekLearning.Storage.BasicSample/project.json b/src/GeekLearning.Storage.BasicSample/project.json index 2849acb..0c16ddc 100644 --- a/src/GeekLearning.Storage.BasicSample/project.json +++ b/src/GeekLearning.Storage.BasicSample/project.json @@ -3,37 +3,71 @@ "compilationOptions": { "emitEntryPoint": true }, + "buildOptions": { + "emitEntryPoint": true, + "preserveCompilationContext": true + }, + "runtimeOptions": { + "gcServer": true + }, + "publishOptions": { + "include": [ + "wwwroot", + "Views", + "appsettings.json", + "web.config" + ] + }, "dependencies": { - "GeekLearning.Storage": "", - "GeekLearning.Storage.Azure": "", - "GeekLearning.Storage.FileSystem": "", - "Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final", - "Microsoft.AspNet.Mvc": "6.0.0-rc1-final", - "Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final", - "Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final", - "Microsoft.Extensions.Configuration.FileProviderExtensions": "1.0.0-rc1-final", - "Microsoft.Extensions.Configuration.Json": "1.0.0-rc1-final", - "Microsoft.Extensions.Logging": "1.0.0-rc1-final", - "Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final", - "Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final" + "Microsoft.NETCore.App": { + "version": "1.0.0-rc2-3002702", + "type": "platform" + }, + "GeekLearning.Storage": "*", + "GeekLearning.Storage.Azure": "*", + "GeekLearning.Storage.FileSystem": "*", + "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-rc2-final", + "Microsoft.AspNetCore.Mvc": "1.0.0-rc2-final", + "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-final", + "Microsoft.AspNetCore.StaticFiles": "1.0.0-rc2-final", + "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0-rc2-final", + "Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-final", + "Microsoft.Extensions.Configuration.UserSecrets": "1.0.0-rc2-final", + "Microsoft.Extensions.Logging": "1.0.0-rc2-final", + "Microsoft.Extensions.Logging.Console": "1.0.0-rc2-final", + "Microsoft.Extensions.Logging.Debug": "1.0.0-rc2-final" }, "commands": { "web": "Microsoft.AspNet.Server.Kestrel" }, + "tools": { + "Microsoft.AspNetCore.Razor.Tools": { + "version": "1.0.0-preview1-final", + "imports": "portable-net45+win8+dnxcore50" + } + }, + + "frameworks": { - "dnx451": { }, - "dnxcore50": { } + "netcoreapp1.0": { + "imports": [ + "dotnet5.6", + "dnxcore50", + "portable-net45+win8" + ] + }, + "net461": { } }, - "exclude": [ - "wwwroot", - "node_modules" - ], - "publishExclude": [ - "**.user", - "**.vspscc" - ] + "publishOptions": { + "include": [ + "wwwroot", + "Views", + "appsettings.json", + "web.config" + ] + } } diff --git a/src/GeekLearning.Storage.FileSystem/FileSystemStorageProvider.cs b/src/GeekLearning.Storage.FileSystem/FileSystemStorageProvider.cs index 73d5b5a..4f1f2a9 100644 --- a/src/GeekLearning.Storage.FileSystem/FileSystemStorageProvider.cs +++ b/src/GeekLearning.Storage.FileSystem/FileSystemStorageProvider.cs @@ -1,19 +1,18 @@ using GeekLearning.Storage; -using Microsoft.Extensions.OptionsModel; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading.Tasks; -using Microsoft.Extensions.PlatformAbstractions; +using Microsoft.AspNetCore.Hosting; namespace GeekLearning.Storage.FileSystem { public class FileSystemStorageProvider : IStorageProvider { - private IApplicationEnvironment appEnv; + private IHostingEnvironment appEnv; - public FileSystemStorageProvider(IApplicationEnvironment appEnv) + public FileSystemStorageProvider(IHostingEnvironment appEnv) { this.appEnv = appEnv; } @@ -28,7 +27,7 @@ public string Name public IStore BuildStore(StorageOptions.StorageStore storeOptions) { - return new FileSystemStore(storeOptions.Parameters["Path"], this.appEnv.ApplicationBasePath); + return new FileSystemStore(storeOptions.Parameters["Path"], this.appEnv.ContentRootPath); } } } diff --git a/src/GeekLearning.Storage.FileSystem/GeekLearning.FileSystem.nuspec b/src/GeekLearning.Storage.FileSystem/GeekLearning.FileSystem.nuspec deleted file mode 100644 index b8b1886..0000000 --- a/src/GeekLearning.Storage.FileSystem/GeekLearning.FileSystem.nuspec +++ /dev/null @@ -1,22 +0,0 @@ - - - - GeekLearning.Storage.FileSystem - $version$ - Geek Learning - Geek Learning - Geek Learning FileSystem Storage Provider - false - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/GeekLearning.Storage.FileSystem/GeekLearning.Storage.FileSystem.xproj b/src/GeekLearning.Storage.FileSystem/GeekLearning.Storage.FileSystem.xproj index 2b9a230..97fe046 100644 --- a/src/GeekLearning.Storage.FileSystem/GeekLearning.Storage.FileSystem.xproj +++ b/src/GeekLearning.Storage.FileSystem/GeekLearning.Storage.FileSystem.xproj @@ -4,18 +4,18 @@ 14.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - + + 4a12b042-76b3-471b-9235-f653e1abe3c0 GeekLearning.Storage.FileSystem - ..\artifacts\obj\$(MSBuildProjectName) - ..\artifacts\bin\$(MSBuildProjectName)\ + .\obj + .\bin\ + v4.5.2 + 2.0 - - True - - - \ No newline at end of file + + diff --git a/src/GeekLearning.Storage.FileSystem/project.json b/src/GeekLearning.Storage.FileSystem/project.json index cdc60c4..26ba77c 100644 --- a/src/GeekLearning.Storage.FileSystem/project.json +++ b/src/GeekLearning.Storage.FileSystem/project.json @@ -2,33 +2,22 @@ "version": "0.0.1-*", "description": "GeekLearning.Storage.FileSystem Class Library", "authors": [ "autex" ], - "tags": [ "" ], - "projectUrl": "", - "licenseUrl": "", + "packOptions": { + "tags": [ ], + "projectUrl": "", + "licenseUrl": "" + }, "frameworks": { "net451": { }, - "dnxcore50": { - "dependencies": { - "Microsoft.CSharp": "4.0.1-beta-23516", - "System.Collections": "4.0.11-beta-23516", - "System.Linq": "4.0.1-beta-23516", - "System.Runtime": "4.0.21-beta-23516", - "System.Threading": "4.0.11-beta-23516" - } - }, - "dotnet5.4": { - "dependencies": { - "Microsoft.CSharp": "4.0.1-beta-23516", - "System.Collections": "4.0.11-beta-23516", - "System.Linq": "4.0.1-beta-23516", - "System.Runtime": "4.0.21-beta-23516", - "System.Threading": "4.0.11-beta-23516" - } + "netstandard1.5": { + "imports": [ "dotnet", "dnxcore50", "portable-net45+win8" ] } }, "dependencies": { - "GeekLearning.Storage": "", - "Microsoft.Extensions.OptionsModel": "1.0.0-rc1-final", - "Microsoft.Extensions.PlatformAbstractions": "1.0.0-rc1-final" + "Microsoft.Extensions.DependencyInjection.Abstractions": "1.0.0-rc2-final", + "Microsoft.Extensions.Options": "1.0.0-rc2-final", + "NETStandard.Library": "1.5.0-rc2-24027", + "GeekLearning.Storage": "*", + "Microsoft.AspNetCore.Hosting.Abstractions": "1.0.0-rc2-final" } } diff --git a/src/GeekLearning.Storage/GeekLearning.Storage.nuspec b/src/GeekLearning.Storage/GeekLearning.Storage.nuspec deleted file mode 100644 index 06e184c..0000000 --- a/src/GeekLearning.Storage/GeekLearning.Storage.nuspec +++ /dev/null @@ -1,19 +0,0 @@ - - - - GeekLearning.Storage - $version$ - Geek Learning - Geek Learning - Geek Learning Storage abstraction - false - - - - - - - - - - \ No newline at end of file diff --git a/src/GeekLearning.Storage/GeekLearning.Storage.xproj b/src/GeekLearning.Storage/GeekLearning.Storage.xproj index ce459e9..a5570c8 100644 --- a/src/GeekLearning.Storage/GeekLearning.Storage.xproj +++ b/src/GeekLearning.Storage/GeekLearning.Storage.xproj @@ -4,18 +4,18 @@ 14.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - + + 1f419c53-73c6-4460-b284-6a49ae41c596 GeekLearning.Storage - ..\artifacts\obj\$(MSBuildProjectName) - ..\artifacts\bin\$(MSBuildProjectName)\ + .\obj + .\bin\ + v4.5.2 + 2.0 - - True - - - \ No newline at end of file + + diff --git a/src/GeekLearning.Storage/StorageFactory.cs b/src/GeekLearning.Storage/StorageFactory.cs index d22c7aa..8d6ef0b 100644 --- a/src/GeekLearning.Storage/StorageFactory.cs +++ b/src/GeekLearning.Storage/StorageFactory.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; -using Microsoft.Extensions.OptionsModel; +using Microsoft.Extensions.Options; namespace GeekLearning.Storage { diff --git a/src/GeekLearning.Storage/project.json b/src/GeekLearning.Storage/project.json index 653e8a3..d4b8691 100644 --- a/src/GeekLearning.Storage/project.json +++ b/src/GeekLearning.Storage/project.json @@ -2,37 +2,20 @@ "version": "0.0.1-*", "description": "GeekLearning.Storage Class Library", "authors": [ "autex" ], - "tags": [ "" ], - "projectUrl": "", - "licenseUrl": "", + "packOptions": { + "tags": [ ], + "projectUrl": "", + "licenseUrl": "" + }, "frameworks": { - "net451": { - "dependencies": { - "System.IO": "4.0.11-beta-23516" - } - }, - "dnxcore50": { - "dependencies": { - "Microsoft.CSharp": "4.0.1-beta-23516", - "System.Collections": "4.0.11-beta-23516", - "System.IO": "4.0.11-beta-23516", - "System.Linq": "4.0.1-beta-23516", - "System.Runtime": "4.0.21-beta-23516", - "System.Threading": "4.0.11-beta-23516" - } - }, - "dotnet5.4": { - "dependencies": { - "Microsoft.CSharp": "4.0.1-beta-23516", - "System.Collections": "4.0.11-beta-23516", - "System.Linq": "4.0.1-beta-23516", - "System.Runtime": "4.0.21-beta-23516", - "System.Threading": "4.0.11-beta-23516" - } + "net451": { }, + "netstandard1.5": { + "imports": [ "dotnet", "dnxcore50", "portable-net45+win8" ] } }, "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "1.0.0-rc1-final", - "Microsoft.Extensions.OptionsModel": "1.0.0-rc1-final" + "Microsoft.Extensions.DependencyInjection.Abstractions": "1.0.0-rc2-final", + "Microsoft.Extensions.Options": "1.0.0-rc2-final", + "NETStandard.Library": "1.5.0-rc2-24027" } } From 29cb396b3e1c3bf4ee69b1ec00705cc62a011e49 Mon Sep 17 00:00:00 2001 From: Cyprien Autexier Date: Wed, 18 May 2016 17:44:38 +0200 Subject: [PATCH 2/2] remove old sample project --- .../Controllers/ValuesController.cs | 52 ----- .../GeekLearning.Storage.BasicSample.xproj | 25 --- .../Project_Readme.html | 188 ------------------ .../Properties/launchSettings.json | 26 --- .../Startup.cs | 54 ----- .../Templates/json.json | 3 - .../TemplatesStore.cs | 14 -- .../appsettings.json | 34 ---- .../project.json | 73 ------- .../wwwroot/web.config | 9 - 10 files changed, 478 deletions(-) delete mode 100644 src/GeekLearning.Storage.BasicSample/Controllers/ValuesController.cs delete mode 100644 src/GeekLearning.Storage.BasicSample/GeekLearning.Storage.BasicSample.xproj delete mode 100644 src/GeekLearning.Storage.BasicSample/Project_Readme.html delete mode 100644 src/GeekLearning.Storage.BasicSample/Properties/launchSettings.json delete mode 100644 src/GeekLearning.Storage.BasicSample/Startup.cs delete mode 100644 src/GeekLearning.Storage.BasicSample/Templates/json.json delete mode 100644 src/GeekLearning.Storage.BasicSample/TemplatesStore.cs delete mode 100644 src/GeekLearning.Storage.BasicSample/appsettings.json delete mode 100644 src/GeekLearning.Storage.BasicSample/project.json delete mode 100644 src/GeekLearning.Storage.BasicSample/wwwroot/web.config diff --git a/src/GeekLearning.Storage.BasicSample/Controllers/ValuesController.cs b/src/GeekLearning.Storage.BasicSample/Controllers/ValuesController.cs deleted file mode 100644 index 69b4f59..0000000 --- a/src/GeekLearning.Storage.BasicSample/Controllers/ValuesController.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNet.Mvc; - -namespace GeekLearning.Storage.BasicSample.Controllers -{ - [Route("api/[controller]")] - public class ValuesController : Controller - { - private TemplatesStore templates; - - public ValuesController(TemplatesStore templates) - { - this.templates = templates; - } - - // GET: api/values - [HttpGet] - public async Task> Get() - { - - return new string[] { await templates.Store.ReadAllText("json.json"), "value2" }; - } - - // GET api/values/5 - [HttpGet("{id}")] - public string Get(int id) - { - return "value"; - } - - // POST api/values - [HttpPost] - public void Post([FromBody]string value) - { - } - - // PUT api/values/5 - [HttpPut("{id}")] - public void Put(int id, [FromBody]string value) - { - } - - // DELETE api/values/5 - [HttpDelete("{id}")] - public void Delete(int id) - { - } - } -} diff --git a/src/GeekLearning.Storage.BasicSample/GeekLearning.Storage.BasicSample.xproj b/src/GeekLearning.Storage.BasicSample/GeekLearning.Storage.BasicSample.xproj deleted file mode 100644 index 56c5e21..0000000 --- a/src/GeekLearning.Storage.BasicSample/GeekLearning.Storage.BasicSample.xproj +++ /dev/null @@ -1,25 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - 3ab29f6f-d32b-49d1-8ce1-5b61a12b78cc - GeekLearning.Storage.BasicSample - .\obj - .\bin\ - v4.5.2 - - - 2.0 - - - - - - - - - diff --git a/src/GeekLearning.Storage.BasicSample/Project_Readme.html b/src/GeekLearning.Storage.BasicSample/Project_Readme.html deleted file mode 100644 index 0fc12df..0000000 --- a/src/GeekLearning.Storage.BasicSample/Project_Readme.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - Welcome to ASP.NET 5 - - - - - - - - - - diff --git a/src/GeekLearning.Storage.BasicSample/Properties/launchSettings.json b/src/GeekLearning.Storage.BasicSample/Properties/launchSettings.json deleted file mode 100644 index 75ee1e8..0000000 --- a/src/GeekLearning.Storage.BasicSample/Properties/launchSettings.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:1916/", - "sslPort": 0 - } - }, - "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "launchUrl": "api/values", - "environmentVariables": { - "Hosting:Environment": "Development" - } - }, - "web": { - "commandName": "web", - "environmentVariables": { - "Hosting:Environment": "Development" - } - } - } -} \ No newline at end of file diff --git a/src/GeekLearning.Storage.BasicSample/Startup.cs b/src/GeekLearning.Storage.BasicSample/Startup.cs deleted file mode 100644 index 9c6afed..0000000 --- a/src/GeekLearning.Storage.BasicSample/Startup.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNet.Builder; -using Microsoft.AspNet.Hosting; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Logging; - -namespace GeekLearning.Storage.BasicSample -{ - public class Startup - { - public Startup(IHostingEnvironment env) - { - // Set up configuration sources. - var builder = new ConfigurationBuilder() - .AddJsonFile("appsettings.json") - .AddEnvironmentVariables(); - Configuration = builder.Build(); - } - - public IConfigurationRoot Configuration { get; set; } - - // This method gets called by the runtime. Use this method to add services to the container. - public void ConfigureServices(IServiceCollection services) - { - // Add framework services. - services.AddMvc(); - - services.AddStorage().AddAzureStorage().AddFileSystemStorage(); - services.Configure(Configuration.GetSection("Storage")); - - services.AddTransient(); - } - - // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) - { - loggerFactory.AddConsole(Configuration.GetSection("Logging")); - loggerFactory.AddDebug(); - - app.UseIISPlatformHandler(); - - app.UseStaticFiles(); - - app.UseMvc(); - } - - // Entry point for the application. - public static void Main(string[] args) => WebApplication.Run(args); - } -} diff --git a/src/GeekLearning.Storage.BasicSample/Templates/json.json b/src/GeekLearning.Storage.BasicSample/Templates/json.json deleted file mode 100644 index 0ee3874..0000000 --- a/src/GeekLearning.Storage.BasicSample/Templates/json.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "toto": "blabla" -} diff --git a/src/GeekLearning.Storage.BasicSample/TemplatesStore.cs b/src/GeekLearning.Storage.BasicSample/TemplatesStore.cs deleted file mode 100644 index 13fd8d5..0000000 --- a/src/GeekLearning.Storage.BasicSample/TemplatesStore.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace GeekLearning.Storage.BasicSample -{ - public class TemplatesStore : StoreBase - { - public TemplatesStore(IStorageFactory storageFactory) : base("Templates", storageFactory) - { - } - } -} diff --git a/src/GeekLearning.Storage.BasicSample/appsettings.json b/src/GeekLearning.Storage.BasicSample/appsettings.json deleted file mode 100644 index 258d4f2..0000000 --- a/src/GeekLearning.Storage.BasicSample/appsettings.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "Logging": { - "IncludeScopes": false, - "LogLevel": { - "Default": "Verbose", - "System": "Information", - "Microsoft": "Information" - } - }, - "Storage": { - "Stores": { - "Packages": { - "Provider": "Azure", - "Parameters": { - "ConnectionString": "toto", - "Container": "packages" - } - }, - "Assets": { - "Provider": "Azure", - "Parameters": { - "ConnectionString": "toto", - "Container": "assets" - } - }, - "Templates": { - "Provider": "FileSystem", - "Parameters": { - "Path": "Templates" - } - } - } - } -} diff --git a/src/GeekLearning.Storage.BasicSample/project.json b/src/GeekLearning.Storage.BasicSample/project.json deleted file mode 100644 index 0c16ddc..0000000 --- a/src/GeekLearning.Storage.BasicSample/project.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "version": "0.0.1-*", - "compilationOptions": { - "emitEntryPoint": true - }, - "buildOptions": { - "emitEntryPoint": true, - "preserveCompilationContext": true - }, - "runtimeOptions": { - "gcServer": true - }, - - "publishOptions": { - "include": [ - "wwwroot", - "Views", - "appsettings.json", - "web.config" - ] - }, - "dependencies": { - "Microsoft.NETCore.App": { - "version": "1.0.0-rc2-3002702", - "type": "platform" - }, - "GeekLearning.Storage": "*", - "GeekLearning.Storage.Azure": "*", - "GeekLearning.Storage.FileSystem": "*", - "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-rc2-final", - "Microsoft.AspNetCore.Mvc": "1.0.0-rc2-final", - "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-final", - "Microsoft.AspNetCore.StaticFiles": "1.0.0-rc2-final", - "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0-rc2-final", - "Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-final", - "Microsoft.Extensions.Configuration.UserSecrets": "1.0.0-rc2-final", - "Microsoft.Extensions.Logging": "1.0.0-rc2-final", - "Microsoft.Extensions.Logging.Console": "1.0.0-rc2-final", - "Microsoft.Extensions.Logging.Debug": "1.0.0-rc2-final" - }, - - "commands": { - "web": "Microsoft.AspNet.Server.Kestrel" - }, - - "tools": { - "Microsoft.AspNetCore.Razor.Tools": { - "version": "1.0.0-preview1-final", - "imports": "portable-net45+win8+dnxcore50" - } - }, - - - "frameworks": { - "netcoreapp1.0": { - "imports": [ - "dotnet5.6", - "dnxcore50", - "portable-net45+win8" - ] - }, - "net461": { } - }, - - "publishOptions": { - "include": [ - "wwwroot", - "Views", - "appsettings.json", - "web.config" - ] - } -} diff --git a/src/GeekLearning.Storage.BasicSample/wwwroot/web.config b/src/GeekLearning.Storage.BasicSample/wwwroot/web.config deleted file mode 100644 index 8485f67..0000000 --- a/src/GeekLearning.Storage.BasicSample/wwwroot/web.config +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - -