Example #1
0
 //////////////////////////////////////////////////////////////////////
 /// <summary>Calls the action on this object and all children.</summary>
 /// <param name="action">an IBaseWalkerAction interface to call </param>
 /// <returns>true or false, pending outcome of the passed in action</returns>
 //////////////////////////////////////////////////////////////////////
 public virtual bool WalkTree(IBaseWalkerAction action)
 {
     //Tracing.Assert(action != null, "action should not be null");
     if (action == null)
     {
         throw new ArgumentNullException("action");
     }
     return(action.Go(this));
 }
        /////////////////////////////////////////////////////////////////////////////



        //////////////////////////////////////////////////////////////////////
        /// <summary>calls the action on this object and all children</summary>
        /// <param name="action">an IAtomBaseAction interface to call </param>
        /// <returns>true or false, pending outcome</returns>
        //////////////////////////////////////////////////////////////////////
        public override bool WalkTree(IBaseWalkerAction action)
        {
            if (base.WalkTree(action) == true)
            {
                return(true);
            }
            foreach (AtomEntry entry in this.Entries)
            {
                if (entry.WalkTree(action) == true)
                {
                    return(true);
                }
            }
            return(false);
        }
Example #3
0
        /// <summary>calls the action on this object and all children</summary> 
        /// <param name="action">an IAtomBaseAction interface to call </param>
        /// <returns>true or false, pending outcome</returns>
        public override bool WalkTree(IBaseWalkerAction action) {
            if (base.WalkTree(action)) {
                return true;
            }

            foreach (AtomPerson person in this.Authors) {
                if (person.WalkTree(action)) {
                    return true;
                }
            }

            // saving Contributors
            foreach (AtomPerson person in this.Contributors) {
                if (person.WalkTree(action)) {
                    return true;
                }
            }

            // saving Categories
            foreach (AtomCategory category in this.Categories) {
                if (category.WalkTree(action)) {
                    return true;
                }
            }

            // saving the generator
            if (this.Generator != null) {
                if (this.Generator.WalkTree(action)) {
                    return true;
                }
            }

            // save the icon
            if (this.Icon != null) {
                if (this.Icon.WalkTree(action)) {
                    return true;
                }
            }

            // save the logo
            if (this.Logo != null) {
                if (this.Logo.WalkTree(action)) {
                    return true;
                }
            }

            // save the ID
            if (this.Id != null) {
                if (this.Id.WalkTree(action)) {
                    return true;
                }
            }

            // save the Links
            foreach (AtomLink link in this.Links) {

                if (link.WalkTree(action)) {
                    return true;
                }
            }

            if (this.Rights != null) {
                if (this.Rights.WalkTree(action)) {
                    return true;
                }
            }

            if (this.Subtitle != null) {
                if (this.Subtitle.WalkTree(action)) {
                    return true;
                }
            }

            if (this.Title != null) {
                if (this.Title.WalkTree(action)) {
                    return true;
                }
            }

            return false;
        }
Example #4
0
        /// <summary>calls the action on this object and all children</summary>
        /// <param name="action">an IAtomBaseAction interface to call </param>
        /// <returns>true or false, pending outcome</returns>
        public override bool WalkTree(IBaseWalkerAction action)
        {
            if (base.WalkTree(action))
            {
                return(true);
            }

            foreach (AtomPerson person in this.Authors)
            {
                if (person.WalkTree(action))
                {
                    return(true);
                }
            }

            // saving Contributors
            foreach (AtomPerson person in this.Contributors)
            {
                if (person.WalkTree(action))
                {
                    return(true);
                }
            }

            // saving Categories
            foreach (AtomCategory category in this.Categories)
            {
                if (category.WalkTree(action))
                {
                    return(true);
                }
            }

            if (this.id != null)
            {
                if (this.id.WalkTree(action))
                {
                    return(true);
                }
            }

            // save the Links
            foreach (AtomLink link in this.Links)
            {
                if (link.WalkTree(action))
                {
                    return(true);
                }
            }

            if (this.rights != null)
            {
                if (this.rights.WalkTree(action))
                {
                    return(true);
                }
            }

            if (this.title != null)
            {
                if (this.title.WalkTree(action))
                {
                    return(true);
                }
            }

            if (this.summary != null)
            {
                if (this.summary.WalkTree(action))
                {
                    return(true);
                }
            }

            if (this.content != null)
            {
                if (this.content.WalkTree(action))
                {
                    return(true);
                }
            }

            if (this.source != null)
            {
                if (this.source.WalkTree(action))
                {
                    return(true);
                }
            }

            // nothing dirty at all
            return(false);
        }
