Universe.Modules.Currency.BaseCurrencyConnector.GetGroupTransactions C# (CSharp) Méthode

GetGroupTransactions() private méthode

private GetGroupTransactions ( UUID groupID, UUID fromAgentID, int currentInterval, int intervalDays ) : List
groupID UUID
fromAgentID UUID
currentInterval int
intervalDays int
Résultat List
        public List<GroupAccountHistory> GetGroupTransactions(UUID groupID, UUID fromAgentID,
            int currentInterval, int intervalDays)
        {
            //return new List<GroupAccountHistory>();
            object remoteValue = DoRemoteByURL("CurrencyServerURI", groupID, fromAgentID, currentInterval, intervalDays);
            if (remoteValue != null || m_doRemoteOnly)
                return (List<GroupAccountHistory>) remoteValue;

            QueryFilter filter = new QueryFilter();

            if (groupID != UUID.Zero)
                filter.andFilters["GroupID"] = groupID;
            if (fromAgentID != UUID.Zero)
                filter.andFilters["AgentID"] = fromAgentID;

            // calculate interval dates
            var dStart = DateTime.Now.AddDays(-currentInterval*intervalDays);
            var dEnd = dStart.AddDays (intervalDays);

            // back to UTC please...
            var dateStart = dStart.ToUniversalTime ();
            var dateEnd = dEnd.ToUniversalTime ();

            filter.andGreaterThanEqFilters["Created"] = Utils.DateTimeToUnixTime(dateStart);    // from...
            filter.andLessThanEqFilters["Created"] = Utils.DateTimeToUnixTime(dateEnd);         //...to

            Dictionary<string, bool> sort = new Dictionary<string, bool>(1);
            sort["Created"] = false;        // descending order

            List<string> query = GD.Query (new string[] { "*" }, _GROUPREALMHISTORY, filter, sort, null, null);

            return ParseGroupTransferQuery(query);
        }

Usage Example

 public List <GroupAccountHistory> GetGroupTransactions(UUID groupID, UUID agentID, int currentInterval,
                                                        int intervalDays)
 {
     return(m_connector.GetGroupTransactions(groupID, agentID, currentInterval, intervalDays));
 }