public void Configure(FubuRegistry registry) { registry.Services(x => { x.Scan(y => { y.Applies.ToAllPackageAssemblies(); y.Applies.ToThisAssembly(); y.Applies.ToAssemblyContainingType(registry.GetType()); y.Applies.ToAssemblyContainingType<ICmsEndpoint>(); y.AddAllTypesOf<ICmsComponent>(); y.AddAllTypesOf<ICmsEndpoint>(); y.AddAllTypesOf<ITheme>(); y.AddAllTypesOf<ICmsViewEngine>(); y.AddAllTypesOf<ITextParser>(); y.AddAllTypesOf<IParseModelExpression>(); y.ConnectImplementationsToTypesClosing(typeof(ICmsRenderer<>)); }); x.SetServiceIfNone<ICmsRenderer, DefaultCmsRenderer>(); x.SetServiceIfNone<IFindParameterValueFromModel, DefaultParameterValueFinder>(); x.SetServiceIfNone<ITemplateStorage, DefaultTemplateStorage>(); }); registry.Policies.Add<ConfigureWidgetBehaviorChain>(); }
public bool HasImported(FubuRegistry registry) { if (_imports.Any(x => x.Registry.GetType() == registry.GetType())) { return(true); } if (_imports.Any(x => x.Registry.Configuration.HasImported(registry))) { return(true); } return(false); }
public void Configure(FubuRegistry registry) { registry.Services(x => { x.Scan(y => { y.Applies.ToAllPackageAssemblies(); y.Applies.ToThisAssembly(); y.Applies.ToAssemblyContainingType(registry.GetType()); y.AddAllTypesOf<IBuildMenuTree>(); }); x.SetServiceIfNone<IBuildMenu, DefaultMenuBuilder>(); }); }
public void Configure(FubuRegistry registry) { registry.Services(x => { x.SetServiceIfNone<ILocalizeText, DefaultTextLocalizer>(); x.SetServiceIfNone<IFindCurrentLocalizationNamespace, DefaultLocalizationNamespaceFinder>(); x.Scan(y => { y.Applies.ToAllPackageAssemblies(); y.Applies.ToThisAssembly(); y.Applies.ToAssemblyContainingType(registry.GetType()); y.Applies.ToAssemblyContainingType<ILocalizationVisitor>(); y.AddAllTypesOf<ILocalizationVisitor>(); }); }); }
public bool HasImported(FubuRegistry registry) { if (_imports.Any(x => x.Registry.GetType() == registry.GetType())) { return true; } if (_imports.Any(x => x.Registry.Configuration.HasImported(registry))) { return true; } return false; }