コード例 #1
0
        public static IEnumerable SelectNullable <T>(this NullAllowed <T> nullable,
                                                     Func <T, IEnumerable> selector)
            where T : class
        {
            Contract.Requires(selector != null);

            return(nullable.Select(selector).AllowNull());
        }
コード例 #2
0
        public static ICollection <TResult> SelectNullable <T, TResult>(this NullAllowed <T> nullable,
                                                                        Func <T, ICollection <TResult> > selector)
            where T : class
        {
            Contract.Requires(selector != null);

            return(nullable.Select(selector).AllowNull());
        }