/*
OpenNxSerialization Framework
Copyright (C) 2006 - 2007 "NeXtreme Innovations"
[The Next Xtreme Innovations]
This program is free software, distributed under the terms of
the GNU General Public License Version 2. See the "License.txt" file
at the top of the source tree.
*/
using System;
using System.Configuration;
namespace NeXtreme.OpenNxSerialization.Configuration
{
/// <summary>
/// Represents an NxSerialization sectionName within a configuration file.
/// </summary>
public class NxConfigurationSection : ConfigurationSection
{
/// <summary>
/// Controls whether built-in surrogates are registered by default.
/// </summary>
[ConfigurationProperty("useBuiltinSurrogates", DefaultValue=true, IsRequired = false)]
public bool UseBuiltinSurrogates
{
get
{
return ((bool)(base["useBuiltinSurrogates"]));
}
set
{
base["useBuiltinSurrogates"] = value;
}
}
/// <summary>
/// Get/Set the list of surrogates given in the "knownSurrogates" sectionName in the configuration
/// file. Each of these types is registered with an <see cref="NxTypeSurrogateSelector"/> instance.
/// </summary>
/// <remarks>
/// knownSurrogates in an optional sectionName.
/// </remarks>
[ConfigurationProperty("knownSurrogates", IsRequired=false)]
public NxKnownSurrogateElementCollection KnownSurrogates
{
get
{
return ((NxKnownSurrogateElementCollection)(base["knownSurrogates"]));
}
set
{
base["knownSurrogates"] = value;
}
}
/// <summary>
/// Get/Set the list of types given in the "knownTypes" sectionName in the configuration
/// file. Each of these types is registered with an <see cref="NxFormatterServices"/> instance.
/// </summary>
/// <remarks>
/// knownTypes in an optional sectionName.
/// </remarks>
[ConfigurationProperty("knownTypes", IsRequired = false)]
public NxKnownTypeElementCollection KnownTypes
{
get
{
return ((NxKnownTypeElementCollection)(base["knownTypes"]));
}
set
{
base["knownSurrogates"] = value;
}
}
}
}