本文整理汇总了C#中Tag.Read方法的典型用法代码示例。如果您正苦于以下问题:C# Tag.Read方法的具体用法?C# Tag.Read怎么用?C# Tag.Read使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tag
的用法示例。
在下文中一共展示了Tag.Read方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Parse
/// <summary>
/// Parses this object out of a stream
/// </summary>
protected override void Parse()
{
BinaryReader br = new BinaryReader(this._dataStream);
this._spriteID = br.ReadUInt16();
this._frameCount = br.ReadUInt16();
this._controlTags = new List<AbstractTagHandler>();
Tag t;
MemoryStream tempstream = new MemoryStream();
long position = this._dataStream.Position;
this._dataStream.WriteTo(tempstream);
tempstream.Seek(position, SeekOrigin.Begin);
do
{
t = new Tag();
try
{
tempstream = (MemoryStream)t.Read(tempstream);
this._controlTags.Add(TagHandlerFactory.Create(t, this._SourceFileReference, this._dataStream));
if (!this._allowedTags.Contains(t.TagType))
{
if (TagTypes.PlaceObject3 != t.TagType)
{
SwfFormatException e = new SwfFormatException("DefineSprite contains illegal tag.(" + t.TagType + ")");
Log.Warn(this, e.Message);
throw e;
}
}
}
catch ( IOException ioe )
{
Log.Error(this, ioe );
SwfFormatException e = new SwfFormatException( "Tag list incomplete, does not end with END tag" );
Log.Warn(this, e );
//throw e;
}
}
while (!t.TagType.Equals(TagTypes.End));
}