当前位置: 首页>>代码示例>>C#>>正文


C# Link.ClipPageToUserPage方法代码示例

本文整理汇总了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)
                {
开发者ID:rocketeerbkw,项目名称:DNA,代码行数:67,代码来源:UserPage.cs


注:本文中的Link.ClipPageToUserPage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。