예제 #1
0
 /// <summary>
 /// Adds the specified <paramref name="part"/> to the collection.
 /// </summary>
 /// <param name="part">The part to add.</param>
 public void Add(YouTubeVideoPart part)
 {
     _list.Add(part);
 }
 /// <summary>
 /// Attempts to parse the specified <paramref name="str"/> into an instance of <see cref="YouTubeVideoPart"/>.
 /// </summary>
 /// <param name="str">The string with the name of the part.</param>
 /// <param name="part">The parsed part.</param>
 /// <returns><c>true</c> if <paramref name="str"/> matches a known part, otherwise <c>false</c>.</returns>
 public static bool TryParse(string str, out YouTubeVideoPart part)
 {
     part = YouTubeVideoParts.Values.FirstOrDefault(temp => temp.Name == str);
     return(part != null);
 }