diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-04-12 10:32:04 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-04-12 10:32:04 -0400 |
| commit | b789550a5639a65e5b9cf0908ab8a577bd891589 (patch) | |
| tree | cbcd9146881607dfcfc86a6770498285d6564079 /MediaBrowser.Server.Implementations/Sorting/BudgetComparer.cs | |
| parent | 192e1676a4d8db48a15316eede2041f0b1c9b48f (diff) | |
Added budget as a sort order
Diffstat (limited to 'MediaBrowser.Server.Implementations/Sorting/BudgetComparer.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Sorting/BudgetComparer.cs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/MediaBrowser.Server.Implementations/Sorting/BudgetComparer.cs b/MediaBrowser.Server.Implementations/Sorting/BudgetComparer.cs new file mode 100644 index 000000000..3637f2939 --- /dev/null +++ b/MediaBrowser.Server.Implementations/Sorting/BudgetComparer.cs @@ -0,0 +1,29 @@ +using MediaBrowser.Controller.Entities; +using MediaBrowser.Controller.Sorting; +using MediaBrowser.Model.Querying; + +namespace MediaBrowser.Server.Implementations.Sorting +{ + public class BudgetDateComparer : IBaseItemComparer + { + /// <summary> + /// Compares the specified x. + /// </summary> + /// <param name="x">The x.</param> + /// <param name="y">The y.</param> + /// <returns>System.Int32.</returns> + public int Compare(BaseItem x, BaseItem y) + { + return (x.Budget ?? 0).CompareTo(y.Budget ?? 0); + } + + /// <summary> + /// Gets the name. + /// </summary> + /// <value>The name.</value> + public string Name + { + get { return ItemSortBy.Budget; } + } + } +} |
