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


C# TagLib.AddFrame方法代码示例

本文整理汇总了C#中TagLib.AddFrame方法的典型用法代码示例。如果您正苦于以下问题:C# TagLib.AddFrame方法的具体用法?C# TagLib.AddFrame怎么用?C# TagLib.AddFrame使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TagLib的用法示例。


在下文中一共展示了TagLib.AddFrame方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: 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

示例2: 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

示例3: Get

 public static UnsynchronisedLyricsFrame Get(TagLib.Id3v2.Tag tag, string description, string language, bool create)
 {
     UnsynchronisedLyricsFrame frame;
     IEnumerator<Frame> enumerator = tag.GetFrames(FrameType.USLT).GetEnumerator();
     try
     {
         while (enumerator.MoveNext())
         {
             Frame current = enumerator.Current;
             frame = current as UnsynchronisedLyricsFrame;
             if (((frame != null) && (frame.Description == description)) && ((language == null) || (language == frame.Language)))
             {
                 return frame;
             }
         }
     }
     finally
     {
         if (enumerator == null)
         {
         }
         enumerator.Dispose();
     }
     if (!create)
     {
         return null;
     }
     frame = new UnsynchronisedLyricsFrame(description, language);
     tag.AddFrame(frame);
     return frame;
 }
开发者ID:shankithegreat,项目名称:commanderdotnet,代码行数:31,代码来源:UnsynchronisedLyricsFrame.cs

示例4: Get

 public static GeneralEncapsulatedObjectFrame Get(TagLib.Id3v2.Tag tag, string description, bool create)
 {
     GeneralEncapsulatedObjectFrame frame;
     IEnumerator<Frame> enumerator = tag.GetFrames(FrameType.GEOB).GetEnumerator();
     try
     {
         while (enumerator.MoveNext())
         {
             Frame current = enumerator.Current;
             frame = current as GeneralEncapsulatedObjectFrame;
             if ((frame != null) && (frame.Description == description))
             {
                 return frame;
             }
         }
     }
     finally
     {
         if (enumerator == null)
         {
         }
         enumerator.Dispose();
     }
     if (!create)
     {
         return null;
     }
     frame = new GeneralEncapsulatedObjectFrame {
         Description = description
     };
     tag.AddFrame(frame);
     return frame;
 }
开发者ID:shankithegreat,项目名称:commanderdotnet,代码行数:33,代码来源:GeneralEncapsulatedObjectFrame.cs

示例5: 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

示例6: Get

 public static RelativeVolumeFrame Get(TagLib.Id3v2.Tag tag, string identification, bool create)
 {
     RelativeVolumeFrame frame;
     IEnumerator<Frame> enumerator = tag.GetFrames(FrameType.RVA2).GetEnumerator();
     try
     {
         while (enumerator.MoveNext())
         {
             Frame current = enumerator.Current;
             frame = current as RelativeVolumeFrame;
             if ((frame != null) && (frame.Identification == identification))
             {
                 return frame;
             }
         }
     }
     finally
     {
         if (enumerator == null)
         {
         }
         enumerator.Dispose();
     }
     if (!create)
     {
         return null;
     }
     frame = new RelativeVolumeFrame(identification);
     tag.AddFrame(frame);
     return frame;
 }
开发者ID:shankithegreat,项目名称:commanderdotnet,代码行数:31,代码来源:RelativeVolumeFrame.cs

示例7: Get

 public static TermsOfUseFrame Get(TagLib.Id3v2.Tag tag, string language, bool create)
 {
     IEnumerator<Frame> enumerator = tag.GetFrames(FrameType.USER).GetEnumerator();
     try
     {
         while (enumerator.MoveNext())
         {
             Frame current = enumerator.Current;
             TermsOfUseFrame frame2 = current as TermsOfUseFrame;
             if ((frame2 != null) && ((language == null) || (language == frame2.Language)))
             {
                 return frame2;
             }
         }
     }
     finally
     {
         if (enumerator == null)
         {
         }
         enumerator.Dispose();
     }
     if (!create)
     {
         return null;
     }
     TermsOfUseFrame frame3 = new TermsOfUseFrame(language);
     tag.AddFrame(frame3);
     return frame3;
 }
开发者ID:shankithegreat,项目名称:commanderdotnet,代码行数:30,代码来源:TermsOfUseFrame.cs

