/// <summary> /// Initializes a new instance of the <see cref="SolidsoftReply.Esb.Libraries.Resolution.StepTrackPointsByType"/> class. /// </summary> /// <param name="type">The track point type.</param> /// <param name="bamActivityStep">The BAM activity step.</param> public StepTrackPointsByType(TrackPointType type, BamActivityStep bamActivityStep) { this.ActivityName = bamActivityStep.ActivityName; this.StepName = bamActivityStep.StepName; this.ExtendedStepName = bamActivityStep.ExtendedStepName; this.TrackPointType = type; this.TrackPoints = (from TrackPoint tp in bamActivityStep.TrackPoints where tp.Type == type select tp).ToList(); }
/// <summary> /// Inserts a cache entry into the Site Location cache, specifying information about /// how the entry will be evicted. /// </summary> /// <param name="key"> /// A unique identifier for the cache entry. /// </param> /// <param name="bamActivityStep"> /// The BAM activity step insert. /// </param> /// <param name="policy"> /// An object that contains eviction details for the cache entry. /// This object provides more options for eviction than a simple absolute expiration. /// </param> /// <returns> /// true if insertion succeeded, or false if there is an already an entry /// in the cache that has the same key as item. /// </returns> internal bool Add(string key, BamActivityStep bamActivityStep, CacheItemPolicy policy) { if (policy.SlidingExpiration.Ticks == 0 && policy.AbsoluteExpiration == DateTime.MinValue) { return(true); } Func <DirectiveCacheItem> addDirectiveCacheItem = () => new DirectiveCacheItem { KeyName = key, BamActivityStep = bamActivityStep }; // Add the site location to the cache. return(this.Add( key, addDirectiveCacheItem, policy)); }