Implement BakaBT, change Console to not build as x64, Add test framework

This commit is contained in:
KZ
2015-07-26 00:51:55 +01:00
parent 2673d5a796
commit a2ce89d2da
25 changed files with 2395 additions and 70 deletions

View File

@@ -19,6 +19,56 @@ namespace Jackett.Utils.Clients
public string Cookies { get; set; }
public string Referer { get; set; }
public RequestType Type { get; set; }
public override bool Equals(System.Object obj)
{
if(obj is WebRequest)
{
var other = obj as WebRequest;
var postDataSame = PostData == null && other.PostData == null;
if (!postDataSame)
{
if (!(PostData == null || other.PostData == null))
{
var ok = PostData.Count == other.PostData.Count;
foreach(var i in PostData)
{
if (!other.PostData.ContainsKey(i.Key))
{
ok = false;
break;
}
if(PostData[i.Key] != other.PostData[i.Key])
{
ok = false;
break;
}
}
if (ok)
{
postDataSame = true;
}
}
}
return other.Url == Url &&
other.Referer == Referer &&
other.Cookies == Cookies &&
other.Type == Type &&
postDataSame;
} else
{
return false;
}
}
public override int GetHashCode()
{
return base.GetHashCode();
}
}
public enum RequestType