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


C# EntityType.ToString方法代码示例

本文整理汇总了C#中EntityType.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# EntityType.ToString方法的具体用法?C# EntityType.ToString怎么用?C# EntityType.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在EntityType的用法示例。


在下文中一共展示了EntityType.ToString方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetChildDetailsUrl

        public static string GetChildDetailsUrl(this Entity entity, EntityGroup group, EntityType entityType, Guid guid)
        {
            string url = String.Format(
                "~/{0}/{1}Details.aspx?guid={2}",
                group.ToString().ToLower(),
                entityType.ToString(),
                guid.ToString());

            return url;
        }
开发者ID:horvatferi,项目名称:graywulf,代码行数:10,代码来源:EntityExtensions.cs

示例2: GetNewChildFormUrl

        public static string GetNewChildFormUrl(this Entity entity, EntityType entityType)
        {
            EntityGroup group = GetDefaultEntityGroup(entityType);

            string url = String.Format(
                "~/{0}/{1}Form.aspx?parentGuid={2}",
                group.ToString().ToLower(),
                entityType.ToString(),
                entity.Guid.ToString());

            return url;
        }
开发者ID:horvatferi,项目名称:graywulf,代码行数:12,代码来源:EntityExtensions.cs

示例3: GetDetailsUrl

        public static string GetDetailsUrl(EntityType entityType, EntityGroup group, Guid guid)
        {
            string url = string.Empty;

            OverrideEntityGroup(entityType, ref group);

            url = String.Format(
                "~/{0}/{1}Details.aspx?guid={2}",
                group.ToString().ToLower(),
                entityType.ToString(),
                guid.ToString());

            return url;
        }
开发者ID:horvatferi,项目名称:graywulf,代码行数:14,代码来源:EntityExtensions.cs

示例4: GetProjectActivitiesByFilter

        public IEnumerable<ProjectActivityWrapper> GetProjectActivitiesByFilter(int projectId, ApiDateTime periodStart, ApiDateTime periodStop, Guid user, EntityType? entity, int lastId)
        {
            var filter = new ProjectActivityFilter
                             {
                                 ProjectId = projectId,
                                 UserId = user,
                                 Type = entity.ToString(),
                                 From = periodStart,
                                 To = periodStop,
                                 SortBy = _context.SortBy,
                                 SortOrder = !_context.SortDescending,
                                 SearchText = _context.FilterValue,
                                 Offset = (int) _context.StartIndex,
                                 Max = (int) _context.Count,
                                 LastId = lastId
                             };

            _context.SetDataPaginated();
            _context.SetDataFiltered();
            _context.SetDataSorted();

            return EngineFactory.GetProjectActivityEngine().GetByFilter(filter).NotFoundIfNull().Select(a => new ProjectActivityWrapper(a)).ToSmartList();
        }
开发者ID:ridhouan,项目名称:teamlab.v6.5,代码行数:23,代码来源:ProjectApi.Projects.cs

