Exemplo n.º 1
0
        private void IndexWindow_OnLoaded(object sender, RoutedEventArgs e)
        {
            InitialiseFields();

            var canAccessFile = false;

            TryExtensions.Try(() => canAccessFile = FileName.CanAccessFile()).Times(10);
            if (!canAccessFile)
            {
                return;
            }

            ShowFile();
        }
Exemplo n.º 2
0
 public static void Main() =>
 TryExtensions.Try(Crawler.Start)
 .Tee(methodResult =>
      Console.WriteLine(methodResult.IsSuccess ? "Success" : methodResult.Detail.ToString()));