Merge branch 'master' of github.com:alcexhim/MBS.Framework

This commit is contained in:
Michael Becker 2022-03-10 16:34:36 -05:00
parent 460250b7ad
commit 36115d61fa
No known key found for this signature in database
GPG Key ID: A379FD753DD913D6
3 changed files with 51 additions and 3 deletions

View File

@ -7,7 +7,7 @@
<OutputType>Library</OutputType>
<RootNamespace>MBS.Framework.Console</RootNamespace>
<AssemblyName>MBS.Framework.CLI</AssemblyName>
<ReleaseVersion>4.0.2019.12</ReleaseVersion>
<ReleaseVersion>1.0.*</ReleaseVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>

View File

@ -11,7 +11,7 @@
<SchemaVersion>2.0</SchemaVersion>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\Production.snk</AssemblyOriginatorKeyFile>
<ReleaseVersion>4.0.2021.01</ReleaseVersion>
<ReleaseVersion>4.0.2021.12</ReleaseVersion>
<SynchReleaseVersion>false</SynchReleaseVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@ -127,6 +127,7 @@
<Compile Include="EventFilter.cs" />
<Compile Include="EventFilterType.cs" />
<Compile Include="EventFilterDelegate.cs" />
<Compile Include="NativeHandle.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="Logic\" />

View File

@ -0,0 +1,47 @@
using System;
namespace MBS.Framework
{
public class NativeHandle
{
}
public class NativeHandle<THandle> : NativeHandle
{
public THandle Handle { get; private set; }
public NativeHandle(THandle handle)
{
Handle = handle;
}
public override int GetHashCode()
{
return Handle.GetHashCode();
}
public override bool Equals(object obj)
{
if ((object)obj == null && (object)this == null)
return true;
if ((object)obj == null || (object)this == null)
return false;
if (obj is NativeHandle<THandle>)
return Equals(obj as NativeHandle<THandle>);
return false;
}
public static bool operator ==(NativeHandle<THandle> left, NativeHandle<THandle> right)
{
if ((object)left == null && (object)right == null)
return true;
if ((object)left == null || (object)right == null)
return false;
return left.Equals(right);
}
public static bool operator !=(NativeHandle<THandle> left, NativeHandle<THandle> right)
{
return !left.Equals(right);
}
}
}