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

C# TargetType类代码示例

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

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



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

示例1: NativeFieldInfo

        public NativeFieldInfo(TargetType type, string name, int index,
					bool has_const_value, int const_value)
            : base(type, name, index, false, TargetMemberAccessibility.Public,
				0, 0, has_const_value)
        {
            this.const_value = const_value;
        }
开发者ID:baulig,项目名称:debugger,代码行数:7,代码来源:NativeStructType.cs


示例2: TargetAuraMinTimeLeftCondition

 public TargetAuraMinTimeLeftCondition(TargetType target, int auraId, TimeSpan minTimeLeft)
 {
     Target = target;
     AuraId = auraId;
     CreatorGuid = StyxWoW.Me.Guid;
     MinTimeLeft = minTimeLeft;
 }
开发者ID:Lbniese,项目名称:PawsPremium,代码行数:7,代码来源:TargetAuraMinTimeLeftCondition.cs


示例3: WithDest

        public Network WithDest(string dest)
        {
            _destType = GetTargetType(dest);
            _dest = dest;

            return this;
        }
开发者ID:kostyll,项目名称:FFmpegSharp,代码行数:7,代码来源:Network.cs


示例4: 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


示例5: clear

	private void clear()
	{
		targetType = TargetType.Type_Null;
		targetArrived = null;
		goTarget = null;

	}
开发者ID:wuzhangwuzhang,项目名称:BWM,代码行数:7,代码来源:RunToTarget.cs


示例6: CMakeTarget

 public CMakeTarget(TargetType type, bool isImported)
 {
     Type = type;
     IMPORTED = isImported;
     sources = new HashSet<FileInfo>();
     properties = new CMakeTargetPropertyCollection();
 }
开发者ID:chen-charles,项目名称:GraphicalCMake,代码行数:7,代码来源:CMakeTarget.cs


示例7: TargetAuraMaxTimeLeftCondition

 public TargetAuraMaxTimeLeftCondition(TargetType target, int auraId, WoWGuid creatorGuid, TimeSpan maxTimeLeft)
 {
     Target = target;
     AuraId = auraId;
     CreatorGuid = creatorGuid;
     MaxTimeLeft = maxTimeLeft;
 }
开发者ID:Lbniese,项目名称:PawsPremium,代码行数:7,代码来源:TargetAuraMaxTimeLeftCondition.cs


示例8: Item

 public Item(string name, string desc, ItemType type, TargetType targetType)
 {
     _name = name;
     _desc = desc;
     _type = type;
     _targetType = targetType;
 }
开发者ID:skinitimski,项目名称:Reverence,代码行数:7,代码来源:Item.cs


示例9: Initialize

 public void Initialize (Transform targ, TargetType targType, float maxTTL, float expRadius, float dmg ) {
     target = targ;
     targetType = targType;
     maxTimeToLive = maxTTL;
     explosionRadius = expRadius;
     damage = dmg;
 }
开发者ID:genelikespie,项目名称:AR_Game_Winter2016,代码行数:7,代码来源:MissileProjectile.cs


示例10: TargetInfo

 public TargetInfo(string name, string target, TargetType type, bool safe)
 {
     this.name = name;
     this.target = target;
     this.type = type;
     this.safe = safe;
 }
开发者ID:Spanfile,项目名称:BackupUtil,代码行数:7,代码来源:Structs.cs


