Ejemplo n.º 1
0
        /// <summary>
        /// Standard interface method to Initialize the class.  There is one parameter - the Sort method enumeration
        /// </summary>
        /// <param name="AParamList">A single parameter - the sort method enumeration.  Must be one of <see cref="TSortEnum"/> enumerations</param>
        /// <exception cref="System.ArgumentNullException">Thrown if no sort enumeration is specified</exception>
        /// <exception cref="System.ArgumentException">Thrown if there is more than one argument passed in</exception>
        /// <exception cref="System.ArgumentOutOfRangeException">Thrown if the sort enumeration is invalid</exception>
        /// <returns>Always returns True if no exception is raised</returns>
        public bool Initialize(object[] AParamList)
        {
            if (AParamList == null)
            {
                throw new ArgumentNullException("");
            }

            if (AParamList.Length != 1)
            {
                throw new ArgumentException("");
            }

            try
            {
                FFormDataSortMethod = (TSortEnum)AParamList[0];
            }
            catch (Exception)
            {
                throw new ArgumentOutOfRangeException("");
            }

            return(true);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Standard interface method to Initialize the class.  There is one parameter - the Sort method enumeration
        /// </summary>
        /// <param name="AParamList">A single parameter - the sort method enumeration.  Must be one of <see cref="TSortEnum"/> enumerations</param>
        /// <exception cref="System.ArgumentNullException">Thrown if no sort enumeration is specified</exception>
        /// <exception cref="System.ArgumentException">Thrown if there is more than one argument passed in</exception>
        /// <exception cref="System.ArgumentOutOfRangeException">Thrown if the sort enumeration is invalid</exception>
        /// <returns>Always returns True if no exception is raised</returns>
        public bool Initialize(object[] AParamList)
        {
            if (AParamList == null)
            {
                throw new ArgumentNullException("");
            }

            if (AParamList.Length != 1)
            {
                throw new ArgumentException("");
            }

            try
            {
                FFormDataSortMethod = (TSortEnum)AParamList[0];
            }
            catch (Exception)
            {
                throw new ArgumentOutOfRangeException("");
            }

            return true;
        }