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


C# StringTable.ToString方法代码示例

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


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

示例1: GetValue

        public string GetValue()
        {
            StringTable table = new StringTable();

            //table.Add("LimitType", LimitType.ToString());
            table.Add("LimitType", ((byte)LimitType).ToString());


            foreach (KeyValuePair<Guid, List<Guid>> item in ExcludeRoles)
            {

                if (item.Value != null)
                {

                    StringList roles = new StringList();
                    foreach (Guid roleID in item.Value)
                    {
                        roles.Add(roleID.ToString());
                    }

                    table.Add("ExcludeRoles-" + item.Key.ToString("N"), roles.ToString());

                }

            }

            return table.ToString();
        }
开发者ID:huchao007,项目名称:bbsmax,代码行数:28,代码来源:PermissionLimit.cs

示例2: ToString

		public override string ToString()
		{
			StringTable values = new StringTable();

			if (Items != null)
			{
				foreach (ExtendedFieldSearchInfoItem item in Items)
				{
					values.Add(item.FieldKey, item.SearchValue);
				}
			}

			return values.ToString();
		}
开发者ID:huchao007,项目名称:bbsmax,代码行数:14,代码来源:ExtendedFieldSearchInfo.cs

示例3: JoinForum

        private void JoinForum()
        {
            int oldForumID = Forum.ForumID;
            int newForumID = _Request.Get<int>("targetForum", Method.Post, 0);

            MessageDisplay msgDisplay = CreateMessageDisplay();

            if (oldForumID == newForumID)
            {
                msgDisplay.AddError("不能合并到本身");
                return;
            }

            bool beginTask = false;

            using (new ErrorScope())
            {
                StringTable keyValues = new StringTable();

                keyValues.Add("oldForumID", oldForumID.ToString());
                keyValues.Add("newForumID", newForumID.ToString());

                try
                {
                    beginTask = TaskManager.BeginTask(MyUserID, new JoinForumTask(), keyValues.ToString());
                }
                catch (Exception ex)
                {
                    msgDisplay.AddException(ex);
                }
            }

            if (beginTask)
                Return(true);
        }
开发者ID:huchao007,项目名称:bbsmax,代码行数:35,代码来源:forum-join.aspx.cs

示例4: GetExtendData

        public static string GetExtendData(string agreeViewPoint, string againstViewPoint, int agreeCount, int againstCount, int neutralCount, DateTime expiresDate, Dictionary<int,ViewPointType> polemizeUsers)
        {
            StringTable table = new StringTable();
            table.Add("agreeViewPoint", agreeViewPoint);
            table.Add("againstViewPoint",againstViewPoint);
            table.Add("agreeCount", agreeCount.ToString());
            table.Add("againstCount", againstCount.ToString());
            table.Add("neutralCount", neutralCount.ToString());
            table.Add("expiresDate", expiresDate.ToString());
            if (polemizeUsers == null)
                polemizeUsers = new Dictionary<int, ViewPointType>();

            table.Add("polemizeUserIDs", StringUtil.Join(polemizeUsers.Keys));

            StringBuilder sb = new StringBuilder();
            foreach (ViewPointType pointType in polemizeUsers.Values)
            {
                sb.Append((int)pointType);
                sb.Append(",");
            }
            string value;
            if (sb.Length > 0)
                value = sb.ToString(0, sb.Length - 1);
            else
                value = string.Empty;

            table.Add("polemizeViewPointTypes", value);
            return table.ToString();
        }
开发者ID:huchao007,项目名称:bbsmax,代码行数:29,代码来源:PolemizeThread.cs

示例5: GetExtendData

 public static string GetExtendData(bool isClosed, int reward, int rewardCount, bool alwaysEyeable, DateTime expiresDate, int bestPostID, int unusefulCount, int usefulCount, Dictionary<int,int> rewards)
 {
     StringTable table = new StringTable();
     table.Add("IsClosed", isClosed ? "1" : "0");
     table.Add("reward", reward.ToString());
     table.Add("rewardCount", rewardCount.ToString());
     table.Add("alwaysEyeable", alwaysEyeable.ToString());
     table.Add("expiresDate", expiresDate.ToString());
     table.Add("bestPostID", bestPostID.ToString());
     table.Add("unusefulCount", unusefulCount.ToString());
     table.Add("usefulCount", usefulCount.ToString());
     if (rewards == null)
         rewards = new Dictionary<int, int>();
     table.Add("rewardPostIDs", StringUtil.Join(rewards.Keys));
     table.Add("rewards", StringUtil.Join(rewards.Values));
     return table.ToString();
 }
开发者ID:huchao007,项目名称:bbsmax,代码行数:17,代码来源:QuestionThread.cs

示例6: GetExtendData

 public static string GetExtendData(bool alwaysEyeable, DateTime expiresDate, int multiple, PollItemCollectionV5 pollItems, List<int> votedUserIDs)
 {
     StringTable table = new StringTable();
     table.Add("alwaysEyeable", alwaysEyeable.ToString());
     table.Add("expiresDate", expiresDate.ToString());
     table.Add("multiple", multiple.ToString());
     table.Add("pollItems", pollItems.ToString());
     table.Add("votedUserIDs", StringUtil.Join(votedUserIDs, ","));
     return table.ToString();
 }
开发者ID:huchao007,项目名称:bbsmax,代码行数:10,代码来源:PollThread.cs


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