コード例 #1
0
 public MainViewModel()
 {
     Status = "Initializing";
     name = NameGenerator.Generate();
     UITaskFactory = new TaskFactory(TaskScheduler.FromCurrentSynchronizationContext());
     client = new Client(this, name);
     client.Start();
 }
コード例 #2
0
        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    client.Close();
                    client = null;
                }

                disposedValue = true;
            }
        }