Exemple #1
0
 public static string SequenceToString <T>(this IEnumerable <T> sequence, char separator)
 {
     return(IEnumerableExtensions.SequenceToString <T>(sequence, separator.ToString()));
 }
Exemple #2
0
 public static string SequenceToString <T>(this IEnumerable <T> sequence)
 {
     return(IEnumerableExtensions.SequenceToString <T>(sequence, string.Empty));
 }
Exemple #3
0
 public static int Xor(this IEnumerable <int> sequence)
 {
     return(IEnumerableExtensions.Xor <int>(sequence, (Func <int, int>)(value => value)));
 }
Exemple #4
0
 public static string SequenceToString <T>(this IEnumerable <T> sequence, string separator, string prefix)
 {
     return(IEnumerableExtensions.SequenceToString <T>(sequence, separator, prefix, string.Empty));
 }
Exemple #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));
 }
Exemple #6
0
 public static long Xor(this IEnumerable <long> sequence)
 {
     return(IEnumerableExtensions.Xor <long>(sequence, (Func <long, long>)(value => value)));
 }
Exemple #7
0
 public static bool IsStrictOrdered <T>(this IEnumerable <T> sequence)
 {
     return(IEnumerableExtensions.IsStrictOrdered <T, T>(sequence, (Func <T, T>)(element => element)));
 }
Exemple #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))));
        }
Exemple #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))));
        }
Exemple #10
0
 public static int SequenceGetHashCode <T>(this IEnumerable <T> sequence)
 {
     return(IEnumerableExtensions.Xor <T>(sequence, (Func <T, int>)(value => value.GetHashCode())));
 }
Exemple #11
0
 public static string BytesSequenceToHexadecimalString(this IEnumerable <byte> sequence)
 {
     return(IEnumerableExtensions.BytesSequenceToHexadecimalString(sequence, string.Empty));
 }