Table of Contents

Class ReadOnlyPropertiesDictionary

Namespace
log4net.Util
Assembly
log4net.dll

String keyed object map that is read only.

public class ReadOnlyPropertiesDictionary : ISerializable, IDictionary, ICollection, IEnumerable
Inheritance
ReadOnlyPropertiesDictionary
Implements
Derived
Inherited Members

Remarks

This collection is readonly and cannot be modified.

While this collection is serializable only member objects that are serializable will be serialized along with this collection.

Constructors

ReadOnlyPropertiesDictionary()

Constructor

public ReadOnlyPropertiesDictionary()

Remarks

Initializes a new instance of the ReadOnlyPropertiesDictionary class.

ReadOnlyPropertiesDictionary(SerializationInfo, StreamingContext)

Deserialization constructor

protected ReadOnlyPropertiesDictionary(SerializationInfo info, StreamingContext context)

Parameters

info SerializationInfo

The SerializationInfo that holds the serialized object data.

context StreamingContext

The StreamingContext that contains contextual information about the source or destination.

Remarks

Initializes a new instance of the ReadOnlyPropertiesDictionary class with serialized data.

ReadOnlyPropertiesDictionary(ReadOnlyPropertiesDictionary)

Copy Constructor

public ReadOnlyPropertiesDictionary(ReadOnlyPropertiesDictionary propertiesDictionary)

Parameters

propertiesDictionary ReadOnlyPropertiesDictionary

properties to copy

Remarks

Initializes a new instance of the ReadOnlyPropertiesDictionary class.

Properties

Count

The number of properties in this collection

public int Count { get; }

Property Value

int

InnerHashtable

The hashtable used to store the properties

protected Hashtable InnerHashtable { get; }

Property Value

Hashtable

The internal collection used to store the properties

Remarks

The hashtable used to store the properties

this[string]

Gets or sets the value of the property with the specified key.

public virtual object this[string key] { get; set; }

Parameters

key string

The key of the property to get or set.

Property Value

object

The value of the property with the specified key.

Remarks

The property value will only be serialized if it is serializable. If it cannot be serialized it will be silently ignored if a serialization operation is performed.

Methods

Clear()

Remove all properties from the properties collection

public virtual void Clear()

Contains(string)

Test if the dictionary contains a specified key

public bool Contains(string key)

Parameters

key string

the key to look for

Returns

bool

true if the dictionary contains the specified key

Remarks

Test if the dictionary contains a specified key

GetKeys()

Gets the key names.

public string[] GetKeys()

Returns

string[]

An array of all the keys.

Remarks

Gets the key names.

GetObjectData(SerializationInfo, StreamingContext)

Serializes this object into the SerializationInfo provided.

[SecurityCritical]
public virtual void GetObjectData(SerializationInfo info, StreamingContext context)

Parameters

info SerializationInfo

The SerializationInfo to populate with data.

context StreamingContext

The destination for this serialization.

Remarks

Serializes this object into the SerializationInfo provided.