public static BsonRegularExpression ToRegex(this string value, StringComparisonMode comparisonMode)
    {
        switch (comparisonMode)
        {
        case StringComparisonMode.StrictEqual:
            return(value.ToRegexMatchEquals());

        case StringComparisonMode.Contains:
            return(value.ToRegexMatchContains());

        case StringComparisonMode.EndsWith:
            return(value.ToRegexMatchEndsWith());

        default:
            throw new NotSupportedException(nameof(StringComparisonMode));
        }
    }
Exemplo n.º 2
0
 /// <summary>
 /// int _mm_cmpestra (__m128i a, int la, __m128i b, int lb, const int imm8)
 /// int _mm_cmpestrc (__m128i a, int la, __m128i b, int lb, const int imm8)
 /// int _mm_cmpestro (__m128i a, int la, __m128i b, int lb, const int imm8)
 /// int _mm_cmpestrs (__m128i a, int la, __m128i b, int lb, const int imm8)
 /// int _mm_cmpestrz (__m128i a, int la, __m128i b, int lb, const int imm8)
 /// </summary>
 public static bool CompareExplicitLength(Vector128 <short> left, byte leftLength, Vector128 <short> right, byte rightLength, ResultsFlag flag, StringComparisonMode mode)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 3
0
 /// <summary>
 /// int _mm_cmpistra (__m128i a, __m128i b, const int imm8)
 /// int _mm_cmpistrc (__m128i a, __m128i b, const int imm8)
 /// int _mm_cmpistro (__m128i a, __m128i b, const int imm8)
 /// int _mm_cmpistrs (__m128i a, __m128i b, const int imm8)
 /// int _mm_cmpistrz (__m128i a, __m128i b, const int imm8)
 /// </summary>
 public static bool CompareImplicitLength(Vector128 <byte> left, Vector128 <byte> right, ResultsFlag flag, StringComparisonMode mode)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 4
0
 /// <summary>
 /// __m128i _mm_cmpestrm (__m128i a, int la, __m128i b, int lb, const int imm8)
 /// </summary>
 public static Vector128 <ushort> CompareExplicitLengthUnitMask(Vector128 <ushort> left, byte leftLength, Vector128 <ushort> right, byte rightLength, StringComparisonMode mode)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 5
0
 /// <summary>
 /// __m128i _mm_cmpistrm (__m128i a, __m128i b, const int imm8)
 /// </summary>
 public static Vector128 <byte> CompareImplicitLengthUnitMask(Vector128 <byte> left, Vector128 <byte> right, StringComparisonMode mode)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 6
0
 /// <summary>
 /// int _mm_cmpestri (__m128i a, int la, __m128i b, int lb, const int imm8)
 /// </summary>
 public static int CompareExplicitLengthIndex(Vector128 <byte> left, byte leftLength, Vector128 <byte> right, byte rightLength, StringComparisonMode mode)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 7
0
 /// <summary>
 /// int _mm_cmpistri (__m128i a, __m128i b, const int imm8)
 /// </summary>
 public static int CompareImplicitLengthIndex(Vector128 <ushort> left, Vector128 <ushort> right, StringComparisonMode mode)
 {
     throw new NotImplementedException();
 }
 /// <summary>
 /// int _mm_cmpestra (__m128i a, int la, __m128i b, int lb, const int imm8)
 ///   PCMPESTRI xmm, xmm/m128, imm8
 /// int _mm_cmpestrc (__m128i a, int la, __m128i b, int lb, const int imm8)
 ///   PCMPESTRI xmm, xmm/m128, imm8
 /// int _mm_cmpestro (__m128i a, int la, __m128i b, int lb, const int imm8)
 ///   PCMPESTRI xmm, xmm/m128, imm8
 /// int _mm_cmpestrs (__m128i a, int la, __m128i b, int lb, const int imm8)
 ///   PCMPESTRI xmm, xmm/m128, imm8
 /// int _mm_cmpestrz (__m128i a, int la, __m128i b, int lb, const int imm8)
 ///   PCMPESTRI xmm, xmm/m128, imm8
 /// </summary>
 public static bool CompareExplicitLength(Vector128 <sbyte> left, byte leftLength, Vector128 <sbyte> right, byte rightLength, ResultsFlag flag, StringComparisonMode mode)
 {
     throw new PlatformNotSupportedException();
 }
 /// <summary>
 /// int _mm_cmpistra (__m128i a, __m128i b, const int imm8)
 ///   PCMPISTRI xmm, xmm/m128, imm8
 /// int _mm_cmpistrc (__m128i a, __m128i b, const int imm8)
 ///   PCMPISTRI xmm, xmm/m128, imm8
 /// int _mm_cmpistro (__m128i a, __m128i b, const int imm8)
 ///   PCMPISTRI xmm, xmm/m128, imm8
 /// int _mm_cmpistrs (__m128i a, __m128i b, const int imm8)
 ///   PCMPISTRI xmm, xmm/m128, imm8
 /// int _mm_cmpistrz (__m128i a, __m128i b, const int imm8)
 ///   PCMPISTRI xmm, xmm/m128, imm8
 /// </summary>
 public static bool CompareImplicitLength(Vector128 <ushort> left, Vector128 <ushort> right, ResultsFlag flag, StringComparisonMode mode)
 {
     throw new PlatformNotSupportedException();
 }
 /// <summary>
 /// __m128i _mm_cmpestrm (__m128i a, int la, __m128i b, int lb, const int imm8)
 ///   PCMPESTRM xmm, xmm/m128, imm8
 /// </summary>
 public static Vector128 <byte> CompareExplicitLengthUnitMask(Vector128 <byte> left, byte leftLength, Vector128 <byte> right, byte rightLength, StringComparisonMode mode)
 {
     throw new PlatformNotSupportedException();
 }
 /// <summary>
 /// __m128i _mm_cmpistrm (__m128i a, __m128i b, const int imm8)
 ///   PCMPISTRM xmm, xmm/m128, imm8
 /// </summary>
 public static Vector128 <ushort> CompareImplicitLengthUnitMask(Vector128 <ushort> left, Vector128 <ushort> right, StringComparisonMode mode)
 {
     throw new PlatformNotSupportedException();
 }
 /// <summary>
 /// int _mm_cmpestri (__m128i a, int la, __m128i b, int lb, const int imm8)
 ///   PCMPESTRI xmm, xmm/m128, imm8
 /// </summary>
 public static int CompareExplicitLengthIndex(Vector128 <ushort> left, byte leftLength, Vector128 <ushort> right, byte rightLength, StringComparisonMode mode)
 {
     throw new PlatformNotSupportedException();
 }
 /// <summary>
 /// int _mm_cmpistri (__m128i a, __m128i b, const int imm8)
 ///   PCMPISTRI xmm, xmm/m128, imm8
 /// </summary>
 public static int CompareImplicitLengthIndex(Vector128 <byte> left, Vector128 <byte> right, StringComparisonMode mode)
 {
     throw new PlatformNotSupportedException();
 }