Delete 'Locked.cs'

This commit is contained in:
Jordan Wages 2019-11-08 03:30:08 -06:00
parent 264293f968
commit dfeedc9702

View file

@ -1,89 +0,0 @@
using System;
namespace PingPong.Generic
{
public class Locked<T>
{
#region Members
/// <summary>
/// The lock object.
/// </summary>
private object lockObject;
/// <summary>
/// The value.
/// </summary>
private T value;
/// <summary>
/// The is locked.
/// </summary>
private bool isLocked;
#endregion
#region Properties
/// <summary>
/// Gets or sets the value.
/// </summary>
/// <value>
/// The value.
/// </value>
public T Value
{
get
{
return this.value;
}
set
{
lock (this.lockObject)
{
this.isLocked = true;
this.value = value;
this.isLocked = false;
}
}
}
/// <summary>
/// Gets a value indicating whether this instance is locked.
/// </summary>
/// <value>
/// <c>true</c> if this instance is locked; otherwise, <c>false</c>.
/// </value>
public bool IsLocked
{
get
{
return this.isLocked;
}
}
#endregion
#region Constructors
/// <summary>
/// Initializes a new instance of the <see cref="PingPong.Generic.Locked`1"/> class.
/// </summary>
public Locked()
{
this.value = default(T);
}
/// <summary>
/// Initializes a new instance of the <see cref="PingPong.Generic.Locked`1"/> class.
/// </summary>
/// <param name='value'>
/// Value.
/// </param>
public Locked(T value)
{
this.value = value;
}
#endregion
}
}