BN089-BS开发框架MVC4版/source20131023/Zephyr.Net/Zephyr.WorkFlow/Node/NodeReader.cs

(开头部分) 12KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System.Collections.Generic;
using System.Collections;
using System.IO;
using System.Xml;
using System;

namespace Zephyr.WorkFlow
{
    public class NodeReader  
    {
        public string _name;               //名称
        public string _version;            //版本
        public string _description;        //描述
        public int _startNodeIndex;        //开始结点
        public int _endNodeIndex;          //终止结点
        public IList<Task> _nodes;         //结点列表
        public Node _rootElement;          //XML所有节点结构
        public IDictionary<string, int> _taskNameMap;  //工作项对应Map
        public IDictionary<string, string> _processVars;  //流程变量
        public string _bizKeyName;

        public NodeReader(ProcessDefinition processDefinition, string xmlstring)
        {
            #region 读取xml处理
            try
            {
                //初始化
                _startNodeIndex = -1;
                _endNodeIndex = -1;
                _rootElement = null;
                _nodes = new List<Task>();
                _taskNameMap = new Dictionary<string, int>();

                StringReader ts = new StringReader(xmlstring);
                var _xmlreader = new XmlTextReader(ts);

                _rootElement = null;
                var _elementStack = new ArrayList();

                while (_xmlreader.Read())
                {
                    switch (_xmlreader.NodeType)
                    {
                        case XmlNodeType.XmlDeclaration:                      //xml声明信息
                            break;
                        case XmlNodeType.Element:                             //元素信息
                            Node newElement = new Node(_xmlreader.Name);
                            bool isEmptyElement = _xmlreader.IsEmptyElement;

                            Hashtable attributes = new Hashtable();
                            if (_xmlreader.HasAttributes)
                            {
                                for (int i = 0; i < _xmlreader.AttributeCount; i++)
                                {
                                    _xmlreader.MoveToAttribute(i);
                                    attributes.Add(_xmlreader.Name, _xmlreader.Value);
                                }
                            }

                            newElement.Attributes = attributes;
后面还有 210 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。