LibuvSharp.Loop.Run C# (CSharp) Method

Run() public method

public Run ( ) : bool
return bool
        public bool Run()
        {
            return RunGuard(() => uv_run(NativeHandle, uv_run_mode.UV_RUN_DEFAULT));
        }

Same methods

Loop::Run ( System.Action context ) : bool
Loop::Run ( Func asyncMethod ) : bool

Usage Example

 public static void Execute(Loop loop)
 {
     loop.Run(async delegate {
         try {
             await loop.Async(() => Directory.CreateDirectory("testing"));
             await loop.Async(() => Directory.Move("testing", "testing123"));
             var dirs = await loop.FAsync(() => Directory.GetFiles("./"));
             Console.WriteLine("{0} files.", dirs.Length);
             Console.WriteLine();
             foreach (var dir in dirs) {
                 Console.WriteLine(dir);
             }
             await loop.Async(() => Directory.Delete("testing123"));
         } catch (Exception e) {
             Console.WriteLine(e);
         }
     });
 }