示例5: Entity

        public Entity(SpriteBatch spriteBatch, Soul game, string filename, Vector2 dimension, string alias, EntityType type)
        {
            sprite = new Sprite(spriteBatch, game, filename);
            screenBoundaries = new Rectangle(0, 0, Constants.RESOLUTION_VIRTUAL_WIDTH, Constants.RESOLUTION_VIRTUAL_HEIGHT);
            this.alias = alias;
            this.dimension = dimension;
            offset.X = dimension.X * 0.5f;
            offset.Y = dimension.Y * 0.5f;
            this.type = type;
            animation = new Animation(((int)(sprite.X / dimension.X)) - 1);
            this.game = game;
            this.spriteBatch = spriteBatch;

            //IniFile config = new IniFile("Content\\Config\\config.ini");
            //config.parse();
            debug = bool.Parse(game.config.getValue("Debug","Hitbox"));

            bool varyingEntity = false;
            List<String> varyingEntities = new List<string>();
            varyingEntities.Add("BLUE_BLOOD_VESSEL");
            varyingEntities.Add("RED_BLOOD_VESSEL");
            varyingEntities.Add("PURPLE_BLOOD_VESSEL");
            varyingEntities.Add("DARK_THOUGHT");
            varyingEntities.Add("DARK_WHISPER");
            varyingEntities.Add("INNER_DEMON");
            varyingEntities.Add("LESSER_DEMON");
            varyingEntities.Add("NIGHTMARE");
            varyingEntities.Add("PLAYER");
            varyingEntities.Add("BOSS");
            foreach (String entityType in varyingEntities)
            {
                if (type.ToString().Equals(entityType))
                {
                    varyingEntity = true;
                }
            }

            if (varyingEntity)
            {
                //IniFile ini = new IniFile("Content\\Config\\constants.ini");
                //ini.parse();
                health = int.Parse(game.constants.getValue(type.ToString(), "HEALTH"));

                if (type.ToString().Equals("PLAYER"))
                {
                    maxHealth = int.Parse(game.constants.getValue(type.ToString(), "MAXHEALTH"));
                }

                if (!type.ToString().Equals("BOSS"))
                {
                    hitRadius = int.Parse(game.constants.getValue(type.ToString(), "RADIUS"));
                    maxVelocity = new Vector2(float.Parse(game.constants.getValue(type.ToString(), "SPEED")), float.Parse(game.constants.getValue(type.ToString(), "SPEED")));
                }

                if (!type.ToString().Equals("INNER_DEMON") && !type.ToString().Equals("LESSER_DEMON") && !type.ToString().Equals("BOSS"))
                {
                    damage = int.Parse(game.constants.getValue(type.ToString(), "DAMAGE"));
                }
                if (type.ToString().Equals("DARK_THOUGHT") || type.ToString().Equals("PLAYER"))
                {
                    fireRate = float.Parse(game.constants.getValue(type.ToString(), "RATE"));
                }
                if (type.ToString().Equals("DARK_THOUGHT") || type.ToString().Equals("BOSS"))
                {
                    burst = int.Parse(game.constants.getValue(type.ToString(), "BURSTPERIOD"));
                }
                if (type.ToString().Equals("INNER_DEMON") || type.ToString().Equals("BOSS"))
                {
                    minSpawn = int.Parse(game.constants.getValue(type.ToString(), "MINSPAWN"));
                    maxSpawn = int.Parse(game.constants.getValue(type.ToString(), "MAXSPAWN"));
                }
                if (type.ToString().Equals("DARK_WHISPER"))
                {
                    spikeDamage = int.Parse(game.constants.getValue(type.ToString(), "SPIKEDAMAGE"));
                    spikeSpeed = int.Parse(game.constants.getValue(type.ToString(), "SPIKESPEED"));
                    spikeRange = int.Parse(game.constants.getValue(type.ToString(), "SPIKERANGE"));
                }
            }
        }
开发者ID:rodstrom,项目名称:soul,代码行数:79,代码来源:Entity.cs

示例6: RegisterClientScript

        private void RegisterClientScript(EntityType entityType)
        {
            var apiServer = new Api.ApiServer();
            var templateConatainerList = apiServer.GetApiResponse(
                String.Format("{0}crm/{1}/tasktemplatecontainer.json", SetupInfo.WebApiBaseUrl, entityType.ToString().ToLower()), "GET");

            Page.JsonPublisher(templateConatainerList, "templateConatainerList");

        }
开发者ID:Inzaghi2012,项目名称:teamlab.v7.5,代码行数:9,代码来源:TaskTemplateView.ascx.cs

示例7: GetItems

        public virtual List<TaskTemplateContainer> GetItems(EntityType entityType)
        {
            if (!_supportedEntityType.Contains(entityType))
                throw new ArgumentException("", entityType.ToString());


            using (var db = GetDb())
            {
                return db.ExecuteList(GetQuery(Exp.Eq("entity_type", (int)entityType)))
                                                  .ConvertAll(row => ToObject(row));
            }
        }
开发者ID:vipwan,项目名称:CommunityServer,代码行数:12,代码来源:TaskTemplateContainerDao.cs

示例8: SetupPool

    private void SetupPool(EntityType Type, List<GameObject> Pool, int Amount)
    {
        GameObject prefab = GetPrefabByType(Type);
        if (prefab != null)
        {
            GameObject holder = new GameObject(Type.ToString() + " Holder");
            holder.transform.SetParent(transform);
            holder.transform.position = Vector3.zero;
            holder.transform.rotation = Quaternion.identity;

            for (int i = 0; i < Amount; i++)
            {
                GameObject o = Instantiate(prefab, prefab.transform.position, prefab.transform.rotation) as GameObject;
                TransportEntityView objView = o.AddComponent<TransportEntityView>();
                objView.Spawner = this;
                objView.Type = Type;
                o.SetActive(false);
                o.transform.SetParent(holder.transform);
                Pool.Add(o);
                if(Type == EntityType.Car)
                    prefab = GetPrefabByType(Type);
            }
        }
    }
