Exemple #1
0
        public static string FromGlob(string pattern, PcreGlobConversionOptions options)
        {
            if (pattern == null)
            {
                throw new ArgumentNullException(nameof(pattern));
            }
            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            using (var context = options.CreateContext())
            {
                return(context.Convert(pattern, ImplicitOptions | options.GetConvertOptions()));
            }
        }
Exemple #2
0
        public static string FromGlob(string pattern, PcreGlobConversionOptions options)
        {
            if (pattern == null)
            {
                throw new ArgumentNullException(nameof(pattern));
            }
            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            var input = new Native.convert_input();

            options.FillConvertInput(ref input);

            return(Convert(pattern, ref input));
        }