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

C# ILocator类代码示例

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

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



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

示例1: Prepare

 /// <inheritdoc />
 public virtual void Prepare(ILocator locator)
 {
     if (!this.IsInitialized || this.IsPrepared)
     throw new InvalidOperationException();
      this.Locator = locator;
      this.IsPrepared = true;
 }
开发者ID:urahnung,项目名称:webplatform,代码行数:8,代码来源:Module.cs


示例2: DetectAndHashJob

 public DetectAndHashJob(JobDescriptor jobDescription, Guid workerId, ILocator locator) : 
     base(jobDescription, workerId, locator)
 {
     _codeLocationRepository = _serviceLocator.Locate<ICodeLocationRepository>();
     _fileRepository = _serviceLocator.Locate<IFileRepository>();
     _repositoryController = _serviceLocator.Locate<IRepositoryController>();
 }
开发者ID:codeimpossible,项目名称:proggr,代码行数:7,代码来源:DetectAndHashJob.cs


示例3: EncodeJobNotification

 public EncodeJobNotification(IJob[] jobsReady, string OriginalAssetName, ILocator[] Locators, string UrlForClientStreaming)
 {
     myJobList = jobsReady;
     myAssetName = OriginalAssetName;
     myLocators = Locators;
     myUrlForClientStreaming = UrlForClientStreaming;
 }
开发者ID:sabbour,项目名称:WAMSVODButler,代码行数:7,代码来源:EncodeJobNotification.cs


示例4: ToggleButtonHandle

 public ToggleButtonHandle(Figure owner, ILocator locator)
     : base(owner, locator)
 {
     FillColor = new Color (1, 1, 0.0, 0.3);
     Width = 15.0;
     Height = 15.0;
 }
开发者ID:erbriones,项目名称:monodevelop-classdesigner,代码行数:7,代码来源:ToggleButtonHandle.cs


示例5: ButtonHandle

 public ButtonHandle(IFigure owner, ILocator locator, kindButton type)
     : base(owner)
 {
     _locator = locator;
     _clicked = false;
     typeButton = type;
 }
开发者ID:xiul,项目名称:Monodevelop-Database-Modeler-Addin,代码行数:7,代码来源:ButtonHandle.cs


示例6: SAXParseException

 /// <summary>
 ///   Wrap an existing exception in a SAXParseException.
 ///   <para>
 ///     This constructor is especially useful when an application is
 ///     creating its own exception from within a <see cref="org.xml.sax.ContentHandler" /> callback,
 ///     and needs to wrap an existing exception that is not a
 ///     subclass of <see cref="SAXException" />.
 ///   </para>
 /// </summary>
 /// <param name="message">
 ///   The error or warning message, or null to
 ///   use the message from the embedded exception.
 /// </param>
 /// <param name="locator">
 ///   The locator object for the error or warning (may be null).
 /// </param>
 /// <param name="ex">Any exception.</param>
 /// <seealso cref="ILocator" />
 public SAXParseException(string message, ILocator locator, Exception ex) : base(message, ex) {
   if (locator != null) {
     Init(locator.PublicId, locator.SystemId, locator.LineNumber, locator.ColumnNumber);
   } else {
     Init(null, null, -1, -1);
   }
 }
开发者ID:rasmusjp,项目名称:sax.net,代码行数:25,代码来源:SAXParseException.cs


示例7: ServiceConfiguration

		public ServiceConfiguration(ILocator locator, ICollection<RouteBase> routes, string[] allowedSchemes, Type contractType, Type serviceType)
		{
			this.locator = locator;
			this.routes = routes;
			this.allowedSchemes = allowedSchemes;
			this.contractType = contractType;
			this.serviceType = serviceType;
		}
开发者ID:matteomigliore,项目名称:HSDK,代码行数:8,代码来源:ServiceConfiguration.cs


示例8: Locator2

    ////
    /// <summary>
    ///   Copy an existing Locator or Locator2 object.
    ///   If the object implements Locator2, values of the
    ///   <em>encoding</em> and <em>version</em>strings are copied,
    ///   otherwise they set to <em>null</em>.
    /// </summary>
    /// <param name="locator">
    ///   The existing Locator object.
    /// </param>
    public Locator2(ILocator locator) : base(locator) {
      if (locator is ILocator2) {
        var l2 = (ILocator2)locator;

        _version = l2.XmlVersion;
        _encoding = l2.Encoding;
      }
    }
开发者ID:rasmusjp,项目名称:sax.net,代码行数:18,代码来源:Locator2.cs


示例9: ProjectionGatewayConfigurationBuilder

 private ProjectionGatewayConfigurationBuilder(ILocator locator)
 {
     _locator = locator;
     var stringEqComparer = EqualityComparerFactory.Create<string>(
         (x, y) => x.ToLower() == y.ToLower(),
         s => s.GetHashCode());
     Subscriptions = new MultiValueDictionary<string, Subscription>(stringEqComparer);
 }
开发者ID:DrunkyBard,项目名称:CqrsMe,代码行数:8,代码来源:ProjectionGatewayConfigurationBuilder.cs


示例10: TransformHandle

        public TransformHandle(MoonlightController controller, IHandleGroup group, ILocator locator)
            : base(controller, group)
        {
            Locator = locator;

            rotation = new RotateTransform();
            Transforms.Children.Add(rotation);
        }
开发者ID:mono,项目名称:lunareclipse,代码行数:8,代码来源:TransformHandle.cs


