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
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<configSections> | |
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" /> | |
</configSections> | |
<connectionStrings> | |
<add name="forum-db" connectionString="Data Source=.\SQLExpress;Initial Catalog=forum-db;Integrated Security=SSPI;Persist Security Info=False;" /> | |
</connectionStrings> | |
<log4net> | |
<root> |
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 MyBinder : IModelBinder | |
{ | |
public object Bind(NancyContext context, Type modelType, params string[] blackList) | |
{ | |
var implementation = GetImplementationFromFormVariables(context.Request.Form); | |
return implementation as IMyInterface; //I don't think the cast is necessary here, but it illustrates the point | |
} | |
public bool CanBind(Type modelType) | |
{ |
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 IAmAnInterface TestBindAndCastToInterface() | |
{ | |
var result = this.Bind(); | |
return (IAmAnInterface)result; | |
} | |
public Concrete TestBindAndCastToConcrete() | |
{ | |
var result = this.Bind(); | |
return (Concrete)result; |
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; | |
using System.IO; | |
using Lemur.Logging; | |
using log4net.Config; | |
using NConfig; | |
using Topshelf; | |
namespace Lemur.CommandHost | |
{ | |
public class Program : ILoggingSource |
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
Json: { | |
"requestId":"ac2aa039-ede3-4f29-b0ee-9fff017e5d37", | |
"destinationAddress":"msmq://djlancerock/my_commandhost?tx=false", | |
"headers":null, | |
"message":{ | |
"failedMessage": | |
{ | |
"issuedBy":"msmq://localhost/my_commandhost", | |
"implementingType":"my.Commands.DiagnosticCommand, MyCommand , Version=1.0.0.0, Culture=neutral, PublicKeyToken=null","identifier":"00000000-0000-0000-0000-000000000000" | |
}, |
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 interface ICommandPublisher | |
{ | |
void Publish(ICommand command); | |
} | |
public class MassTransitCommandPublisher : ICommandPublisher, ILoggingSource | |
{ | |
public void Publish(ICommand command) | |
{ | |
this.Debug("Publishing command {0}", 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
{ | |
Name, | |
Description, | |
IsValid, | |
ConfigurationErrors [], //string | |
Agents [ ], | |
Commands [ ], | |
Queries [ ], | |
InputModels [ ] | |
} |
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
[{ | |
AgentSystemName, | |
PartName, | |
PartNamespace, | |
Arguments [{ | |
Type, | |
Name, | |
Choices [] //string array, | |
MultiChoice, | |
DefaultValue |
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
[{ | |
Description, | |
DescriptiveName, | |
IsValid, | |
AgentSystemName, | |
Commands [ ], | |
Queries [ ], | |
ReadModels [ ] | |
}] |
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
{ | |
Description, | |
DescriptiveName, | |
IsValid, | |
AgentSystemName, | |
Commands [ ], | |
Queries [ ], | |
ReadModels [ ] | |
} |
OlderNewer