コード例 #1
0
        /// <summary>
        /// 获取该文章的Channel包含路径(供页面存储用)
        /// </summary>
        /// <returns>Channel的路径,绝对路径</returns>
        private string GetChannelPath(PageSection pageSection)
        {
            SimpleExIndexXmlElement ele = (SimpleExIndexXmlElement)this.SdsiteElement;

            switch (pageSection)
            {
            case PageSection.MainPage:
            {
                return(ele.RelativeUrl.Remove(0, 1).Replace('/', '\\'));
            }

            case PageSection.Head:
            {
                string str = ele.RelativeUrl.Remove(0, 1).Replace('/', '\\');
                str = str.Insert(str.LastIndexOf('.'), "_head");
                return(str);
            }

            case PageSection.Content:
            {
                string str = ele.RelativeUrl.Remove(0, 1).Replace('/', '\\');
                str = str.Insert(str.LastIndexOf('.'), "_content");
                return(str);
            }

            case PageSection.None:
            default:
            {
                Debug.Fail("PageSection is Error!");
                return(ele.RelativeUrl.Remove(0, 1).Replace('/', '\\'));
            }
            }
        }
コード例 #2
0
 public KnowledgeXmlDocument(string relativeFilePath, SimpleExIndexXmlElement sdsiteElement)
     : base(relativeFilePath, sdsiteElement)
 {
 }
コード例 #3
0
        /// <summary>
        /// 创建一个PageXmlDocument对象。(type参数决定从哪个派生类创建)
        /// </summary>
        static public PageXmlDocument CreateInstance(string relativeFilePath, string pageId, PageType type, SimpleExIndexXmlElement sdsiteElement)
        {
            Debug.Assert(!string.IsNullOrEmpty(relativeFilePath));
            Debug.Assert(!string.IsNullOrEmpty(pageId));

            PageXmlDocument doc = null;

            switch (type)
            {
            case PageType.General:
                doc = new GeneralPageXmlDocument(relativeFilePath, sdsiteElement);
                break;

            case PageType.Product:
                doc = new ProductXmlDocument(relativeFilePath, sdsiteElement);
                break;

            case PageType.Project:
                doc = new ProjectXmlDocument(relativeFilePath, sdsiteElement);
                break;

            case PageType.InviteBidding:
                doc = new InviteBiddingXmlDocument(relativeFilePath, sdsiteElement);
                break;

            case PageType.Knowledge:
                doc = new KnowledgeXmlDocument(relativeFilePath, sdsiteElement);
                break;

            case PageType.Hr:
                doc = new HrXmlDocument(relativeFilePath, sdsiteElement);
                break;

            case PageType.Home:
                doc = new HomeXmlDocument(relativeFilePath, sdsiteElement);
                break;

            default:
                Debug.Assert(false, "开发期错误。未知的PageType:" + type);
                break;
            }

            return(doc);
        }
コード例 #4
0
 public ProductXmlDocument(string relativeFilePath, SimpleExIndexXmlElement sdsiteElement)
     : base(relativeFilePath, sdsiteElement)
 {
     item = new ItemCollection(this);
 }
コード例 #5
0
 public CorpDataXmlDocument(string relativeFilePath, SimpleExIndexXmlElement sdsiteElement)
     : base(relativeFilePath, sdsiteElement)
 {
 }
コード例 #6
0
 public InviteBiddingXmlDocument(string relativeFilePath, SimpleExIndexXmlElement sdsiteElement)
     : base(relativeFilePath, sdsiteElement)
 {
 }
コード例 #7
0
        /// <summary>
        /// 创建一个TmpltXmlDocument对象。
        /// </summary>
        internal static TmpltXmlDocument CreateInstance(string docPath, string tmpltId, SimpleExIndexXmlElement sdsiteElement)
        {
            Debug.Assert(!string.IsNullOrEmpty(docPath));
            Debug.Assert(!string.IsNullOrEmpty(tmpltId));

            TmpltXmlDocument doc = new TmpltXmlDocument(docPath, sdsiteElement);

            //doc.HasAutoKeyWordsSequenceType = false;
            return(doc);
        }
コード例 #8
0
 protected TmpltXmlDocument(string relativeFilePath, SimpleExIndexXmlElement sdsiteElement)
     : base(sdsiteElement)
 {
     this.CreateXhtmlElement();
 }
コード例 #9
0
 public IndexXmlDocument(SimpleExIndexXmlElement sdsiteElement)
     : base(sdsiteElement.AbsoluteFilePath)
 {
     this.SdsiteElement = sdsiteElement;
 }