本文整理汇总了C#中FubuMVC.Core.FubuRegistry.Services方法的典型用法代码示例。如果您正苦于以下问题:C# FubuRegistry.Services方法的具体用法?C# FubuRegistry.Services怎么用?C# FubuRegistry.Services使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FubuMVC.Core.FubuRegistry
的用法示例。
在下文中一共展示了FubuRegistry.Services方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Configure
public void Configure(FubuRegistry registry)
{
registry.Policies.Global.Add<ApplyScheduledJobRouting>();
registry.Services<ScheduledJobServicesRegistry>();
registry.Services<MonitoringServiceRegistry>();
registry.Policies.Global.Add<RegisterScheduledJobs>();
registry.Policies.ChainSource<ImportHandlers>();
registry.Services<FubuTransportServiceRegistry>();
registry.Services<PollingServicesRegistry>();
registry.Policies.Global.Add<RegisterPollingJobs>();
registry.Policies.Global.Add<StatefulSagaConvention>();
registry.Policies.Global.Add<AsyncHandlingConvention>();
if (FubuTransport.AllQueuesInMemory)
{
registry.Policies.Global.Add<AllQueuesInMemoryPolicy>();
}
registry.Policies.Global.Add<InMemoryQueueRegistration>();
registry.Policies.Global.Add<ReorderBehaviorsPolicy>(x =>
{
x.ThisNodeMustBeBefore<StatefulSagaNode>();
x.ThisNodeMustBeAfter<HandlerCall>();
});
}
示例2: Configure
public void Configure(FubuRegistry registry)
{
registry.Services(s => s.AddService<IAssetPrecompiler, RequireJsAssetPrecompiler>());
var requireJsAssetRegistry = new RequireJsAssetRegistry();
registry.Services(s => s.SetServiceIfNone<IRequireJsAssetRegistry>(requireJsAssetRegistry));
_actions.Each(x => x(registry));
}
示例3: Configure
public void Configure(FubuRegistry registry)
{
registry.Services(x => x.SetServiceIfNone<IQueryService, QueryService>());
registry.Services(x => x.SetServiceIfNone<ISmartGridService, SmartGridService>());
registry.Models
.BindModelsWith<EditEntityModelBinder>()
.BindModelsWith<EntityModelBinder>()
.ConvertUsing<EntityConversionFamily>();
}
示例4: TwitterContentExtension
void IFubuRegistryExtension.Configure(FubuRegistry registry)
{
registry.Actions.FindWith<TwitterEndpoints>();
registry.Services<TwitterServiceRegistry>();
registry.Policies.Add<AttachDefaultTwitterView>();
registry.Services(x => x.SetServiceIfNone(_settings));
registry.Extensions().For(new TwitterContentExtension());
}
示例5: modify
void IFubuRegistryExtension.Configure(FubuRegistry registry)
{
registry.Services<BasicLocalizationServices>();
if(_modifications.Any())
{
registry.Services(x => _modifications.Each(modify => modify(x)));
}
registry.Import<HtmlConventionRegistry>(x => x.Labels.Add(new LabelBuilder()));
}
示例6: Configure
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>();
}
示例7: register_with_basic_authentication_disabled
public void register_with_basic_authentication_disabled()
{
var registry = new FubuRegistry();
registry.Import<Saml2Extensions>();
registry.Import<ApplyAuthentication>();
var samlCertificateRepository = MockRepository.GenerateMock<ISamlCertificateRepository>();
samlCertificateRepository.Stub(x => x.AllKnownCertificates()).Return(new SamlCertificate[0]);
registry.Services(x =>
{
x.SetServiceIfNone<IPrincipalBuilder>(MockRepository.GenerateMock<IPrincipalBuilder>());
x.AddService<ISamlResponseHandler>(MockRepository.GenerateMock<ISamlResponseHandler>());
x.SetServiceIfNone<ISamlCertificateRepository>(samlCertificateRepository);
});
registry.AlterSettings<AuthenticationSettings>(x => {
x.MembershipEnabled = MembershipStatus.Disabled;
});
var container = new Container();
var runtime = FubuApplication.For(registry).StructureMap(container).Bootstrap();
var strategies = container.GetAllInstances<IAuthenticationStrategy>();
strategies.Single().ShouldBeOfType<SamlAuthenticationStrategy>();
}
示例8: Configure
public void Configure(FubuRegistry registry)
{
registry.Actions.FindWith<WindowsActionSource>();
registry.Services<WindowsRegistry>();
registry.Extensions().For(new WindowsLoginExtension());
}
示例9: SetUp
public void SetUp()
{
var registry = new FubuRegistry();
registry.Services<ResourcesServiceRegistry>();
theServices = BehaviorGraph.BuildFrom(registry).Services;
}
示例10: configures_settings_with_default_assemblies_and_namespaces
public void configures_settings_with_default_assemblies_and_namespaces()
{
var registry = new FubuRegistry();
registry.WithSparkDefaults();
SparkSettings settings = null;
registry.Services(x =>
{
settings = (SparkSettings) x.DefaultServiceFor<ISparkSettings>().Value;
});
registry.BuildGraph();
settings
.UseAssemblies
.ShouldContain(typeof(HtmlTag).Assembly.FullName);
settings
.UseAssemblies
.ShouldContain(typeof(FubuPageExtensions).Assembly.FullName);
settings
.UseNamespaces
.ShouldContain(typeof(FubuRegistryExtensions).Namespace);
settings
.UseNamespaces
.ShouldContain(typeof(FubuPageExtensions).Namespace);
settings
.UseNamespaces
.ShouldContain(typeof(HtmlTag).Namespace);
}
示例11: UseFakeSecurityContext
public void UseFakeSecurityContext(FubuRegistry registry)
{
if (FakeSecurityContext == null) {
FakeSecurityContext = new FakeSecurityContext();
}
registry.Services(serviceRegistry => serviceRegistry.ReplaceService<ISecurityContext>(FakeSecurityContext));
}
示例12: Configure
public void Configure(FubuRegistry registry)
{
registry.Services<ServerSentEventRegistry>();
registry.Actions.FindWith<TopicActions>();
registry.Routes.UrlPolicy<TopicUrls>();
}
示例13: Configure
public void Configure(FubuRegistry registry)
{
locateTemplates();
registry.Views.Facility(new SparkViewFacility(_composer));
registry.Services(configureServices);
}
示例14: Configure
public void Configure(FubuRegistry registry)
{
registry.Policies.Add<MenuItemAttributeConfigurator>();
registry.Policies.Add<CompileNavigationStep>();
registry.Services<NavigationServiceRegistry>();
}
示例15:
void IFubuRegistryExtension.Configure(FubuRegistry registry)
{
registry.Actions.FindWith<GoogleEndpoints>();
registry.Services<GoogleServiceRegistry>();
registry.Policies.Add<AttachDefaultGoogleView>();
registry.Extensions().For(new OAuth2ContentExtension<GoogleLoginRequest>());
}