예제 #1
0
파일: Exports.cs 프로젝트: W-h-a-t-s/Rant
 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;
 }
예제 #2
0
파일: Exports.cs 프로젝트: W-h-a-t-s/Rant
 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;
 }
예제 #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);
        }
예제 #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);
        }
예제 #5
0
 public static ErrorCode LoadPackage(UnmanagedRantContext context, string packagePath) => context.Run(() => context.Rant.LoadPackage(packagePath));
예제 #6
0
 public static ErrorCode LoadEngine(UnmanagedRantContext context, string dictionaryPath) => context.Run(() => context.Rant = new RantEngine(dictionaryPath));
예제 #7
0
 public static string GetLastErrorMessage(UnmanagedRantContext context) => context.LastErrorMessage;
예제 #8
0
 public static ErrorCode GetLastError(UnmanagedRantContext context) => context.LastErrorCode;
예제 #9
0
 public static void ReleaseContext(UnmanagedRantContext context) => context.Dispose();
예제 #10
0
 public static bool IsEngineLoaded(UnmanagedRantContext context) => context.Rant != null;
예제 #11
0
파일: Exports.cs 프로젝트: W-h-a-t-s/Rant
 public static ErrorCode LoadPackage(UnmanagedRantContext context, string packagePath) => context.Run(() => context.Rant.LoadPackage(packagePath));
예제 #12
0
파일: Exports.cs 프로젝트: W-h-a-t-s/Rant
 public static ErrorCode LoadEngine(UnmanagedRantContext context, string dictionaryPath) => context.Run(() => context.Rant = new RantEngine(dictionaryPath));
예제 #13
0
파일: Exports.cs 프로젝트: W-h-a-t-s/Rant
 public static string GetLastErrorMessage(UnmanagedRantContext context) => context.LastErrorMessage;
예제 #14
0
파일: Exports.cs 프로젝트: W-h-a-t-s/Rant
 public static ErrorCode GetLastError(UnmanagedRantContext context) => context.LastErrorCode;
예제 #15
0
파일: Exports.cs 프로젝트: W-h-a-t-s/Rant
 public static void ReleaseContext(UnmanagedRantContext context) => context.Dispose();
예제 #16
0
파일: Exports.cs 프로젝트: W-h-a-t-s/Rant
 public static bool IsEngineLoaded(UnmanagedRantContext context) => context.Rant != null;