Ejemplo n.º 1
0
        // 创建分析对象
        protected ABnfFile CreateABnfFile(ABnf abnf, string text)
        {
            var file = m_factory.CreateABnfFile(m_full_path, abnf, text);

            if (file == null)
            {
                file = new ABnfFileInfo(m_full_path, abnf, text);
            }
            file.SetProjectInfo(m_project);
            return(file);
        }
Ejemplo n.º 2
0
        // 创建分析对象
        protected FileItem CreatFileItem(ABnf abnf, string full_path, uint node)
        {
            // 读取文件
            var text = File.ReadAllText(full_path);

            // 创建ABnfFile
            var file = m_factory.CreateABnfFile(full_path, abnf, text);

            if (file == null)
            {
                file = new ABnfFile(full_path, abnf, text);
            }
            file.SetProjectInfo(this);

            // 创建item
            var file_item = m_factory.CreateFileItem(this, abnf, full_path, node, file);

            if (file_item == null)
            {
                file_item = new FileItem(this, abnf, full_path, node, file);
            }
            return(file_item);
        }