Exemplo n.º 1
0
        /// <summary>
        /// Cache item execution context
        /// </summary>
        /// <param name="executionContext">Execution context</param>
        /// <returns>Cache item</returns>
        public AnalysisDataSourceCacheItem CacheItemForExecutionContext(AnalysisExecutionContext executionContext)
        {
            foreach (AnalysisDataSourceCacheItem item in this.cache)
            {
                if (item.ExecutionContext == executionContext)
                {
                    return(item);
                }
            }

            return(null);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Cache item execution context result
        /// </summary>
        /// <param name="executionContext">Execution context</param>
        /// <param name="result">Result</param>
        public void AddCacheItemWithExecutionContextResult(AnalysisExecutionContext executionContext, ICrmDataSource result)
        {
            AnalysisDataSourceCacheItem cacheItem = new AnalysisDataSourceCacheItem(result, executionContext);

            this.AddCacheItem(cacheItem);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AnalysisDataSourceCacheItem"/> class.
 /// </summary>
 /// <param name="dataSource">Data source</param>
 /// <param name="executionContext">Execution context</param>
 public AnalysisDataSourceCacheItem(ICrmDataSource dataSource, AnalysisExecutionContext executionContext)
 {
     this.DataSource       = dataSource;
     this.ExecutionContext = executionContext;
 }