예제 #1
0
        protected override void CreateChildControls()
        {
            if (CanCache && Cacheable && IsInCache)
            {
                return;
            }

            base.CreateChildControls();

            NavigableNodeFeed feed = null;

            try
            {
                feed = GetModel() as NavigableNodeFeed;
            }
            catch (Exception ex)
            {
                this.RenderException = ex;
                this.HasError        = true;
            }

            if (feed != null)
            {
                this.Controls.Add(new TempControl {
                    Feed = feed
                });
            }
        }
예제 #2
0
        protected override void CreateChildControls()
        {
            using (var traceOperation = Logger.TraceOperation("SiteMenuBase.CreateChildControls"))
            {
                if (CanCache && Cacheable && IsInCache)
                {
                    return;
                }

                base.CreateChildControls();

                NavigableNodeFeed feed = null;

                try
                {
                    feed = GetModel() as NavigableNodeFeed;
                }
                catch (Exception ex)
                {
                    this.RenderException = ex;
                    this.HasError        = true;
                }

                if (feed != null)
                {
                    this.Controls.Add(new TempControl {
                        Feed = feed
                    });
                }

                traceOperation.IsSuccessful = true;
            }
        }