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
using Microsoft.AspNetCore.Http; | |
using Microsoft.Extensions.Configuration; | |
using System.IO; | |
using System.Text; | |
using System.Threading.Tasks; | |
public class ChangeBaseHrefMiddleware | |
{ | |
RequestDelegate next; | |
private readonly IConfiguration configuration; |
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
import {trigger, animate, style, group, animateChild, query, stagger, transition} from '@angular/animations'; | |
export const routerTransition = trigger('routerTransition', [ | |
transition('* <=> *', [ | |
/* order */ | |
/* 1 */ query(':enter, :leave', style({ position: 'fixed', width:'100%' }) | |
, { optional: true }), | |
/* 2 */ group([ // block executes in parallel | |
query(':enter', [ |
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
<div class="row"> | |
<div class="col-md-8"> | |
<ul id="colorWheel1" class="sortable"></ul> | |
<ul id="colorWheel2" class="sortable"></ul> | |
<ul id="colorWheel3" class="sortable"></ul> | |
<ul id="colorWheel4" class="sortable"></ul> | |
</div> | |
</div> |
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
[TestMethod] | |
public void MyTestMethod() | |
{ | |
this.Container.RegisterType<FactoryBase<Binding>, CustomBinding1>(); | |
var fixture1 = this.Container.Resolve<IFixture>(); | |
fixture1.Create<Binding>(); | |
this.Container.RegisterType<FactoryBase<Binding>, CustomBinding2>(); | |
var fixture2 = this.Container.Resolve<IFixture>(); |
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
[TestMethod] | |
public void MyTestMethod() | |
{ | |
this.Container.RegisterType<FactoryBase<Entity>, CustomEntityFactory>(); | |
this.Container.RegisterType<FactoryBase<Binding>, CustomBinding1>("binding1"); | |
this.Container.RegisterType<FactoryBase<Binding>, CustomBinding2>("binding2"); | |
var fixture = this.Container.Resolve<IFixture>(); | |
fixture.Create<Binding>(); | |
fixture.Create<DataMart>(); | |
} |
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 interface IFileUploader | |
{ | |
Task<FileInfo> GetUploadedFile(HttpContent content, string expectedExtension); | |
} | |
public class FileUploader : IFileUploader | |
{ | |
public async Task<FileInfo> GetUploadedFile(HttpContent content, string expectedExtension) | |
{ | |
if (!content.IsMimeMultipartContent()) |
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 static class SqlExceptionCreator | |
{ | |
public static SqlException Create(string message, int errorCode) | |
{ | |
SqlException exception = Instantiate<SqlException>(); | |
SetProperty(exception, "_message", message); | |
var errors = new ArrayList(); | |
var errorCollection = Instantiate<SqlErrorCollection>(); |