Example #1
0
        public virtual T BeginContent(System.IO.TextWriter writer, IBootstrapContext context)
        {
            WriteSelfStart(writer);
            if (context != null)
            {
                context.PushParent(this);
            }

            var retVal = CreateContentContext(context);

            retVal.OnDisposing(() =>
            {
                if (context != null)
                {
                    context.PopParent(this);
                }
                WriteSelfEnd(writer);
            });
            return(retVal);
        }