public void SetUp() { TypePool.FindTheCallingAssembly().FullName.ShouldEqual(Assembly.GetExecutingAssembly().FullName); source = new ActionSource(); _graph = new Lazy <BehaviorGraph>(() => { return(BehaviorGraph.BuildFrom(r => { r.Actions.FindWith(source); })); }); }
public FubuRegistry() { var type = GetType(); if (type == typeof(FubuRegistry) || type == typeof(FubuPackageRegistry)) { _applicationAssembly = TypePool.FindTheCallingAssembly(); } else { _applicationAssembly = type.Assembly; } _config = new ConfigGraph(_applicationAssembly); }
private static TypePool getTypes() { var types = new TypePool(); types.AddAssembly(TypePool.FindTheCallingAssembly()); var filter = new CompositeFilter <Assembly>(); filter.Excludes.Add(a => a.IsDynamic); filter.Excludes.Add(a => types.HasAssembly(a)); filter.Includes += (t => true); types.AddSource(() => AppDomain.CurrentDomain.GetAssemblies().Where(filter.MatchesAll)); return(types); }
/// <summary> /// This directs the routing conventions to ignore the default /// assembly namespace when creating a route /// </summary> /// <returns></returns> public RouteConventionExpression RootAtAssemblyNamespace() { var assembly = TypePool.FindTheCallingAssembly(); return(IgnoreNamespaceText(assembly.GetName().Name)); }
/// <summary> /// Include the calling assembly (i.e., the assembly of your code calling this method) /// </summary> public void ToThisAssembly() { ToAssembly(TypePool.FindTheCallingAssembly()); }
/// <summary> /// Use only the default FubuMVC policies and conventions /// </summary> /// <returns></returns> public static IContainerFacilityExpression DefaultPolicies() { var assembly = TypePool.FindTheCallingAssembly(); return(new FubuApplication(() => new FubuRegistry(assembly))); }