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

C# ITarget类代码示例

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

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



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

示例1: HasVisited

 public bool HasVisited(ITarget target)
 {
     if (Visited != null && Visited.Contains(target))
         return true;
     else
         return false;
 }
开发者ID:perploug,项目名称:cshake,代码行数:7,代码来源:TargetRunner.cs


示例2: UnregisterTarget

 public void UnregisterTarget(ITarget target) {
     GetAppropriateListForTarget(target).Remove(target);
     if (attackers.Count == 0 && attackersSpawners.TrueForAll(spawner => spawner.IsSpawnEnded())) {
         StopRound();
         GameManager.NextRound();
     }
 }
开发者ID:Niller,项目名称:LastStand,代码行数:7,代码来源:BattleManager.cs


示例3: GetValue

 /// <summary>
 /// Gets the value to inject into the specified target.
 /// </summary>
 /// <param name="context">The context.</param>
 /// <param name="target">The target.</param>
 /// <returns>The value to inject into the specified target.</returns>
 public object GetValue(IContext context, ITarget target)
 {
     var parameter = context
         .Parameters.OfType<IConstructorArgument>()
         .SingleOrDefault(p => p.AppliesToTarget(context, target));
     return parameter != null ? parameter.GetValue(context, target) : target.ResolveWithin(context);
 }
开发者ID:LuckyStarry,项目名称:Ninject,代码行数:13,代码来源:StandardProvider.cs


示例4: GetPositionOfFuncConstructorArgument

        /// <summary>
        /// Gets the position of the specified <see cref="FuncConstructorArgument"/> relative to the
        /// other <see cref="FuncConstructorArgument"/> of the same type in the specified context.
        /// </summary>
        /// <param name="argument">The argument for which the position is calculated.</param>
        /// <param name="context">The context of the argument.</param>
        /// <param name="target">The target.</param>
        /// <returns>
        ///     -1 if the parameter does not exist in the context or if another constructor argument applies for the target.
        ///     Otherwise the position of the specified <see cref="FuncConstructorArgument"/> within the other <see cref="FuncConstructorArgument"/> 
        ///     of the same type contained in context.Parameters.
        /// </returns>
        public int GetPositionOfFuncConstructorArgument(FuncConstructorArgument argument, IContext context, ITarget target)
        {
            int currentPosition = 0;
            int position = -1;
            foreach (var constructorArgumentParameter in context.Parameters.OfType<IConstructorArgument>())
            {
                var funcArgumentParameter = constructorArgumentParameter as FuncConstructorArgument;
                if (funcArgumentParameter != null)
                {
                    if (ReferenceEquals(argument, funcArgumentParameter))
                    {
                        position = currentPosition;
                    }
                    else
                    {
                        if (funcArgumentParameter.ArgumentType == target.Type)
                        {
                            currentPosition++;
                        }
                    }
                }
                else
                {
                    if (constructorArgumentParameter.AppliesToTarget(context, target))
                    {
                        return -1;
                    }
                }
            }

            return position;
        }
开发者ID:hach-que,项目名称:Ninject.Extensions.Factory,代码行数:44,代码来源:ArgumentPositionCalculator.cs


示例5: Initialize

 public void Initialize(IAttackableTarget sourceParam, ITarget targetParam, SpellData data) {
     source = sourceParam;
     target = targetParam;
     baseData = data;
     InitializeData(data);
     InitView();
 }
开发者ID:Niller,项目名称:LastStand,代码行数:7,代码来源:BaseSpellModel.cs


示例6: DtsTask

 public DtsTask(SourceType sourceType, string sourceName, TargetType targetType, ITarget target)
 {
     SourceType = sourceType;
     SourceName = sourceName;
     TargetType = targetType;
     Target = target;
 }
开发者ID:suh786,项目名称:dts.server,代码行数:7,代码来源:DtsTask.cs


示例7: Initialize

 public virtual void Initialize(BaseBattleData dataParam, bool isDefenderParam, ITarget parentParam) {
     data = dataParam;
     isDefender = isDefenderParam;
     parent = parentParam;
     InitializeData();
     BattleManager.RegisterTarget(parent);
 }
开发者ID:Niller,项目名称:LastStand,代码行数:7,代码来源:BaseTargetBehaviour.cs


示例8: CreateTree

 public static IList<ITarget> CreateTree(ITarget target)
 {
     var final = new List<ITarget>();
     final.AddRange(BuildDependancyTree(target.DependsOn));
     final.Add(target);
     return final;
 }
开发者ID:SkightTeam,项目名称:eLiteWeb,代码行数:7,代码来源:TargetTreeBuilder.cs


示例9: Debugger

        /// <summary>
        /// Constructs the Debugger for the specified Target.
        /// </summary>
        /// <param name="target">The target to be debugged.</param>
        public Debugger(ITarget target)
        {
            if (target == null) throw new ArgumentNullException();

            Target = target;
            Breakpoints = new BreakpointManager(this);
            DebugInformation = new DebugInformation();
        }
开发者ID:lazanet,项目名称:messylab,代码行数:12,代码来源:Debugger.cs


示例10: TargetViewModel

        /// <summary>
        /// Constructor</summary>
        /// <param name="target">The ITarget whose information will be displayed</param>
        /// <param name="protocol">The target's protocol</param>
        public TargetViewModel(ITarget target, IProtocol protocol)
        {
            Requires.NotNull(target, "target");
            Requires.NotNull(protocol, "protocol");

            Target = target;
            m_protocol = protocol;
        }
开发者ID:Joxx0r,项目名称:ATF,代码行数:12,代码来源:Target.cs


