Пример #1
0
 public static string SequenceToString <T>(this IEnumerable <T> sequence, char separator)
 {
     return(IEnumerableExtensions.SequenceToString <T>(sequence, separator.ToString()));
 }
Пример #2
0
 public static string SequenceToString <T>(this IEnumerable <T> sequence)
 {
     return(IEnumerableExtensions.SequenceToString <T>(sequence, string.Empty));
 }
Пример #3
0
 public static int Xor(this IEnumerable <int> sequence)
 {
     return(IEnumerableExtensions.Xor <int>(sequence, (Func <int, int>)(value => value)));
 }
Пример #4
0
 public static string SequenceToString <T>(this IEnumerable <T> sequence, string separator, string prefix)
 {
     return(IEnumerableExtensions.SequenceToString <T>(sequence, separator, prefix, string.Empty));
 }
Пример #5
0
 public static bool IsStrictOrdered <T, TKey>(this IEnumerable <T> sequence, Func <T, TKey> keySelector)
 {
     return(IEnumerableExtensions.IsStrictOrdered <T, TKey>(sequence, keySelector, (IComparer <TKey>)Comparer <TKey> .Default));
 }
Пример #6
0
 public static long Xor(this IEnumerable <long> sequence)
 {
     return(IEnumerableExtensions.Xor <long>(sequence, (Func <long, long>)(value => value)));
 }
Пример #7
0
 public static bool IsStrictOrdered <T>(this IEnumerable <T> sequence)
 {
     return(IEnumerableExtensions.IsStrictOrdered <T, T>(sequence, (Func <T, T>)(element => element)));
 }
Пример #8
0
        public static int UShortsSequenceGetHashCode(this IEnumerable <ushort> sequence)
        {
            int i = 0;

            return(IEnumerableExtensions.Xor <ushort>(sequence, (Func <ushort, int>)(b => (int)b << 16 * (i++ % 2))));
        }
Пример #9
0
        public static int BytesSequenceGetHashCode(this IEnumerable <byte> sequence)
        {
            int i = 0;

            return(IEnumerableExtensions.Xor <byte>(sequence, (Func <byte, int>)(b => (int)b << 8 * (i++ % 4))));
        }
Пример #10
0
 public static int SequenceGetHashCode <T>(this IEnumerable <T> sequence)
 {
     return(IEnumerableExtensions.Xor <T>(sequence, (Func <T, int>)(value => value.GetHashCode())));
 }
Пример #11
0
 public static string BytesSequenceToHexadecimalString(this IEnumerable <byte> sequence)
 {
     return(IEnumerableExtensions.BytesSequenceToHexadecimalString(sequence, string.Empty));
 }