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


C# IServiceRegistry.AddService方法代码示例

本文整理汇总了C#中IServiceRegistry.AddService方法的典型用法代码示例。如果您正苦于以下问题:C# IServiceRegistry.AddService方法的具体用法?C# IServiceRegistry.AddService怎么用?C# IServiceRegistry.AddService使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IServiceRegistry的用法示例。


在下文中一共展示了IServiceRegistry.AddService方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AudioSystem

        /// <summary>
        /// Create an new instance of AudioSystem
        /// </summary>
        /// <param name="registry">The service registry in which to register the <see cref="AudioSystem"/> services</param>
        public AudioSystem(IServiceRegistry registry)
            : base(registry)
        {
            Enabled = true;

            registry.AddService(typeof(AudioSystem), this);
            registry.AddService(typeof(IAudioEngineProvider), this);
        }
开发者ID:Kryptos-FR,项目名称:xenko-reloaded,代码行数:12,代码来源:AudioSystem.cs

示例2: SceneSystem

 /// <summary>
 /// Initializes a new instance of the <see cref="GameSystemBase" /> class.
 /// </summary>
 /// <param name="registry">The registry.</param>
 /// <remarks>The GameSystem is expecting the following services to be registered: <see cref="IGame" /> and <see cref="IAssetManager" />.</remarks>
 public SceneSystem(IServiceRegistry registry)
     : base(registry)
 {
     registry.AddService(typeof(SceneSystem), this);
     Enabled = true;
     Visible = true;
 }
开发者ID:h78hy78yhoi8j,项目名称:xenko,代码行数:12,代码来源:SceneSystem.cs

示例3: SpriteAnimationSystem

        /// <summary>
        /// Creates a new instance of <see cref="SpriteAnimationSystem"/> and register it in the services.
        /// </summary>
        /// <param name="registry"></param>
        public SpriteAnimationSystem(IServiceRegistry registry)
            : base(registry)
        {
            registry.AddService(typeof(SpriteAnimationSystem), this);

            DefaultFramesPerSecond = 30;
        }
开发者ID:h78hy78yhoi8j,项目名称:xenko,代码行数:11,代码来源:SpriteAnimationSystem.cs

示例4: AudioSystem

        /// <summary>
        /// Create an new instance of AudioSystem
        /// </summary>
        /// <param name="registry">The service registry in which to register the <see cref="AudioSystem"/> services</param>
        public AudioSystem(IServiceRegistry registry)
            : base(registry)
        {
            Enabled = true;
            AudioEngine = AudioEngineFactory.NewAudioEngine();

            registry.AddService(typeof(AudioSystem), this);
        }
开发者ID:h78hy78yhoi8j,项目名称:xenko,代码行数:12,代码来源:AudioSystem.cs

示例5: Bullet2PhysicsSystem

        public Bullet2PhysicsSystem(IServiceRegistry registry)
            : base(registry)
        {
            UpdateOrder = -1000; //make sure physics runs before everything
            registry.AddService(typeof(IPhysicsSystem), this);

            Enabled = true; //enabled by default
        }
开发者ID:Powerino73,项目名称:paradox,代码行数:8,代码来源:Bullet2PhysicsSystem.cs

示例6: GraphicsDeviceServiceLocal

 /// <summary>
 /// Initializes a new instance of the <see cref="GraphicsDeviceServiceLocal"/> class.
 /// </summary>
 /// <param name="registry">The registry.</param>
 /// <param name="graphicsDevice">The graphics device.</param>
 public GraphicsDeviceServiceLocal(IServiceRegistry registry, GraphicsDevice graphicsDevice)
 {
     if (registry != null)
     {
         registry.AddService(typeof(IGraphicsDeviceService), this);
     }
     GraphicsDevice = graphicsDevice;
 }
开发者ID:h78hy78yhoi8j,项目名称:xenko,代码行数:13,代码来源:GraphicsDeviceServiceLocal.cs

示例7: DebugConsoleSystem

        public DebugConsoleSystem(IServiceRegistry registry) : base(registry)
        {
            registry.AddService(typeof(DebugConsoleSystem), this);

            Visible = true;

            DrawOrder = 0xffffff;
            UpdateOrder = -100100; //before script
        }
开发者ID:Kryptos-FR,项目名称:xenko-reloaded,代码行数:9,代码来源:DebugConsoleSystem.cs

