diff --git a/AssemblyInfo.cs b/AssemblyInfo.cs new file mode 100644 index 0000000..2283ae2 --- /dev/null +++ b/AssemblyInfo.cs @@ -0,0 +1,27 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// Information about this assembly is defined by the following attributes. +// Change them to the values specific to your project. + +[assembly: AssemblyTitle("PingPong.Generic")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("wagesj45")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". +// The form "{Major}.{Minor}.*" will automatically update the build and revision, +// and "{Major}.{Minor}.{Build}.*" will update just the revision. + +[assembly: AssemblyVersion("1.0.*")] + +// The following attributes are used to specify the signing key for the assembly, +// if desired. See the Mono documentation for more information about signing. + +//[assembly: AssemblyDelaySign(false)] +//[assembly: AssemblyKeyFile("")] + diff --git a/Locked.cs b/Locked.cs new file mode 100644 index 0000000..f350a32 --- /dev/null +++ b/Locked.cs @@ -0,0 +1,89 @@ +using System; +namespace PingPong.Generic +{ + + public class Locked + { + #region Members + + /// + /// The lock object. + /// + private object lockObject; + /// + /// The value. + /// + private T value; + /// + /// The is locked. + /// + private bool isLocked; + + #endregion + + #region Properties + + /// + /// Gets or sets the value. + /// + /// + /// The value. + /// + public T Value + { + get + { + return this.value; + } + set + { + lock (this.lockObject) + { + this.isLocked = true; + this.value = value; + this.isLocked = false; + } + } + } + + /// + /// Gets a value indicating whether this instance is locked. + /// + /// + /// true if this instance is locked; otherwise, false. + /// + public bool IsLocked + { + get + { + return this.isLocked; + } + } + + #endregion + + #region Constructors + + /// + /// Initializes a new instance of the class. + /// + public Locked() + { + this.value = default(T); + } + + /// + /// Initializes a new instance of the class. + /// + /// + /// Value. + /// + public Locked(T value) + { + this.value = value; + } + + #endregion + } +} + diff --git a/PingPong.Generic.csproj b/PingPong.Generic.csproj new file mode 100644 index 0000000..5d620ad --- /dev/null +++ b/PingPong.Generic.csproj @@ -0,0 +1,39 @@ + + + + Debug + AnyCPU + 10.0.0 + 2.0 + {630BDE02-B1C2-4D9F-8BFB-4FCAF128BE14} + Library + PingPong.Generic + PingPong.Generic + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + + + none + true + bin\Release + prompt + 4 + false + + + + + + + + + + \ No newline at end of file diff --git a/desktop.ini b/desktop.ini new file mode 100644 index 0000000..ff62497 --- /dev/null +++ b/desktop.ini @@ -0,0 +1,5 @@ +[.ShellClassInfo] +InfoTip=This folder is shared online. +IconFile=C:\Program Files\Google\Drive\googledrivesync.exe +IconIndex=16 + \ No newline at end of file