public static CombineWith ( this config, ILogServiceConfig s ) : ILogConfig | ||
config | this | This |
s | ILogServiceConfig | A |
return | ILogConfig |
public static ILogConfig CombineWith( this ILogConfig config, ILogServiceConfig s )
{
LogConfig c = (LogConfig)config.Clone();
for( int i = 0; i < c.Services.Count; i++ )
{
if( c.Services[i].Name == s.Name )
{
c.Services.RemoveAt( i );
break;
}
}
c.Services.Add( Clone( s ) );
return c;
}