/// <summary> /// Convert a message buffer into its string representation. /// </summary> /// <param name="buffer">MessageBuffer to use.</param> /// <returns></returns> public static string MessageContent(this MessageBuffer buffer) { var message = buffer.CreateMessage(); var builder = new StringBuilder(); using (var writer = XmlWriter.Create(builder)) { message.WriteMessage(writer); writer.Close(); } return builder.ToString(); }
public static void SendMessageExceptOne(this NetServer server, MessageBase msg, NetConnection except) { var om = server.CreateMessage(); msg.Write(om); SendMessageExceptOne(server, msg, except); }
public static void SendMessage(this NetServer server, MessageBase msg, NetConnection conn) { var om = server.CreateMessage(); msg.Write(om); SendMessage(server, om, conn); }
public static void SendMessage(this NetServer server, MessageBase msg) { var om = server.CreateMessage(); msg.Write(om); SendMessage(server, om); }