Example #5
0
        /// <summary>calls the action on this object and all children</summary> 
        /// <param name="action">an IAtomBaseAction interface to call </param>
        /// <returns>true or false, pending outcome</returns>
        public override bool WalkTree(IBaseWalkerAction action) {
            if (base.WalkTree(action)) {
                return true;
            }

            foreach (AtomPerson person in this.Authors) {
                if (person.WalkTree(action)) {
                    return true;
                }
            }

            // saving Contributors
            foreach (AtomPerson person in this.Contributors) {
                if (person.WalkTree(action)) {
                    return true;
                }
            }

            // saving Categories
            foreach (AtomCategory category in this.Categories) {
                if (category.WalkTree(action)) {
                    return true;
                }
            }

            if (this.id != null) {
                if (this.id.WalkTree(action)) {
                    return true;
                }
            }

            // save the Links
            foreach (AtomLink link in this.Links) {
                if (link.WalkTree(action)) {
                    return true;
                }
            }

            if (this.rights != null) {
                if (this.rights.WalkTree(action)) {
                    return true;
                }
            }

            if (this.title != null) {
                if (this.title.WalkTree(action)) {
                    return true;
                }
            }

            if (this.summary != null) {
                if (this.summary.WalkTree(action)) {
                    return true;
                }
            }

            if (this.content != null) {
                if (this.content.WalkTree(action)) {
                    return true;
                }
            }

            if (this.source != null) {
                if (this.source.WalkTree(action)) {
                    return true;
                }
            }

            // nothing dirty at all
            return false;
        }
Example #6
0
 //////////////////////////////////////////////////////////////////////
 /// <summary>Calls the action on this object and all children.</summary> 
 /// <param name="action">an IBaseWalkerAction interface to call </param>
 /// <returns>true or false, pending outcome of the passed in action</returns>
 //////////////////////////////////////////////////////////////////////
 public virtual bool WalkTree(IBaseWalkerAction action)
 {
     Tracing.Assert(action != null, "action should not be null");
     if (action == null)
     {
         throw new ArgumentNullException("action"); 
     }
     return action.Go(this); 
 }
Example #7
0
        /// <summary>calls the action on this object and all children</summary>
        /// <param name="action">an IAtomBaseAction interface to call </param>
        /// <returns>true or false, pending outcome</returns>
        public override bool WalkTree(IBaseWalkerAction action)
        {
            if (base.WalkTree(action))
            {
                return(true);
            }

            foreach (AtomPerson person in this.Authors)
            {
                if (person.WalkTree(action))
                {
                    return(true);
                }
            }

            // saving Contributors
            foreach (AtomPerson person in this.Contributors)
            {
                if (person.WalkTree(action))
                {
                    return(true);
                }
            }

            // saving Categories
            foreach (AtomCategory category in this.Categories)
            {
                if (category.WalkTree(action))
                {
                    return(true);
                }
            }

            // saving the generator
            if (this.Generator != null)
            {
                if (this.Generator.WalkTree(action))
                {
                    return(true);
                }
            }

            // save the icon
            if (this.Icon != null)
            {
                if (this.Icon.WalkTree(action))
                {
                    return(true);
                }
            }

            // save the logo
            if (this.Logo != null)
            {
                if (this.Logo.WalkTree(action))
                {
                    return(true);
                }
            }

            // save the ID
            if (this.Id != null)
            {
                if (this.Id.WalkTree(action))
                {
                    return(true);
                }
            }

            // save the Links
            foreach (AtomLink link in this.Links)
            {
                if (link.WalkTree(action))
                {
                    return(true);
                }
            }

            if (this.Rights != null)
            {
                if (this.Rights.WalkTree(action))
                {
                    return(true);
                }
            }

            if (this.Subtitle != null)
            {
                if (this.Subtitle.WalkTree(action))
                {
                    return(true);
                }
            }

            if (this.Title != null)
            {
                if (this.Title.WalkTree(action))
                {
                    return(true);
                }
            }

            return(false);
        }
Example #8
0
        /////////////////////////////////////////////////////////////////////////////



        //////////////////////////////////////////////////////////////////////
        /// <summary>calls the action on this object and all children</summary> 
        /// <param name="action">an IAtomBaseAction interface to call </param>
        /// <returns>true or false, pending outcome</returns>
        //////////////////////////////////////////////////////////////////////
        public override bool WalkTree(IBaseWalkerAction action)
        {
            if (base.WalkTree(action)==true)
            {
                return true;
            }
            foreach (AtomEntry entry in this.Entries )
            {
                if (entry.WalkTree(action)==true)
                    return true;
            }
            return false; 
        }