本文整理汇总了C#中Page.ExportObject方法的典型用法代码示例。如果您正苦于以下问题:C# Page.ExportObject方法的具体用法?C# Page.ExportObject怎么用?C# Page.ExportObject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Page
的用法示例。
在下文中一共展示了Page.ExportObject方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShouldCopyEntity
public void ShouldCopyEntity()
{
var page = new Page() { Name = "SomePage" };
dynamic result = page.ExportObject();
Assert.AreEqual( result.Name, page.Name );
}
示例2: ShouldCopyBlocks
public void ShouldCopyBlocks()
{
var page = new Page() { Blocks = new List<Block>() };
page.Blocks.Add( new Block() );
dynamic result = page.ExportObject();
Assert.NotNull( result.Blocks );
Assert.IsNotEmpty( result.Blocks );
}
示例3: ShouldCopyPages
public void ShouldCopyPages()
{
var children = new List<Page>() { new Page() };
var parent = new Page() { Pages = children };
dynamic result = parent.ExportObject();
Assert.IsNotEmpty( result.Pages );
}
示例4: ShouldCopyPagesRecursively
public void ShouldCopyPagesRecursively()
{
var parent = new Page();
var child = new Page();
var grandchild = new Page();
parent.Pages = new List<Page> { child };
child.Pages = new List<Page> { grandchild };
dynamic result = parent.ExportObject();
Assert.IsNotEmpty( result.Pages );
Assert.IsNotEmpty( result.Pages[ 0 ].Pages );
}
示例5: ShouldCopyPageRoutes
public void ShouldCopyPageRoutes()
{
var page = new Page() { PageRoutes = new List<PageRoute>() };
page.PageRoutes.Add( new PageRoute());
dynamic result = page.ExportObject();
Assert.NotNull( result.PageRoutes );
Assert.IsNotEmpty( result.PageRoutes );
}