• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IContainer类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IContainer的典型用法代码示例。如果您正苦于以下问题:C# IContainer类的具体用法?C# IContainer怎么用?C# IContainer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IContainer类属于命名空间,在下文中一共展示了IContainer类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: CusCtlTellPanelChar

 public CusCtlTellPanelChar(Liplis.MainSystem.Liplis lips, ObjSetting os, string url, string title, string discription, int newsEmotion, int newsPoint, Bitmap charBody, EventHandler enter, IContainer components)
 {
     this.lips = lips;
     this.os = os;
     initCms(components);
     initDataPanelNonThum(url, title, discription, newsEmotion, newsPoint, charBody, enter);
 }
开发者ID:LipliStyle,项目名称:LiplisDoll,代码行数:7,代码来源:CusCtlTellPanelChar.cs


示例2: DesignModeSite

		public DesignModeSite (IComponent component, string name, IContainer container, IServiceProvider serviceProvider)
		{
			_component = component;
			_container = container;
			_componentName = name;
			_serviceProvider = serviceProvider;
		}
开发者ID:JianwenSun,项目名称:mono-soc-2007,代码行数:7,代码来源:DesignModeSite.cs


示例3: Initialize

 /// <summary>
 /// Base method that initializes the connection on the entity context connection
 /// </summary>
 public virtual void Initialize(IContainer container)
 {
     if (EntityContextConfiguration != null)
     {
         EntityContextConfiguration.Connection.Initialize(container);
     }
 }
开发者ID:LenFon,项目名称:Bifrost,代码行数:10,代码来源:ConfigurationStorageElement.cs


示例4: Detach

 public static void Detach(IContainer container)
 {
     if (Equals(container, Container))
     {
         Container = null;
     }
 }
开发者ID:snipervld,项目名称:StormXamarin,代码行数:7,代码来源:DependencyService.cs


示例5: CloseContainer

 /// <summary>
 /// Close the Defined Container.
 /// </summary>
 public void CloseContainer(IContainer containerSource)
 {
     //TODO: Need Test this Feature. Probably is a Client Packet.
     PacketBuilder Builder = new PacketBuilder(0x6F, connection);
     Builder.Append(containerSource.Index);
     Connection.Send(Builder.GetPacket());
 }
开发者ID:alexisjojo,项目名称:ktibiax,代码行数:10,代码来源:Use.cs


示例6: ConfigureApplication

 protected override void ConfigureApplication(IContainer container)
 {
     var viewFactory = container.Resolve<IViewFactory>();
     var main = viewFactory.Resolve<LoginViewModel>();
     var np = new NavigationPage(main);
     _application.MainPage = np;
 }
开发者ID:alejandrogf,项目名称:RedSocial_Xamarin,代码行数:7,代码来源:Startup.cs


示例7: SilkveilContainerTests

        public SilkveilContainerTests()
        {
            var containerBuilder = new ContainerBuilder();
            containerBuilder.Register(typeof(IContainerBinder), typeof(ContainerBinder));
            containerBuilder.Register(typeof(IRequestListener), typeof(DownloadRequestListener));
            containerBuilder.Register(typeof(IRequestListener), typeof(RedirectRequestListener));
            containerBuilder.Register(typeof(IMappingResolver<IDownloadMapping>), typeof(DownloadMappingResolver));
            containerBuilder.Register(typeof(IMappingResolver<IRedirectMapping>), typeof(RedirectMappingResolver));
            containerBuilder.Register<IMappingProvider<IDownloadMapping>>(
                c =>
                {
                    var downloadMappingProvider = new DownloadMappingProvider(c);
                    downloadMappingProvider.Initialize();
                    return downloadMappingProvider;
                });
            containerBuilder.Register<IMappingProvider<IRedirectMapping>>(
                c =>
                {
                    var redirectMappingProvider = new RedirectMappingProvider(c);
                    redirectMappingProvider.Initialize();
                    return redirectMappingProvider;
                });
            containerBuilder.Register(typeof(IContentSource), typeof(HttpContentSource));
            containerBuilder.Register(typeof(IContentSource), typeof(FileContentSource));
            containerBuilder.Register(typeof(IStreamSplitter), typeof(StreamSplitter));
            containerBuilder.Register(typeof(IHttpStreamFactory), typeof(HttpStreamFactory));
            containerBuilder.Register(typeof(ISilkveilContainer), typeof(SilkveilContainer));

            containerBuilder.Register(typeof(IDownloadMapping), typeof(DownloadMapping));
            containerBuilder.Register(typeof(IRedirectMapping), typeof(RedirectMapping));

            this._container = containerBuilder.Build();
        }
