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 HostnameAccountAccessor : IAccountAccessor { | |
static readonly ILog _log = LogProvider.For<HostnameAccountAccessor>(); | |
readonly IAccountRepository _AccountRepository; | |
readonly IOwinContext _owinContext; | |
Guid _instanceID; | |
public Guid InstanceID { get { return _instanceID; } } | |
public HostnameAccountAccessor(IOwinContext owinContext, IAccountRepository accountRepository) { | |
_instanceID = Guid.NewGuid(); |
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 ClaimsPrincipalAccountAccessor : IAccountAccessor { | |
static readonly ILog _log = LogProvider.For<ClaimsPrincipalAccountAccessor>(); | |
readonly IAccountRepository _AccountRepository; | |
readonly IOwinContext _owinContext; | |
public ClaimsPrincipalAccountAccessor(IOwinContext owinContext, IAccountRepository accountRepository) { | |
_owinContext = owinContext; | |
_AccountRepository=accountRepository; | |
} |
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 NancyContextAccountAccessor : IAccountAccessor { | |
static readonly ILog _log = LogProvider.For<NancyContextAccountAccessor>(); | |
readonly IAccountRepository _accountRepository; | |
readonly NancyContext _nancyContext; | |
public NancyContextAccountAccessor(IAccountRepository accountRepository, NancyContext nancyContext) { | |
_accountRepository = accountRepository; | |
_nancyContext = nancyContext; | |
} |
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 IAccountAccessor { | |
Account GetCurrentAccount(); | |
} |
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
FROM jetbrains/teamcity-agent | |
ENV MONO_VERSION 5.4.1.6 | |
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF | |
RUN apt install apt-transport-https | |
RUN echo "deb http://download.mono-project.com/repo/ubuntu stable-xenial main" | tee /etc/apt/sources.list.d/mono-official-stable.list \ | |
&& apt-get update \ |
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
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "{your project}", | |
"type": "coreclr", | |
"request": "launch", | |
"cwd": "/app", | |
"program": "/app/{your project dll}.dll", | |
"sourceFileMap": { |
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 System; | |
using System.Collections.Concurrent; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using MediatR; | |
public interface INotificationWithIdentification : INotification | |
{ | |
Guid RequestID { get; set; } |
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
/// <summary> | |
/// </summary> | |
/// <param name="app"></param> | |
/// <param name="env"></param> | |
/// <param name="loggerFactory"></param> | |
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. | |
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) | |
{ | |
loggerFactory.AddConsole(Configuration.GetSection("Logging")); |
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 System; | |
namespace {yourapp}.Infrastructure.Caching { | |
public interface ICache { | |
/// <summary> | |
/// Determines whether the specified keyformat contains key. | |
/// </summary> | |
/// <param name="keyformat">The keyformat.</param> | |
/// <param name="arguments">The arguments.</param> | |
/// <returns></returns> |
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 System; | |
using System.ComponentModel.Composition; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Reflection; | |
using Autofac; | |
namespace AFMetadata { | |
class Program { |