Free cookie consent management tool by TermsFeed Policy Generator

Changeset 8128 for trunk


Ignore:
Timestamp:
06/26/12 15:41:16 (12 years ago)
Author:
mkommend
Message:

#1869: Readded ToEnumerable extension method.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Common/3.3/ObjectExtensions.cs

    r8108 r8128  
    3131namespace HeuristicLab.Common {
    3232  public static class ObjectExtensions {
     33    public static IEnumerable<T> ToEnumerable<T>(this T obj) {
     34      yield return obj;
     35    }
     36
    3337    public static IEnumerable<object> GetObjectGraphObjects(this object obj, HashSet<string> excludedMembers = null, bool excludeStaticMembers = false) {
    3438      if (obj == null) return Enumerable.Empty<object>();
Note: See TracChangeset for help on using the changeset viewer.