Files
StockSharp/Configuration/ConnectionElementCollection.cs
T
2015-10-12 19:46:42 +03:00

34 lines
1.2 KiB
C#

namespace StockSharp.Configuration
{
using System.Configuration;
/// <summary>
/// Represents the custom message adapters section in a configuration file.
/// </summary>
public class ConnectionElementCollection : ConfigurationElementCollection
{
/// <summary>
/// When overridden in a derived class, creates a new <see cref="T:System.Configuration.ConfigurationElement"/>.
/// </summary>
/// <returns>
/// A newly created <see cref="T:System.Configuration.ConfigurationElement"/>.
/// </returns>
protected override ConfigurationElement CreateNewElement()
{
return new ConnectionElement();
}
/// <summary>
/// Gets the element key for a specified configuration element when overridden in a derived class.
/// </summary>
/// <returns>
/// An <see cref="T:System.Object"/> that acts as the key for the specified <see cref="T:System.Configuration.ConfigurationElement"/>.
/// </returns>
/// <param name="element">The <see cref="T:System.Configuration.ConfigurationElement"/> to return the key for. </param>
protected override object GetElementKey(ConfigurationElement element)
{
var elem = (ConnectionElement)element;
return elem.Type;
}
}
}