示例8: GamePlatformDesktop

        public GamePlatformDesktop(IServiceRegistry services) : base(services)
        {
            // By default, the mouse is hidden
            isMouseVisible = false;
            Cursor.Hide();

            IsBlockingRun = true;
            gameWindowDesktop = new GameWindowDesktop();
            services.AddService(typeof(IGraphicsDeviceFactory), this);
        }
开发者ID:dkushner,项目名称:SharpDX,代码行数:10,代码来源:GamePlatformDesktop.cs

示例9: registerDefaultServices

        private static void registerDefaultServices(IServiceRegistry s)
        {
			s.SetServiceIfNone<ILogger, ExceptionLogger>();
			s.SetServiceIfNone<Parser, OptimizedParser>();
			s.SetServiceIfNone<IStylizer, PlainStylizer>();
			s.SetServiceIfNone<IImporter, DefaultImporter>();
			s.SetServiceIfNone<IFileReader, FileReader>();
			s.SetServiceIfNone<ILessEngine, DefaultEngine>();
			s.SetServiceIfNone<IPathResolver, AssetPathResolver>();
            s.SetServiceIfNone<ILessCompiler, LessCompiler>();
            s.AddService<ITransformerPolicy, LessTransformerPolicy>();
        }
开发者ID:uluhonolulu,项目名称:FubuMVC.AssetTransforms,代码行数:12,代码来源:LessExtension.cs

示例10: configureServices

        private void configureServices(IServiceRegistry services)
        {
            services.SetServiceIfNone<ITemplateRegistry>(_templateRegistry);

            services.SetServiceIfNone<ISparkViewEngine>(new SparkViewEngine());
            services.AddService<IActivator, SparkActivator>();

            services.AddService<IRenderStrategy, NestedRenderStrategy>();
            services.AddService<IRenderStrategy, AjaxRenderStrategy>();
            services.AddService<IRenderStrategy, DefaultRenderStrategy>();

            services.AddService<IViewModifier, PageActivation>();
            services.AddService<IViewModifier, SiteResourceAttacher>();
            services.AddService<IViewModifier, ContentActivation>();
            services.AddService<IViewModifier, OnceTableActivation>();
            services.AddService<IViewModifier, OuterViewOutputActivator>();
            services.AddService<IViewModifier, NestedViewOutputActivator>();
            services.AddService<IViewModifier, ViewContentDisposer>();
            services.AddService<IViewModifier, NestedOutputActivation>();
        }
开发者ID:GunioRobot,项目名称:fubumvc,代码行数:20,代码来源:SparkExtension.cs

示例11: GamePlatform

 protected GamePlatform(GameBase game)
 {
     this.game = game;
     Services = game.Services;
     Services.AddService(typeof(IGraphicsDeviceFactory), this);
 }
开发者ID:Powerino73,项目名称:paradox,代码行数:6,代码来源:GamePlatform.cs

示例12: RegisterServices

 public void RegisterServices(IServiceRegistry services)
 {
     services.AddService<IContentFolderService>(_contentFolderService);
     services.AddService<IMimeTypeProvider>(_mimeTypeProvider);
 }
开发者ID:petejohanson,项目名称:fubumvc,代码行数:5,代码来源:FubuMvcPackageFacility.cs

示例13: services

 private static void services(IServiceRegistry s)
 {
     s.SetServiceIfNone<ISassCompiler, DefaultSassCompiler>();
     s.SetServiceIfNone<SassAndCoffee.Ruby.Sass.ISassCompiler, SassAndCoffee.Ruby.Sass.SassCompiler>();
     s.AddService<ITransformerPolicy, SassTransformerPolicy>();            
 }
开发者ID:ketiko,项目名称:FubuMVC.AssetTransforms,代码行数:6,代码来源:SassExtension.cs

示例14: GamePlatformDesktop

 public GamePlatformDesktop(IServiceRegistry services) : base(services)
 {
     IsBlockingRun = true;
     gameWindowDesktop = new GameWindowDesktop();
     services.AddService(typeof(IGraphicsDeviceFactory), this);
 }
开发者ID:Nezz,项目名称:SharpDX,代码行数:6,代码来源:GamePlatformDesktop.cs

示例15: registerDefaultServices

 private static void registerDefaultServices(IServiceRegistry s)
 {
     s.SetServiceIfNone<ILessEngine>(new LessEngine());
     s.SetServiceIfNone<ILessCompiler, LessCompiler>();
     s.AddService<ITransformerPolicy, LessTransformerPolicy>();
 }
开发者ID:ketiko,项目名称:FubuMVC.AssetTransforms,代码行数:6,代码来源:LessExtension.cs


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