summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Model
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Model')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Model/QueueTask.cs69
1 files changed, 69 insertions, 0 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Model/QueueTask.cs b/win/CS/HandBrake.ApplicationServices/Model/QueueTask.cs
index 15f158381..84e9eee9f 100644
--- a/win/CS/HandBrake.ApplicationServices/Model/QueueTask.cs
+++ b/win/CS/HandBrake.ApplicationServices/Model/QueueTask.cs
@@ -30,6 +30,14 @@ namespace HandBrake.ApplicationServices.Model
#region Properties
/// <summary>
+ /// Initializes a new instance of the <see cref="QueueTask"/> class.
+ /// </summary>
+ public QueueTask()
+ {
+ this.Status = QueueItemStatus.Waiting;
+ }
+
+ /// <summary>
/// Gets or sets ScannedSource.
/// </summary>
public Source ScannedSource { get; set; }
@@ -62,5 +70,66 @@ namespace HandBrake.ApplicationServices.Model
public EncodeTask Task { get; set; }
#endregion
+
+ /// <summary>
+ /// The equals.
+ /// </summary>
+ /// <param name="other">
+ /// The other.
+ /// </param>
+ /// <returns>
+ /// The <see cref="bool"/>.
+ /// </returns>
+ protected bool Equals(QueueTask other)
+ {
+ return Equals(this.ScannedSource, other.ScannedSource) && this.CustomQuery.Equals(other.CustomQuery) && Equals(this.Task, other.Task) && this.status == other.status;
+ }
+
+ /// <summary>
+ /// The equals.
+ /// </summary>
+ /// <param name="obj">
+ /// The obj.
+ /// </param>
+ /// <returns>
+ /// The <see cref="bool"/>.
+ /// </returns>
+ public override bool Equals(object obj)
+ {
+ if (ReferenceEquals(null, obj))
+ {
+ return false;
+ }
+
+ if (ReferenceEquals(this, obj))
+ {
+ return true;
+ }
+
+ if (obj.GetType() != this.GetType())
+ {
+ return false;
+ }
+
+ return Equals((QueueTask)obj);
+ }
+
+ /// <summary>
+ /// The get hash code.
+ /// </summary>
+ /// <returns>
+ /// The <see cref="int"/>.
+ /// </returns>
+ public override int GetHashCode()
+ {
+ unchecked
+ {
+ int hashCode = (this.ScannedSource != null ? this.ScannedSource.GetHashCode() : 0);
+ hashCode = (hashCode * 397) ^ this.CustomQuery.GetHashCode();
+ hashCode = (hashCode * 397) ^ (this.Task != null ? this.Task.GetHashCode() : 0);
+ hashCode = (hashCode * 397) ^ (int)this.status;
+ return hashCode;
+ }
+ }
}
} \ No newline at end of file