Пример #1
0
 /// <summary>
 ///     Creates an <see cref="IEnumerable{T}" /> from an <see cref="IMMWMSPropertySet" />
 /// </summary>
 /// <param name="source">An <see cref="IMMWMSPropertySet" /> to create an <see cref="IEnumerable{T}" /> from.</param>
 /// <returns>
 ///     An <see cref="IEnumerable{T}" /> that contains the property set from the input source.
 /// </returns>
 public static IEnumerable <KeyValuePair <string, object> > AsEnumerable(this IMMWMSPropertySet source)
 {
     if (source != null)
     {
         for (int i = 0; i < source.Count; i++)
         {
             yield return(new KeyValuePair <string, object>(source.GetNameByIndex(i), source.GetPropertyByIndex(i)));
         }
     }
 }