public static ShamanOptions With(this ShamanOptions options, IShamanService service) { if (options == null) { throw new ArgumentNullException(nameof(options)); } if (service == null) { throw new ArgumentNullException(nameof(service)); } options.Services.Add(service); return(options); }
public static ShamanOptions With(this ShamanOptions options, IShamanService service) { if (options == null) { throw new ArgumentNullException(nameof(options)); } if (service == null) { throw new ArgumentNullException(nameof(service)); } options.Services.Add(service); var modificationService = service as IShamanOptionModificationService; modificationService?.ModifyShamanOptions(options); return(options); }