コード例 #1
0
 /// <summary>
 /// Adds the specified <paramref name="part"/> to the collection.
 /// </summary>
 /// <param name="part">The part to add.</param>
 public void Add(YouTubeChannelPart part)
 {
     _list.Add(part);
 }
コード例 #2
0
 /// <summary>
 /// Attempts to parse the specified <paramref name="str"/> into an instance of <see cref="YouTubeChannelPart"/>.
 /// </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 YouTubeChannelPart part)
 {
     part = YouTubeChannelParts.Values.FirstOrDefault(temp => temp.Name == str);
     return(part != null);
 }