IndexGroup
using Autodesk.DesignScript.Interfaces;
using System.Collections.Generic;
using System.Linq;
namespace Autodesk.DesignScript.Geometry
{
public class IndexGroup
{
internal IIndexGroupEntity IndexGroupEntity { get; set; }
public uint Count => IndexGroupEntity.get_Count();
public uint A => IndexGroupEntity.get_A();
public uint B => IndexGroupEntity.get_B();
public uint C => IndexGroupEntity.get_C();
public uint D => IndexGroupEntity.get_D();
internal IndexGroup(IIndexGroupEntity host, bool persist)
{
IndexGroupEntity = host;
}
public override string ToString()
{
return "IndexGroup(Count = " + Count + ", A = " + A + ", B = " + B + ", C = " + C + ", D = " + D + ")";
}
public override bool Equals(object other)
{
if (base.Equals(other))
return true;
IndexGroup indexGroup = other as IndexGroup;
if (indexGroup == null)
return false;
uint num = indexGroup.Count;
if (num.Equals(Count)) {
num = indexGroup.A;
if (num.Equals(A)) {
num = indexGroup.B;
if (num.Equals(B)) {
num = indexGroup.C;
if (num.Equals(C)) {
num = indexGroup.D;
return num.Equals(D);
}
}
}
}
return false;
}
public override int GetHashCode()
{
int num = 17 * 23;
uint num2 = Count;
int num3 = (num + num2.GetHashCode()) * 23;
num2 = A;
int num4 = (num3 + num2.GetHashCode()) * 23;
num2 = B;
int num5 = (num4 + num2.GetHashCode()) * 23;
num2 = C;
int num6 = (num5 + num2.GetHashCode()) * 23;
num2 = D;
return num6 + num2.GetHashCode();
}
internal static IndexGroup Wrap(IIndexGroupEntity host, bool persist = true)
{
if (host == null)
return null;
return new IndexGroup(host, persist);
}
internal static IndexGroup[] Wrap(IIndexGroupEntity[] hosts, bool persist = true)
{
return (from x in hosts
select Wrap(x, persist)).ToArray();
}
internal static IndexGroup[][] Wrap(IIndexGroupEntity[][] hosts, bool persist = true)
{
return (from x in hosts
select Wrap(x, persist)).ToArray();
}
internal static IIndexGroupEntity[][] Unwrap(IndexGroup[][] o)
{
return (from x in o
select Unwrap(x)).ToArray();
}
internal static IIndexGroupEntity[] Unwrap(IndexGroup[] o)
{
return (from x in o
select Unwrap(x)).ToArray();
}
internal static IIndexGroupEntity[] Unwrap(IEnumerable<IndexGroup> o)
{
return (from x in o
select Unwrap(x)).ToArray();
}
internal static IIndexGroupEntity Unwrap(IndexGroup o)
{
return o.IndexGroupEntity;
}
public static IndexGroup ByIndices(uint a, uint b, uint c, uint d)
{
return Wrap(HostFactory.Factory.IndexGroupByIndices(a, b, c, d), true);
}
public static IndexGroup ByIndices(uint a, uint b, uint c)
{
return Wrap(HostFactory.Factory.IndexGroupByIndices(a, b, c), true);
}
}
}