示例#1
0
		/// <summary>
		/// Initializes a new instance of the <see cref="PublishTransportListener"/> class.
		/// </summary>
		/// <param name="session">The Bayeux client session.</param>
		public PublishTransportListener(BayeuxClient session)
		{
			if (null == session)
				throw new ArgumentNullException("session");

			_session = session;
		}
		/// <summary>
		/// Initializes a new instance of the <see cref="BayeuxClientChannel"/> class
		/// with the specified <see cref="ChannelId"/>.
		/// </summary>
		public BayeuxClientChannel(BayeuxClient session, ChannelId channelId)
			: base(channelId)
		{
			if (null == session)
				throw new ArgumentNullException("session");

			_bayeuxClient = session;
		}
示例#3
0
		/// <summary>
		/// Initializes a new instance of the <see cref="DisconnectTransportListener"/> class.
		/// </summary>
		public DisconnectTransportListener(BayeuxClient session) : base(session) { }
示例#4
0
		/// <summary>
		/// Initializes a new instance of the <see cref="DisconnectingState"/> class
		/// for the specified <paramref name="clientId"/>.
		/// </summary>
		public DisconnectingState(BayeuxClient session, ClientTransport transport, string clientId)
			: base(session, BayeuxClientStates.Disconnecting, null, null, transport, clientId, 0) { }
示例#5
0
		/// <summary>
		/// Initializes a new instance of the <see cref="HandshakeTransportListener"/> class.
		/// </summary>
		public HandshakeTransportListener(BayeuxClient session) : base(session) { }
示例#6
0
		/// <summary>
		/// Initializes a new instance of the <see cref="ConnectedState"/> class
		/// with the specified handshaking message template: <paramref name="handshakeFields"/>,
		/// and the last received information from a Bayeux server like: <paramref name="advice"/>, <paramref name="clientId"/>.
		/// </summary>
		public ConnectedState(
			BayeuxClient session,
			IDictionary<string, object> handshakeFields,
			IDictionary<string, object> advice,
			ClientTransport transport,
			string clientId)
			: base(session, BayeuxClientStates.Connected, handshakeFields, advice, transport, clientId, 0)
		{
		}
示例#7
0
		/// <summary>
		/// Initializes a new instance of the <see cref="UnconnectedState"/> class
		/// with the specified handshaking message template: <paramref name="handshakeFields"/>,
		/// and the last received information from a Bayeux server like: <paramref name="advice"/>, <paramref name="clientId"/>.
		/// </summary>
		public UnconnectedState(
			BayeuxClient session,
			IDictionary<string, object> handshakeFields,
			IDictionary<string, object> advice,
			ClientTransport transport,
			string clientId,
			long backOff)
			: base(session, BayeuxClientStates.Unconnected, handshakeFields, advice, transport, clientId, backOff)
		{
		}
示例#8
0
		/// <summary>
		/// Initializes a new instance of the <see cref="ReHandshakingState"/> class
		/// with the specified handshaking message template: <paramref name="handshakeFields"/>.
		/// </summary>
		public ReHandshakingState(
			BayeuxClient session,
			IDictionary<string, object> handshakeFields,
			ClientTransport transport,
			long backOff)
			: base(session, BayeuxClientStates.ReHandshaking, handshakeFields, null, transport, null, backOff)
		{
		}
示例#9
0
		/// <summary>
		/// Initializes a new instance of the <see cref="HandshakingState"/> class
		/// with the specified handshaking message template: <paramref name="handshakeFields"/>.
		/// </summary>
		public HandshakingState(
			BayeuxClient session,
			IDictionary<string, object> handshakeFields,
			ClientTransport transport)
			: base(session, BayeuxClientStates.Handshaking, handshakeFields, null, transport, null, 0)
		{
		}
示例#10
0
		/// <summary>
		/// Initializes a new instance of the <see cref="AbortedState"/> class.
		/// </summary>
		public AbortedState(BayeuxClient session, ClientTransport transport)
			: base(session, transport) { }
示例#11
0
		/// <summary>
		/// Initializes a new instance of the <see cref="DisconnectedState"/> class.
		/// </summary>
		public DisconnectedState(BayeuxClient session, ClientTransport transport)
			: base(session, BayeuxClientStates.Disconnected, null, null, transport, null, 0)
		{
		}
示例#12
0
		/// <summary>
		/// Initializes a new instance of the <see cref="BayeuxClientState"/> class
		/// with the specified <see cref="BayeuxClientStates"/> type.
		/// </summary>
		protected BayeuxClientState(
			BayeuxClient session,
			BayeuxClientStates type,
			IDictionary<string, object> handshakeFields,
			IDictionary<string, object> advice,
			ClientTransport transport,
			string clientId,
			long backOff)
		{
			if (session == null)
				throw new ArgumentNullException("session");
			if (type == BayeuxClientStates.None)
				throw new ArgumentOutOfRangeException("type");
			if (transport == null)
				throw new ArgumentNullException("transport");

			_session = session;

			_type = type;
			_handshakeFields = handshakeFields;
			_advice = advice;
			_transport = transport;
			_clientId = clientId;
			_backOff = backOff;
		}