Ejemplo n.º 1
0
 public static ErrorCode CompilePatternFile(UnmanagedRantContext context, string patternPath, out UnmanagedPattern patternCompiled)
 {
     RantPattern pattern = null;
     context.Run(() => pattern = RantPattern.FromFile(patternPath));
     patternCompiled = new UnmanagedPattern(pattern);
     return context.LastErrorCode;
 }
Ejemplo n.º 2
0
 public static ErrorCode RunPatternSeed(UnmanagedRantContext context, UnmanagedPattern pattern, PatternOptions options, long seed, out UnmanagedOutput output)
 {
     RantOutput o = null;
     context.Run(() => o = context.Rant.Do(pattern.Pattern, seed, options.CharLimit, options.Timeout));
     output = new UnmanagedOutput(o);
     return context.LastErrorCode;
 }
Ejemplo n.º 3
0
        public static ErrorCode RunPatternSeed(UnmanagedRantContext context, UnmanagedPattern pattern, PatternOptions options, long seed, out UnmanagedOutput output)
        {
            RantOutput o = null;

            context.Run(() => o = context.Rant.Do(pattern.Pattern, seed, options.CharLimit, options.Timeout));
            output = new UnmanagedOutput(o);
            return(context.LastErrorCode);
        }
Ejemplo n.º 4
0
        public static ErrorCode CompilePatternFile(UnmanagedRantContext context, string patternPath, out UnmanagedPattern patternCompiled)
        {
            RantPattern pattern = null;

            context.Run(() => pattern = RantPattern.FromFile(patternPath));
            patternCompiled           = new UnmanagedPattern(pattern);
            return(context.LastErrorCode);
        }
Ejemplo n.º 5
0
 public static ErrorCode LoadPackage(UnmanagedRantContext context, string packagePath) => context.Run(() => context.Rant.LoadPackage(packagePath));
Ejemplo n.º 6
0
 public static ErrorCode LoadEngine(UnmanagedRantContext context, string dictionaryPath) => context.Run(() => context.Rant = new RantEngine(dictionaryPath));
Ejemplo n.º 7
0
 public static string GetLastErrorMessage(UnmanagedRantContext context) => context.LastErrorMessage;
Ejemplo n.º 8
0
 public static ErrorCode GetLastError(UnmanagedRantContext context) => context.LastErrorCode;
Ejemplo n.º 9
0
 public static void ReleaseContext(UnmanagedRantContext context) => context.Dispose();
Ejemplo n.º 10
0
 public static bool IsEngineLoaded(UnmanagedRantContext context) => context.Rant != null;
Ejemplo n.º 11
0
 public static ErrorCode LoadPackage(UnmanagedRantContext context, string packagePath) => context.Run(() => context.Rant.LoadPackage(packagePath));
Ejemplo n.º 12
0
 public static ErrorCode LoadEngine(UnmanagedRantContext context, string dictionaryPath) => context.Run(() => context.Rant = new RantEngine(dictionaryPath));
Ejemplo n.º 13
0
 public static string GetLastErrorMessage(UnmanagedRantContext context) => context.LastErrorMessage;
Ejemplo n.º 14
0
 public static ErrorCode GetLastError(UnmanagedRantContext context) => context.LastErrorCode;
Ejemplo n.º 15
0
 public static void ReleaseContext(UnmanagedRantContext context) => context.Dispose();
Ejemplo n.º 16
0
 public static bool IsEngineLoaded(UnmanagedRantContext context) => context.Rant != null;