Comment on serialization.
This commit is contained in:
@ -44,6 +44,19 @@ namespace zaaReloaded2.Controller
|
||||
{
|
||||
#region Properties persistence
|
||||
|
||||
/// <summary>
|
||||
/// Loads the SettingsRepository instance that was persisted in
|
||||
/// the assembly properties.
|
||||
/// </summary>
|
||||
/// <returns>SettingsRepository that was last stored in the
|
||||
/// assembly properties, or a newly created SettingsRepository
|
||||
/// if no previously stored exists.</returns>
|
||||
/// <remarks>
|
||||
/// The SettingsRepository is serialized using a SoapFormatter, which
|
||||
/// creates SOAP XML. Since the assembly properties are stored as
|
||||
/// XML as well, the serialized SettingsRepository is converted to
|
||||
/// a base-64 string, which does not mess with the properties XML.
|
||||
/// </remarks>
|
||||
public static SettingsRepository Load()
|
||||
{
|
||||
string s = Properties.Settings.Default.SettingsRepository;
|
||||
@ -63,6 +76,15 @@ namespace zaaReloaded2.Controller
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Stores the SettingsRepository in the assembly properties.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The SettingsRepository is serialized using a SoapFormatter, which
|
||||
/// creates SOAP XML. Since the assembly properties are stored as
|
||||
/// XML as well, the serialized SettingsRepository is converted to
|
||||
/// a base-64 string, which does not mess with the properties XML.
|
||||
/// </remarks>
|
||||
public void Store()
|
||||
{
|
||||
MemoryStream stream = new MemoryStream();
|
||||
|
Reference in New Issue
Block a user