示例11: SubmitActionRound

    // When the player has entered the action they are using this turn
    public void SubmitActionRound(IAction action, Player player, ITarget target)
    {
        if (action is Card) {
            CastCard(action as Card, player, target);
        }

        PromptNextPlayer();
    }
开发者ID:khill25,项目名称:warlock-wars,代码行数:9,代码来源:GameManager.cs


示例12: GetValue

        /// <summary>
        /// Gets the value to inject into the specified target.
        /// </summary>
        /// <param name="context">The context.</param>
        /// <param name="target">The target.</param>
        /// <returns>The value to inject into the specified target.</returns>
        public object GetValue(IContext context, ITarget target)
        {
            Ensure.ArgumentNotNull(context, "context");
            Ensure.ArgumentNotNull(target, "target");

            var parameter = context.Parameters.OfType<PropertyValue>().Where(p => p.Name == target.Name).SingleOrDefault();
            return parameter != null ? parameter.GetValue(context) : target.ResolveWithin(context);
        }
开发者ID:JasonTrue,项目名称:ninject,代码行数:14,代码来源:PropertyInjectionStrategy.cs


示例13: CastCard

 protected void CastCard(Card card, Player origin, ITarget target)
 {
     card.CastOrigin = origin;
     card.CastTarget = target;
     CardStack.Push (card);
     if (target is Player) {
         AlertPlayerForResponse(target as Player, origin, card);
     }
 }
开发者ID:khill25,项目名称:warlock-wars,代码行数:9,代码来源:GameManager.cs


示例14: Argument

		/*----------------------------------------------------------------------------------------*/
		#region Constructors
		/// <summary>
		/// Creates a new Argument.
		/// </summary>
		/// <param name="target">The argument's injection point.</param>
		/// <param name="resolver">The argument's dependency marker.</param>
		/// <param name="optional">A value indicating whether the argument is optional.</param>
		public Argument(ITarget target, IResolver resolver, bool optional)
		{
			Ensure.ArgumentNotNull(target, "target");
			Ensure.ArgumentNotNull(resolver, "dependency");

			Target = target;
			Resolver = resolver;
			Optional = optional;
		}
开发者ID:jamarlthomas,项目名称:ninject1,代码行数:17,代码来源:Argument.cs


示例15: SimpleProvider

		public SimpleProvider (ITarget[] targets) {
			this.targets = new Hashtable ();

			if (targets == null)
				return;

			foreach (ITarget t in targets)
				AddTarget (t);
		}
开发者ID:emtees,项目名称:old-code,代码行数:9,代码来源:SimpleProvider.cs


示例16: ImageLoaderTask

		public ImageLoaderTask(IDownloadCache downloadCache, IMainThreadDispatcher mainThreadDispatcher, IMiniLogger miniLogger, TaskParameter parameters, nfloat imageScale, ITarget<UIImage, ImageLoaderTask> target, bool clearCacheOnOutOfMemory)
			: base(mainThreadDispatcher, miniLogger, parameters, true, clearCacheOnOutOfMemory)
		{
			if (target == null)
				throw new ArgumentNullException(nameof(target));
			
			_target = target;
			DownloadCache = downloadCache;
		}
开发者ID:CaLxCyMru,项目名称:FFImageLoading,代码行数:9,代码来源:ImageLoaderTask.cs


示例17: TargetObjectBaseCore

		public TargetObjectBaseCore(ITarget builtFrom,
				IIdentifiableRetrievalManager retrievalManager) : base(builtFrom) {
			this.referenceValues = new List<IReferenceValueBase>();
			this.builtFrom = builtFrom;
			/* foreach */
			foreach (IReferenceValue referenceValue  in  builtFrom.ReferenceValues) {
				referenceValues.Add(new ReferenceValueObjectBaseCore(referenceValue, retrievalManager));
			}
		}
开发者ID:alcardac,项目名称:SDMXRI_WS_OF,代码行数:9,代码来源:TargetSuperBeanImpl.cs


示例18: PlotCourse

 /// <summary>
 /// Plots a direct course to the target and notifies the ship of the outcome via the
 /// onCoursePlotSuccess/Failure events if set. The actual location is adjusted for the ship's
 /// position within the fleet's formation.
 /// </summary>
 /// <param name="target">The target.</param>
 /// <param name="speed">The speed.</param>
 public override void PlotCourse(ITarget target, float speed) {
     base.PlotCourse(target, speed);
     if (CheckApproachTo(Destination)) {
         OnCoursePlotSuccess();
     }
     else {
         OnCoursePlotFailure();
     }
 }
开发者ID:Maxii,项目名称:UnityEntry,代码行数:16,代码来源:ShipNavigator.cs


示例19: Policy

 public Policy(string id, 
     ITarget target, 
     ICombiningAlgorithm combiningAlgorithm, 
     IEnumerable<IRule> rules)
 {
     Id = id;
     Target = target;
     CombiningAlgorithm = combiningAlgorithm;
     Rules = rules;
 }
开发者ID:patrickhuber,项目名称:Oriz,代码行数:10,代码来源:Policy.cs


示例20: Create

 public IOutputWriter Create(TargetType targetType, BlockingCollection<Block> outputQueue, ITarget target)
 {
     switch (targetType)
     {
         case TargetType.Callback:
             return new CallbackWriter(outputQueue, target);
         default:
             throw new ArgumentOutOfRangeException("targetType");
     }
 }
开发者ID:suh786,项目名称:dts.server,代码行数:10,代码来源:IOutputWriterFactory.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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