开发者ID:patrickpissurno,项目名称:samecitysameshit,代码行数:24,代码来源:SpawnerView.cs

示例9: DataListContactTab

 public static void DataListContactTab(BasePage page, Int32 entityID, EntityType entityType)
 {
     page.RegisterInlineScript(String.Format(" var entityData = {0}; ",
                                     JsonConvert.SerializeObject(new
                                     {
                                         id = entityID,
                                         type = entityType.ToString().ToLower()
                                     })), onReady: false);
 }
开发者ID:haoasqui,项目名称:ONLYOFFICE-Server,代码行数:9,代码来源:RegisterClientScriptHelper.cs

示例10: GetEntityTypes

        private static Dictionary<int, string> GetEntityTypes(EntityType type)
        {
            XDocument doc = XDocument.Load(path);

            var x = from c in doc.Descendants(type.ToString())
                    select c.DescendantNodes().ToList();

            Dictionary<int, string> list = new Dictionary<int, string>();

            foreach (XElement item in x.FirstOrDefault())
            {
                int id = int.Parse(item.Attribute(GlobalStringResource.Identifier).Value);
                string name = item.Attribute(GlobalStringResource.Name).Value;

                list.Add(id, name);
            }

            return list;
        }
开发者ID:meanprogrammer,项目名称:sawebreports_migrated,代码行数:19,代码来源:TypesReader.cs

示例11: SendOffensiveEntityMail

        private void SendOffensiveEntityMail(ReportEntityDetails details, EntityType entityType)
        {
            //// TODO: Need to send mail asynchronously. 

            try
            {
                // Send Mail.
                var request = new FlaggedRequest()
                {
                    ID = details.ReportEntityID,
                    EntityType = entityType,
                    ParentID = details.ParentID,
                    UserComments = details.Comment,
                    FlaggedOn = DateTime.UtcNow,
                    FlaggedAs = details.ReportEntityType.ToString(),
                    UserID = details.ReportedByID,
                    UserName = details.ReportedBy,
                    UserLink = string.Format(CultureInfo.InvariantCulture, "{0}Profile/Index/{1}", HttpContext.Request.Url.GetServerLink(), details.ReportedByID),
                };

                switch (entityType)
                {
                    case EntityType.Community:
                    case EntityType.Folder:
                        request.Link = string.Format(CultureInfo.InvariantCulture, "{0}Community/Index/{1}", HttpContext.Request.Url.GetServerLink(), details.ReportEntityID);
                        break;
                    default:
                        request.Link = string.Format(CultureInfo.InvariantCulture, "{0}{1}/Index/{2}", HttpContext.Request.Url.GetServerLink(), entityType.ToString(), details.ReportEntityID);
                        break;
                }

                _notificationService.NotifyFlagged(request);
            }
            catch (Exception)
            {
                // Ignore all exceptions.
            }
        }
开发者ID:faorg,项目名称:wwt-website,代码行数:38,代码来源:OffensiveController.cs

示例12: DetachFileFromEntity

 public void DetachFileFromEntity(EntityType entityType, int entityId, object fileId)
 {
     using (var dao = FilesIntegration.GetTagDao())
     {
         dao.RemoveTags(new Tag(entityType.ToString() + entityId, TagType.System, Guid.Empty) {EntryType = FileEntryType.File, EntryId = fileId});
     }
 }
开发者ID:ridhouan,项目名称:teamlab.v6.5,代码行数:7,代码来源:FileEngine.cs

示例13: AttachFileToEntity

 public void AttachFileToEntity(EntityType entityType, int entityId, object fileId)
 {
     using (var dao = FilesIntegration.GetTagDao())
     {
         dao.SaveTags(new Tag(entityType.ToString() + entityId, TagType.System, Guid.Empty) {EntryType = FileEntryType.File, EntryId = fileId});
         GenerateImageThumb(GetFile(fileId, 0));
     }
 }
开发者ID:ridhouan,项目名称:teamlab.v6.5,代码行数:8,代码来源:FileEngine.cs


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