当前位置: 首页>>代码示例>>C#>>正文


C# TagLib.GetEnumerator方法代码示例

本文整理汇总了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;
 }
开发者ID:shankithegreat,项目名称:commanderdotnet,代码行数:31,代码来源:MusicCdIdentifierFrame.cs

示例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;
 }
开发者ID:shankithegreat,项目名称:commanderdotnet,代码行数:31,代码来源:PopularimeterFrame.cs

示例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;
 }
开发者ID:shankithegreat,项目名称:commanderdotnet,代码行数:30,代码来源:SynchronisedLyricsFrame.cs

示例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;
 }
开发者ID:shankithegreat,项目名称:commanderdotnet,代码行数:47,代码来源:SynchronisedLyricsFrame.cs


注:本文中的TagLib.GetEnumerator方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。