开发者ID:peterbucher,项目名称:silkveil,代码行数:33,代码来源:SilkveilContainerTests.cs


示例8: PathResolver

 /// <summary>
 /// Initializes a new instance of the <see cref="PathResolver"/> class.
 /// </summary>
 /// <param name="session">The session.</param>
 /// <param name="pathData">The path data.</param>
 /// <param name="controllerMapper">The controller mapper.</param>
 /// <param name="container">The container.</param>
 public PathResolver(IDocumentSession session, IPathData pathData, IControllerMapper controllerMapper, IContainer container)
 {
     _pathData = pathData;
     _controllerMapper = controllerMapper;
     _container = container;
     _session = session;
 }
开发者ID:sriv,项目名称:BrickPile,代码行数:14,代码来源:PathResolver.cs


示例9: Application_Start

        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            // Register: create and configure the container
            _container = BootstrapContainer();

            DependencyResolver.SetResolver(new AutofacDependencyResolver(_container));

            var builder = new ContainerBuilder();

            //var configurationRepository =
            //    new ConfigurationRepository.ConfigurationRepository() as IConfigurationRepository;

            //builder.Register(c => configurationRepository).As<IConfigurationRepository>().SingleInstance();

            builder.RegisterType<StashCoreApiConsumer>().As<IStashCoreApiConsumer>();

            builder.RegisterType<PullTrackerRepository>().As<IPullTrackerRepository>();

            builder.RegisterType<RequestProcessFacade>().As<IRequestProcessFacade>();

            IContainer localContainer = builder.Build();

            AutofacHelper.Scope = localContainer;

            _containerProvider = new ContainerProvider(localContainer);
        }
开发者ID:rajasekaran18,项目名称:PullTracker,代码行数:31,代码来源:Global.asax.cs


示例10: UsbDs3

        public UsbDs3(IContainer container)
            : base(USB_CLASS_GUID)
        {
            container.Add(this);

            InitializeComponent();
        }
开发者ID:metaxis,项目名称:ScpServer,代码行数:7,代码来源:UsbDs3.cs


示例11: StructureMapDependencyScope

 public StructureMapDependencyScope(IContainer container)
 {
     if (container == null) {
         throw new ArgumentNullException("container");
     }
     Container = container;
 }
开发者ID:imatiqul,项目名称:criccard,代码行数:7,代码来源:StructureMapDependencyScope.cs


示例12: InitializeStartupRunners

        private static void InitializeStartupRunners(IContainer existingContainer)
        {
            var mappingDefinitions = existingContainer.GetAllInstances<IRunAtStartup>().ToList();
            mappingDefinitions.ForEach(mappingDefinition => mappingDefinition.Init());

            Mapper.AssertConfigurationIsValid();
        }
开发者ID:techvenky,项目名称:microservice-template,代码行数:7,代码来源:NancyBootstrapper.cs


示例13: IndexerManagerService

 public IndexerManagerService(IContainer c, IConfigurationService config, Logger l, ICacheService cache)
 {
     container = c;
     configService = config;
     logger = l;
     cacheService = cache;
 }
开发者ID:Jackett,项目名称:Jackett,代码行数:7,代码来源:IndexerManagerService.cs


示例14: ChapterValidatorProvider

        /// <summary>
        /// Initializes an instance of <see cref="ChapterValidatorProvider"/> ChapterValidatorProvider
        /// </summary>
        /// <param name="typeDiscoverer">An instance of ITypeDiscoverer to help identify and register <see cref="IChapterValidator"> IChapterValidator</see> implementations
        /// </param>
        /// <param name="container">An instance of <see cref="IContainer"/> to create concrete instances of validators</param>
        public ChapterValidatorProvider(ITypeDiscoverer typeDiscoverer, IContainer container)
        {
            _typeDiscoverer = typeDiscoverer;
            _container = container;

            Initialize();
        }
开发者ID:LenFon,项目名称:Bifrost,代码行数:13,代码来源:ChapterValidatorProvider.cs


