Skip to content
This repository has been archived by the owner on Apr 6, 2020. It is now read-only.

Removed singleton instance of ApplicationContext #58

Merged
merged 1 commit into from
Nov 21, 2017

Conversation

justingaffney
Copy link
Collaborator

No description provided.

@justingaffney justingaffney merged commit 0e0cd17 into dev Nov 21, 2017
@justingaffney justingaffney deleted the remove_applicationcontext_singleton branch November 23, 2017 10:20
justingaffney added a commit that referenced this pull request Dec 19, 2017
* Abstract HomeViewModel from all the others viewModels (#33)

* Remove AssetViewModel dependency from HomeViewModel

* when removing the AssetViewModel dependency from HomeView, one binding was forgot

* Remove TransactionsViewModel dependency from HomeViewModel

* First draft of the BlockChainController

* WalletController created

* CreateWallet in WalletController implemented from code in HomeViewModel

* * WalletController: OpenWallet code copy
* DialogHelper created - Object that will abstract the creation and show dialogs.

* All dependencies on HomeViewModel are now injected in the constructor (#36)

* Remove AssetViewModel dependency from HomeViewModel

* when removing the AssetViewModel dependency from HomeView, one binding was forgot

* Remove TransactionsViewModel dependency from HomeViewModel

* First draft of the BlockChainController

* WalletController created

* CreateWallet in WalletController implemented from code in HomeViewModel

* * WalletController: OpenWallet code copy
* DialogHelper created - Object that will abstract the creation and show dialogs.

* Decoupled some views from their respective view model classes using messages

* Replace Application.Instance calls with ApplicationContext that was injected in the constructor

* Remove from solution already removed messages classes

* Cleanup in AccountViewModel don't access the ApplicationContext using the Singleton but the constructor injection object

* Remove singleton ApplicationContext from HomeViewModel and inject it in constructor.

* Remove extra-code added by mistake during the merge

* This object is declared as Singleton, therefore the lock in not necessary. This class will be created only once.

* WalletController is been injected in the BlockChainController instead to access through ApplicationContext

* The access to the singleton Application.Instance is not removed from all the ViewModels.
IApplicationContext has been injected in this classes.

* First atempt to wire the BlockChainController in the app.
Cannot connect to the peers

* * Added some technical debts issues
* Wallet and blockchain code removed from HomeViewModel
* ApplicationContext injection removed from HomeViewModel

* All the code related with wallet access goes not throuh WalletController in AccountsViewModel

* Set application context in view in constructor

* Bug fixes in dev branch (#49)

* Fixed wallet password changing, fixed restore accounts, fixed HomeView menu items not enabling when wallet is opened

* Added input binding to open the wallet in OpenWalletView when the enter key is pressed

* Removed IApplicationContext.CurrentWallet and replaced all uses with IWalletController methods (#50)

* Extracted blockchain setup logic from Program.cs and moved it to BlockChainController.cs (#51)

Also added a very basic splash screen, which needs a lot of work

* IExternalProcessHelper created to abstract the static call Process.Start, added basic IDialogHelper implementation (#47)

* Remove AssetViewModel dependency from HomeViewModel

* when removing the AssetViewModel dependency from HomeView, one binding was forgot

* Remove TransactionsViewModel dependency from HomeViewModel

* First draft of the BlockChainController

* WalletController created

* CreateWallet in WalletController implemented from code in HomeViewModel

* * WalletController: OpenWallet code copy
* DialogHelper created - Object that will abstract the creation and show dialogs.

* Decoupled some views from their respective view model classes using messages

* Replace Application.Instance calls with ApplicationContext that was injected in the constructor

* Remove from solution already removed messages classes

* Cleanup in AccountViewModel don't access the ApplicationContext using the Singleton but the constructor injection object

* Remove singleton ApplicationContext from HomeViewModel and inject it in constructor.

* Remove extra-code added by mistake during the merge

* This object is declared as Singleton, therefore the lock in not necessary. This class will be created only once.

* WalletController is been injected in the BlockChainController instead to access through ApplicationContext

* The access to the singleton Application.Instance is not removed from all the ViewModels.
IApplicationContext has been injected in this classes.

* First atempt to wire the BlockChainController in the app.
Cannot connect to the peers

* * Added some technical debts issues
* Wallet and blockchain code removed from HomeViewModel
* ApplicationContext injection removed from HomeViewModel

* All the code related with wallet access goes not throuh WalletController in AccountsViewModel

* Set application context in view in constructor

* ExternalProcessHelper was create to wrapper the calls Process.Start that start a external process to the application.

* Basic implementation of IDialogHelper and usage to in HomeViewModel to open OpenWalletView #44

* Splash screen improvements (#52)

* Small splash screen improvements

* Moved logo icon file to Resources directory, added logo to splash screen

* Localised ThemeStyle enum values, cleaned up TODO's, added themed border to splash screen (#53)

* Removed Program.cs (#54)

Replaced Program.Main method with an auto-generated Main method inside App

* Removed LocalNode property from IApplicationContext (#55)

Replaced references with IBlockChainController method calls

* NotificationHelper + Remove code from HomeViewModel to WalletController (#57)

* Remove AssetViewModel dependency from HomeViewModel

* when removing the AssetViewModel dependency from HomeView, one binding was forgot

* Remove TransactionsViewModel dependency from HomeViewModel

* First draft of the BlockChainController

* WalletController created

* CreateWallet in WalletController implemented from code in HomeViewModel

* * WalletController: OpenWallet code copy
* DialogHelper created - Object that will abstract the creation and show dialogs.

* Decoupled some views from their respective view model classes using messages

* Replace Application.Instance calls with ApplicationContext that was injected in the constructor

* Remove from solution already removed messages classes

* Cleanup in AccountViewModel don't access the ApplicationContext using the Singleton but the constructor injection object

* Remove singleton ApplicationContext from HomeViewModel and inject it in constructor.

* Remove extra-code added by mistake during the merge

* This object is declared as Singleton, therefore the lock in not necessary. This class will be created only once.

* WalletController is been injected in the BlockChainController instead to access through ApplicationContext

* The access to the singleton Application.Instance is not removed from all the ViewModels.
IApplicationContext has been injected in this classes.

* First atempt to wire the BlockChainController in the app.
Cannot connect to the peers

* * Added some technical debts issues
* Wallet and blockchain code removed from HomeViewModel
* ApplicationContext injection removed from HomeViewModel

* All the code related with wallet access goes not throuh WalletController in AccountsViewModel

* Set application context in view in constructor

* ExternalProcessHelper was create to wrapper the calls Process.Start that start a external process to the application.

* Basic implementation of IDialogHelper and usage to in HomeViewModel to open OpenWalletView #44

* * NotificationHelper created (using nuget from https://github.com/raflop/ToastNotifications)
* Move some code from HomeViewModel to WalletController that use the NotificationHelper to show how the action end

#39, #56

* When a Wallet is opened is need to check if need to upgrade. There are now methods that perfom that and they should be called in the Caller, in this case HomeViewModel.

* * Moving relevant code from BlockChainController to WalletController
* Remove unnecessary IDispatcher from BlockChainController
* Remove unnecessary IDialogHelper from WalletControler

All of this was to remove Circular Reference between BlockChainController and WalletController

* Removed singleton instance of ApplicationContext (#58)

* Merged changes from master branch (#59)

* Re-added BaseRegistrationModule.cs to project file

This compile tag was accidentally removed from the .csproj file

* Added Neo.Gui.Helper .NET standard project, fixed messaging in AccountsViewModel, AssetsViewModel and TransactionsViewModel (#60)

* Cleaned up wallet status updating code, added RemoteBlockChainController, small UI changes (#61)

* Refactored private WalletController method names to help clarify what they do

* Cleaned up wallet status updating code, added RemoteBlockChainController, small UI changes

* Added view model unit tests project (#62)

* Moved appropriate classes and interfaces to Neo.Gui.Base project (#63)

* Fixes for various problems

* Renamed Neo.Gui.Helpers project to Neo.Gui.Base, move some interfaces to Neo.Gui.Base, renamed neo-gui project to Neo.Gui.Wpf

* Updated name of Neo.Gui.Base directory

* Converted static VersionHelper class to an injectable class and added IVersionHelper interface to Neo.Gui.Base

* Fixed error with VersionHelper in App.xaml.cs

* Added newer version checking back

* Replaced IApplicationContext instance with static IoC container lifetime scope setter method in DialogHelper

* Deleted PeerState.cs and moved logic into LocalBlockChainController

* Moved a few classes to Neo.Gui.Base

* Moved sharable theming logic to Neo.Gui.Base

* Moved classes into Neo.Gui.Base project

* Changed directory structure for some classes

* Refactor namespaces (#64)

* Refactored namespaces in Neo.Gui.Base to reflect changes in directory structure

* Refactored namespaces in Neo.Gui.Wpf project

* Moved appropriate classes and interfaces to Neo.Gui.Base project (#65)

* Added Neo.Gui.ViewModels project, fixed resource paths

* Extracted System.Drawing.Color to System.Windows.Media.Color conversion to a separate extensions class

* Moved remaining messaging classes and interfaces to Neo.Gui.Base, moved all registration module classes to one directory

* Moved dialog result classes to Neo.Gui.Base, removed references to views from view model classes

* Removed all remaining direct references to Neo.Core.Blockchain class from view models and replaced with IBlockChainController calls

* Moved message classes to Neo.Gui.Base

* Modified namespaces of message classes to reflect new location

* Refactoring, UI changes (#66)

* Changed Blockchain.PersistCompleted event handler add and remove wrapper methods to an event

* Moved collection item class to Neo.Gui.Base project

* Refactoring and UI changes

* Moved localizable strings resource file to Neo.Gui.Base, added ColorToSolidColorBrushConverter (#67)

* Removed duplicate localizable string resource files

* Moved CertificateQueryService to base project (#68)

* Moved CertificateQueryService to base project, added BaseRegistrationModule

* Changed CertificateQueryService to internal

*  Removed most references to IBlockChainController from view model classes (#69)

* Removed most references to IBlockChainController from view model classes, removed Neo.Gui.Wpf references from IWalletController

* Moved WalletController to Neo.Gui.Base project

* Added MvvmLight library to Neo.Gui.Wpf project, replaced RelayCommand references with MvvmLight equivalent class (#70)

* Revert "Added MvvmLight library to Neo.Gui.Wpf project, replaced RelayCommand references with MvvmLight equivalent class (#70)"

This reverts commit 07c5150.

*  Removed all remaining references to IBlockChainController from view model classes (#71)

* Removed all remaining references to IBlockChainController from view models

* Added IMessageSubscriber.Unsubscribe() calls to view models that were subscribing to messages

* Refactored controller class namespaces

* Moved RemoteBlockChainController to base project, preparation for moving LocalBlockChainController to base project (#72)

* Moved root certificate installation from LocalBlockChainController to App

* Moved RemoteBlockChainController to base project

* Replaced view class references with IDialogHelper ShowDialog method calls (#73)

* Dispatch messages on UI Thread, abstracted view references from view models (#75)

* Remove AssetViewModel dependency from HomeViewModel

* when removing the AssetViewModel dependency from HomeView, one binding was forgot

* Remove TransactionsViewModel dependency from HomeViewModel

* First draft of the BlockChainController

* WalletController created

* CreateWallet in WalletController implemented from code in HomeViewModel

* * WalletController: OpenWallet code copy
* DialogHelper created - Object that will abstract the creation and show dialogs.

* Decoupled some views from their respective view model classes using messages

* Replace Application.Instance calls with ApplicationContext that was injected in the constructor

* Remove from solution already removed messages classes

* Cleanup in AccountViewModel don't access the ApplicationContext using the Singleton but the constructor injection object

* Remove singleton ApplicationContext from HomeViewModel and inject it in constructor.

* Remove extra-code added by mistake during the merge

* This object is declared as Singleton, therefore the lock in not necessary. This class will be created only once.

* WalletController is been injected in the BlockChainController instead to access through ApplicationContext

* The access to the singleton Application.Instance is not removed from all the ViewModels.
IApplicationContext has been injected in this classes.

* First atempt to wire the BlockChainController in the app.
Cannot connect to the peers

* * Added some technical debts issues
* Wallet and blockchain code removed from HomeViewModel
* ApplicationContext injection removed from HomeViewModel

* All the code related with wallet access goes not throuh WalletController in AccountsViewModel

* Set application context in view in constructor

* ExternalProcessHelper was create to wrapper the calls Process.Start that start a external process to the application.

* Basic implementation of IDialogHelper and usage to in HomeViewModel to open OpenWalletView #44

* * NotificationHelper created (using nuget from https://github.com/raflop/ToastNotifications)
* Move some code from HomeViewModel to WalletController that use the NotificationHelper to show how the action end

#39, #56

* When a Wallet is opened is need to check if need to upgrade. There are now methods that perfom that and they should be called in the Caller, in this case HomeViewModel.

* * Moving relevant code from BlockChainController to WalletController
* Remove unnecessary IDispatcher from BlockChainController
* Remove unnecessary IDialogHelper from WalletControler

All of this was to remove Circular Reference between BlockChainController and WalletController

* When a message is published should be Dispatched to UI thread.

* * DialogHelper receive parameters
* (..).ShowDialog calles were replaced by DialogHelper
* ICommand were replaced by RelayCommand
* Dialogs now can be closed using the CloseEvent in the DialogViewModel<T>

* Refactor HomeViewModel (#83)

* Remove AssetViewModel dependency from HomeViewModel

* when removing the AssetViewModel dependency from HomeView, one binding was forgot

* Remove TransactionsViewModel dependency from HomeViewModel

* First draft of the BlockChainController

* WalletController created

* CreateWallet in WalletController implemented from code in HomeViewModel

* * WalletController: OpenWallet code copy
* DialogHelper created - Object that will abstract the creation and show dialogs.

* Decoupled some views from their respective view model classes using messages

* Replace Application.Instance calls with ApplicationContext that was injected in the constructor

* Remove from solution already removed messages classes

* Cleanup in AccountViewModel don't access the ApplicationContext using the Singleton but the constructor injection object

* Remove singleton ApplicationContext from HomeViewModel and inject it in constructor.

* Remove extra-code added by mistake during the merge

* This object is declared as Singleton, therefore the lock in not necessary. This class will be created only once.

* WalletController is been injected in the BlockChainController instead to access through ApplicationContext

* The access to the singleton Application.Instance is not removed from all the ViewModels.
IApplicationContext has been injected in this classes.

* First atempt to wire the BlockChainController in the app.
Cannot connect to the peers

* * Added some technical debts issues
* Wallet and blockchain code removed from HomeViewModel
* ApplicationContext injection removed from HomeViewModel

* All the code related with wallet access goes not throuh WalletController in AccountsViewModel

* Set application context in view in constructor

* ExternalProcessHelper was create to wrapper the calls Process.Start that start a external process to the application.

* Basic implementation of IDialogHelper and usage to in HomeViewModel to open OpenWalletView #44

* * NotificationHelper created (using nuget from https://github.com/raflop/ToastNotifications)
* Move some code from HomeViewModel to WalletController that use the NotificationHelper to show how the action end

#39, #56

* When a Wallet is opened is need to check if need to upgrade. There are now methods that perfom that and they should be called in the Caller, in this case HomeViewModel.

* * Moving relevant code from BlockChainController to WalletController
* Remove unnecessary IDispatcher from BlockChainController
* Remove unnecessary IDialogHelper from WalletControler

All of this was to remove Circular Reference between BlockChainController and WalletController

* When a message is published should be Dispatched to UI thread.

* * DialogHelper receive parameters
* (..).ShowDialog calles were replaced by DialogHelper
* ICommand were replaced by RelayCommand
* Dialogs now can be closed using the CloseEvent in the DialogViewModel<T>

* * Refactor HomeViewModel to be align with Region structure
* Remove one line methods
* AboutView is Dialog
* DeveloperTools can be open with DialogHelper
* Fix on DialogHelper: When a dialog ViewModel don't implement the IDialogViewModel, the Dialog can be shown anyway
* Settings helper abstract the GuiSettings static calls.

#80, #81, #82

* Added injectable clipboard and settings managers (#74)

* Refactored class names to separate them into either Helper, Service or Manager classes

* Added injectable ClipboardManager class

* Replaced Clipboard references with IClipboardManager references

* Added settings manager interface and implementation class files

* Replaced some references to Neo.Gui.Wpf.Properties.Settings with ISettingsManager

* Moved LocalBlockchainController to Neo.Gui.Base project

* Abstracted some settings to ISettingsManager, added ToAddress and ToScriptHash wrapper method in IWalletController to remove more NEO lib references from view models

* Fixed typo, abstracted all remaining settings used by view models into ISettingsViewModel

* Fixed merge errors

* Moved abstracted settings logic to ISettingManager

* Abstracted all file operations out of view models (#84)

* Abstracted most file operations out of view models

* Added ICompressedFileManager to abstract compressed file operations from view models, moved file manager implementation classes to base project

* Abstracted OpenFileDialog and SaveFileDialog from view models, removed "using" lines that aren't needed (#85)

* Removed references to System.Windows.MessageBox from view models and replaced with method calls to IDialogManager (#86)

* Abstracted InputBox and InformationBox usage into IDialogManager (#87)

* Removed references of InputBox and InformationBox controls from all view models and replaced with calls to IDialogManager methods, cleaned up application intialization logic

* Moved NeoWindow style to newly added StyleResources resource dictionary file

* Replaced usages of MahApps dialog management library with IDialogManager.ShowMessageDialog method calls

* Draft of UnitTests (#89)

* Remove AssetViewModel dependency from HomeViewModel

* when removing the AssetViewModel dependency from HomeView, one binding was forgot

* Remove TransactionsViewModel dependency from HomeViewModel

* First draft of the BlockChainController

* WalletController created

* CreateWallet in WalletController implemented from code in HomeViewModel

* * WalletController: OpenWallet code copy
* DialogHelper created - Object that will abstract the creation and show dialogs.

* Decoupled some views from their respective view model classes using messages

* Replace Application.Instance calls with ApplicationContext that was injected in the constructor

* Remove from solution already removed messages classes

* Cleanup in AccountViewModel don't access the ApplicationContext using the Singleton but the constructor injection object

* Remove singleton ApplicationContext from HomeViewModel and inject it in constructor.

* Remove extra-code added by mistake during the merge

* This object is declared as Singleton, therefore the lock in not necessary. This class will be created only once.

* WalletController is been injected in the BlockChainController instead to access through ApplicationContext

* The access to the singleton Application.Instance is not removed from all the ViewModels.
IApplicationContext has been injected in this classes.

* First atempt to wire the BlockChainController in the app.
Cannot connect to the peers

* * Added some technical debts issues
* Wallet and blockchain code removed from HomeViewModel
* ApplicationContext injection removed from HomeViewModel

* All the code related with wallet access goes not throuh WalletController in AccountsViewModel

* Set application context in view in constructor

* ExternalProcessHelper was create to wrapper the calls Process.Start that start a external process to the application.

* Basic implementation of IDialogHelper and usage to in HomeViewModel to open OpenWalletView #44

* * NotificationHelper created (using nuget from https://github.com/raflop/ToastNotifications)
* Move some code from HomeViewModel to WalletController that use the NotificationHelper to show how the action end

#39, #56

* When a Wallet is opened is need to check if need to upgrade. There are now methods that perfom that and they should be called in the Caller, in this case HomeViewModel.

* * Moving relevant code from BlockChainController to WalletController
* Remove unnecessary IDispatcher from BlockChainController
* Remove unnecessary IDialogHelper from WalletControler

All of this was to remove Circular Reference between BlockChainController and WalletController

* When a message is published should be Dispatched to UI thread.

* * DialogHelper receive parameters
* (..).ShowDialog calles were replaced by DialogHelper
* ICommand were replaced by RelayCommand
* Dialogs now can be closed using the CloseEvent in the DialogViewModel<T>

* * Refactor HomeViewModel to be align with Region structure
* Remove one line methods
* AboutView is Dialog
* DeveloperTools can be open with DialogHelper
* Fix on DialogHelper: When a dialog ViewModel don't implement the IDialogViewModel, the Dialog can be shown anyway
* Settings helper abstract the GuiSettings static calls.

#80, #81, #82

* First unit tests for HomeViewModel

#46

* Add testes to MessageHandlers

* Delete SettingsHelper.cs

* Delete ISettingsHelper.cs

* Moved viewmodel classes out to .NET standard Neo.Gui.ViewModels project (#90)

Also updated Neo nuget package version to 2.4.1

* Fixed namespace error

* HomeViewModel 29 tests added (#91)

* Remove AssetViewModel dependency from HomeViewModel

* when removing the AssetViewModel dependency from HomeView, one binding was forgot

* Remove TransactionsViewModel dependency from HomeViewModel

* First draft of the BlockChainController

* WalletController created

* CreateWallet in WalletController implemented from code in HomeViewModel

* * WalletController: OpenWallet code copy
* DialogHelper created - Object that will abstract the creation and show dialogs.

* Decoupled some views from their respective view model classes using messages

* Replace Application.Instance calls with ApplicationContext that was injected in the constructor

* Remove from solution already removed messages classes

* Cleanup in AccountViewModel don't access the ApplicationContext using the Singleton but the constructor injection object

* Remove singleton ApplicationContext from HomeViewModel and inject it in constructor.

* Remove extra-code added by mistake during the merge

* This object is declared as Singleton, therefore the lock in not necessary. This class will be created only once.

* WalletController is been injected in the BlockChainController instead to access through ApplicationContext

* The access to the singleton Application.Instance is not removed from all the ViewModels.
IApplicationContext has been injected in this classes.

* First atempt to wire the BlockChainController in the app.
Cannot connect to the peers

* * Added some technical debts issues
* Wallet and blockchain code removed from HomeViewModel
* ApplicationContext injection removed from HomeViewModel

* All the code related with wallet access goes not throuh WalletController in AccountsViewModel

* Set application context in view in constructor

* ExternalProcessHelper was create to wrapper the calls Process.Start that start a external process to the application.

* Basic implementation of IDialogHelper and usage to in HomeViewModel to open OpenWalletView #44

* * NotificationHelper created (using nuget from https://github.com/raflop/ToastNotifications)
* Move some code from HomeViewModel to WalletController that use the NotificationHelper to show how the action end

#39, #56

* When a Wallet is opened is need to check if need to upgrade. There are now methods that perfom that and they should be called in the Caller, in this case HomeViewModel.

* * Moving relevant code from BlockChainController to WalletController
* Remove unnecessary IDispatcher from BlockChainController
* Remove unnecessary IDialogHelper from WalletControler

All of this was to remove Circular Reference between BlockChainController and WalletController

* When a message is published should be Dispatched to UI thread.

* * DialogHelper receive parameters
* (..).ShowDialog calles were replaced by DialogHelper
* ICommand were replaced by RelayCommand
* Dialogs now can be closed using the CloseEvent in the DialogViewModel<T>

* * Refactor HomeViewModel to be align with Region structure
* Remove one line methods
* AboutView is Dialog
* DeveloperTools can be open with DialogHelper
* Fix on DialogHelper: When a dialog ViewModel don't implement the IDialogViewModel, the Dialog can be shown anyway
* Settings helper abstract the GuiSettings static calls.

#80, #81, #82

* First unit tests for HomeViewModel

#46

* Add testes to MessageHandlers

* Delete SettingsHelper.cs

* Delete ISettingsHelper.cs

* All public methods in HomeViewModel is fully tested

#46

* Fix references due the change of the ViewModels to their own project

#46

* AssetsViewModelTests class created and GUI reference removed from the Tests Project

#46

* Merge new commits in neo-project/neo-gui repo (#93)

* Updated Neo nuget package version to 2.5.0

* Removed RestoreAccount dialog

* Merged changes from neo-project/neo-gui

* Fix bug of not saving wallet file

* Updated Neo nuget packages

* Added GetStandardAccounts method to IWalletController to reduce duplicate code

* Fixed bug with not clearing the flag that indicates whether wallet balance has changed

* Removed old leftover neo-gui directory

* Fixed error from merge

* Code cleanup, added missing NEP-6 wallet Save method calls

* Moved view model classes to Neo.Gui.ViewModels project, moved transaction generation logic into WalletController (#94)

* Code cleanup, added missing NEP-6 wallet Save method calls

* Removed unused exception class file

* Moved certificate viewing logic to CertficateService, moved transaction generation logic to WalletController. Moved BulkPayViewModel, PayToViewModel and SigningViewModel to Neo.Gui.ViewModels project

* Replaced RelayCommand and ViewModelBase implementations with MvvmLight library implementations

* Add #if DEBUG statements to prevent application from loading update XML document when running a debug build

* Cleaned up namespaces to reflect current directory structure

* AssetViewModel tests (#92)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant