findStructureByName() public method

Provides the structure which corresponds to the given name
public findStructureByName ( string name ) : Structure
name string
return Structure
Exemplo n.º 1
0
        /// <summary>
        ///     Either provides the requested structure or creates it if it cannot be found
        /// </summary>
        /// <param name="name">The name pf the structure</param>
        /// <param name="initialNameSpace">The namespace the structure is being copied from</param>
        /// <returns></returns>
        public Structure GetStructureUpdate(string name, NameSpace initialNameSpace)
        {
            Structure retVal = null;

            if (name != null)
            {
                retVal = findStructureByName(name);
                Structure initialStructure = initialNameSpace.findStructureByName(name);
                if (retVal == null)
                {
                    retVal = initialStructure.CreateStructureUpdate(Dictionary);
                }
            }
            return(retVal);
        }
Exemplo n.º 2
0
        /// <summary>
        ///     Either provides the requested structure or creates it if it cannot be found
        /// </summary>
        /// <param name="name">The name pf the structure</param>
        /// <param name="initialNameSpace">The namespace the structure is being copied from</param>
        /// <returns></returns>
        public Structure GetStructureUpdate(string name, NameSpace initialNameSpace)
        {
            Structure retVal = null;

            if (name != null)
            {
                retVal = findStructureByName(name);
                Structure initialStructure = initialNameSpace.findStructureByName(name);
                if (retVal == null)
                {
                    retVal = initialStructure.CreateStructureUpdate(Dictionary);
                }
            }
            return retVal;
        }