本文整理匯總了C#中OsmSharp.Osm.Xml.Streams.XmlOsmStreamSource.Reset方法的典型用法代碼示例。如果您正苦於以下問題:C# XmlOsmStreamSource.Reset方法的具體用法?C# XmlOsmStreamSource.Reset怎麽用?C# XmlOsmStreamSource.Reset使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類OsmSharp.Osm.Xml.Streams.XmlOsmStreamSource
的用法示例。
在下文中一共展示了XmlOsmStreamSource.Reset方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: XmlDataProcessorSourceReset
public void XmlDataProcessorSourceReset()
{
// generate the source.
var source = new XmlOsmStreamSource(
Assembly.GetExecutingAssembly().GetManifestResourceStream(
"OsmSharp.Test.Unittests.api.osm"));
// pull the data out.
var target = new OsmStreamTargetEmpty();
target.RegisterSource(source);
target.Pull();
// reset the source.
if (source.CanReset)
{
source.Reset();
// pull the data again.
target.Pull();
}
}
示例2: TestSimpleToCompleteOn
/// <summary>
/// Test simple to complete conversion on the given resource.
/// </summary>
/// <param name="embeddedResource"></param>
private void TestSimpleToCompleteOn(string embeddedResource)
{
var dataProcessorSource = new XmlOsmStreamSource(
Assembly.GetExecutingAssembly().GetManifestResourceStream(embeddedResource));
// fill the memory data source with source-data.
var referenceSource = MemoryDataSource.CreateFrom(dataProcessorSource);
// pull the complete objects.
dataProcessorSource.Reset();
var list = this.PullToCompleteList(dataProcessorSource);
// compare the two.
this.Compare(referenceSource, list);
}