internal void CancelModifications( VMLogServiceConfig vmS )
{
vmS.ClearConfig();
if( vmS.IsBound )
{
foreach( ILogServiceConfig s in _hostConfiguration.LogConfig.Services )
{
if( s.Name == vmS.Name )
{
vmS.UpdateFrom( s, false );// We update from the kernel, we don't track changes (and therefor set IsDirty to false)
break;
}
}
}
else
{
bool hasBeenFound = false;
foreach( ILogServiceConfig s in _hostConfiguration.LogConfig.Services )
{
if( s.Name == vmS.Name )
{
vmS.UpdateFrom( s, false );// We update from the kernel, we don't track changes (and therefor set IsDirty to false)
_services.Add( vmS );
hasBeenFound = true;
break;
}
}
if( !hasBeenFound )
_services.Remove( vmS );
}
}