/
AppIdentity.cs
38 lines (33 loc) · 982 Bytes
/
AppIdentity.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
using ToSic.Lib.Documentation;
namespace ToSic.Eav.Apps;
/// <summary>
/// A full App-Identity.<br/>
/// This is either used to pass identities around, or as a base class for more extensive objects which know their full identity.
/// </summary>
[PublicApi]
public class AppIdentity: IAppIdentity
{
/// <inheritdoc />
public int ZoneId { get; }
/// <inheritdoc />
public int AppId { get; }
/// <summary>
/// App identity containing zone/app combination
/// </summary>
/// <param name="zoneId"></param>
/// <param name="appId"></param>
public AppIdentity(int zoneId, int appId)
{
ZoneId = zoneId;
AppId = appId;
}
/// <summary>
/// This is just for extracting the Identity-part of something that may have much more information
/// </summary>
/// <param name="parent"></param>
public AppIdentity(IAppIdentity parent)
{
ZoneId = parent.ZoneId;
AppId = parent.AppId;
}
}