2

Closed

Blockage caused by WriteLogAsync().Wait();

description

Hello,
 
i'm trying to use this project in my applications.
When i navigate to my first page i need to initialize some picture dynamically, and when the await "is doing the code skip to" onLaunch method and call the
 
MetroApplicationServiceBase.Instance.ApplicationLaunched(args);

But it Blockage the application and ii didn´t start.
 
I added the code and I did some debug, I found this method:
 
public void WriteLog()
    {
        WriteLogAsync().Wait();
 
        //if (this.Storage == null)
        //{
        //    return;
        //}
        //using (IsolatedStorageFileStream isolatedStorageFileStream = new IsolatedStorageFileStream(this.FileName, (FileMode)2, this.Storage))
        //{
        //    this.serializer.WriteObject(isolatedStorageFileStream, this.Events);
        //}
    }
 
the WriteLogAsync().Wait(); blockage my application and i need to remove the Wait().
 
Why you are using the Wait()? it is not necessary, i think.....
 
 
Thanks
Sara Silva
Closed Sep 30, 2012 at 12:05 PM by AlexSorokoletov
Applied suggested fix. Thank you folks!

comments