private void CreateConfigFromScratch()
{
// Get the user name.
string userName = "Unknown";
if (Backend.Platform == PlatformID.Unix ||
Backend.Platform == PlatformID.MacOSX)
{
userName = Environment.UserName;
if (string.IsNullOrEmpty(userName))
{
userName = String.Empty;
}
else
{
userName = userName.TrimEnd(",".ToCharArray());
}
}
else
{
userName = Environment.UserName;
}
if (string.IsNullOrEmpty(userName))
{
userName = "Unknown";
}
// Define the default XML configuration file.
configXml = new SyncConfig()
{
ConfigSchemaVersion = Config.SchemaVersion,
Notifications = true,
SingleRepository = false, // Multiple repository for CmisSync, but some CmisSync-derived products have different defaults.
FrozenConfiguration = false,
Log4Net = createDefaultLog4NetElement(),
Folders = new List<SyncConfig.Folder>(),
User = new User()
{
EMail = "Unknown",
Name = userName
}
};
}