public static ILogConfig Clone( this ILogConfig config ) { LogConfig c = new LogConfig(); c.DoLog = config.DoLog; foreach( ILogServiceConfig s in config.Services ) { c.Services.Add( Clone( s ) ); } return c; }