本文整理汇总了C#中TagLib.ReadWord方法的典型用法代码示例。如果您正苦于以下问题:C# TagLib.ReadWord方法的具体用法?C# TagLib.ReadWord怎么用?C# TagLib.ReadWord使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TagLib
的用法示例。
在下文中一共展示了TagLib.ReadWord方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ContentDescriptionObject
public ContentDescriptionObject(TagLib.Asf.File file, long position) : base(file, position)
{
this.title = string.Empty;
this.author = string.Empty;
this.copyright = string.Empty;
this.description = string.Empty;
this.rating = string.Empty;
if (base.Guid != TagLib.Asf.Guid.AsfContentDescriptionObject)
{
throw new CorruptFileException("Object GUID incorrect.");
}
if (base.OriginalSize < 0x22L)
{
throw new CorruptFileException("Object size too small.");
}
ushort length = file.ReadWord();
ushort num2 = file.ReadWord();
ushort num3 = file.ReadWord();
ushort num4 = file.ReadWord();
ushort num5 = file.ReadWord();
this.title = file.ReadUnicode(length);
this.author = file.ReadUnicode(num2);
this.copyright = file.ReadUnicode(num3);
this.description = file.ReadUnicode(num4);
this.rating = file.ReadUnicode(num5);
}
示例2: HeaderExtensionObject
public HeaderExtensionObject(TagLib.Asf.File file, long position) : base(file, position)
{
this.children = new List<TagLib.Asf.Object>();
if (!base.Guid.Equals(TagLib.Asf.Guid.AsfHeaderExtensionObject))
{
throw new CorruptFileException("Object GUID incorrect.");
}
if (file.ReadGuid() != TagLib.Asf.Guid.AsfReserved1)
{
throw new CorruptFileException("Reserved1 GUID expected.");
}
if (file.ReadWord() != 6)
{
throw new CorruptFileException("Invalid reserved WORD. Expected '6'.");
}
uint num = file.ReadDWord();
position += 0x2eL;
while (num > 0)
{
TagLib.Asf.Object item = file.ReadObject(position);
position += (long) item.OriginalSize;
num -= (uint) item.OriginalSize;
this.children.Add(item);
}
}
示例3: Parse
protected bool Parse(TagLib.Asf.File file)
{
int length = file.ReadWord();
this.name = file.ReadUnicode(length);
this.type = (DataType) file.ReadWord();
int num2 = file.ReadWord();
switch (this.type)
{
case DataType.Unicode:
this.strValue = file.ReadUnicode(num2);
break;
case DataType.Bytes:
this.byteValue = file.ReadBlock(num2);
break;
case DataType.Bool:
this.longValue = file.ReadDWord();
break;
case DataType.DWord:
this.longValue = file.ReadDWord();
break;
case DataType.QWord:
this.longValue = file.ReadQWord();
break;
case DataType.Word:
this.longValue = file.ReadWord();
break;
default:
return false;
}
return true;
}
示例4: StreamPropertiesObject
public StreamPropertiesObject(TagLib.Asf.File file, long position) : base(file, position)
{
if (!base.Guid.Equals(TagLib.Asf.Guid.AsfStreamPropertiesObject))
{
throw new CorruptFileException("Object GUID incorrect.");
}
if (base.OriginalSize < 0x4eL)
{
throw new CorruptFileException("Object size too small.");
}
this.stream_type = file.ReadGuid();
this.error_correction_type = file.ReadGuid();
this.time_offset = file.ReadQWord();
int length = (int) file.ReadDWord();
int num2 = (int) file.ReadDWord();
this.flags = file.ReadWord();
this.reserved = file.ReadDWord();
this.type_specific_data = file.ReadBlock(length);
this.error_correction_data = file.ReadBlock(num2);
}
示例5: Parse
protected bool Parse(TagLib.Asf.File file)
{
this.lang_list_index = file.ReadWord();
this.stream_number = file.ReadWord();
ushort length = file.ReadWord();
this.type = (DataType) file.ReadWord();
int num2 = (int) file.ReadDWord();
this.name = file.ReadUnicode(length);
switch (this.type)
{
case DataType.Unicode:
this.strValue = file.ReadUnicode(num2);
break;
case DataType.Bytes:
this.byteValue = file.ReadBlock(num2);
break;
case DataType.Bool:
case DataType.DWord:
this.longValue = file.ReadDWord();
break;
case DataType.QWord:
this.longValue = file.ReadQWord();
break;
case DataType.Word:
this.longValue = file.ReadWord();
break;
case DataType.Guid:
this.guidValue = file.ReadGuid();
break;
default:
return false;
}
return true;
}