This file contains 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
using Microsoft.AspNet.FileProviders; | |
using Microsoft.AspNet.Hosting; | |
using Microsoft.AspNet.Mvc; | |
using Microsoft.AspNet.Razor.Runtime.TagHelpers; | |
using Microsoft.Framework.Runtime; | |
using System; | |
using System.IO; | |
using System.Text; | |
namespace BundleHelpers |
This file contains 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
using Microsoft.AspNet.FileProviders; | |
using Microsoft.AspNet.Hosting; | |
using Microsoft.AspNet.Mvc; | |
using Microsoft.AspNet.Razor.Runtime.TagHelpers; | |
using Microsoft.Framework.Runtime; | |
using System; | |
using System.IO; | |
using System.Text; | |
namespace BundleHelpers |
This file contains 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 sealed class CanvasControlWrapper : ICanvasControl | |
{ | |
public event EventHandler<CanvasDrawEventArgs> Draw; | |
private void OnDraw(CanvasDrawEventArgs e) | |
{ | |
Draw?.Invoke(this, e); | |
} | |
public CanvasControlWrapper(CanvasControl canvasControl) |
This file contains 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
//----------------------------------------------------------------------- | |
// <copyright file="SwaggerMiddleware.cs" company="NSwag"> | |
// Copyright (c) Rico Suter. All rights reserved. | |
// </copyright> | |
// <license>https://github.com/NSwag/NSwag/blob/master/LICENSE.md</license> | |
// <author>Rico Suter, mail@rsuter.com</author> | |
//----------------------------------------------------------------------- | |
using System; | |
using System.Collections.Generic; |
This file contains 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
log.LogError(exception, w => w | |
.WriteProperty("action", "HandleCommand.") | |
.WriteProperty("actionId", context.ContextId.ToString()) | |
.WriteProperty("state", "Failed") | |
.WriteProperty("commandType", context.Command.GetType().Name)); |
This file contains 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
log.LogError($"Failed to handle command {context.Command.GetType().Name}."); |
This file contains 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 ActionContextLogAppender : ILogAppender | |
{ | |
private readonly IActionContextAccessor actionContextAccessor; | |
public ActionContextLogAppender(IActionContextAccessor actionContextAccessor) | |
{ | |
this.actionContextAccessor = actionContextAccessor; | |
} | |
public void Append(IObjectWriter writer) |
This file contains 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
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)] | |
public sealed class MinifyHtmlAttribute : ActionFilterAttribute | |
{ | |
public override void OnActionExecuted(ActionExecutedContext filterContext) | |
{ | |
if (IsSupportedContentType(filterContext)) | |
{ | |
filterContext.HttpContext.Response.Filter = new MinifyHtmlStream(filterContext.HttpContext.Response.Filter); | |
} | |
} |
This file contains 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
using System.Collections.Generic; | |
using System.Linq; | |
using System.Numerics; | |
namespace GP.Utils.Mathematics | |
{ | |
/// <summary> | |
/// Defines a convex hull that can be constructed from multiple vectors. | |
/// </summary> |
This file contains 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
{ | |
"swagger" : "2.0", | |
"info" : { | |
"description" : "This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n# Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Rebilly/ReDoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Rebilly/ReDoc/blob/master/docs/redoc-vendor-extensions.md).\n# OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io |
OlderNewer