当前位置: 首页>>代码示例>>C#>>正文


C# FubuRegistry.Services方法代码示例

本文整理汇总了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>();
            });
        }
开发者ID:RyanHauert,项目名称:FubuTransportation,代码行数:26,代码来源:FubuTransportationExtensions.cs

示例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));
 }
开发者ID:bobpace,项目名称:FubuMVC.RequireJS,代码行数:7,代码来源:RequireJsExtension.cs

示例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>();
        }
开发者ID:DarthFubuMVC,项目名称:FubuFastPack,代码行数:10,代码来源:FubuFastPackRegistryExtension.cs

示例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());
        }
开发者ID:RobertTheGrey,项目名称:FubuMVC.Authentication,代码行数:10,代码来源:ApplyTwitterAuthentication.cs

示例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()));
        }
开发者ID:mtscout6,项目名称:FubuMVC.Localization,代码行数:11,代码来源:BasicLocalizationSupport.cs

示例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>();
        }
开发者ID:MattiasJakobsson,项目名称:Jajo.Cms,代码行数:28,代码来源:CmsFubuRegistry.cs

示例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>();

        }
开发者ID:sbartlett,项目名称:FubuMVC.Saml2,代码行数:28,代码来源:bottle_configuration_integration_tester.cs

示例8: Configure

        public void Configure(FubuRegistry registry)
        {
            registry.Actions.FindWith<WindowsActionSource>();
            registry.Services<WindowsRegistry>();

            registry.Extensions().For(new WindowsLoginExtension());
        }
开发者ID:mtscout6,项目名称:FubuMVC.Authentication,代码行数:7,代码来源:WindowsAuthFubuRegistryExtension.cs

示例9: SetUp

        public void SetUp()
        {
            var registry = new FubuRegistry();
            registry.Services<ResourcesServiceRegistry>();

            theServices = BehaviorGraph.BuildFrom(registry).Services;
        }
开发者ID:ahjohannessen,项目名称:FubuMVC.Media,代码行数:7,代码来源:default_service_registrations.cs

示例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);
        }
开发者ID:RobertTheGrey,项目名称:fubumvc,代码行数:33,代码来源:SparkRegistrationTester.cs

示例11: UseFakeSecurityContext

 public void UseFakeSecurityContext(FubuRegistry registry)
 {
     if (FakeSecurityContext == null) {
         FakeSecurityContext = new FakeSecurityContext();
     }
     registry.Services(serviceRegistry => serviceRegistry.ReplaceService<ISecurityContext>(FakeSecurityContext));
 }
开发者ID:uluhonolulu,项目名称:Chpokk,代码行数:7,代码来源:SimpleConfiguredContext.cs

示例12: Configure

        public void Configure(FubuRegistry registry)
        {
            registry.Services<ServerSentEventRegistry>();

            registry.Actions.FindWith<TopicActions>();
            registry.Routes.UrlPolicy<TopicUrls>();
        }
开发者ID:mtscout6,项目名称:FubuMVC.ServerSentEvents,代码行数:7,代码来源:ServerSentEventsExtension.cs

示例13: Configure

        public void Configure(FubuRegistry registry)
        {
            locateTemplates();

            registry.Views.Facility(new SparkViewFacility(_composer));
            registry.Services(configureServices);
        }
开发者ID:GunioRobot,项目名称:fubumvc,代码行数:7,代码来源:SparkExtension.cs

示例14: Configure

        public void Configure(FubuRegistry registry)
        {
            registry.Policies.Add<MenuItemAttributeConfigurator>();
            registry.Policies.Add<CompileNavigationStep>();

            registry.Services<NavigationServiceRegistry>();
        }
开发者ID:DarthFubuMVC,项目名称:FubuMVC.Navigation,代码行数:7,代码来源:NavigationRegistryExtension.cs

示例15:

 void IFubuRegistryExtension.Configure(FubuRegistry registry)
 {
     registry.Actions.FindWith<GoogleEndpoints>();
     registry.Services<GoogleServiceRegistry>();
     registry.Policies.Add<AttachDefaultGoogleView>();
     registry.Extensions().For(new OAuth2ContentExtension<GoogleLoginRequest>());
 }
开发者ID:DarthFubuMVC,项目名称:FubuMVC.Authentication,代码行数:7,代码来源:ApplyGoogleAuthentication.cs


注:本文中的FubuMVC.Core.FubuRegistry.Services方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。