示例#1
0
        public async void ReadDataAsync()
        {
            BoardsReadCompletedEventArgs args = await Task <BoardsReadCompletedEventArgs> .Factory.StartNew(() =>
            {
                try
                {
                    List <IBoard> list = ReadData().ToList();
                    return(new BoardsReadCompletedEventArgs(list));
                }
                catch (Exception ex)
                {
                    return(new BoardsReadCompletedEventArgs(ex));
                }
            });

            if (args.Error == null)
            {
                this.Boards = args.Result;
            }

            DataReadCompleted?.Invoke(args);
        }
 internal void OnDataReadCompleted(DataReadCompleteArgs args)
 {
     DataReadCompleted?.Invoke(this, args);
 }
示例#3
0
 protected virtual void OnDataReadCompleted(ExportCompleteArgs e)
 {
     DataReadCompleted?.Invoke(this, e);
 }