Example #1
0
        /// <summary>
        /// Get more detailed description of the object type.
        /// </summary>
        /// <param name="objectType">The object type to get a more detailed description of.</param>
        /// <returns>The full details for the given object.</returns>
        public SObjectType DescribeObjectType(SObjectTypePartial objectType)
        {
            if (objectType == null)
            {
                throw new ArgumentNullException("objectType");
            }

            return(DescribeObjectType(objectType.Name));
        }
Example #2
0
        /// <summary>
        /// Compare this object with another object.
        /// </summary>
        /// <param name="obj">The object to compare with this one.</param>
        /// <returns>
        /// A value that indicates the relative order of the objects being compared.
        /// The return value has these meanings:
        /// Less than zero - This instance precedes obj in the sort order.
        /// Zero - This instance occurs in the same position in the sort order as obj.
        /// Greater than zero - This instance follows obj in the sort order.
        /// </returns>
        public int CompareTo(object obj)
        {
            SObjectTypePartial other = obj as SObjectTypePartial;

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

            if (this.Name == null)
            {
                return(1);
            }

            return(this.Name.CompareTo(other.Name));
        }