Esempio n. 1
0
        public static BehaviorGraph BuildFrom(Action<FubuRegistry> configure, IPerfTimer timer = null)
        {
            var registry = new FubuRegistry();
            configure(registry);

            return BehaviorGraphBuilder.Build(registry, timer ?? new PerfTimer(), new Assembly[0], new ActivationDiagnostics(), FubuApplicationFiles.ForDefault());
        }
Esempio n. 2
0
        string IKnowMyConfigurationType.DetermineConfigurationType()
        {
            if (GetType().HasAttribute <ConfigurationTypeAttribute>())
            {
                return(GetType().GetAttribute <ConfigurationTypeAttribute>().Type);
            }

            var types = _actions.Select(DetermineConfigurationType).Distinct().ToArray();

            if (types.Count() == 1)
            {
                return(types.Single());
            }


            foreach (var type in BehaviorGraphBuilder.ConfigurationOrder().Reverse())
            {
                if (types.Contains(type))
                {
                    return(type);
                }
            }

            return(ConfigurationType.Policy);
        }
Esempio n. 3
0
        public static BehaviorGraph BuildFrom(Action <FubuRegistry> configure)
        {
            var registry = new FubuRegistry();

            configure(registry);

            return(BehaviorGraphBuilder.Build(registry));
        }
Esempio n. 4
0
 public static BehaviorGraph BuildFrom<T>(IPerfTimer timer = null) where T : FubuRegistry, new()
 {
     return BehaviorGraphBuilder.Build(new T(), timer ?? new PerfTimer(), new Assembly[0], new ActivationDiagnostics(), FubuApplicationFiles.ForDefault());
 }
Esempio n. 5
0
 public static BehaviorGraph BuildFrom <T>() where T : FubuRegistry, new()
 {
     return(BehaviorGraphBuilder.Build(new T()));
 }
Esempio n. 6
0
 public static BehaviorGraph BuildFrom(FubuRegistry registry)
 {
     return(BehaviorGraphBuilder.Build(registry));
 }