本文整理汇总了C#中Link.ClipPageToUserPage方法的典型用法代码示例。如果您正苦于以下问题:C# Link.ClipPageToUserPage方法的具体用法?C# Link.ClipPageToUserPage怎么用?C# Link.ClipPageToUserPage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Link
的用法示例。
在下文中一共展示了Link.ClipPageToUserPage方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GenerateUserPageXml
//.........这里部分代码省略.........
}
}
XmlElement pageOwner = AddElementTag(RootElement, "PAGE-OWNER");
if(gotOwner)
{
AddInside(pageOwner, owner);
}
else
{
XmlElement pretendUser = AddElementTag(pageOwner, "USER");
AddIntElement(pretendUser, "USERID", userPageParameters.UserID);
AddTextTag(pretendUser, "USERNAME", "Researcher " + userPageParameters.UserID.ToString());
}
if(gotInterface)
{
AddInside(pageInterface, "");
}
if (userPageParameters.Clip)
{
string clipSubject = String.Empty;
if (gotOwner)
{
clipSubject = owner.UserName;
}
else
{
clipSubject = "U" + userPageParameters.UserID.ToString();
}
Link link = new Link(InputContext);
//TODO ClipPageToUser page
link.ClipPageToUserPage("userpage", userPageParameters.UserID, clipSubject, String.Empty, InputContext.ViewingUser, userPageParameters.Private);
AddInside(link);
}
// if masthead NULL stylesheet should do the default response
if (gotMasthead && (InputContext.GetSiteOptionValueBool("PersonalSpace", "IncludeUsersGuideEntry") || userPageParameters.IncludeUsersGuideEntries))
{
AddInside(masthead);
}
// add page forum if there is one => this is the forum associated with
// the guide enty that is the masthead for this user
if (gotPageForum && (InputContext.GetSiteOptionValueBool("PersonalSpace", "IncludeUsersGuideEntryForum") || userPageParameters.IncludeUsersGuideEntriesForums))
{
XmlElement articleForumTag = AddElementTag(RootElement, "ARTICLEFORUM");
AddInside(articleForumTag, pageForum);
}
// add journal if it exists
if ( gotJournal)
{
XmlElement journalTag = AddElementTag(RootElement, "JOURNAL");
AddInside(journalTag, journal);
}
// add recent posts if they exist, this may add an empty
// POST-LIST tag if the user exists but has never posted
if ( gotRecentPosts)
{
XmlElement recentPostsTag = AddElementTag(RootElement, "RECENT-POSTS");
AddInside(recentPostsTag, recentPosts);
}
// add recent articles if they exist, this may add an empty
// ARTICLES-LIST tag if the user exists but has never written a guide entry
if ( gotRecentArticles)
{