Exemplo n.º 1
0
        public static void UpdateCustomProperties(this INamedObjectContainer container)
        {
            if (container == null)
            {
                throw new ArgumentException("Argument container is null", "container");
            }

            container.UpdateCustomProperties(container.NamedObjects);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Calls UpdateCustomProperties on all contained NamedObjects.  This is done recurisvely.
        /// </summary>
        /// <param name="container">The INamedObjectContainer (which is going to be an IElement at the time of this writing)</param>
        /// <param name="namedObjectList">The List of NamedObjectSaves - so that this can be called recursively.</param>
        private static void UpdateCustomProperties(this INamedObjectContainer container, List <NamedObjectSave> namedObjectList)
        {
            for (int i = 0; i < namedObjectList.Count; i++)
            {
                namedObjectList[i].UpdateCustomProperties();

                container.UpdateCustomProperties(namedObjectList[i].ContainedObjects);
            }
        }