/// <inheritdoc/>
        protected override EventHandlerRegistrationRequest GetRegisterArguments()
        {
            var request = new EventHandlerRegistrationRequest
            {
                EventHandlerId = Identifier.ToProtobuf(),
                ScopeId        = _scope.ToProtobuf(),
                Partitioned    = _partitioned,
            };

            foreach (var eventType in _handler.HandledEventTypes)
            {
                var artifact = _artifacts.GetArtifactFor(eventType);
                request.Types_.Add(new Artifact
                {
                    Id         = artifact.Id.ToProtobuf(),
                    Generation = artifact.Generation,
                });
            }

            return(request);
        }
示例#2
0
 /// <inheritdoc/>
 public EventHandlerRegistrationArguments ConvertConnectArguments(EventHandlerRegistrationRequest arguments)
 => arguments.HasAlias switch
 {
     true => new EventHandlerRegistrationArguments(