private Channel CreateChannel(PubSubDefinition definition) { if (null == definition) { throw new ArgumentNullException(nameof(definition)); } return(new Channel(definition.Namespace, definition.Identifier, definition.Persisted, definition.Address, _logger)); }
private IObjectSerialization GetSerializer(PubSubDefinition definition) { if (null == definition) { throw new ArgumentNullException(nameof(definition)); } if (null == definition.Serializer || !_serviceProvider.TryResolve <IObjectSerialization>(definition.Serializer, out var serializerFactory)) { return(_serviceProvider.Resolve <IObjectSerialization>()); } return(serializerFactory); }