These are chat archives for DarthFubuMVC/fubumvc

15th
Apr 2015
Jeremy D. Miller
@jeremydmiller
Apr 15 2015 00:12 UTC
@mkmurray I looked at what they have documented here: http://getglimpse.com/Extensions. It’s the same model I thought was inadequate 2 years ago and their OWIN support isn’t yet released as far as I can tell. I think it’s going to be much more bang for the buck to run Glimpse in parallel w/ the existing fubu diagnostics
Mike Murray
@mkmurray
Apr 15 2015 00:14 UTC
I see, yeah I haven’t had a chance to research myself yet…thanks
Ron Lloyd
@rlloyd2001
Apr 15 2015 16:02 UTC
public class ApplyAjaxContinuationErrorHandling : IConfigurationAction
{
    public void Configure(BehaviorGraph graph)
    {
        graph
            .Behaviors
            .OfType<RoutedChain>()
            .Where(routedChain => routedChain.ResourceType().CanBeCastTo<AjaxContinuation>())
            .Each(routedChain => routedChain.InsertFirst(Wrapper.For<AjaxContinuationErrorBehavior>()));
    }
}
Question on behavoirs.
in fubu
  • [0] {FubuMVC.Core.Diagnostics.Runtime.DiagnosticNode} FubuMVC.Core.Registration.Nodes.BehaviorNode {FubuMVC.Core.Diagnostics.Runtime.DiagnosticNode}
  • 1 {FubuMVC.Core.Diagnostics.Runtime.BehaviorTracerNode} FubuMVC.Core.Registration.Nodes.BehaviorNode {FubuMVC.Core.Diagnostics.Runtime.BehaviorTracerNode}
  • 2 {Wrapped by ExtendHealth.OneExchange.Infrastructure.AjaxContinuationErrorBehavior} FubuMVC.Core.Registration.Nodes.BehaviorNode {FubuMVC.Core.Registration.Nodes.Wrapper}
  • 3 {FubuMVC.Core.Diagnostics.Runtime.BehaviorTracerNode} FubuMVC.Core.Registration.Nodes.BehaviorNode {FubuMVC.Core.Diagnostics.Runtime.BehaviorTracerNode}
  • [4] {Wrapped by FubuMVC.RavenDb.TransactionalBehavior} FubuMVC.Core.Registration.Nodes.BehaviorNode {FubuMVC.Core.Registration.Nodes.Wrapper}
Even though 'InsertFirst' is configured for AjaxContinuationErrorBehavior, can a DiagnosticNod or BehaviorTracerNode still get inserted in front of that Behavior in the graph?
Jeremy D. Miller
@jeremydmiller
Apr 15 2015 16:04 UTC
@rlloyd2001 The diagnostic behaviors are inserted at the very last minute in the bootstrapping specifically to avoid problems with ordering rules. Or put another way, the behavior node ordering happens before the diagnostics are inserted into the chain.
Ron Lloyd
@rlloyd2001
Apr 15 2015 16:04 UTC
Here's the test that's failing for more context:
        var graph = BehaviorGraph.BuildFrom<TestRegistry>();
        var behavior = graph.Behaviors
            .First(x => x.IsWrappedBy(typeof(AjaxContinuationErrorBehavior)));
        behavior.First().BehaviorType.ShouldEqual(typeof(AjaxContinuationErrorBehavior));
Jeremy D. Miller
@jeremydmiller
Apr 15 2015 16:05 UTC
Sure, you just need to account for the diagnostic behaviors being there.
Ron Lloyd
@rlloyd2001
Apr 15 2015 16:05 UTC
Weird thing is this test passes on the CI.
Jeremy D. Miller
@jeremydmiller
Apr 15 2015 16:06 UTC
Remember that FubuMode thing we did yesterday on your box?
Do this, in your test, force FubuMode to not be in development mode before you build the behavior graph
Ron Lloyd
@rlloyd2001
Apr 15 2015 16:06 UTC
I've done a git clean -dfx on a different branch that is passing on the CI and still same issue.
Sounds good, I'll let you know if that fixes is.
fixes it
Ron Lloyd
@rlloyd2001
Apr 15 2015 16:25 UTC
        PackageRegistry.Properties.Remove(FubuMode.Development);
        var graph = BehaviorGraph.BuildFrom<TestRegistry>();
        var behavior = graph.Behaviors
            .First(x => x.IsWrappedBy(typeof(AjaxContinuationErrorBehavior)));
        behavior.First().BehaviorType.ShouldEqual(typeof(AjaxContinuationErrorBehavior));
I'm trying that, but it's still not passing. What do you think about just ignoring those behaviors in the test?
Jeremy D. Miller
@jeremydmiller
Apr 15 2015 16:26 UTC
Use FubuMode Ron
Ron Lloyd
@rlloyd2001
Apr 15 2015 16:27 UTC
        FubuMode.Mode("none");
        //PackageRegistry.Properties.Remove(FubuMode.Development);
        var graph = BehaviorGraph.BuildFrom<TestRegistry>();
        var behavior = graph.Behaviors
            .First(x => x.IsWrappedBy(typeof(AjaxContinuationErrorBehavior)));
        behavior.First().BehaviorType.ShouldEqual(typeof(AjaxContinuationErrorBehavior));
This works...
And actually FubuMode.Mode(""); works also...