/// <summary>
 /// Collects data from the point when <see cref="CollectDataOnInterval"/> is called till returned object is disposed
 /// This call create test scope automatically, there is no need to call <see cref="dotMemoryUnit.TestScope"/> when use <see cref="CollectDataOnInterval"/>
 /// </summary>
 /// <param name="collectAllocations">Set collectAllocations to true in order to obtain information about memory traffic</param>
 /// <returns>Instance of <see cref="TimeInterval"/> type used to get memory data</returns>
 public static TimeInterval CollectDataOnInterval(bool collectAllocations)
 {
     DotMemoryUnitController.TestStart();
     return(new TimeInterval(collectAllocations));
 }
 private DotMemoryUnit()
 {
     DotMemoryUnitController.TestStart();
 }
 public Controller(bool collectAllocations)
 {
     DotMemoryUnitController.TestStart();
     dotMemoryApi.CollectAllocations = collectAllocations;
 }