mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-21 01:25:42 -05:00
Move unused forked code to external directory (#1192)
* Move unused forked code to external directory * Fix SLN build errors * Add back resource provider core since it's referenced by main resource provider project * Update PackageProjects step of pipeline
This commit is contained in:
36
external/Microsoft.SqlTools.CoreServices/Connection/CancelTokenKey.cs
vendored
Normal file
36
external/Microsoft.SqlTools.CoreServices/Connection/CancelTokenKey.cs
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.SqlTools.DataProtocol.Contracts.Connection;
|
||||
|
||||
namespace Microsoft.SqlTools.CoreServices.Connection
|
||||
{
|
||||
/// <summary>
|
||||
/// Used to uniquely identify a CancellationTokenSource associated with both
|
||||
/// a string URI and a string connection type.
|
||||
/// </summary>
|
||||
public class CancelTokenKey : CancelConnectParams, IEquatable<CancelTokenKey>
|
||||
{
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
CancelTokenKey other = obj as CancelTokenKey;
|
||||
if (other == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return other.OwnerUri == OwnerUri && other.Type == Type;
|
||||
}
|
||||
|
||||
public bool Equals(CancelTokenKey obj)
|
||||
{
|
||||
return obj.OwnerUri == OwnerUri && obj.Type == Type;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return OwnerUri.GetHashCode() ^ Type.GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user