|
using System;
using ZED.Utility.Development;
/// <summary>
/// clsSpeedTestAB_Properties - Speed test Property versus direct field access.
/// </summary>
/// <overview>
/// </overview>
/// <remarks>
/// </remarks>
/// <notes>
/// </notes>
public class clsSpeedTestAB_Properties : clsBaseSpeedTestAB
{
protected int f_SomeInteger;
/// <summary>
/// Construct a new speed test with prescribed repetitions.
/// </summary>
/// <param name="aRepetitions"></param>
/// <remarks></remarks>
public clsSpeedTestAB_Properties(int aRepetitions) : base(aRepetitions)
{
this.f_SomeInteger = 0x1e240;
}
/// <summary>
/// Overriden speed test A setup.
/// </summary>
/// <remarks></remarks>
protected override void SetUpTestA()
{
base.f_DescribeA = "Access a public field directly.";
}
/// <summary>
/// Overriden speed test A setup.
/// </summary>
/// <remarks></remarks>
protected override void SetUpTestB()
{
base.f_DescribeB = "Access a field via a property.";
}
/// <summary>
/// Overridden Speed Test A.
/// </summary>
/// <remarks></remarks>
protected override void SpeedTestA()
{
int xInt = this.f_SomeInteger;
}
/// <summary>
/// Overridden Speed Test B.
/// </summary>
/// <remarks></remarks>
protected override void SpeedTestB()
{
int xInt = this.SomeInteger;
}
public int SomeInteger
{
get
{
return this.f_SomeInteger;
}
set
{
this.f_SomeInteger = value;
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.