本文整理汇总了C#中SerializationTestContext.AssertRead方法的典型用法代码示例。如果您正苦于以下问题:C# SerializationTestContext.AssertRead方法的具体用法?C# SerializationTestContext.AssertRead怎么用?C# SerializationTestContext.AssertRead使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SerializationTestContext
的用法示例。
在下文中一共展示了SerializationTestContext.AssertRead方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReadCollectionOfDictionaryTest
public void ReadCollectionOfDictionaryTest()
{
var context = new SerializationTestContext();
var stats = context.AssertRead<CollectionOfDictionaryGraph>(3);
stats.AssertVisitOrderExact(LevelType.Collection, LevelType.DictionaryInCollection, LevelType.DictionaryKey,
LevelType.DictionaryValue, LevelType.DictionaryKey, LevelType.DictionaryInCollection);
}
示例2: ReadCollectionOfComplexTest
public void ReadCollectionOfComplexTest()
{
var context = new SerializationTestContext();
var stats = context.AssertRead<CollectionOfComplexGraph>(4);
stats.AssertVisitOrderExact(LevelType.Collection, LevelType.CollectionItem, LevelType.Value, LevelType.Value,
LevelType.Value, LevelType.Value, LevelType.CollectionItem);
}
示例3: ReadDictionaryCount3WithComplexKeyAndValueTest
public void ReadDictionaryCount3WithComplexKeyAndValueTest()
{
var context = new SerializationTestContext();
var stats = context.AssertRead<DictionaryWithComplexKeyAndValueGraph>(15, 3);
stats.AssertVisitOrderExact(LevelType.Dictionary, LevelType.DictionaryKey, LevelType.Value, LevelType.Value,
LevelType.DictionaryValue, LevelType.Value, LevelType.Value, LevelType.Value,
LevelType.DictionaryKey, LevelType.Value, LevelType.Value,
LevelType.DictionaryValue, LevelType.Value, LevelType.Value, LevelType.Value,
LevelType.DictionaryKey, LevelType.Value, LevelType.Value,
LevelType.DictionaryValue, LevelType.Value, LevelType.Value, LevelType.Value,
LevelType.DictionaryKey);
}
示例4: ReadMultidimensionalArrayTest
public void ReadMultidimensionalArrayTest()
{
var context = new SerializationTestContext();
var stats = context.AssertRead<MultidimensionalArrayGraph>(2);
stats.AssertVisitOrderExact(LevelType.Collection, LevelType.CollectionInCollection, LevelType.CollectionItem,
LevelType.CollectionItem, LevelType.CollectionInCollection);
}
示例5: ReadDictionaryWithDictionaryValueTest
public void ReadDictionaryWithDictionaryValueTest()
{
var context = new SerializationTestContext();
var stats = context.AssertRead<DictionaryWithDictionaryValueGraph>(5);
stats.AssertVisitOrderExact(LevelType.Dictionary, LevelType.DictionaryKey,
LevelType.DictionaryInDictionaryValue, LevelType.DictionaryKey, LevelType.DictionaryValue,
LevelType.DictionaryKey, LevelType.DictionaryKey);
}
示例6: ReadDictionaryWithCollectionKeyTest
public void ReadDictionaryWithCollectionKeyTest()
{
var context = new SerializationTestContext();
var stats = context.AssertRead<DictionaryWithCollectionKeyGraph>(3);
stats.AssertVisitOrderExact(LevelType.Dictionary, LevelType.CollectionInDictionaryKey,
LevelType.CollectionItem, LevelType.CollectionItem, LevelType.DictionaryValue,
LevelType.CollectionInDictionaryKey);
}