示例11: GetBestTarget

 public static Obj_AI_Hero GetBestTarget(TargetType type, float range)
 {
     var List = HeroManager.Enemies.Where(x => !x.IsDead && x.Distance(Player.Position) <= range);
     if (type == TargetType.LowestHealth)
     {
         return List.OrderBy(x => x.Health).FirstOrDefault();
     }
     if (type == TargetType.MaxHealth)
     {
         return List.OrderBy(x => x.MaxHealth).FirstOrDefault();
     }
     if (type == TargetType.BestDamage)
     {
         return List.OrderBy(x => x.TotalMagicalDamage + x.TotalAttackDamage ).LastOrDefault();
     }
     if (type == TargetType.Closest)
     {
         return List.OrderBy(x => x.Distance(Player.Position)).FirstOrDefault();
     }
     if (type == TargetType.Tankiest)
     {
         return List.OrderBy(x => x.Armor + x.FlatMagicReduction).FirstOrDefault();
     }
     if (type == TargetType.MostHealth)
     {
         return List.OrderBy(x => x.Health).LastOrDefault();
     }
     else return TargetSelector.GetTarget(range, TargetSelector.DamageType.Physical);
 }
开发者ID:LSharpAura,项目名称:LeagueSharp,代码行数:29,代码来源:Spells.cs


示例12: MonoVariable

        public MonoVariable(string name, TargetType type, bool is_local, bool is_byref,
				     Method method, VariableInfo info, int start_scope_offset,
				     int end_scope_offset)
            : this(name, type, is_local, is_byref, method, info)
        {
            if (is_local) {
                start_scope = method.StartAddress + start_scope_offset;
                end_scope = method.StartAddress + end_scope_offset;
            } else if (method.HasMethodBounds) {
                start_scope = method.MethodStartAddress;
                end_scope = method.MethodEndAddress;
            } else {
                start_scope = method.StartAddress;
                end_scope = method.EndAddress;
            }

            if (has_liveness_info) {
                if (start_liveness < start_scope)
                    start_liveness = start_scope;
                if (end_liveness > end_scope)
                    end_liveness = end_scope;
            } else {
                start_liveness = start_scope;
                end_liveness = end_scope;
                has_liveness_info = true;
            }
        }
开发者ID:baulig,项目名称:debugger,代码行数:27,代码来源:MonoVariable.cs


示例13: IsValidTarget

    public static bool IsValidTarget(TargetType targetType, GameObject target, GameObject me)
    {
        Team targetTeam = target.GetComponent<Team>();
        Team myTeam = me.GetComponent<Team>();

        //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        switch (targetType) {
          case TargetType.Self:
        if(target == me) {
          return true;
        }
        break;
          case TargetType.Ally:
        if(myTeam.m_teamNumber == targetTeam.m_teamNumber) {
          return true;
        }
        break;
          case TargetType.Enemy:
        if(myTeam.m_teamNumber != targetTeam.m_teamNumber) {
          return true;
        }
        break;
          case TargetType.All:
        return true;
          default:
        return false;
        };
        //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        return false;
    }
开发者ID:shawnmiller,项目名称:Capstone,代码行数:30,代码来源:Team.cs


示例14: CategoriesToTreeNodes

        /// <summary>
        /// 将分类类别转换为TreeNodes
        /// </summary>
        /// <param name="categoryService">扩展类:CategoryService</param>
        /// <param name="categories">要转换成节点分类集合</param>
        /// <param name="targetType">点击分类时打开新页还是在本页打开</param>
        /// <param name="idPrefix">节点ID前缀</param>
        /// <param name="checkedCategoryId">当前选中的CategoryId</param>
        /// <param name="openLevel">默认打开的层级</param>
        /// <returns>TreeNodes列表</returns>
        public static IList<TreeNode> CategoriesToTreeNodes(this CategoryService<Category> categoryService, IList<Category> categories, TargetType targetType, string idPrefix, long? checkedCategoryId, int? openLevel)
        {
            //本方法将分类转换成TreeNodes,其中,哪些节点展开还是闭合的逻辑较为复杂,如下:
            //关于哪些节点展开哪些节点闭合,逻辑实现如下:
            //1 首先,若checkedCategoryId有值,则这个分类的所有父级分类展开,其他分类全部折叠;
            //2 其次,若checkedCategoryId无值,openLevel有着,则深度小于等于openLevel的分类展开,其他分类折叠;
            //3 若若checkedCategoryId和openLevel都没有值,则所有分类折叠。

            IList<TreeNode> nodes = new List<TreeNode>();
            if (categories != null && categories.Count > 0)
            {
                //若当前有选中的分类,则获取其所有的父级分类Id集合
                List<long> checkedCategoryIds = new List<long>();
                if (checkedCategoryId.HasValue && checkedCategoryId.Value > 0)
                    GetParentCategoryIDs(categoryService, checkedCategoryId.Value, checkedCategoryIds);

                //通过Category组装TreeNode
                foreach (Category category in categories)
                {
                    TreeNode node = new TreeNode();
                    node.Id = idPrefix + category.CategoryId.ToString();
                    node.IsChecked = (checkedCategoryId == category.CategoryId);
                    node.IsOpened = IsOpenedNode(category, checkedCategoryIds, openLevel);
                    node.IsParent = category.ChildCount > 0;
                    node.Name = category.CategoryName;
                    node.ParentId = idPrefix + category.ParentId.ToString();
                    node.Target = targetType;
                    node.Url = string.Empty;
                    nodes.Add(node);
                }
            }
            return nodes;
        }
