Example #1
0
        internal static IAsyncResult Create(AsyncCallback ac)
        {
            var result = new LocalAsyncResult();

            Task.Delay(100).Wait();
            ac.Invoke(result);
            return(result);
        }
Example #2
0
        public IAsyncResult BeginUploadFile(Stream stream, string path, AsyncCallback callback, Action <ulong> progress)
        {
            ColoredConsole.WriteLine(ConsoleColor.Cyan, "LocalFile: Beginning upload of file {0}...", path);
            DelayTransfer(stream);
            var result = LocalAsyncResult.Create(callback);

            ColoredConsole.WriteLine(ConsoleColor.Green, "LocalFile: File {0} is being uploaded.", path);
            return(result);
        }
Example #3
0
 public IAsyncResult BeginExecute(AsyncCallback callback)
 {
     return(LocalAsyncResult.Create(callback));
 }