private IGPName GetName(string Name)
        {
            IGPName gpName = null;

            try
            {
                InitNames();
                m_enumGPName.Reset();

                gpName = m_enumGPName.Next();
                while (gpName != null)
                {
                    if (gpName.Equals(Name))
                    {
                        gpName = CreateDataTypeName(gpName.Name, gpName.DisplayName, (IGPDataTypeFactory)this);
                        break;
                    }

                    gpName = m_enumGPName.Next();
                }
            }
            catch
            {
                // undecided if I should throw the exception at this point
            }

            return(gpName);
        }
Ejemplo n.º 2
0
        /// <summary>
        ///     Gets all of function name objects of all the geoprocessing functions managed by this function factory.
        /// </summary>
        /// <returns>
        ///     Returns an <see cref="IEnumGPName" /> representing all of function name objects of all the geoprocessing
        ///     functions managed by this function factory.
        /// </returns>
        public virtual IEnumGPName GetFunctionNames()
        {
            IArray list = new EnumGPNameClass();

            foreach (IGPFunction function in this.Tools.Keys)
            {
                IGPName functionName = this.GetFunctionName(function.Name);
                list.Add(functionName);
            }

            return((IEnumGPName)list);
        }
Ejemplo n.º 3
0
        private IGPFunctionName makeName(string name,
                                         string description,
                                         string dispname)
        {
            IGPFunctionName nm = new GPFunctionNameClass();
            IGPName         n  = (IGPName)nm;

            n.Category    = this.Name;
            n.Name        = name;
            n.Description = description;
            n.DisplayName = dispname;
            n.Factory     = this;
            return(nm);
        }
Ejemplo n.º 4
0
        /// <summary>
        ///     Gets the name of the function.
        /// </summary>
        /// <param name="function">The function.</param>
        /// <returns></returns>
        protected virtual IGPFunctionName GetFunctionName(IGPFunction2 function)
        {
            IGPFunctionName functionName = new GPFunctionNameClass();

            functionName.MinimumProduct = esriProductCode.esriProductCodeBasic;
            functionName.HelpFile       = function.HelpFile;
            functionName.HelpContext    = function.HelpContext;

            IGPName name = (IGPName)functionName;

            name.Name        = function.Name;
            name.Description = function.DisplayName;
            name.DisplayName = function.DisplayName;
            name.Factory     = this;

            return(functionName);
        }
        public void addDataTypeName(ref IArray Names, string Name, string DisplayName, IGPDataTypeFactory Factory)
        {
            IGPName gpName = CreateDataTypeName(Name, DisplayName, Factory);

            Names.Add(gpName);
        }