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


C# ITarget类代码示例

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


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


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