예제 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:System.Object" /> class.
 /// </summary>
 /// <param name="pipe">The Pipe this joins the feed to</param>
 /// <param name="feedHref">The feed href for identifying the feed</param>
 /// <param name="address">The address pattern to match this join against.</param>
 public Join(Pipe pipe, Uri feedHref, Address address)
 {
     Address = address;
     FeedHref = feedHref;
     Pipe = pipe;
     Type = JoinType.Default;
     Name = new Name(Guid.NewGuid().ToString());
     Href = new Uri(string.Format(JOIN_URI_FORMAT, Globals.HostName, Name.Value));
     Id = new Identity(Name.Value);
     Version = new AggregateVersion(0);
 }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Pipe"/> class.
 /// </summary>
 /// <param name="identity">The identity.</param>
 /// <param name="pipeType">Type of the pipe.</param>
 /// <param name="title">The title.</param>
 public Pipe(Identity identity, PipeType pipeType, Title title = null)
 {
     Id = identity;
     Title = title;
     Name = new Name(Id.Value);
     Type = pipeType;
     Href = new Uri(string.Format(PIPE_URI_FORMAT, Globals.HostName, identity.Value));
 }
예제 #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Pipe"/> class.
        /// </summary>
        /// <param name="identity">The identity.</param>
        /// <param name="pipeType">Type of the pipe.</param>
        /// <param name="title">The title.</param>
        public Pipe(string identity, string pipeType, string title = null)
        {
            Id = new Identity(identity);
            Title = new Title(title);
            Name = new Name(Id.Value);
            if (!string.IsNullOrEmpty(pipeType))
                Type = (PipeType)Enum.Parse(typeof(PipeType), pipeType);
            else
                Type = PipeType.Default;

            Href = new Uri(string.Format(PIPE_URI_FORMAT, Globals.HostName, Name.Value));
        }
예제 #4
0
 /// <summary>
 /// Adds the pipe.
 /// </summary>
 /// <param name="id">The identifier.</param>
 public void AddPipe(Identity id)
 {
     _pipes.Add(id);
 }
예제 #5
0
 /// <summary>
 /// Removes the feed.
 /// </summary>
 /// <param name="identity">The identity.</param>
 public void RemoveFeed(Identity identity)
 {
     _feeds.RemoveWhere(feed => feed == identity);
 }
예제 #6
0
 /// <summary>
 /// Adds the feed.
 /// </summary>
 /// <param name="id">The identifier.</param>
 public void AddFeed(Identity id)
 {
     _feeds.Add(id);
 }