I=(S=Uno.Delegate = function(){
}).prototype;

I.Equals = function(right)
{
    return ((right != null) && (this.GetMethodObj() == right.GetMethodObj())) && (this.GetMethodId() == right.GetMethodId());
};

S.Combine = function(a, b)
{
    if (a == null)
    {
        return b;
    }

    for (var d = b; d != null; d = d.Prev)
    {
        if (d.Prev == null)
        {
            d.Prev = a;
            break;
        }
    }

    return b;
};

S.Remove = function(source, value)
{
    if (value == null)
    {
        return source;
    }

    if (value.Equals(source))
    {
        return source.Prev;
    }

    var d = source;

    for (var d = source; d != null; d = d.Prev)
    {
        if (value.Equals(d.Prev))
        {
            d.Prev = d.Prev.Prev;
            break;
        }
    }

    return source;
};
