/// <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('/', '\\')); } } }
public KnowledgeXmlDocument(string relativeFilePath, SimpleExIndexXmlElement sdsiteElement) : base(relativeFilePath, sdsiteElement) { }
/// <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); }
public ProductXmlDocument(string relativeFilePath, SimpleExIndexXmlElement sdsiteElement) : base(relativeFilePath, sdsiteElement) { item = new ItemCollection(this); }
public CorpDataXmlDocument(string relativeFilePath, SimpleExIndexXmlElement sdsiteElement) : base(relativeFilePath, sdsiteElement) { }
public InviteBiddingXmlDocument(string relativeFilePath, SimpleExIndexXmlElement sdsiteElement) : base(relativeFilePath, sdsiteElement) { }
/// <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); }
protected TmpltXmlDocument(string relativeFilePath, SimpleExIndexXmlElement sdsiteElement) : base(sdsiteElement) { this.CreateXhtmlElement(); }
public IndexXmlDocument(SimpleExIndexXmlElement sdsiteElement) : base(sdsiteElement.AbsoluteFilePath) { this.SdsiteElement = sdsiteElement; }