Example #1
0
        /// <summary>
        /// Ctr. Used on producer's side, which implements synchronous or asynchronous data generation process, 
        /// to buffer and pipeline the data straight into network output stream.
        /// </summary>
        /// <param name="dataWriter">Producer's callback interface</param>
        /// <param name="holders">Optional IDisposable to enable controlled cleanup of <paramref name="dataWriter"/> and others</param>
        /// <param name="authTicket">Authentication information, including tenantId, userId etc.</param>
        /// <param name="scopeId">Scope identifier or some other key</param>
        /// <param name="protocolVersion">Version information on the sender of this message</param>
        public PqlMessage(IPqlDataWriter dataWriter, IDisposable[] holders, string authTicket, string scopeId, string protocolVersion)
            : this()
        {
            if (dataWriter == null)
            {
                throw new ArgumentNullException("dataWriter");
            }

            if (string.IsNullOrWhiteSpace(authTicket))
            {
                throw new ArgumentNullException("authTicket");
            }

            if (string.IsNullOrWhiteSpace(scopeId))
            {
                throw new ArgumentNullException("scopeId");
            }

            if (string.IsNullOrWhiteSpace(protocolVersion))
            {
                throw new ArgumentNullException("protocolVersion");
            }

            AuthTicket = authTicket;
            ScopeId = scopeId;
            ProtocolVersion = protocolVersion;

            m_dataWriter = dataWriter;
            m_holders = holders;
        }
Example #2
0
        /// <summary>
        /// Ctr. Used on producer's side, which implements synchronous or asynchronous data generation process,
        /// to buffer and pipeline the data straight into network output stream.
        /// </summary>
        /// <param name="dataWriter">Producer's callback interface</param>
        /// <param name="holders">Optional IDisposable to enable controlled cleanup of <paramref name="dataWriter"/> and others</param>
        /// <param name="authTicket">Authentication information, including tenantId, userId etc.</param>
        /// <param name="scopeId">Scope identifier or some other key</param>
        /// <param name="protocolVersion">Version information on the sender of this message</param>
        public PqlMessage(IPqlDataWriter dataWriter, IDisposable[] holders, string authTicket, string scopeId, string protocolVersion)
            : this()
        {
            if (dataWriter == null)
            {
                throw new ArgumentNullException("dataWriter");
            }

            if (string.IsNullOrWhiteSpace(authTicket))
            {
                throw new ArgumentNullException("authTicket");
            }

            if (string.IsNullOrWhiteSpace(scopeId))
            {
                throw new ArgumentNullException("scopeId");
            }

            if (string.IsNullOrWhiteSpace(protocolVersion))
            {
                throw new ArgumentNullException("protocolVersion");
            }

            AuthTicket      = authTicket;
            ScopeId         = scopeId;
            ProtocolVersion = protocolVersion;

            m_dataWriter = dataWriter;
            m_holders    = holders;
        }