本文整理匯總了C#中N2.Web.PathData.Clone方法的典型用法代碼示例。如果您正苦於以下問題:C# PathData.Clone方法的具體用法?C# PathData.Clone怎麽用?C# PathData.Clone使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類N2.Web.PathData
的用法示例。
在下文中一共展示了PathData.Clone方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Cloned_path_data_should_not_be_same_item
public void Cloned_path_data_should_not_be_same_item()
{
var path = new PathData(page, item);
var clone = path.Clone();
clone.ShouldNotBeSameAs(path);
clone.QueryParameters.ShouldNotBeSameAs(path.QueryParameters);
}
示例2: Cloned_path_data_has_same_values
public void Cloned_path_data_has_same_values()
{
var path = new PathData(page, item) { Action = "hello", Argument = "world", Ignore = true, IsCacheable = false, IsPubliclyAvailable = true, IsRewritable = false, TemplateUrl = "asdf" };
var clone = path.Clone();
path.Action.ShouldBe(clone.Action);
path.Argument.ShouldBe(clone.Argument);
path.CurrentItem.ShouldBe(clone.CurrentItem);
path.CurrentPage.ShouldBe(clone.CurrentPage);
path.ID.ShouldBe(clone.ID);
path.Ignore.ShouldBe(clone.Ignore);
path.IsCacheable.ShouldBe(clone.IsCacheable);
path.IsPubliclyAvailable.ShouldBe(clone.IsPubliclyAvailable);
path.IsRewritable.ShouldBe(clone.IsRewritable);
path.PageID.ShouldBe(clone.PageID);
path.Path.ShouldBe(clone.Path);
path.QueryParameters.Count.ShouldBe(clone.QueryParameters.Count);
path.StopID.ShouldBe(clone.StopID);
path.StopItem.ShouldBe(clone.StopItem);
path.TemplateUrl.ShouldBe(clone.TemplateUrl);
}