This commit is contained in:
2018-05-02 04:09:51 +02:00
parent fd7b50bc8a
commit 08eca1f46f
283 changed files with 23194 additions and 590 deletions

View File

@ -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

View File

@ -21,11 +21,6 @@ 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
{
@ -33,7 +28,6 @@ namespace cli
{
public static void Main(string[] args)
{
var host = new WebHostBuilder();
var hostengnine = host
@ -44,7 +38,11 @@ namespace cli
var app = hostengnine.Start();
var mailer = app.Services.GetService<EMailer>();
mailer.AllUserGen(2, nameof(UserOrientedTemplate));
var loggerFactory = app.Services.GetService<ILoggerFactory>();
var logger = loggerFactory.CreateLogger<Program>();
mailer.AllUserGen(2,"UserOrientedTemplate");
logger.LogInformation("Finished");
}
}
}

View File

@ -1,26 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle("cli")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("${AuthorCopyright}")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
[assembly: AssemblyVersion("1.0.*")]
// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
//[assembly: AssemblyDelaySign(false)]
//[assembly: AssemblyKeyFile("")]

View File

@ -1,63 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="MonthlySubjectTemplate"><value>[{0} Monthly] {1}</value></data>
</root>

View File

@ -139,6 +139,7 @@ namespace cli.Services
}
else
{
logger.LogInformation(razorResult.GeneratedCode);
ms.Seek(0, SeekOrigin.Begin);
Assembly assembly = Assembly.Load(ms.ToArray());
@ -149,8 +150,9 @@ namespace cli.Services
logger.LogInformation("Generation for " + user.UserName);
generatedtemplate.Init();
generatedtemplate.User = user;
generatedtemplate.ExecuteAsync();
logger.LogInformation(generatedtemplate.GeneratedText);
}
/* ... type.InvokeMember("Write",

96
cli/cli.csproj Normal file
View File

@ -0,0 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<PropertyGroup>
<MinimumVisualStudioVersion>10.0</MinimumVisualStudioVersion>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{E7C9D6BF-54DC-4E18-8F25-C4BD4BE71ACC}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>cli</RootNamespace>
<AssemblyName>cli</AssemblyName>
<TargetFramework>netcoreapp2.0</TargetFramework>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<EnableDefaultCompileItems>true</EnableDefaultCompileItems>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<!-- <AllowUnsafeBlocks>true</AllowUnsafeBlocks> -->
<ExternalConsole>true</ExternalConsole>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ExternalConsole>true</ExternalConsole>
</PropertyGroup>
<ItemGroup>
<None Include="appsettings.Development.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="appsettings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="Microsoft.Web.Infrastructure">
<HintPath>packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
</Reference>
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Security" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Net.Http" />
<Reference Include="Mono.Security">
<HintPath>packages\Npgsql.2.2.0-rc1\lib\net45\Mono.Security.dll</HintPath>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Transactions" />
<Reference Include="EntityFramework7.Npgsql">
<HintPath>..\packages\EntityFramework7.Npgsql.3.1.0-rc1-3\lib\net451\EntityFramework7.Npgsql.dll</HintPath>
</Reference>
<Reference Include="EntityFramework.Core">
<HintPath>..\packages\EntityFramework.Core.7.0.0-rc1-final\lib\net451\EntityFramework.Core.dll</HintPath>
</Reference>
<Reference Include="Yavsc.Server">
<HintPath>..\packages\Yavsc.Server.1.0.5-rc9\lib\portable-net45+win8+wp8+wpa81+Xamarin.Mac+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Yavsc.Server.dll</HintPath>
</Reference>
<Reference Include="Yavsc.Abstract">
<HintPath>..\packages\Yavsc.Abstract.1.0.5-rc9\lib\portable-net45+win8+wp8+wpa81+Xamarin.Mac+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Yavsc.Abstract.dll</HintPath>
</Reference>
<Reference Include="System.Interactive.Async">
<HintPath>..\packages\Ix-Async.1.2.5\lib\net45\System.Interactive.Async.dll</HintPath>
</Reference>
<Reference Include="CommandLine">
<HintPath>..\packages\Machine.Specifications.Runner.Console.0.9.0\tools\CommandLine.dll</HintPath>
</Reference>
<Reference Include="Machine.Specifications.Reporting">
<HintPath>..\packages\Machine.Specifications.Runner.Console.0.9.0\tools\Machine.Specifications.Reporting.dll</HintPath>
</Reference>
<Reference Include="Machine.Specifications.Reporting.Templates">
<HintPath>..\packages\Machine.Specifications.Runner.Console.0.9.0\tools\Machine.Specifications.Reporting.Templates.dll</HintPath>
</Reference>
<Reference Include="Machine.Specifications.Runner.Utility">
<HintPath>..\packages\Machine.Specifications.Runner.Console.0.9.0\tools\Machine.Specifications.Runner.Utility.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Folder Include="Services\" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,5 @@
{
"version": 1,
"dgSpecHash": "LNDBH3EbqEEFCcWbzyWyYNOMRaVGbaEzWY/zgzSwqZE75MXqbQMshgoHZc43TWxvE2zEpQkum6iHe1OSweEcyw==",
"success": true
}

17
cli/cli/Program.cs Normal file
View File

@ -0,0 +1,17 @@
// // Program.cs
// /*
// paul 02/05/2018 02:32 20182018 5 2
// */
using System;
namespace cli
{
class MainClass
{
public static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}

60
cli/cli/packages.config Normal file
View File

@ -0,0 +1,60 @@
<?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>

View File

@ -1,52 +1,58 @@
{
"version": "1.0.5-*",
"commands": {
"run": "cli"
{
"version": "1.0.5-*",
"commands": {
"run": "cli"
},
"resource": "Resources/**/*.resx",
"buildOptions": {
"debugType": "full",
"emitEntryPoint": true,
"compile": {
"include": "*.cs",
"exclude": [
"contrib"
]
},
"resource": "Resources/**/*.resx",
"buildOptions": {
"debugType": "full",
"emitEntryPoint": true,
"compile": {
"include": "*.cs",
"exclude": [
"contrib"
]
},
"embed": [
"Resources/**/*.resx"
]
"embed": [
"Resources/**/*.resx"
]
},
"dependencies": {
"EntityFramework7.Npgsql": "3.1.0-rc1-3",
"MailKit": "1.12.0",
"Microsoft.AspNet.Hosting": "1.0.0-rc1-final",
"Microsoft.AspNet.Identity": "3.0.0-rc1-*",
"Microsoft.AspNet.Identity.EntityFramework": "3.0.0-rc1-*",
"Microsoft.AspNet.Mvc": "6.0.0-rc1-*",
"Microsoft.CodeAnalysis": "1.1.0-rc1-20151109-01",
"Microsoft.Extensions.CodeGeneration": "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.DependencyInjection": "1.0.0-rc1-final",
"Microsoft.Extensions.DependencyInjection.Abstractions": "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.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.Extensions.Logging.TraceSource": "1.0.0-rc1-final",
"Microsoft.Extensions.Options": "0.0.1-alpha",
"Microsoft.Extensions.WebEncoders": "1.0.0-rc1-final",
"Microsoft.Extensions.WebEncoders.Core": "1.0.0-rc1-final",
"Microsoft.Framework.Configuration.Json": "1.0.0-beta8",
"Microsoft.Framework.ConfigurationModel.Json": "1.0.0-beta4",
"Yavsc": {
"version": "1.0.5-rc14",
"target": "package"
},
"dependencies": {
"Microsoft.AspNet.Hosting": "1.0.0-rc1-final",
"Microsoft.Extensions.DependencyInjection": "1.0.0-rc1-final",
"Microsoft.Framework.Configuration.Json": "1.0.0-beta8",
"Microsoft.Framework.ConfigurationModel.Json": "1.0.0-beta4",
"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.AspNet.Mvc": "6.0.0-rc1-*",
"Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final",
"Microsoft.AspNet.Identity.EntityFramework": "3.0.0-rc1-*",
"Microsoft.AspNet.Identity": "3.0.0-rc1-*",
"Microsoft.Extensions.DependencyInjection.Abstractions": "1.0.0-rc1-final",
"Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final",
"Microsoft.CodeAnalysis": "1.0.0-rc1",
"EntityFramework7.Npgsql": "3.1.0-rc1-3",
"MailKit": "1.12.0",
"Yavsc.Abstract": { "version": "1.0.5-rc14", "target": "package" },
"Yavsc": { "version": "1.0.5-rc14", "target": "package" }
},
"frameworks": {
"dnx451": {}
"Yavsc.Abstract": {
"version": "1.0.5-rc14",
"target": "package"
}
},
"frameworks": {
"dnx451": {}
}
}

File diff suppressed because it is too large Load Diff