本文整理汇总了C#中TagLib.GetEnumerator方法的典型用法代码示例。如果您正苦于以下问题:C# TagLib.GetEnumerator方法的具体用法?C# TagLib.GetEnumerator怎么用?C# TagLib.GetEnumerator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TagLib
的用法示例。
在下文中一共展示了TagLib.GetEnumerator方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Get
public static MusicCdIdentifierFrame Get(TagLib.Id3v2.Tag tag, bool create)
{
MusicCdIdentifierFrame frame;
IEnumerator<Frame> enumerator = tag.GetEnumerator();
try
{
while (enumerator.MoveNext())
{
Frame current = enumerator.Current;
frame = current as MusicCdIdentifierFrame;
if (frame != null)
{
return frame;
}
}
}
finally
{
if (enumerator == null)
{
}
enumerator.Dispose();
}
if (!create)
{
return null;
}
frame = new MusicCdIdentifierFrame();
tag.AddFrame(frame);
return frame;
}
示例2: Get
public static PopularimeterFrame Get(TagLib.Id3v2.Tag tag, string user, bool create)
{
PopularimeterFrame frame;
IEnumerator<Frame> enumerator = tag.GetEnumerator();
try
{
while (enumerator.MoveNext())
{
Frame current = enumerator.Current;
frame = current as PopularimeterFrame;
if ((frame != null) && frame.user.Equals(user))
{
return frame;
}
}
}
finally
{
if (enumerator == null)
{
}
enumerator.Dispose();
}
if (!create)
{
return null;
}
frame = new PopularimeterFrame(user);
tag.AddFrame(frame);
return frame;
}
示例3: Get
public static SynchronisedLyricsFrame Get(TagLib.Id3v2.Tag tag, string description, string language, SynchedTextType type, bool create)
{
IEnumerator<Frame> enumerator = tag.GetEnumerator();
try
{
while (enumerator.MoveNext())
{
Frame current = enumerator.Current;
SynchronisedLyricsFrame frame2 = current as SynchronisedLyricsFrame;
if (((frame2 != null) && ((frame2.Description == description) && ((language == null) || (language == frame2.Language)))) && (type == frame2.Type))
{
return frame2;
}
}
}
finally
{
if (enumerator == null)
{
}
enumerator.Dispose();
}
if (!create)
{
return null;
}
SynchronisedLyricsFrame frame3 = new SynchronisedLyricsFrame(description, language, type);
tag.AddFrame(frame3);
return frame3;
}
示例4: GetPreferred
public static SynchronisedLyricsFrame GetPreferred(TagLib.Id3v2.Tag tag, string description, string language, SynchedTextType type)
{
int num = -1;
SynchronisedLyricsFrame frame = null;
IEnumerator<Frame> enumerator = tag.GetEnumerator();
try
{
while (enumerator.MoveNext())
{
Frame current = enumerator.Current;
SynchronisedLyricsFrame frame3 = current as SynchronisedLyricsFrame;
if (frame3 != null)
{
int num2 = 0;
if (frame3.Language == language)
{
num2 += 4;
}
if (frame3.Description == description)
{
num2 += 2;
}
if (frame3.Type == type)
{
num2++;
}
if (num2 == 7)
{
return frame3;
}
if (num2 > num)
{
num = num2;
frame = frame3;
}
}
}
}
finally
{
if (enumerator == null)
{
}
enumerator.Dispose();
}
return frame;
}