Пример #1
0
        public override IWriteResult WriteStaticJavascript(IJavascriptWriter writer)
        {
            var writeResult = WriteResult.Continue();

            if (!ReferenceEquals(_pageComponents, null))
            {
                for (var i = 0; i < _pageComponents.Length; i++)
                {
                    var pageComponent = _pageComponents[i];
                    if (writeResult.Add(pageComponent.WriteStaticJavascript(writer)).IsComplete)
                    {
                        return(writeResult);
                    }
                }
            }

            if (!ReferenceEquals(_layout, null))
            {
                writeResult.Add(_layout.WriteStaticJavascript(writer));
            }

            return(writeResult);
        }