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


C# Message.GenerateId方法代码示例

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


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

示例1: BeginGetGameList

 /// <summary>
 /// The begin get game list.
 /// </summary>
 public void BeginGetGameList()
 {
     Log.Info("Begin get game list");
     var m = new Message(this.Config.GameBotUser.JidUser, MessageType.normal, string.Empty, "gamelist");
     m.GenerateId();
     this.xmpp.Send(m);
 }
开发者ID:haslo,项目名称:OCTGN,代码行数:10,代码来源:Client.cs

示例2: BeginHostGame

 /// <summary>
 /// The begin host game.
 /// </summary>
 /// <param name="game">
 /// The game.
 /// </param>
 /// <param name="gamename">
 /// The gamename.
 /// </param>
 public void BeginHostGame(Octgn.DataNew.Entities.Game game, string gamename, string password)
 {
     string data = string.Format("{0},:,{1},:,{2},:,{3}", game.Id.ToString(), game.Version, gamename, password ?? "");
     Log.InfoFormat("BeginHostGame {0}", data);
     var m = new Message(this.Config.GameBotUser.JidUser, this.Me.JidUser, MessageType.normal, data, "hostgame");
     m.GenerateId();
     this.xmpp.Send(m);
 }
开发者ID:haslo,项目名称:OCTGN,代码行数:17,代码来源:Client.cs

示例3: KillGame

 public void KillGame(Guid gameId)
 {
     var m = new Message(this.Config.GameBotUser.JidUser, this.Me.JidUser, MessageType.normal, string.Format("{0}#:999:#{1}", gameId, this.Password), "killgame");
     m.GenerateId();
     this.xmpp.Send(m);
 }
开发者ID:digitalalchemy,项目名称:OCTGN,代码行数:6,代码来源:Client.cs

示例4: SendGameInvite

 public void SendGameInvite(User user, Guid sessionId, string gamePassword)
 {
     Log.InfoFormat("Sending game request to {0}", user.UserName);
     var req = new InviteToGameRequest(sessionId, gamePassword);
     var m = new Message(user.JidUser, this.Me.JidUser, MessageType.normal, "", "invitetogamerequest");
     m.GenerateId();
     m.AddChild(req);
     this.xmpp.Send(m);
 }
开发者ID:digitalalchemy,项目名称:OCTGN,代码行数:9,代码来源:Client.cs

示例5: BeginHostGame

 /// <summary>
 /// The begin host game.
 /// </summary>
 /// <param name="game">
 /// The game.
 /// </param>
 /// <param name="gamename">
 /// The gamename.
 /// </param>
 public void BeginHostGame(Octgn.DataNew.Entities.Game game, string gamename,
     string password, string actualgamename, string gameIconUrl, Version sasVersion, bool specators)
 {
     var hgr = new HostGameRequest(game.Id, game.Version, gamename, actualgamename, gameIconUrl, password ?? "", sasVersion, specators);
     //string data = string.Format("{0},:,{1},:,{2},:,{3},:,{4}", game.Id.ToString(), game.Version, gamename, password ?? "",actualgamename);
     Log.InfoFormat("BeginHostGame {0}", hgr);
     var m = new Message(this.Config.GameBotUser.JidUser, this.Me.JidUser, MessageType.normal, "", "hostgame");
     m.GenerateId();
     m.AddChild(hgr);
     this.xmpp.Send(m);
 }
开发者ID:digitalalchemy,项目名称:OCTGN,代码行数:20,代码来源:Client.cs

示例6: BeginHostGame

 /// <summary>
 /// The begin host game.
 /// </summary>
 /// <param name="game">
 /// The game.
 /// </param>
 /// <param name="gamename">
 /// The gamename.
 /// </param>
 public void BeginHostGame(Game game, string gamename)
 {
     string data = string.Format("{0},:,{1},:,{2}", game.Id.ToString(), game.Version, gamename);
     var m = new Message(new Jid("[email protected]" + Host), this.Me.JidUser, MessageType.normal, data, "hostgame");
     m.GenerateId();
     this.xmpp.Send(m);
 }
开发者ID:IanWhalen,项目名称:OCTGN,代码行数:16,代码来源:Client.cs

示例7: BeginGetGameList

 /// <summary>
 /// The begin get game list.
 /// </summary>
 public void BeginGetGameList()
 {
     var m = new Message(new Jid("[email protected]" + Host), MessageType.normal, string.Empty, "gamelist");
     m.GenerateId();
     this.xmpp.Send(m);
 }
开发者ID:IanWhalen,项目名称:OCTGN,代码行数:9,代码来源:Client.cs

示例8: SetSub

 public void SetSub(bool subbed)
 {
     if (!this.IsConnected) return;
     var m = new Message(new Jid("[email protected]" + Host), MessageType.groupchat, string.Empty);
     //m.Body = Me.FullUserName + " " + subbed;
     m.AddChild(new Sub(subbed));
     m.GenerateId();
     this.xmpp.Send(m);
 }
开发者ID:TriAdX,项目名称:OCTGN,代码行数:9,代码来源:Client.cs

示例9: BeginHostGame

 /// <summary>
 /// The begin host game.
 /// </summary>
 /// <param name="game">
 /// The game.
 /// </param>
 /// <param name="gamename">
 /// The gamename.
 /// </param>
 public void BeginHostGame(Octgn.DataNew.Entities.Game game, string gamename)
 {
     string data = string.Format("{0},:,{1},:,{2}", game.Id.ToString(), game.Version, gamename);
     Log.InfoFormat("BeginHostGame {0}",data);
     var m = new Message(new Jid("[email protected]" + Host), this.Me.JidUser, MessageType.normal, data, "hostgame");
     m.GenerateId();
     this.xmpp.Send(m);
     //m = new Message(new Jid("[email protected]" + Host), this.Me.JidUser, MessageType.normal, data, "hostgame");
     //m.GenerateId();
     //this.xmpp.Send(m);
 }
开发者ID:TriAdX,项目名称:OCTGN,代码行数:20,代码来源:Client.cs


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