This repository has been archived by the owner on Jul 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Christian Lang
committed
Jul 15, 2013
1 parent
c9aa5cb
commit c781bc8
Showing
5 changed files
with
36 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,28 @@ | ||
using System.Runtime.Serialization; | ||
using System; | ||
using System.Runtime.Serialization; | ||
|
||
namespace Pusher.Events | ||
{ | ||
[DataContract] | ||
public class SubscribeEvent : Event<SubscribeEventArgs> | ||
public class SubscribeEvent : IEvent | ||
{ | ||
public SubscribeEvent(string channel) | ||
{ | ||
EventName = Pusher.EventSubscribe; | ||
DataObject = new SubscribeEventArgs { Channel = channel }; | ||
DataObject = new SubscribeEventArgs { Channel = channel }; | ||
} | ||
|
||
[DataMember(Name = "event")] | ||
public string EventName { get; set; } | ||
|
||
public string Channel { get; set; } | ||
|
||
public Type GetDataType() | ||
{ | ||
return typeof (SubscribeEventArgs); | ||
} | ||
|
||
[DataMember(Name = "data")] | ||
public SubscribeEventArgs DataObject { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System; | ||
using System.Runtime.Serialization; | ||
|
||
namespace Pusher | ||
{ | ||
public interface IEvent | ||
{ | ||
[DataMember(Name = "event")] | ||
string EventName { get; set; } | ||
|
||
[DataMember(Name = "channel", EmitDefaultValue = false, IsRequired = false)] | ||
string Channel { get; set; } | ||
|
||
Type GetDataType(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters