public static void JoinBufferConfig(BufferSettingsConfig parentConfig, BufferSettingsConfig childConfig) { if (parentConfig == null) { return; } if (childConfig == null) { childConfig = parentConfig; return; } childConfig.BufferPath = childConfig.BufferPath ?? parentConfig.BufferPath; childConfig.ReadLimit = childConfig.ReadLimit ?? parentConfig.ReadLimit; childConfig.WorkerCount = childConfig.WorkerCount ?? parentConfig.WorkerCount; childConfig.MemoryBufferLimit = childConfig.MemoryBufferLimit ?? parentConfig.MemoryBufferLimit; childConfig.FileBufferLimit = childConfig.FileBufferLimit ?? parentConfig.FileBufferLimit; childConfig.FlushTimeout = childConfig.FlushTimeout ?? parentConfig.FlushTimeout; childConfig.ResendTimeout = childConfig.ResendTimeout ?? parentConfig.ResendTimeout; childConfig.ResendIntervals = childConfig.ResendIntervals ?? parentConfig.ResendIntervals; childConfig.Encoding = childConfig.Encoding ?? parentConfig.Encoding; }
public void JoinWithParentBufferConfig(BufferSettingsConfig parentConfig) { JoinBufferConfig(parentConfig, this); }