示例15: TfsHelper

 public TfsHelper(IContainer container, TextWriter stdout, Script script)
 {
     _container = container;
     _stdout = stdout;
     _script = script;
     _versionControlServer = new FakeVersionControlServer(_script);
 }
开发者ID:davidalpert,项目名称:git-tfs,代码行数:7,代码来源:TfsHelper.VsFake.cs


示例16: UICommand

        public UICommand(IContainer container)
        {
            container.Add(this);

            InitializeComponent();
            ClickForwarderDelegate = new EventHandler(ClickForwarder);
        }
开发者ID:Stoner19,项目名称:Memory-Lifter,代码行数:7,代码来源:UICommand.cs


示例17: GetChildBindingSources

    private static List<BindingSourceNode> GetChildBindingSources(
      IContainer container, BindingSource parent, BindingSourceNode parentNode)
    {
      List<BindingSourceNode> children = new List<BindingSourceNode>();

#if !WEBGUI
      foreach (System.ComponentModel.Component component in container.Components)
#else
      foreach (IComponent component in container.Components)
#endif
      {
        if (component is BindingSource)
        {
          BindingSource temp = component as BindingSource;
          if (temp.DataSource != null && temp.DataSource.Equals(parent))
          {
            BindingSourceNode childNode = new BindingSourceNode(temp);
            children.Add(childNode);
            childNode.Children.AddRange(GetChildBindingSources(container, temp, childNode));
            childNode.Parent = parentNode;
          }
        }
      }

      return children;
    }
开发者ID:transformersprimeabcxyz,项目名称:cslacontrib-MarimerLLC,代码行数:26,代码来源:BindingSourceHelper.cs


示例18: Init

        public void Init() {
            _settingsA = new ShellSettings { Name = "Alpha" };
            _settingsB = new ShellSettings { Name = "Beta", };
            _routes = new RouteCollection();

            var rootBuilder = new ContainerBuilder();
            rootBuilder.Register(ctx => _routes);
            rootBuilder.RegisterType<ShellRoute>().InstancePerDependency();
            rootBuilder.RegisterType<RunningShellTable>().As<IRunningShellTable>().SingleInstance();
            rootBuilder.RegisterModule(new WorkContextModule());
            rootBuilder.RegisterType<WorkContextAccessor>().As<IWorkContextAccessor>().InstancePerMatchingLifetimeScope("shell");
            rootBuilder.RegisterType<HttpContextAccessor>().As<IHttpContextAccessor>();
            rootBuilder.RegisterType<ExtensionManager>().As<IExtensionManager>();
            rootBuilder.RegisterType<StubCacheManager>().As<ICacheManager>();
            rootBuilder.RegisterType<StubAsyncTokenProvider>().As<IAsyncTokenProvider>();
            rootBuilder.RegisterType<StubParallelCacheContext>().As<IParallelCacheContext>();

            _rootContainer = rootBuilder.Build();

            _containerA = _rootContainer.BeginLifetimeScope(
                "shell",
                builder => {
                    builder.Register(ctx => _settingsA);
                    builder.RegisterType<RoutePublisher>().As<IRoutePublisher>().InstancePerMatchingLifetimeScope("shell");
                });

            _containerB = _rootContainer.BeginLifetimeScope(
                "shell",
                builder => {
                    builder.Register(ctx => _settingsB);
                    builder.RegisterType<RoutePublisher>().As<IRoutePublisher>().InstancePerMatchingLifetimeScope("shell");
                });
        }
开发者ID:dioptre,项目名称:nkd,代码行数:33,代码来源:ShellRouteTests.cs


示例19: Dispose

        public void Dispose()
        {
            if (container != null)
                container.Dispose();

            container = null;
        }
开发者ID:ArthurYiL,项目名称:Vulcan.AspNetMvc,代码行数:7,代码来源:StructureMapDependencyScope.cs


示例20: RegisterContainer

		private void RegisterContainer() {
			var builder = new ContainerBuilder();
			builder.RegisterControllers(Assembly.GetExecutingAssembly());
			_pluginServicee.Startup(builder);
			_container = builder.Build();
			DependencyResolver.SetResolver(new AutofacDependencyResolver(_container));
		}
开发者ID:fengzijun,项目名称:MvcPluginByGriffin.mvccontrib,代码行数:7,代码来源:Global.asax.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IContainerAdapter类代码示例发布时间:2022-05-24
下一篇:
C# IContactService类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap