mirror of
https://github.com/actions/runner.git
synced 2025-12-28 12:27:48 +08:00
GitHub Actions Runner
This commit is contained in:
54
src/Sdk/DTWebApi/WebApi/MaskHint.cs
Normal file
54
src/Sdk/DTWebApi/WebApi/MaskHint.cs
Normal file
@@ -0,0 +1,54 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace GitHub.DistributedTask.WebApi
|
||||
{
|
||||
[DataContract]
|
||||
public class MaskHint
|
||||
{
|
||||
public MaskHint()
|
||||
{
|
||||
}
|
||||
|
||||
private MaskHint(MaskHint maskHintToBeCloned)
|
||||
{
|
||||
this.Type = maskHintToBeCloned.Type;
|
||||
this.Value = maskHintToBeCloned.Value;
|
||||
}
|
||||
|
||||
public MaskHint Clone()
|
||||
{
|
||||
return new MaskHint(this);
|
||||
}
|
||||
|
||||
[DataMember]
|
||||
public MaskType Type
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[DataMember]
|
||||
public String Value
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public override Boolean Equals(Object obj)
|
||||
{
|
||||
var otherHint = obj as MaskHint;
|
||||
if (otherHint != null)
|
||||
{
|
||||
return this.Type == otherHint.Type && String.Equals(this.Value ?? String.Empty, otherHint.Value ?? String.Empty, StringComparison.Ordinal);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override Int32 GetHashCode()
|
||||
{
|
||||
return this.Type.GetHashCode() ^ (this.Value ?? String.Empty).GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user