This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github搜索EA7E Single User License | |
----- BEGIN LICENSE ----- | |
Michael Barnes | |
Single User License | |
EA7E-821385 | |
8A353C41 872A0D5C DF9B2950 AFF6F667 | |
C458EA6D 8EA3C286 98D1D650 131A97AB | |
AA919AEC EF20E143 B361B1E7 4C8B7F04 | |
B085E65E 2F5F5360 8489D422 FB8FC1AA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//for more detail please visit | |
//https://github.com/Awesome-CMS-Core/Awesome-CMS-Core/blob/master/src/AwesomeCMSCore/AwesomeCMSCore/webpack.config.js | |
const path = require("path"); | |
const webpack = require("webpack"); | |
const ExtractTextPlugin = require("extract-text-webpack-plugin"); | |
const extractCSS = new ExtractTextPlugin("cmscore.css"); | |
const CompressionPlugin = require("compression-webpack-plugin"); | |
module.exports = { | |
entry: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public string GetVirtualPath(VirtualPathContext context) | |
{ | |
foreach (var matcherParameter in _matcher.Template.Parameters) | |
{ | |
context.Values.Remove(matcherParameter.Name); // make sure none of the domain-placeholders are appended as query string parameters | |
} | |
return _innerRoute.GetVirtualPath(context); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module: { | |
rules: [{ | |
test: /\.scss$/, | |
use: [ | |
'style-loader', | |
MiniCssExtractPlugin.loader, | |
{ | |
loader: "css-loader", | |
options: { | |
minimize: true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugins: [ | |
new WebpackShellPlugin({ | |
onBuildStart: ['echo "Starting"'], | |
onBuildEnd: ['postcss --dir wwwroot/dist wwwroot/dist/*.css'] | |
}) | |
], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm install --save-dev cssnano webpack-shell-plugin | |
npm install postcss-cli --global |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class BackgroundService : IHostedService, IDisposable | |
{ | |
private Task task; | |
private readonly CancellationTokenSource cancellationTokens = new CancellationTokenSource(); | |
protected abstract Task ExecuteAsync(CancellationToken stoppingToken); | |
public virtual Task StartAsync(CancellationToken cancellationToken) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ExampleGuidService : BackgroundService | |
{ | |
public const string ExampleGuidsKey = "ExampleGuids"; | |
private IMemoryCache memoryCache; | |
public ExampleGuidService(IMemoryCache memoryCache) | |
{ | |
this.memoryCache = memoryCache; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private IMemoryCache memoryCache; | |
public HomeController(IMemoryCache memoryCache) | |
{ | |
this.memoryCache = memoryCache; | |
} | |
public IActionResult Index() | |
{ | |
if (!this.memoryCache.TryGetValue(ExampleGuidService.ExampleGuidsKey, out List<ExampleGuid> cacheEntry)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services.AddMemoryCache(); | |
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); | |
services.AddSingleton<IHostedService, ExampleGuidService>(); |
OlderNewer