Beispiel #1
0
 /// <summary>
 /// Allowed options for search_type are "by_sender", "by_recipient", "by_sender_datetime", "by_recipient_datetime".
 /// Account is then either sender or recevier, and start is either index od ISO time stamp.
 /// </summary>
 /// <param name="appId">the application id</param>
 /// <param name="searchType"></param>
 /// <param name="account"></param>
 /// <param name="start"></param>
 /// <param name="count"></param>
 /// <returns></returns>
 private ReceivedDocumentResponse GetReceivedDocuments(ulong appId,
                                                       string account, SearchType searchType, DateTime start, uint count)
 {
     try
     {
         var reqname = CSharpToCpp.GetValue(MethodBase.GetCurrentMethod().Name);
         var @params = new ArrayList {
             appId, account, searchType.GetStringValue(), start, count
         };
         var result = SendRequest(reqname, @params);
         return(JsonConvert.DeserializeObject <ReceivedDocumentResponse>(result));
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Beispiel #2
0
        /// <summary>
        /// Allowed options for search_type are "by_sender", "by_recipient", "by_sender_datetime", "by_recipient_datetime".
        /// Account is then either sender or recevier, and start is either index od ISO time stamp.
        /// </summary>
        /// <param name="appId">the application id</param>
        /// <param name="searchType"></param>
        /// <param name="account"></param>
        /// <param name="start"></param>
        /// <param name="count"></param>
        /// <returns></returns>
        private async Task <ReceivedDocumentResponse> GetReceivedDocumentsAsync(ulong appId, string account,
                                                                                SearchType searchType, DateTime start, uint count)
        {
            try
            {
                var reqname = CSharpToCpp.GetValue("GetReceivedDocuments");
                var @params = new ArrayList {
                    appId, account, searchType.GetStringValue(), start, count
                };
                var result = await SendRequestAsync(reqname, @params);

                return(JsonConvert.DeserializeObject <ReceivedDocumentResponse>(result));
            }
            catch (Exception ex)
            {
                throw;
            }
        }
Beispiel #3
0
        /// <summary>
        /// Get all app buyings by app_name or buyer
        /// </summary>
        /// <param name="buyerName">the buyers name</param>
        /// <param name="searchType">search_type One of "by_buyer", "by_app_id"</param>
        /// <param name="count">count Number of items to retrieve</param>
        public ApplicationSearchResponse GetApplicationBuyings(string buyerName, SearchType searchType, uint count)
        {
            try
            {
                var reqname = CSharpToCpp.GetValue(MethodBase.GetCurrentMethod().Name);
                var @params = new ArrayList {
                    buyerName, searchType.GetStringValue(), count
                };
                var result      = SendRequest(reqname, @params);
                var contentdata = JsonConvert.DeserializeObject <ApplicationSearchResponse>(result);

                return(contentdata);
            }
            catch (Exception ex)
            {
                throw;
            }
        }