CodeProfilerTests 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]
public void ProfilingWhenInactiveDoesNothing()
{
    var profiler = new CodeProfiler { IsActive = false };
    profiler.BeginFrame();
    profiler.Start(ProfilingMode.Rendering, Section);
    profiler.Stop(ProfilingMode.Rendering, Section);
    profiler.EndFrame();
    Assert.AreEqual(0, profiler.Sections[(int)ProfilingMode.Rendering].Count);
}
See Also