Tasque.Backends.IceCore.IceBackend.CompareCategoriesSortFunc C# (CSharp) Метод

CompareCategoriesSortFunc() статический приватный Метод

static private CompareCategoriesSortFunc ( Gtk model, Gtk a, Gtk b ) : int
model Gtk
a Gtk
b Gtk
Результат int
        static int CompareCategoriesSortFunc(Gtk.TreeModel model,
											  Gtk.TreeIter a,
											  Gtk.TreeIter b)
        {
            ICategory categoryA = model.GetValue (a, 0) as ICategory;
            ICategory categoryB = model.GetValue (b, 0) as ICategory;

            if (categoryA == null || categoryB == null)
                return 0;

            if (categoryA is Tasque.AllCategory)
                return -1;
            else if (categoryB is Tasque.AllCategory)
                return 1;

            return (categoryA.Name.CompareTo (categoryB.Name));
        }