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
<configuration> | |
<system.webServer> | |
<handlers> | |
<add name="iisnode" path="server.js" verb="*" modules="iisnode" /> | |
</handlers> | |
<rewrite> | |
<rules> | |
<rule name="cdw"> | |
<match url="/*" /> |
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.Configuration; | |
public class ConfigHelper | |
{ | |
public static string GetAppSetting(string key, string defaultValue = null) | |
{ | |
var result = defaultValue; | |
var val = ConfigurationManager.AppSettings[key]); |
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.Linq; | |
public class AppSettingAttribute : Attribute | |
{ | |
public string Name { get; } | |
public string DefaultValue { get; } | |
public AppSettingAttribute(string name) | |
{ |
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 IBotConfiguration { | |
string AppId { get; set; } | |
string AppPasseord { get; set; } | |
} | |
public class BotConfiguration : IBotConfiguration { | |
[AppSetting("AppPassword")] | |
public string AppId { get; set; } | |
[AppSetting("AppId", "AnyDefaultValueAppId")] |
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 AppSettingModule : Autofac.Module { | |
protected override void Load(ContainerBuilder builder) { | |
builder.RegisterType<ConfigurationReader>().As<IConfigurationReader>().SingleInstance(); | |
builder.Register(c => c.Resolve<IConfigurationReader>().Load<BotConfiguration>()).As<IBotConfiguration>(); | |
// Register future model here... | |
} | |
} |
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
<?xml version="1.0" encoding="utf-8"?> | |
<packages> | |
<package id="Autofac" version="4.4.0" targetFramework="net462" /> | |
<package id="Chronic.Signed" version="0.3.2" targetFramework="net462" /> | |
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net462" /> | |
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net462" /> | |
<package id="Microsoft.Bot.Builder" version="3.0.0" targetFramework="net462" /> | |
<package id="Microsoft.Bot.Connector" version="1.1.0.0" targetFramework="net462" /> | |
<package id="Microsoft.IdentityModel.Protocol.Extensions" version="1.0.2.206221351" targetFramework="net462" /> | |
<package id="Microsoft.Rest.ClientRuntime" version="1.8.2" targetFramework="net462" /> |
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.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using PP.Core; | |
using PP.Core.Logging; | |
using PP.Core.Models; | |
using PP.Libraries.Models; |
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 IRepository<TEntity> : IRepository<TEntity, Guid> | |
where TEntity : class, IEntity | |
{ | |
} | |
public interface IRepository<TEntity, TPrimaryKey> | |
where TEntity : class, IEntity<TPrimaryKey> |
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; | |
using System.Collections.Generic; | |
using System.Data; | |
namespace Bingo | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
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 DepositsManagerTest : TestFor<DepositsManager> | |
{ | |
[SetUp] | |
public void Setup() { } | |
[Test] | |
public void QueryService_ShouldRecevied_GetAccountQuery_WithNormalStyle() | |
{ | |
// arrange | |
var mockQueryService = new Mock<IBookingQueryService>(); |
OlderNewer