开发者ID:hbulzy,项目名称:SYS,代码行数:43,代码来源:CategoryServiceExtensions.cs


示例15: TargetHasAuraMinStacksCondition

 public TargetHasAuraMinStacksCondition(TargetType target, int auraId, int minStackCount)
 {
     Target = target;
     AuraId = auraId;
     MinStackCount = minStackCount;
     CreatorGuid = StyxWoW.Me.Guid;
 }
开发者ID:Lbniese,项目名称:PawsPremium,代码行数:7,代码来源:TargetHasAuraMinStacksCondition.cs


示例16: PropertySetPreservedAndSourceNotModified

        public void PropertySetPreservedAndSourceNotModified()
        {
            const string ValueFoo = "hello";
            var valueBar = new DateTime(2013, 12, 1, 23, 0, 0);
            var valueBaz = new object();
            var valueFuu = new TargetType();

            dynamic source = new ExpandoObject();
            source.Foo = ValueFoo;
            source.Bar = valueBar;
            source.Baz = valueBaz;
            source.Fuu = valueFuu;
            
            dynamic result = ((object)source).ToExpando();
            
            Assert.AreNotSame(source, result);
            
            Assert.AreEqual(source.Foo, result.Foo);
            Assert.AreEqual(source.Bar, result.Bar);
            Assert.AreEqual(source.Baz, result.Baz);
            Assert.AreEqual(source.Fuu, result.Fuu);

            Assert.AreEqual(ValueFoo, source.Foo);
            Assert.AreEqual(valueBar, source.Bar);
            Assert.AreEqual(valueBaz, source.Baz);
            Assert.AreEqual(valueFuu, source.Fuu);
        }
开发者ID:Sinbadsoft,项目名称:Sinbadsoft.Lib.Model,代码行数:27,代码来源:ExpandoSourceTest.cs


示例17: Instantiate

        public StructureDiscoveryCommand Instantiate(Target target, TargetType type, IEnumerable<CaptionFilter> filters)
        {
            if (!(connection is AdomdConnection))
                throw new ArgumentException();

            var builder = InstantiateBuilder(target, type);
            builder.Build(filters);

            var cmd = connection.CreateCommand();
            cmd.CommandText = builder.GetCommandText();
            var postFilters = builder.GetPostFilters();

            var description = new CommandDescription(target, filters);

            OlapCommand command = null;
            if ((target == Target.MeasureGroups && type == TargetType.Object) || target == Target.Perspectives)
                command = new DistinctOlapCommand(cmd, postFilters, description);
            else if (target == Target.Dimensions && type == TargetType.Object)
                command = new DimensionCommand(cmd, postFilters, description);
            else if (target == Target.Dimensions && type == TargetType.Relation)
                command = new DimensionRelationCommand(cmd, postFilters, description);
            else
                command = new OlapCommand(cmd, postFilters, description);

            return command;
        }
