Beispiel #1
0
 public static void LeaveChat(this ChatHost host, Guid sessionId, ISquiggleEndPoint sender, ISquiggleEndPoint recipient)
 {
     host.Send(new ChatLeaveMessage()
     {
         SessionId = sessionId, Sender = new SquiggleEndPoint(sender), Recipient = new SquiggleEndPoint(recipient)
     });
 }
Beispiel #2
0
 public static void UserIsTyping(this ChatHost host, Guid sessionId, ISquiggleEndPoint sender, ISquiggleEndPoint recipient)
 {
     host.Send(new UserTypingMessage()
     {
         SessionId = sessionId, Sender = new SquiggleEndPoint(sender), Recipient = new SquiggleEndPoint(recipient)
     });
 }
Beispiel #3
0
 public static void ReceiveChatInvite(this ChatHost host, Guid sessionId, ISquiggleEndPoint sender, ISquiggleEndPoint recipient, IEnumerable <ISquiggleEndPoint> participants)
 {
     host.Send(new ChatInviteMessage()
     {
         SessionId = sessionId, Sender = new SquiggleEndPoint(sender), Recipient = new SquiggleEndPoint(recipient), Participants = participants.Select(p => new SquiggleEndPoint(p)).ToList()
     });
 }
Beispiel #4
0
 public static void ReceiveSessionInfo(this ChatHost host, Guid sessionId, ISquiggleEndPoint sender, ISquiggleEndPoint recipient, ISquiggleEndPoint[] participants)
 {
     host.Send(new SessionInfoMessage()
     {
         SessionId = sessionId, Sender = new SquiggleEndPoint(sender), Recipient = new SquiggleEndPoint(recipient), Participants = participants.Select(p => new SquiggleEndPoint(p)).ToList()
     });
 }
Beispiel #5
0
 public static void CancelActivitySession(this ChatHost host, Guid activitySessionId, ISquiggleEndPoint sender, ISquiggleEndPoint recipient)
 {
     host.Send(new ActivityCancelMessage()
     {
         SessionId = activitySessionId, Sender = new SquiggleEndPoint(sender), Recipient = new SquiggleEndPoint(recipient)
     });
 }
Beispiel #6
0
 public static void ReceiveActivityData(this ChatHost host, Guid activitySessionId, ISquiggleEndPoint sender, ISquiggleEndPoint recipient, byte[] chunk)
 {
     host.Send(new ActivityDataMessage()
     {
         SessionId = activitySessionId, Sender = new SquiggleEndPoint(sender), Recipient = new SquiggleEndPoint(recipient), Data = chunk
     });
 }
Beispiel #7
0
 public static void GetSessionInfo(this ChatHost host, Guid sessionId, ISquiggleEndPoint sender, ISquiggleEndPoint recipient)
 {
     host.Send(new GiveSessionInfoMessage()
     {
         SessionId = sessionId, Sender = new SquiggleEndPoint(sender), Recipient = new SquiggleEndPoint(recipient)
     });
 }
Beispiel #8
0
 public static void ReceiveActivityInvite(this ChatHost host, Guid sessionId, ISquiggleEndPoint sender, ISquiggleEndPoint recipient, Guid activityId, Guid activitySessionId, IEnumerable <KeyValuePair <string, string> > metadata)
 {
     host.Send(new ActivityInviteMessage()
     {
         SessionId = sessionId, Sender = new SquiggleEndPoint(sender), Recipient = new SquiggleEndPoint(recipient), ActivityId = activityId, ActivitySessionId = activitySessionId, Metadata = metadata.ToDictionary(kv => kv.Key, kv => kv.Value)
     });
 }
Beispiel #9
0
 public static void UpdateMessage(this ChatHost host, Guid messageId, Guid sessionId, ISquiggleEndPoint sender, ISquiggleEndPoint recipient, string message)
 {
     host.Send(new UpdateTextMessage()
     {
         Id        = messageId,
         SessionId = sessionId,
         Sender    = new SquiggleEndPoint(sender),
         Recipient = new SquiggleEndPoint(recipient),
         Message   = message
     });
 }
Beispiel #10
0
 public static void ReceiveMessage(this ChatHost host, Guid messageId, Guid sessionId, ISquiggleEndPoint sender, ISquiggleEndPoint recipient, string fontName, int fontSize, Color color, FontStyle fontStyle, string message)
 {
     host.Send(new TextMessage()
     {
         Id        = messageId,
         SessionId = sessionId,
         Sender    = new SquiggleEndPoint(sender),
         Recipient = new SquiggleEndPoint(recipient),
         FontName  = fontName,
         FontSize  = fontSize,
         Color     = color,
         FontStyle = fontStyle,
         Message   = message
     });
 }