Esempio n. 1
0
        public String ItemType()
        {
            switch (assemblyType)
            {
            case AssemblyType.Enum:
                return("enum type");

            case AssemblyType.EnumValue:
                return("enum value");

            case AssemblyType.Property:
            case AssemblyType.Primitive:
            case AssemblyType.Class:
            case AssemblyType.Struct:
            case AssemblyType.Constructor:
            case AssemblyType.Field:
                return(assemblyType.ToString().ToLower());

            case AssemblyType.Method:
                return(SimplifiedName.Contains("implop") ? "implicit operator" : "method");
            }

            return("unclassified(todo)");
        }
Esempio n. 2
0
        /// <summary>
        /// Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
        /// </summary>
        /// <returns>
        /// A value that indicates the relative order of the objects being compared. The return value has these meanings: Value Meaning Less than zero This instance is less than <paramref name="obj"/>. Zero This instance is equal to <paramref name="obj"/>. Greater than zero This instance is greater than <paramref name="obj"/>.
        /// </returns>
        /// <param name="obj">An object to compare with this instance. </param><exception cref="T:System.ArgumentException"><paramref name="obj"/> is not the same type as this instance. </exception><filterpriority>2</filterpriority>
        public int CompareTo(object obj)
        {
            var item = (IDataItemOld)obj;

            return(SimplifiedName.CompareTo(item.ItemName()));
        }