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


C# Guid.Pack方法代码示例

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


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

示例1: Test

		public void Test()
		{
			Guid g = new Guid();
			string gIn = g.ToString();

			string gPacked = g.Pack();

			Guid gNew = gPacked.UnPackGuid();

			string gOut = gNew.ToString();

			Assert.IsTrue(gIn == gOut);
		}
开发者ID:davelondon,项目名称:dontstayin,代码行数:13,代码来源:Utilities.cs

示例2: PinTag

			public string PinTag(Guid roomGuid)
			{
				return string.Format("<dsi:object type=\"room\" ref=\"{0}\" />", roomGuid.Pack());
			}
开发者ID:davelondon,项目名称:dontstayin,代码行数:4,代码来源:Chat.cs

示例3: getRoomStub

		RoomStub getRoomStub(Guid g, string name, string url, bool pinnable, bool guest, bool readOnly, bool pinned, bool isPhotoChatRoom, bool isPrivateChatRoom, bool isNewPhotoAlertsRoom, PresenceState presence, string icon, bool starred, int listOrder, bool isStarredByDefault, bool starrable, bool hasArchive, bool hiddenFromRoomList, bool isStreamRoom)
		{
			string tokenDateTimeTicks = guest ? DateTime.Now.Ticks.ToString() : "";
			string token = guest ? Chat.GetToken(g, tokenDateTimeTicks) : "";
			return new RoomStub(
				this.ClientID,
				g.Pack(),//.ToString("N"),
				name,
				url,
				pinned,
				starred,
				isStarredByDefault,
				pinnable,
				starrable,
				false,//Prefs.Current["ChatClientSelectedRoomGuid"].Exists && Prefs.Current["ChatClientSelectedRoomGuid"].Equals(g.ToString("N")), 
				guest,
				0,
				0,
				"",
				"",
				"",
				readOnly,
				listOrder,
				isPhotoChatRoom,
				isPrivateChatRoom,
				isNewPhotoAlertsRoom,
				presence,
				icon,
				tokenDateTimeTicks,
				token,
				hasArchive,
				hiddenFromRoomList,
				isStreamRoom);
		}
开发者ID:davelondon,项目名称:dontstayin,代码行数:34,代码来源:ChatClient.ascx.cs

示例4: getLaughStub

		static LaughStub getLaughStub(ItemType itemType, Guid roomGuid, Comment fullComment)
		{
			return new LaughStub(
						Guid.NewGuid().Pack(),
						itemType,
						DateTime.Now.Ticks.ToString(),
						roomGuid.Pack(),
						Usr.Current.NickName,
						Usr.Current.StmuParams,
						Usr.Current.K,
						Usr.Current.HasPic ? Usr.Current.Pic.ToString() : "0",
						Usr.Current.HasChatPic ? Usr.Current.ChatPic.Value.ToString() : "0",
						Chat.GetMessageFromCommentBody(fullComment.Text),
						fullComment.Thread.GetRoomSpec().Guid.Pack(),
						fullComment.UrlRefresher(),
						fullComment.Thread.Subject.TruncateWithDots(50));
		}
开发者ID:davelondon,项目名称:dontstayin,代码行数:17,代码来源:Lol.cs

示例5: getChatMessage

		static CommentMessageStub getChatMessage(Guid roomGuid, Guid pinRoomGuid, Comment newComment, Thread parentThread, Usr postingUsr, string chatMessageBody)
		{
			return new CommentMessageStub(
				newComment.ChatItemGuid.Value.Pack(),
				ItemType.CommentChatMessage,
				newComment.DateTime.Ticks.ToString(),
				roomGuid.Pack(),
				postingUsr.NickName,
				postingUsr.StmuParams,
				postingUsr.K,
				postingUsr.HasPic ? postingUsr.Pic.ToString() : "0",
				postingUsr.HasChatPic ? postingUsr.ChatPic.Value.ToString() : "0",
				chatMessageBody,
				pinRoomGuid.Pack(),
				newComment.UrlRefresher(),
				parentThread.Subject.TruncateWithDots(30)
			);
		}
开发者ID:davelondon,项目名称:dontstayin,代码行数:18,代码来源:Comment.cs


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