开发者ID:Waltervondehans,项目名称:NBi,代码行数:26,代码来源:OlapStructureDiscoveryFactory.cs


示例18: MonoGenericInstanceType

        public MonoGenericInstanceType(MonoClassType container, TargetType[] type_args,
						TargetAddress class_ptr)
            : base(container.File.MonoLanguage)
        {
            this.Container = container;
            this.type_args = type_args;
            this.class_ptr = class_ptr;

            struct_type = new MonoStructType (container.File, this, container.Type);

            StringBuilder sb = new StringBuilder (container.BaseName);
            sb.Append ('<');
            for (int i = 0; i < type_args.Length; i++) {
                if (i > 0)
                    sb.Append (',');
                sb.Append (type_args [i].Name);
            }
            sb.Append ('>');
            full_name = sb.ToString ();

            bool is_compiler_generated;
            DebuggerBrowsableState? browsable_state;
            MonoSymbolFile.CheckCustomAttributes (container.Type,
                                  out browsable_state,
                                  out debugger_display,
                                  out type_proxy,
                                  out is_compiler_generated);
        }
开发者ID:baulig,项目名称:debugger,代码行数:28,代码来源:MonoGenericInstanceType.cs


示例19: InstantiateBuilder

        protected override IDiscoveryCommandBuilder InstantiateBuilder(Target target, TargetType type)
        {
            if (type != TargetType.Object)
                throw new ArgumentOutOfRangeException();

            switch (target)
            {
                case Target.Perspectives:
                    return new PerspectiveDiscoveryCommandBuilder();
                case Target.MeasureGroups:
                    return new MeasureGroupDiscoveryCommandBuilder();
                case Target.Measures:
                    return new MeasureDiscoveryCommandBuilder();
                case Target.Dimensions:
                    return new DimensionDiscoveryCommandBuilder();
                case Target.Hierarchies:
                    return new HierarchyDiscoveryCommandBuilder();
                case Target.Levels:
                    return new LevelDiscoveryCommandBuilder();
                case Target.Properties:
                    return new PropertyDiscoveryCommandBuilder();
                case Target.Tables:
                    return new TableDiscoveryCommandBuilder();
                case Target.Columns:
                    return new ColumnDiscoveryCommandBuilder();
                case Target.Sets:
                    return new SetDiscoveryCommandBuilder();
                default:
                    throw new ArgumentOutOfRangeException();
            }
        }
开发者ID:Waltervondehans,项目名称:NBi,代码行数:31,代码来源:TabularStructureDiscoveryFactory.cs


示例20: CreateAbnormalConditionMagic

        private static IList<WarMagicData> CreateAbnormalConditionMagic(MagicData magic, bool isChipEffect, IAbnormalCondition cond, TargetType targetType)
        {
            var name = magic.Name;
            var description = magic.Description;
            var cores = magic.Cores;
            var magicDatas = new List<WarMagicData>(cores.Length);
            foreach (var core in cores)
            {
                // 行為の範囲や対象を設定する
                IScope scope;
                if (core.Area != 0)
                    scope = new DefaultScope(core.Range, core.Area, targetType);
                else
                    scope = new WholeScope(targetType);

                // 画面効果を設定する
                var screenEffect = CreateScreenEffect(magic, isChipEffect);

                // 消費MPの設定
                var consumption = new MPCost(core.MPCost);

                // 行為の設定
                var action = new GiveAbnormalConditionAction(scope, consumption, screenEffect, cond);

                // 魔法データを作成する
                var magicData = new WarMagicData(name, description, action, core.MPCost, core.Area, core.Range);
                magicDatas.Add(magicData);
            }
            return magicDatas;
        }
开发者ID:ProjectTane,项目名称:FarenDotNet,代码行数:30,代码来源:WarMagicDataLoader.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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