Пример #1
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="answers"></param>
 /// <param name="billingRef">This parameter lets you specify information that will be included in usage logs for this call. For example, you can use a string to uniquely identify the end user that initiated the request and/or the context in which the call was made. When you review usage logs, you can then see which end users initiated each request. That information could then be used to pass costs on to those end users if desired.</param>
 /// <returns></returns>
 protected internal abstract BinaryObject GetAnswersImpl(
     BinaryObject[] answers,
     string billingRef);
Пример #2
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="answers">An array of answers as binary objects, which will be overlayed successively to produce a single <c>BinaryObject</c>.</param>
        /// <param name="billingRef">This parameter lets you specify information that will be included in usage logs for this call. For example, you can use a string to uniquely identify the end user that initiated the request and/or the context in which the call was made. When you review usage logs, you can then see which end users initiated each request. That information could then be used to pass costs on to those end users if desired.</param>
        /// <returns></returns>
        protected internal override BinaryObject GetAnswersImpl(BinaryObject[] answers, string billingRef)
        {
            DateTime timestamp = DateTime.UtcNow;

            string hmac = HMAC.CalculateHMAC(
                SigningKey,
                timestamp,
                SubscriberId,
                billingRef);

            return _proxy.GetAnswers(
                SubscriberId,
                answers.ToArray(),
                billingRef,
                timestamp,
                hmac);
        }
Пример #3
0
 /// <summary>
 /// Combines the provided answersets to form an aggregate answerset.
 /// </summary>
 /// <param name="answers">The answers to use with the request.</param>
 /// <param name="billingRef">This parameter lets you specify information that will be included in usage logs for this call. For example, you can use a string to uniquely identify the end user that initiated the request and/or the context in which the call was made. When you review usage logs, you can then see which end users initiated each request. That information could then be used to pass costs on to those end users if desired.</param>
 /// <returns>A <c>BinaryObject</c> containing the aggregated answers.</returns>
 public BinaryObject GetAnswers(BinaryObject[] answers, string billingRef=null)
 {
     return GetAnswersImpl(answers, billingRef);
 }
Пример #4
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="answers"></param>
 /// <param name="billingRef">This parameter lets you specify information that will be included in usage logs for this call. For example, you can use a string to uniquely identify the end user that initiated the request and/or the context in which the call was made. When you review usage logs, you can then see which end users initiated each request. That information could then be used to pass costs on to those end users if desired.</param>
 /// <returns></returns>
 protected internal override BinaryObject GetAnswersImpl(BinaryObject[] answers, string billingRef)
 {
     throw new NotImplementedException(); // The REST client does not support GetAnswers.
 }