parent
ae56b1b1a9
commit
e2e74c50d5
@ -1,22 +0,0 @@
|
||||
|
||||
|
||||
all: build
|
||||
|
||||
build: project.lock.json
|
||||
dnu build
|
||||
|
||||
deploy-pkg:
|
||||
|
||||
|
||||
restore:
|
||||
touch project.json
|
||||
dnu restore
|
||||
|
||||
project.lock.json: project.json
|
||||
dnu restore
|
||||
|
||||
run: project.lock.json
|
||||
ASPNET_ENV=Development ASPNET_LOG_LEVEL=Debug dnx run
|
||||
|
||||
|
||||
|
@ -1,97 +0,0 @@
|
||||
using System;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.OptionsModel;
|
||||
|
||||
using System.Globalization;
|
||||
using System.Reflection;
|
||||
// using Microsoft.AspNet.Authorization;
|
||||
using Microsoft.AspNet.Builder;
|
||||
// using Microsoft.AspNet.Diagnostics;
|
||||
using Microsoft.AspNet.Hosting;
|
||||
using Microsoft.AspNet.Identity;
|
||||
using Microsoft.AspNet.Identity.EntityFramework;
|
||||
using Microsoft.AspNet.Localization;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
using Microsoft.AspNet.Mvc.Filters;
|
||||
using Microsoft.AspNet.Mvc.Razor;
|
||||
using Microsoft.Net.Http.Headers;
|
||||
using Microsoft.AspNet.Razor;
|
||||
using Microsoft.Extensions.DependencyInjection.Abstractions;
|
||||
using Microsoft.Extensions.PlatformAbstractions;
|
||||
using cli.Services;
|
||||
using Yavsc;
|
||||
using Yavsc.Models;
|
||||
using Yavsc.Server.Helpers;
|
||||
using Yavsc.Services;
|
||||
using Yavsc.Templates;
|
||||
|
||||
namespace cli
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
public string ConnectionString
|
||||
{
|
||||
get { return DbHelpers.ConnectionString; }
|
||||
private set { DbHelpers.ConnectionString = value; }
|
||||
}
|
||||
|
||||
public static SiteSettings SiteSetup { get; private set; }
|
||||
public static SmtpSettings SmtpSettup { get; private set; }
|
||||
public static IConfiguration Configuration { get; set; }
|
||||
|
||||
public static string HostingFullName { get; private set; }
|
||||
|
||||
ILogger logger;
|
||||
public Startup(IHostingEnvironment env, IApplicationEnvironment appEnv)
|
||||
{
|
||||
var devtag = env.IsDevelopment()?"D":"";
|
||||
var prodtag = env.IsProduction()?"P":"";
|
||||
var stagetag = env.IsStaging()?"S":"";
|
||||
|
||||
HostingFullName = $"{appEnv.RuntimeFramework.FullName} [{env.EnvironmentName}:{prodtag}{devtag}{stagetag}]";
|
||||
// Set up configuration sources.
|
||||
|
||||
var builder = new ConfigurationBuilder()
|
||||
.AddEnvironmentVariables()
|
||||
.AddJsonFile("appsettings.json")
|
||||
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true);
|
||||
Configuration = builder.Build();
|
||||
|
||||
}
|
||||
|
||||
public void ConfigureServices (IServiceCollection services)
|
||||
{
|
||||
services.AddOptions();
|
||||
var siteSettingsconf = Configuration.GetSection("Site");
|
||||
services.Configure<SiteSettings>(siteSettingsconf);
|
||||
var smtpSettingsconf = Configuration.GetSection("Smtp");
|
||||
services.Configure<SmtpSettings>(smtpSettingsconf);
|
||||
services.AddInstance(typeof(ILoggerFactory), new LoggerFactory());
|
||||
services.AddTransient(typeof(IEmailSender), typeof(MessageSender));
|
||||
services.AddTransient(typeof(RazorEngineHost), typeof(YaRazorEngineHost));
|
||||
services.AddEntityFramework().AddNpgsql().AddDbContext<ApplicationDbContext>();
|
||||
services.AddTransient((s) => new RazorTemplateEngine(s.GetService<RazorEngineHost>()));
|
||||
services.AddLogging();
|
||||
services.AddTransient<EMailer>();
|
||||
services.AddLocalization(options =>
|
||||
{
|
||||
options.ResourcesPath = "Resources";
|
||||
});
|
||||
}
|
||||
|
||||
public void Configure (IApplicationBuilder app, IHostingEnvironment env,
|
||||
IOptions<SiteSettings> siteSettings, ILoggerFactory loggerFactory)
|
||||
{
|
||||
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
|
||||
loggerFactory.AddDebug();
|
||||
logger = loggerFactory.CreateLogger<Startup>();
|
||||
logger.LogInformation(env.EnvironmentName);
|
||||
var cxstr = Configuration["Data:DefaultConnection:ConnectionString"];
|
||||
DbHelpers.ConnectionString = cxstr;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Hosting.Server;
|
||||
using Microsoft.AspNet.Http.Features;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Server
|
||||
{
|
||||
public class YavscServerFactory : IServerFactory
|
||||
{
|
||||
public IFeatureCollection Initialize(IConfiguration configuration)
|
||||
{
|
||||
FeatureCollection featureCollection = new FeatureCollection();
|
||||
return featureCollection;
|
||||
}
|
||||
|
||||
public IDisposable Start(IFeatureCollection serverFeatures, Func<IFeatureCollection, Task> application)
|
||||
{
|
||||
var task = application(serverFeatures);
|
||||
return task;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
{
|
||||
"Site": {
|
||||
"Authority": "dev.pschneider.fr",
|
||||
"Title": "Yavsc dev",
|
||||
"Slogan": "Yavsc : WIP.",
|
||||
"Banner": "/images/yavsc.png",
|
||||
"HomeViewName": "Home",
|
||||
"FavIcon": "/favicon.ico",
|
||||
"Icon": "/images/yavsc.png"
|
||||
},
|
||||
"Logging": {
|
||||
"IncludeScopes": true,
|
||||
"LogLevel": {
|
||||
"Default": "Debug",
|
||||
"System": "Warning",
|
||||
"Microsoft": "Warning"
|
||||
}
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
|
||||
{
|
||||
"sdk": {
|
||||
"version": "2.1.4",
|
||||
"runtime": "mono",
|
||||
"architecture": "x64"
|
||||
}
|
||||
|
||||
}
|
@ -1,60 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
|
||||
<package id="Microsoft.AspNet.Server.Kestrel" version="1.0.0-rc1-final" targetFramework="net451" />
|
||||
<package id="EntityFramework.Relational.Design" version="7.0.0-rc1-final" targetFramework="net451" />
|
||||
<package id="Microsoft.AspNet.Hosting.Abstractions" version="1.0.0-rc1-final" targetFramework="net451" />
|
||||
|
||||
<package id="EntityFramework.Core" version="7.0.0-rc1-final" targetFramework="net451" />
|
||||
<package id="EntityFramework.Relational" version="7.0.0-rc1-final" targetFramework="net451" />
|
||||
<package id="Microsoft.AspNet.Identity.EntityFramework" version="3.0.0-rc1-final" targetFramework="net451" />
|
||||
<package id="Microsoft.AspNet.Mvc.Razor" version="6.0.0-rc1-final" targetFramework="net451" />
|
||||
<package id="Microsoft.CodeAnalysis.Analyzers" version="1.0.0" targetFramework="net451" />
|
||||
<package id="Microsoft.CodeAnalysis.Common" version="1.1.0-rc1" targetFramework="net451" />
|
||||
<package id="Microsoft.CodeAnalysis.CSharp" version="1.1.0-rc1" targetFramework="net451" />
|
||||
<package id="Microsoft.Dnx.Compilation.Abstractions" version="1.0.0-rc1-final" targetFramework="net451" />
|
||||
<package id="Microsoft.Dnx.Compilation.CSharp.Abstractions" version="1.0.0-rc1-final" targetFramework="net451" />
|
||||
<package id="Microsoft.Dnx.Compilation.CSharp.Common" version="1.0.0-rc1-final" targetFramework="net451" />
|
||||
<package id="Microsoft.Extensions.Caching.Abstractions" version="1.0.0-rc1-final" targetFramework="net451" />
|
||||
<package id="Microsoft.Extensions.Caching.Memory" version="1.0.0-rc1-final" targetFramework="net451" />
|
||||
<package id="Microsoft.Extensions.Configuration" version="1.0.0-rc1-final" targetFramework="net451" />
|
||||
<package id="Microsoft.Extensions.Configuration.Abstractions" version="1.0.0-rc1-final" targetFramework="net451" />
|
||||
<package id="Microsoft.Extensions.Configuration.FileExtensions" version="1.0.0-rc1-final" targetFramework="net451" />
|
||||
<package id="Microsoft.Extensions.Configuration.Json" version="1.0.0-rc1-final" targetFramework="net451" />
|
||||
<package id="Microsoft.Extensions.DependencyInjection" version="1.0.0-rc1-final" targetFramework="net451" />
|
||||
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="1.0.0-rc1-final" targetFramework="net451" />
|
||||
<package id="Microsoft.Extensions.Localization" version="1.0.0-rc1-final" targetFramework="net451" />
|
||||
<package id="Microsoft.Extensions.Localization.Abstractions" version="1.0.0-rc1-final" targetFramework="net451" />
|
||||
<package id="Microsoft.Extensions.Logging" version="1.0.0-rc1-final" targetFramework="net451" />
|
||||
<package id="Microsoft.Extensions.Logging.Abstractions" version="1.0.0-rc1-final" targetFramework="net451" />
|
||||
<package id="Microsoft.Extensions.MemoryPool" version="1.0.0-rc1-final" targetFramework="net451" />
|
||||
<package id="Microsoft.Extensions.OptionsModel" version="1.0.0-rc1-final" targetFramework="net451" />
|
||||
<package id="Microsoft.Extensions.PlatformAbstractions" version="1.0.0-rc1-final" targetFramework="net451" />
|
||||
<package id="Microsoft.Extensions.Primitives" version="1.0.0-rc1-final" targetFramework="net451" />
|
||||
<package id="Microsoft.Framework.ConfigurationModel" version="1.0.0-beta4" targetFramework="net451" />
|
||||
<package id="Microsoft.Framework.ConfigurationModel.Interfaces" version="1.0.0-beta4" targetFramework="net451" />
|
||||
<package id="Microsoft.Framework.ConfigurationModel.Json" version="1.0.0-beta4" targetFramework="net451" />
|
||||
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net451" />
|
||||
<package id="Remotion.Linq" version="2.0.1" targetFramework="net451" />
|
||||
<package id="System.Collections" version="4.0.11" targetFramework="net451" />
|
||||
<package id="System.Collections.Immutable" version="1.1.37" targetFramework="net451" />
|
||||
<package id="System.Diagnostics.Debug" version="4.0.11" targetFramework="net451" />
|
||||
<package id="System.Diagnostics.DiagnosticSource" version="4.0.0-beta-23516" targetFramework="net451" />
|
||||
<package id="System.Diagnostics.Tracing" version="4.0.0" targetFramework="net451" />
|
||||
<package id="System.Globalization" version="4.0.11" targetFramework="net451" />
|
||||
<package id="System.IO" version="4.0.0" targetFramework="net451" />
|
||||
<package id="System.Linq" version="4.1.0" targetFramework="net451" />
|
||||
<package id="System.Reflection" version="4.1.0" targetFramework="net451" />
|
||||
<package id="System.Reflection.Extensions" version="4.0.0" targetFramework="net451" />
|
||||
<package id="System.Reflection.Metadata" version="1.1.0" targetFramework="net451" />
|
||||
<package id="System.Reflection.Primitives" version="4.0.0" targetFramework="net451" />
|
||||
<package id="System.Resources.ResourceManager" version="4.0.1" targetFramework="net451" />
|
||||
<package id="System.Runtime" version="4.0.0" targetFramework="net451" />
|
||||
<package id="System.Runtime.Extensions" version="4.1.0" targetFramework="net451" />
|
||||
<package id="System.Runtime.InteropServices" version="4.1.0" targetFramework="net451" />
|
||||
<package id="System.Text.Encoding" version="4.0.0" targetFramework="net451" />
|
||||
<package id="System.Text.Encoding.Extensions" version="4.0.0" targetFramework="net451" />
|
||||
<package id="System.Threading" version="4.0.0" targetFramework="net451" />
|
||||
<package id="Yavsc.Abstract" version="1.0.5-rc9" targetFramework="net451" />
|
||||
<package id="Yavsc.Server" version="1.0.5-rc9" targetFramework="net451" />
|
||||
</packages>
|
@ -1,52 +0,0 @@
|
||||
{
|
||||
"version": "1.0.5-*",
|
||||
"commands": {
|
||||
"run": "cli"
|
||||
},
|
||||
"resource": "Resources/**/*.resx",
|
||||
"buildOptions": {
|
||||
"debugType": "full",
|
||||
"emitEntryPoint": true,
|
||||
"compile": {
|
||||
"include": "*.cs",
|
||||
"exclude": [
|
||||
"contrib"
|
||||
]
|
||||
},
|
||||
"embed": [
|
||||
"Resources/**/*.resx"
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"EntityFramework7.Npgsql": "3.1.0-rc1-3",
|
||||
"MailKit": "1.12.0",
|
||||
"Microsoft.CodeAnalysis": "1.0.0-rc1",
|
||||
"Microsoft.AspNet.Mvc": "6.0.0-rc1-*",
|
||||
"Microsoft.AspNet.Hosting": "1.0.0-rc1-final",
|
||||
"Microsoft.AspNet.Identity.EntityFramework": "3.0.0-rc1-*",
|
||||
"Microsoft.AspNet.Identity": "3.0.0-rc1-*",
|
||||
"Microsoft.Framework.Configuration.Json": "1.0.0-beta8",
|
||||
"Microsoft.Framework.ConfigurationModel.Json": "1.0.0-beta4",
|
||||
"Microsoft.Extensions.DependencyInjection": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Configuration.Abstractions": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Configuration.FileProviderExtensions": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Configuration.UserSecrets": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Logging": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Logging.TraceSource": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Globalization.CultureInfoCache": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Localization": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Localization.Abstractions": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.WebEncoders.Core": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Options": "0.0.1-alpha",
|
||||
"Microsoft.Extensions.WebEncoders": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.CodeGeneration": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.DependencyInjection.Abstractions": "1.0.0-rc1-final",
|
||||
"Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final",
|
||||
"Yavsc.Abstract": { "version": "1.0.5-rc14", "target": "package" },
|
||||
"Yavsc": { "version": "1.0.5-rc14", "target": "package" }
|
||||
},
|
||||
"frameworks": {
|
||||
"dnx451": {}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,26 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cli", "cli\cli.csproj", "{DC25DCD0-19CB-4458-923A-40CE069A56BD}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{DC25DCD0-19CB-4458-923A-40CE069A56BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DC25DCD0-19CB-4458-923A-40CE069A56BD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DC25DCD0-19CB-4458-923A-40CE069A56BD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DC25DCD0-19CB-4458-923A-40CE069A56BD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(MonoDevelopProperties) = preSolution
|
||||
Policies = $0
|
||||
$0.DotNetNamingPolicy = $1
|
||||
$1.DirectoryNamespaceAssociation = PrefixedHierarchical
|
||||
$0.TextStylePolicy = $2
|
||||
$2.inheritsSet = null
|
||||
$2.scope = application/json
|
||||
$0.StandardHeader = $3
|
||||
EndGlobalSection
|
||||
EndGlobal
|
@ -1,44 +0,0 @@
|
||||
{
|
||||
"Site": {
|
||||
"Authority": "dev.pschneider.fr",
|
||||
"Title": "Yavsc dev",
|
||||
"Slogan": "Yavsc : WIP.",
|
||||
"Banner": "/images/yavsc.png",
|
||||
"HomeViewName": "Home",
|
||||
"FavIcon": "/favicon.ico",
|
||||
"Icon": "/images/yavsc.png",
|
||||
"Owner": {
|
||||
"Name": "Paul",
|
||||
"EMail": "paul@pschneider.fr",
|
||||
"PostalAddress": {
|
||||
"Street1": "2 Blv A. Briand",
|
||||
"Street2": "Apt 284 - Bat V",
|
||||
"PostalCode": "92150",
|
||||
"City": "Suresnes",
|
||||
"State": "France",
|
||||
"Province": null
|
||||
}
|
||||
},
|
||||
"Admin": {
|
||||
"Name": "Paul",
|
||||
"EMail": "contact@pschneider.fr"
|
||||
},
|
||||
"UserFiles": {
|
||||
"Avatars": "Avatars-Dev",
|
||||
"Quota": 200000000,
|
||||
"Bills": "Bills-Dev",
|
||||
"Blog": "Blog-Dev"
|
||||
},
|
||||
"TempDir": "Temp-Dev"
|
||||
},
|
||||
"Smtp": {
|
||||
"Host": "localhost",
|
||||
"Port": 25,
|
||||
"EnableSSL": false
|
||||
},
|
||||
"Data": {
|
||||
"DefaultConnection": {
|
||||
"ConnectionString": "Server=localhost;Port=5432;Database=YavscDev;Username=yavscdev;Password=admin;"
|
||||
}
|
||||
}
|
||||
}
|
@ -1 +1 @@
|
||||
20-alpha7
|
||||
20-alpha8
|
||||
|
Loading…
Reference in New Issue