AddSource() public method

public AddSource ( string dllPath ) : System.Threading.Tasks.Task
dllPath string
return System.Threading.Tasks.Task
Example #1
0
 private async void button_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (System.IO.File.Exists(_dllPath))
         {
             System.IO.File.Delete(_dllPath);
             Sources sources = this.FindParent <Sources>();
             sources.container.Children.Clear();
             sources.ItemsCount = 0;
             if (Directory.Exists("News"))
             {
                 foreach (string file in System.IO.Directory.GetFiles("News", "*.news"))
                 {
                     await sources.AddSource(file);
                 }
             }
         }
     }
     catch
     {
     }
 }