示例#1
0
        public void CanSetBeaconCacheLowerMemoryBoundaryForDynatrace()
        {
            // given
            var        target = new DynatraceOpenKitBuilder(Endpoint, AppID, DeviceID);
            const long lowerMemoryBoundary = 42L * 1024L;

            // when
            var obtained = target.WithBeaconCacheLowerMemoryBoundary(lowerMemoryBoundary);
            var config   = target.BuildConfiguration().BeaconCacheConfig;

            // then
            Assert.That(obtained, Is.InstanceOf <DynatraceOpenKitBuilder>());
            Assert.That((DynatraceOpenKitBuilder)obtained, Is.SameAs(target));
            Assert.That(config.CacheSizeLowerBound, Is.EqualTo(lowerMemoryBoundary));
        }
 /// <summary>
 /// Sets the lower memory boundary of the beacon cache.
 ///
 /// When this is set to a positive value the memory based eviction strategy clears the collected data,
 /// until the data size in the cache falls below the configured limit.
 ///
 /// </summary>
 /// <param name="lowerMemoryBoundary">The lower boundary of the beacon cache or negative if unlimited.</param>
 /// <returns><code>this</code></returns>
 public DynatraceOpenKitBuilderVB WithBeaconCacheLowerMemoryBoundary(long lowerMemoryBoundary)
 {
     wrappedBuilder.WithBeaconCacheLowerMemoryBoundary(lowerMemoryBoundary);
     return(this);
 }