-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Implement ViewModelComponent with unified logic for storing/restoring/cleaning view models * Update interface of Forms' implementation of DialogsService * Add documentation for ViewModelComponent class * Update storage naming * Throw exception if component is re-initialized
- Loading branch information
1 parent
d96d058
commit 7c0e75a
Showing
15 changed files
with
191 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
Softeq.XToolkit.WhiteLabel.Droid/Internal/IInstanceStorage.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// Developed by Softeq Development Corporation | ||
// http://www.softeq.com | ||
|
||
using System.Collections.Generic; | ||
|
||
namespace Softeq.XToolkit.WhiteLabel.Droid.Internal | ||
{ | ||
/// <summary> | ||
/// Defines the contract for a storage that stores instances of different classes. | ||
/// </summary> | ||
internal interface IInstanceStorage | ||
{ | ||
/// <summary> | ||
/// Returns an existing <typeparamref name="T"/> instance from the store. | ||
/// </summary> | ||
/// <typeparam name="T">The type of the instance to get.</typeparam> | ||
/// <param name="key">The instance unique key.</param> | ||
/// <returns>Stored instance.</returns> | ||
T Get<T>(string key) where T : class; | ||
|
||
/// <summary> | ||
/// Adds a <typeparamref name="T"/> instance to the store by <paramref name="key"/>. | ||
/// </summary> | ||
/// <typeparam name="T">The type of the instance to add.</typeparam> | ||
/// <param name="key">The instance unique key.</param> | ||
/// <param name="viewModel">The instance to add.</param> | ||
void Add<T>(string key, T viewModel) where T : class; | ||
|
||
/// <summary> | ||
/// Removes an existing instance from the store by <paramref name="key"/>. | ||
/// </summary> | ||
/// <param name="key">The instance unique key.</param> | ||
void Remove(string key); | ||
|
||
/// <summary> | ||
/// Removes an existing instances from the store by <paramref name="keys"/>. | ||
/// </summary> | ||
/// <param name="keys">The collection of instance unique keys.</param> | ||
void Remove(IEnumerable<string> keys); | ||
|
||
/// <summary> | ||
/// Clears store. | ||
/// </summary> | ||
void Clear(); | ||
} | ||
} |
47 changes: 0 additions & 47 deletions
47
Softeq.XToolkit.WhiteLabel.Droid/Internal/IViewModelStore.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.