Exemplo n.º 1
0
	public void Insert(Int32 index, GroupRoleData value)
	{
	    if (!immutable)
	    {
		List.Insert(index, value);
	    }
	    else
	    {
		throw new System.Data.ReadOnlyException();
	    }
	}
Exemplo n.º 2
0
	public void Add(GroupRoleData value)
	{
	    if (!immutable)
	    {
		List.Add(value);
	    }
	    else
	    {
		throw new System.Data.ReadOnlyException();
	    }
	}
Exemplo n.º 3
0
	    /// <summary>
	    /// Compares two GroupRoleData objects.
	    /// </summary>
	    /// <param name="o1">First object</param>
	    /// <param name="o2">Second Object</param>
	    /// <returns>0 if equal, -1 if first less than second and 1 if first greater than second.  Note that null is always less than non-null.</returns>
	    public int Compare(object o1, object o2)
	    {
		if (o1 == null && o2 == null)
		{
		    return 0;
		}

		if (o1 == null)
		{
		    return -1;
		}

		if (o2 == null)
		{
		    return 1;
		}

		GroupRoleData g1 = (GroupRoleData)o1;
		GroupRoleData g2 = (GroupRoleData)o2;

		if (g1.RoleId.IsValid && !g2.RoleId.IsValid)
		{
		    return 1;
		}
		else if (!g1.RoleId.IsValid && g2.RoleId.IsValid)
		{
		return -1;
	    }
	    else if (g1.RoleId.IsValid && g2.RoleId.IsValid && g1.RoleId.ToString().CompareTo(g2.RoleId.ToString()) != 0
	    {
	    return g1.RoleId.ToString().CompareTo(g2.RoleId.ToString());
	}

	// No inequalities found, so they must be equal.
	return 0;
    }
Exemplo n.º 4
0
	public Int32 IndexOf(GroupRoleData value)
	{
	    return List.IndexOf(value);
	}
Exemplo n.º 5
0
	public Boolean Contains(GroupRoleData value)
	{
	    return List.Contains(value);
	}