Beispiel #1
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;
 }
Beispiel #2
0
        public static string[] GetOutputChannelNames(UnmanagedOutput output, out int count)
        {
            var names = output.Output.Select(e => e.Name).ToArray();

            count = names.Length;
            return(names);
        }
Beispiel #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);
        }
Beispiel #4
0
 public static string GetOutputValue(UnmanagedOutput output, string channelName) => output?.Output?[channelName];
Beispiel #5
0
 public static string GetMainValue(UnmanagedOutput output) => output?.Output?.Main;
Beispiel #6
0
 public static void ReleaseOutput(UnmanagedOutput output) => output.Dispose();
Beispiel #7
0
 public static string GetOutputValue(UnmanagedOutput output, string channelName) => output?.Output?[channelName];
Beispiel #8
0
 public static string[] GetOutputChannelNames(UnmanagedOutput output, out int count)
 {
     var names = output.Output.Select(e => e.Name).ToArray();
     count = names.Length;
     return names;
 }
Beispiel #9
0
 public static string GetMainValue(UnmanagedOutput output) => output?.Output?.Main;
Beispiel #10
0
 public static void ReleaseOutput(UnmanagedOutput output) => output.Dispose();