mscorlib(4.0.0.0) API with additions
ApplicationIdentity.cs
4 using System.Security;
5 
6 namespace System
7 {
10  [ComVisible(false)]
11  public sealed class ApplicationIdentity : ISerializable
12  {
13  private IDefinitionAppId _appId;
14 
17  public string FullName
18  {
19  [SecuritySafeCritical]
20  get
21  {
22  return IsolationInterop.AppIdAuthority.DefinitionToText(0u, _appId);
23  }
24  }
25 
28  public string CodeBase
29  {
30  [SecuritySafeCritical]
31  get
32  {
33  return _appId.get_Codebase();
34  }
35  }
36 
37  internal IDefinitionAppId Identity
38  {
39  [SecurityCritical]
40  get
41  {
42  return _appId;
43  }
44  }
45 
46  private ApplicationIdentity()
47  {
48  }
49 
50  [SecurityCritical]
51  private ApplicationIdentity(SerializationInfo info, StreamingContext context)
52  {
53  string text = (string)info.GetValue("FullName", typeof(string));
54  if (text == null)
55  {
56  throw new ArgumentNullException("fullName");
57  }
58  _appId = IsolationInterop.AppIdAuthority.TextToDefinition(0u, text);
59  }
60 
65  [SecuritySafeCritical]
66  public ApplicationIdentity(string applicationIdentityFullName)
67  {
68  if (applicationIdentityFullName == null)
69  {
70  throw new ArgumentNullException("applicationIdentityFullName");
71  }
72  _appId = IsolationInterop.AppIdAuthority.TextToDefinition(0u, applicationIdentityFullName);
73  }
74 
75  [SecurityCritical]
76  internal ApplicationIdentity(IDefinitionAppId applicationIdentity)
77  {
78  _appId = applicationIdentity;
79  }
80 
83  public override string ToString()
84  {
85  return FullName;
86  }
87 
91  [SecurityCritical]
93  {
94  info.AddValue("FullName", FullName, typeof(string));
95  }
96  }
97 }
ApplicationIdentity(string applicationIdentityFullName)
Initializes a new instance of the T:System.ApplicationIdentity class.
The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method th...
string CodeBase
Gets the location of the deployment manifest as a URL.
Definition: __Canon.cs:3
Describes the source and destination of a given serialized stream, and provides an additional caller-...
override string ToString()
Returns the full name of the manifest-activated application.
Stores all the data needed to serialize or deserialize an object. This class cannot be inherited.
Allows an object to control its own serialization and deserialization.
Definition: ISerializable.cs:8
Provides the ability to uniquely identify a manifest-activated application. This class cannot be inhe...
Specifies that the class can be serialized.
string FullName
Gets the full name of the application.
void GetObjectData(SerializationInfo info, StreamingContext context)
Populates a T:System.Runtime.Serialization.SerializationInfo with the data needed to serialize the ta...