SystemProfilerTests ProfilingWhenInactiveDoesNothing Method Delta Engine Documentation

Namespace: DeltaEngine.Profiling.Tests
Assembly: DeltaEngine.Profiling.Tests (in DeltaEngine.Profiling.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void ProfilingWhenInactiveDoesNothing()
Examples

[Test, CloseAfterFirstFrame]
public void ProfilingWhenInactiveDoesNothing()
{
    int count = 0;
    var profiler = new SystemProfiler { IsActive = false };
    profiler.Updated += () => count++;
    profiler.Log(ProfilingMode.Fps, systemInformation);
    Assert.AreEqual(0, profiler.GetProfilingResults(ProfilingMode.Fps).Calls);
    Assert.AreEqual(0, count);
}
See Also