- Notifications should be actionless views
- Use IPartialModel for wiring up actionless views (INotificationModel should be an IPartialModel)
- Endpoints to Handlers
- Beef up coverage on handlers
- BehaviorNode partial mechanism
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var values = new List<Sample>(); | |
for (var i = 0; i < 10; i++) | |
{ | |
values.Add(new Sample | |
{ | |
Prop1 = Guid.NewGuid().ToString(), |
public interface ICommandInvoker | |
{ | |
void InvokeFor(SocketMessage message); | |
} | |
public class CommandInvoker : ICommandInvoker | |
{ | |
public void InvokeFor(SocketMessage message) | |
{ | |
//no-op..just an example |
public class Order | |
{ | |
private readonly List<OrderLineItem> _lineItems = new List<OrderLineItem>(); | |
public Guid Id { get; set; } | |
public IEnumerable<OrderLineItem> LineItems { get { return _lineItems; } } | |
public bool IsInterational { get; set; } | |
public bool IsReadyToShip { get; set; } | |
public void AddLineItem(OrderLineItem item) |
public class AddBehaviorChainNotificationPolicy : INotificationPolicy | |
{ | |
private readonly BehaviorGraph _graph; | |
public AddBehaviorChainNotificationPolicy(BehaviorGraph graph) | |
{ | |
_graph = graph; | |
} | |
public bool Applies() |
public class DiagnosticsTemplateBinder : ITemplateBinder | |
{ | |
public bool CanBind(IBindRequest request) | |
{ | |
var descriptor = request.Target.Descriptor as ViewDescriptor; | |
if(descriptor == null || descriptor.ViewModel == null) | |
{ | |
return false; | |
} |
public class CommandInvocationSource : IActionSource | |
{ | |
private readonly IContainer _container; | |
public CommandInvocationSource() | |
{ | |
_container = ObjectFactory.Container; | |
} | |
public IEnumerable<ActionCall> FindActions(TypePool types) |
public class Global : System.Web.HttpApplication | |
{ | |
protected void Application_Start(object sender, EventArgs e) | |
{ | |
FubuApplication | |
.For<Test>() | |
.StructureMapObjectFactory() | |
.Bootstrap(RouteTable.Routes); | |
} |
jBus.routing = new (function() { | |
function lazy(builder) { | |
this.builder = builder; | |
this.buildWith = function(func) { | |
this.builder = func; | |
}; | |
this.value = function() { | |
return this.builder(); | |
}; |
public class ModelFinder : IModelFinder | |
{ | |
private readonly BehaviorGraph _graph; | |
public ModelFinder(BehaviorGraph graph) | |
{ | |
_graph = graph; | |
} | |
public Type FindRelatedModel(Type type) |