示例8: Get

 public static UniqueFileIdentifierFrame Get(TagLib.Id3v2.Tag tag, string owner, bool create)
 {
     UniqueFileIdentifierFrame frame;
     IEnumerator<Frame> enumerator = tag.GetFrames(FrameType.UFID).GetEnumerator();
     try
     {
         while (enumerator.MoveNext())
         {
             Frame current = enumerator.Current;
             frame = current as UniqueFileIdentifierFrame;
             if ((frame != null) && (frame.Owner == owner))
             {
                 return frame;
             }
         }
     }
     finally
     {
         if (enumerator == null)
         {
         }
         enumerator.Dispose();
     }
     if (!create)
     {
         return null;
     }
     frame = new UniqueFileIdentifierFrame(owner, null);
     tag.AddFrame(frame);
     return frame;
 }
开发者ID:shankithegreat,项目名称:commanderdotnet,代码行数:31,代码来源:UniqueFileIdentifierFrame.cs

示例9: Get

 public static UserTextInformationFrame Get(TagLib.Id3v2.Tag tag, string description, StringType type, bool create)
 {
     if (tag == null)
     {
         throw new ArgumentNullException("tag");
     }
     if (description == null)
     {
         throw new ArgumentNullException("description");
     }
     if (description.Length == 0)
     {
         throw new ArgumentException("Description must not be empty.", "description");
     }
     IEnumerator<UserTextInformationFrame> enumerator = tag.GetFrames<UserTextInformationFrame>(FrameType.TXXX).GetEnumerator();
     try
     {
         while (enumerator.MoveNext())
         {
             UserTextInformationFrame current = enumerator.Current;
             if (description.Equals(current.Description))
             {
                 return current;
             }
         }
     }
     finally
     {
         if (enumerator == null)
         {
         }
         enumerator.Dispose();
     }
     if (!create)
     {
         return null;
     }
     UserTextInformationFrame frame2 = new UserTextInformationFrame(description, type);
     tag.AddFrame(frame2);
     return frame2;
 }
开发者ID:shankithegreat,项目名称:commanderdotnet,代码行数:41,代码来源:UserTextInformationFrame.cs

示例10: Get

 public static TextInformationFrame Get(TagLib.Id3v2.Tag tag, ByteVector ident, StringType encoding, bool create)
 {
     if (tag == null)
     {
         throw new ArgumentNullException("tag");
     }
     if (ident == null)
     {
         throw new ArgumentNullException("ident");
     }
     if (ident.Count != 4)
     {
         throw new ArgumentException("Identifier must be four bytes long.", "ident");
     }
     IEnumerator<TextInformationFrame> enumerator = tag.GetFrames<TextInformationFrame>(ident).GetEnumerator();
     try
     {
         while (enumerator.MoveNext())
         {
             return enumerator.Current;
         }
     }
     finally
     {
         if (enumerator == null)
         {
         }
         enumerator.Dispose();
     }
     if (!create)
     {
         return null;
     }
     TextInformationFrame frame = new TextInformationFrame(ident, encoding);
     tag.AddFrame(frame);
     return frame;
 }
开发者ID:shankithegreat,项目名称:commanderdotnet,代码行数:37,代码来源:TextInformationFrame.cs

示例11: Get

 public static AttachedPictureFrame Get(TagLib.Id3v2.Tag tag, string description, PictureType type, bool create)
 {
     AttachedPictureFrame frame;
     IEnumerator<Frame> enumerator = tag.GetFrames(FrameType.APIC).GetEnumerator();
     try
     {
         while (enumerator.MoveNext())
         {
             Frame current = enumerator.Current;
             frame = current as AttachedPictureFrame;
             if (((frame != null) && ((description == null) || (frame.Description == description))) && ((type == PictureType.Other) || (frame.Type == type)))
             {
                 return frame;
             }
         }
     }
     finally
     {
         if (enumerator == null)
         {
         }
         enumerator.Dispose();
     }
     if (!create)
     {
         return null;
     }
     frame = new AttachedPictureFrame {
         Description = description,
         Type = type
     };
     tag.AddFrame(frame);
     return frame;
 }
开发者ID:shankithegreat,项目名称:commanderdotnet,代码行数:34,代码来源:AttachedPictureFrame.cs


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