TSplineVertex
using Autodesk.DesignScript.Interfaces;
using Autodesk.DesignScript.Runtime;
using System.Collections.Generic;
using System.Linq;
namespace Autodesk.DesignScript.Geometry.TSpline
{
    public class TSplineVertex : Vertex
    {
        internal ITSplineVertexEntity TSplineVertexEntity => HostImpl as ITSplineVertexEntity;
        [IsVisibleInDynamoLibrary(false)]
        public new TSplineEdge[] AdjacentEdges {
            get {
                return TSplineEdge.Wrap(TSplineVertexEntity.get_AdjacentEdges(), true);
            }
        }
        [IsVisibleInDynamoLibrary(false)]
        public new TSplineFace[] AdjacentFaces {
            get {
                return TSplineFace.Wrap(TSplineVertexEntity.get_AdjacentFaces(), true);
            }
        }
        public TSplineUVNFrame UVNFrame => TSplineUVNFrame.Wrap(TSplineVertexEntity.get_UVNFrame(), true);
        public int Index => TSplineVertexEntity.get_Index();
        public bool IsStarPoint => TSplineVertexEntity.get_IsStarPoint();
        public bool IsTPoint => TSplineVertexEntity.get_IsTPoint();
        public bool IsManifold => TSplineVertexEntity.get_IsManifold();
        public int Valence => TSplineVertexEntity.get_Valence();
        public int FunctionalValence => TSplineVertexEntity.get_FunctionalValence();
        internal TSplineVertex(ITSplineVertexEntity host, bool persist)
            : base(host, persist)
        {
        }
        public override string ToString()
        {
            object[] obj = new object[11] {
                "TSplineVertex(Index = ",
                Index,
                ", IsStarPoint = ",
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null
            };
            bool flag = IsStarPoint;
            obj[3] = flag.ToString();
            obj[4] = ", IsTPoint = ";
            flag = IsTPoint;
            obj[5] = flag.ToString();
            obj[6] = ", IsManifold = ";
            flag = IsManifold;
            obj[7] = flag.ToString();
            obj[8] = ", Valence = ";
            obj[9] = Valence;
            obj[10] = ")";
            return string.Concat(obj);
        }
        internal static TSplineVertex Wrap(ITSplineVertexEntity host, bool persist = true)
        {
            if (host == null)
                return null;
            return new TSplineVertex(host, persist);
        }
        internal static TSplineVertex[] Wrap(ITSplineVertexEntity[] hosts, bool persist = true)
        {
            return (from x in hosts
            select Wrap(x, persist)).ToArray();
        }
        internal static TSplineVertex[][] Wrap(ITSplineVertexEntity[][] hosts, bool persist = true)
        {
            return (from x in hosts
            select Wrap(x, persist)).ToArray();
        }
        internal static ITSplineVertexEntity[][] Unwrap(TSplineVertex[][] o)
        {
            return (from x in o
            select Unwrap(x)).ToArray();
        }
        internal static ITSplineVertexEntity[] Unwrap(TSplineVertex[] o)
        {
            return (from x in o
            select Unwrap(x)).ToArray();
        }
        internal static ITSplineVertexEntity[] Unwrap(IEnumerable<TSplineVertex> o)
        {
            return (from x in o
            select Unwrap(x)).ToArray();
        }
        internal static ITSplineVertexEntity Unwrap(TSplineVertex o)
        {
            return o.TSplineVertexEntity;
        }
        [MultiReturn(new string[] {
            "uvnFrame",
            "index",
            "isStarPoint",
            "isTPoint",
            "isManifold",
            "valence",
            "functionalValence"
        })]
        public Dictionary<string, object> Info()
        {
            Dictionary<string, object> dictionary = new Dictionary<string, object>();
            foreach (KeyValuePair<string, object> item in TSplineVertexEntity.Info()) {
                string key = item.Key;
                if (key == "uvnFrame")
                    dictionary[item.Key] = TSplineUVNFrame.Wrap(item.Value as ITSplineUVNFrameEntity, true);
                else
                    dictionary[item.Key] = item.Value;
            }
            return dictionary;
        }
    }
}
            