|
// ******************************************************************************
// ******************************************************************************
// ASP.NET DaST Rendering Engine
// Copyright (C) 2011 Roman Gubarenko
// Project Home: http://aspnetdast.sourceforge.net/
// ******************************************************************************
// ******************************************************************************
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
//
// ******************************************************************************
// Primary Contact: rgubarenko@gmail.com
// Learn More: http://aspnetdast.sourceforge.net/
// Project Repository: http://sourceforge.net/projects/aspnetdast/
// ******************************************************************************
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Collections;
using System.Collections.Specialized;
namespace AspNetDaST.Web.Private
{
internal class TreeNodeScope : TreeNodeBase
{
internal ScopeTreeModel ScopeTree { get; set; }
// initial tree node properties
internal string ScopeID { get; set; }
internal PathModel NodePath { get; set; }
internal TreeNodeScope ParentNode { get; set; }
internal string TagOriginalName { get; set; }
internal NameValueCollection TagAttributes { get; set; }
// properties assigned on structure setup
internal List<TreeNodeBase> Nodes { get; private set; }
internal int FromNodeIdx { get; set; }
internal int StopNodeIdx { get; set; }
// properties assigned on model setup
internal ScopeController Controller { get; set; }
internal bool IsControllerRoot { get; set; }
internal DataBindHandler DataBindCallback { get; set; }
internal List<ModelActionInfo> ActionHandlers { get; private set; }
//internal List<ModelMethodInfo> MethodHandlers { get; private set; }
internal TreeNodeScope(ScopeTreeModel scopeTree)
{
ScopeTree = scopeTree;
ScopeID = null;
NodePath = new PathModel();
ParentNode = null;
TagOriginalName = null;
TagAttributes = new NameValueCollection();
Controller = null;
IsControllerRoot = false;
ResetModel();
}
internal List<TreeNodeScope> ScopeNodes
{
get
{
return Nodes.OfType<TreeNodeScope>().ToList();
}
}
internal void ResetModel()
{
Nodes = new List<TreeNodeBase>();
FromNodeIdx = -1;
StopNodeIdx = -1;
DataBindCallback = null;
ActionHandlers = new List<ModelActionInfo>();
//MethodHandlers = new List<ModelMethodInfo>();
}
public override string ToString()
{
return string.Format("Scope: {0}, {1}", ScopeID ?? "<ROOT>", NodePath);
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Software Architect with over 15 years in IT field. Started with deep math and C++ Computer Vision software. Currently in .NET and PHP web development. Creator of DaST pattern, open-source frameworks, and plugins. Interested in cutting Edge IT, open-source, Web 2.0, .NET, MVC, C++, Java, jQuery, Mobile tech, and extreme sports.