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