示例11: LocatorServiceHostFactory

		public LocatorServiceHostFactory(
			ServiceHostConfigurator configurator,
			ILocator locator,
			string[] allowedSchemes)
		{
			this.configurator = configurator;
			this.locator = locator;
			this.allowedSchemes = allowedSchemes;
		}
开发者ID:matteomigliore,项目名称:HSDK,代码行数:9,代码来源:LocatorServiceHostFactory.cs


示例12: GatewayConfiguration

 public GatewayConfiguration(IReadOnlyCollection<Host> hosts, UserCrenedtial userCredential, ILocator locator, int prefetchCount, int eventSubscriberThreadCount, int commandHandlerThreadCount)
 {
     Hosts = hosts;
     UserCrenedtial = userCredential;
     Locator = locator;
     PrefetchCount = prefetchCount;
     EventSubscriberThreadCount = eventSubscriberThreadCount;
     CommandHandlerThreadCount = commandHandlerThreadCount;
 }
开发者ID:DrunkyBard,项目名称:CqrsMe,代码行数:9,代码来源:GatewayConfiguration.cs


示例13: GetLocator

 public static ILocator GetLocator()
 {
     if (locator == null)
     {
         locator = new DefaultLocator(new DefaultFactoryMethodFactory());
         RegisterAbstractions(locator);
     }
     return locator;
 }
开发者ID:nixondanielj,项目名称:thelocator,代码行数:9,代码来源:LocatorFactory.cs


示例14: JobPoller

        public JobPoller(WorkloadPresenter presenter, ILocator locator, WorkerState worker, int? intervalSeconds = null)
        {
            _interval = intervalSeconds ?? _interval;

            _presenter = presenter;
            _jobRepository = locator.Locate<IJobRepository>();
            _worker = worker;
            _serviceLocator = locator;
        }
开发者ID:codeimpossible,项目名称:proggr,代码行数:9,代码来源:JobPoller.cs


示例15: ContractBehavior

		private IContractBehavior ContractBehavior(ILocator locator, Type serviceType)
		{
			var provider =
				locator.IsRegistered(contractType) ?
					(IContractBehavior)new LocatorInstanceProvider(locator, contractType) :
					new ActivatorInstanceProvider(serviceType);

			return provider;
		}
开发者ID:matteomigliore,项目名称:HSDK,代码行数:9,代码来源:LocatorServiceHost.cs


示例16: NewConnectionHandle

 public NewConnectionHandle(IFigure owner, ILocator locator)
     : base(owner, locator)
 {
     if (_icon == null) {
         // TODO: use icon factory.
         Pixbuf pixbuf = Pixbuf.LoadFromResource("icons.new_association_handle.png");
         _icon = GdkCairoHelper.PixbufToImageSurface(pixbuf);
     }
 }
开发者ID:mono,项目名称:monohotdraw,代码行数:9,代码来源:NewConnectionHandle.cs


示例17: LocatorServiceHost

		public LocatorServiceHost(ILocator locator, Type contractType, Type serviceType, params Uri[] baseAddresses)
			: base(serviceType, baseAddresses)
		{
			this.contractType = contractType;

			foreach (var contractDescription in ImplementedContracts.Values)
			{
				contractDescription.Behaviors.Add(ContractBehavior(locator, serviceType));
			}
		}
开发者ID:matteomigliore,项目名称:HSDK,代码行数:10,代码来源:LocatorServiceHost.cs


示例18: Job

        public Job(JobDescriptor jobDescription, Guid workerId, ILocator locator)
        {
            _serviceLocator = locator;
            _jobRepository = locator.Locate<IJobRepository>();
            _apiRepository = locator.Locate<IApiDataRepository>();

            Id = jobDescription.Id;
            WorkerId = workerId;
            JobDescriptor = jobDescription;
        }
开发者ID:codeimpossible,项目名称:proggr,代码行数:10,代码来源:Job.cs


示例19: RabbitMqGateway

 public RabbitMqGateway(string connectionString, int eventSubscriberThreadCount, int commandHandlerThreadCount, ILocator locator)
 {
     _eventSubscriberThreadCount = eventSubscriberThreadCount;
     _commandHandlerThreadCount = commandHandlerThreadCount;
     var adapter = new EasyNetQContainerAdapter(locator);
     RabbitHutch.SetContainerFactory(() => adapter);
     _externalMessageBus = RabbitHutch.CreateBus(connectionString, register => register.Register<IConsumerErrorStrategy, MyClass>());
     _eventBus = locator.Resolve<Core.IEventBus>();
     _commandHandlerFactory = locator.Resolve<ICommandHandlerFactory>();
     var a = locator.Resolve<IConsumerErrorStrategy>();
 }
开发者ID:DrunkyBard,项目名称:CqrsMe,代码行数:11,代码来源:RabbitMqGateway.cs


示例20: CreateJob

        public static IJob CreateJob(JobDescriptor description, WorkerState worker, ILocator locator)
        {
            var jobType = Type.GetType(description.JobType);
            if (jobType == null)
            {
                throw new TypeAccessException("Could not create a type from " + description.JobType);
            }
            var instance = Activator.CreateInstance(jobType, description, worker.Id, locator) as IJob;

            return instance;
        }
开发者ID:codeimpossible,项目名称:proggr,代码行数:11,代码来源:JobFactory.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# ILockBytes类代码示例发布时间:2022-05-24
下一篇:
C# ILocation类代码示例发布时间: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