Subscription.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Security;
  6. namespace WindowsPhone.Recipes.Push.Server.Models
  7. {
  8. /// <summary>
  9. /// Represents user subscription.
  10. /// </summary>
  11. public class Subscription
  12. {
  13. /// <summary>
  14. /// Gets the user name.
  15. /// </summary>
  16. public string UserName { get; private set; }
  17. /// <summary>
  18. /// Gets the notification channel uri.
  19. /// </summary>
  20. public Uri ChannelUri { get; private set; }
  21. /// <summary>
  22. /// Initialize a new instance of this type.
  23. /// </summary>
  24. public Subscription(string userName, Uri channelUri)
  25. {
  26. UserName = userName;
  27. ChannelUri = channelUri;
  28. }
  29. /// <summary>
  30. /// Initialize a new instance of this type.
  31. /// </summary>
  32. public Subscription(string userName, string channelUri)
  33. : this (userName, new Uri(channelUri, UriKind.Absolute))
  34. {
  35. }
  36. }
  37. }