mscorlib(4.0.0.0) API with additions
ChannelDataStore.cs
1 using System.Collections;
3 using System.Security;
5 
7 {
10  [SecurityCritical]
11  [ComVisible(true)]
12  [SecurityPermission(SecurityAction.InheritanceDemand, Flags = SecurityPermissionFlag.Infrastructure)]
14  {
15  private string[] _channelURIs;
16 
17  private DictionaryEntry[] _extraData;
18 
21  public string[] ChannelUris
22  {
23  [SecurityCritical]
24  get
25  {
26  return _channelURIs;
27  }
28  set
29  {
30  _channelURIs = value;
31  }
32  }
33 
37  public object this[object key]
38  {
39  [SecurityCritical]
40  get
41  {
42  DictionaryEntry[] extraData = _extraData;
43  for (int i = 0; i < extraData.Length; i++)
44  {
45  DictionaryEntry dictionaryEntry = extraData[i];
46  if (dictionaryEntry.Key.Equals(key))
47  {
48  return dictionaryEntry.Value;
49  }
50  }
51  return null;
52  }
53  [SecurityCritical]
54  set
55  {
56  if (_extraData == null)
57  {
58  _extraData = new DictionaryEntry[1];
59  _extraData[0] = new DictionaryEntry(key, value);
60  return;
61  }
62  int num = _extraData.Length;
63  DictionaryEntry[] array = new DictionaryEntry[num + 1];
64  int i;
65  for (i = 0; i < num; i++)
66  {
67  array[i] = _extraData[i];
68  }
69  array[i] = new DictionaryEntry(key, value);
70  _extraData = array;
71  }
72  }
73 
74  private ChannelDataStore(string[] channelUrls, DictionaryEntry[] extraData)
75  {
76  _channelURIs = channelUrls;
77  _extraData = extraData;
78  }
79 
82  public ChannelDataStore(string[] channelURIs)
83  {
84  _channelURIs = channelURIs;
85  _extraData = null;
86  }
87 
88  [SecurityCritical]
89  internal ChannelDataStore InternalShallowCopy()
90  {
91  return new ChannelDataStore(_channelURIs, _extraData);
92  }
93  }
94 }
Describes a set of security permissions applied to code. This class cannot be inherited.
ChannelDataStore(string[] channelURIs)
Initializes a new instance of the T:System.Runtime.Remoting.Channels.ChannelDataStore class with the ...
Definition: __Canon.cs:3
string [] ChannelUris
Gets or sets an array of channel URIs that the current channel maps to.
SecurityAction
Specifies the security actions that can be performed using declarative security.
Stores channel data for the remoting channels.
object Value
Gets or sets the value in the key/value pair.
Specifies that the class can be serialized.
object Key
Gets or sets the key in the key/value pair.
Stores channel data for the remoting channels.
SecurityPermissionFlag
Specifies access flags for the security permission object.
Defines a dictionary key/value pair that can be set or retrieved.