Created
November 8, 2010 01:00
-
-
Save mthomas/667249 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class DemoExtensions{ | |
public static T Pick<T>(this IEnumerable<T> items){ | |
/*return random element out of items*/ | |
} | |
public static T Take<T>(this IList<T> items){ | |
/*thread safe: return random element out of items and remove it*/ | |
} | |
public static IList<T> Times<T>(this int x, Func<int, T> action){ | |
/*use Parallel.For to execute action x times, aggregate results into a list and return it*/ | |
/*wrap each execution in a new NHibernate session scope*/ | |
} | |
public static IList<TResult> Each<T, TResult>(this IEnumerable<T> items, Func<T, TResult> action){ | |
/*use Parallel.each to transform each item in items, aggregate results, return */ | |
/*wrap each execution in a new NHibernate session scope*/ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment