void EnsurePropertyValid()
{
if (this.StartPoint < 0)
{
throw new ArgumentOutOfRangeException(
"StartPoint cannot be less then 0. ");
}
if (this.EndPoint < this.StartPoint)
{
throw new ArgumentOutOfRangeException(
"EndPoint cannot be less then StartPoint ");
}
if (this.BufferSize < 0)
{
throw new ArgumentOutOfRangeException(
"BufferSize cannot be less then 0. ");
}
if (this.MaxCacheSize < this.BufferSize)
{
throw new ArgumentOutOfRangeException(
"MaxCacheSize cannot be less then BufferSize ");
}
if (this.BufferCountPerNotification <= 0)
{
throw new ArgumentOutOfRangeException(
"BufferCountPerNotification cannot be less then 0. ");
}
if (this.MaxThreadCount < 1)
{
throw new ArgumentOutOfRangeException(
"maxThreadCount cannot be less than 1. ");
}
}