Example #1
0
        /// <summary>
        /// Builds a new RegisteredObject
        /// </summary>
        /// <param name="reference">Object reference</param>
        /// <param name="referenceName">Reference name to access the object</param>
        /// <param name="methods">MethodInfo object array of methods you want accessible to the script, by default it is everything</param>
        /// <param name="properties">PropertyInfo object array of properties you want accessible to the script, by default it is everything</param>
        public RegisteredObject(ref Object reference, string referenceName, MethodInfo[] methods, PropertyInfo[] properties)
        {
            this.reference     = reference;
            this.referenceName = referenceName;
            this.methods       = methods.ToList <MethodInfo>();
            this.properties    = properties.ToList <PropertyInfo>();
            // add our helper methods
            this.methods.Add(this.GetType().GetMethod(LIST_METHOD_NAMES));
            this.methods.Add(this.GetType().GetMethod(LIST_PROPERTY_NAMES));
            this.methods.Add(this.GetType().GetMethod(HELP));

            //Alpha sort
            this.methods.Sort(AlphaComparer.getInstance());
            this.properties.Sort(AlphaComparer.getInstance());
        }
Example #2
0
 public void AlphaSort()
 {
     IComparer Alpha = new AlphaComparer();
     Array.Sort(Data, Alpha);
 }