Mercurial > silverbladetech
annotate Chronosv2/source/Presentation/ViewModel/ViewModelBase.cs @ 19:09d18d6e5f40
airport work
author | stevenh7776 stevenhollidge@hotmail.com |
---|---|
date | Thu, 15 Mar 2012 06:59:15 +0000 |
parents | 443821e55f06 |
children |
rev | line source |
---|---|
19 | 1 using nRoute.Services; |
10
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
2 using nRoute.ViewServices; |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
3 |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
4 namespace Chronos.Presentation.ViewModel |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
5 { |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
6 /// <summary> |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
7 /// Provides a base class for Applications to inherit from. |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
8 /// </summary> |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
9 public abstract class ViewModelBase |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
10 : ObservableObject |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
11 { |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
12 #region · Constructors · |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
13 |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
14 /// <summary> |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
15 /// Initializes a new instance of the <see cref="ViewModelBase"/> class. |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
16 /// </summary> |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
17 protected ViewModelBase() |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
18 : base() |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
19 { |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
20 } |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
21 |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
22 #endregion |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
23 |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
24 #region · Protected Methods · |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
25 |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
26 /// <summary> |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
27 /// Gets the requested service instance. |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
28 /// </summary> |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
29 /// <typeparam name="TService">The type of the service.</typeparam> |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
30 /// <returns></returns> |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
31 protected TService GetService<TService>() where TService : class |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
32 { |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
33 return ServiceLocator.GetService<TService>(); |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
34 } |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
35 |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
36 /// <summary> |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
37 /// Gets the requested view service. |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
38 /// </summary> |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
39 /// <typeparam name="TViewService">The type of the view service.</typeparam> |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
40 /// <returns></returns> |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
41 protected TViewService GetViewService<TViewService>() where TViewService : class |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
42 { |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
43 return ViewServiceLocator.GetViewService<TViewService>(); |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
44 } |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
45 |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
46 #endregion |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
47 } |
443821e55f06
Initial cleaned up add from Codeplex files
stevenh7776 stevenhollidge@hotmail.com
parents:
diff
changeset
|
48 } |