This commit is contained in:
Jordan Wages 2019-11-08 03:27:55 -06:00
parent ab85fea44d
commit ccd6149d83
4 changed files with 160 additions and 0 deletions

27
AssemblyInfo.cs Normal file
View File

@ -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("")]

89
Locked.cs Normal file
View File

@ -0,0 +1,89 @@
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
}
}

39
PingPong.Generic.csproj Normal file
View File

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>10.0.0</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{630BDE02-B1C2-4D9F-8BFB-4FCAF128BE14}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>PingPong.Generic</RootNamespace>
<AssemblyName>PingPong.Generic</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
</ItemGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="Locked.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>

5
desktop.ini Normal file
View File

@ -0,0 +1,5 @@
[.ShellClassInfo]
InfoTip=This folder is shared online.
IconFile=C:\Program Files\Google\Drive\googledrivesync.exe
IconIndex=16