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()
{
string[] obj = new string[11] {
"IndexGroup(Count = ",
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
};
uint num = Count;
obj[1] = num.ToString();
obj[2] = ", A = ";
num = A;
obj[3] = num.ToString();
obj[4] = ", B = ";
num = B;
obj[5] = num.ToString();
obj[6] = ", C = ";
num = C;
obj[7] = num.ToString();
obj[8] = ", D = ";
num = D;
obj[9] = num.ToString();
obj[10] = ")";
return string.Concat(obj);
}
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;
int num2 = num * 23;
uint num3 = Count;
num = num2 + num3.GetHashCode();
int num4 = num * 23;
num3 = A;
num = num4 + num3.GetHashCode();
int num5 = num * 23;
num3 = B;
num = num5 + num3.GetHashCode();
int num6 = num * 23;
num3 = C;
num = num6 + num3.GetHashCode();
int num7 = num * 23;
num3 = D;
return num7 + num3.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);
}
}
}