-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIProxy.cs
54 lines (50 loc) · 1.89 KB
/
IProxy.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//
// PureMVC C# Standard
//
// Copyright(c) 2017 Saad Shams <[email protected]>
// Your reuse is governed by the Creative Commons Attribution 3.0 License
//
namespace PureMVC.Interfaces
{
/// <summary>
/// The interface definition for a PureMVC Proxy.
/// </summary>
/// <remarks>
/// <para>
/// In PureMVC, <c>IProxy</c> implementors assume these responsibilities:
/// <list type="bullet">
/// <item>Implement a common method which returns the name of the Proxy.</item>
/// <item>Provide methods for setting and getting the data object.</item>
/// </list>
/// </para>
/// <para>
/// Additionally, <c>IProxy</c>s typically:
/// <list type="bullet">
/// <item>Maintain references to one or more pieces of model data.</item>
/// <item>Provide methods for manipulating that data.</item>
/// <item>Generate <c>INotifications</c> when their model data changes.</item>
/// <item>Expose their name as a <c>public static const</c> called <c>NAME</c>, if they are not instantiated multiple times.</item>
/// <item>Encapsulate interaction with local or remote services used to fetch and persist model data.</item>
/// </list>
/// </para>
/// </remarks>
public interface IProxy: INotifier
{
/// <summary>
/// Get the Proxy name
/// </summary>
string ProxyName { get; }
/// <summary>
/// Get or Set the data object
/// </summary>
object Data { get; set; }
/// <summary>
/// Called by the Model when the Proxy is registered
/// </summary>
void OnRegister();
/// <summary>
/// Called by the Model when the Proxy is removed
/// </summary>
void OnRemove();
}
}