Example #1
0
        private InvocationMessage CreateInvocationMessage(string methodName, object[] args, string action = null,
                                                          string connectionId = null, string groupName = null, IReadOnlyList <string> excludedId = null)
        {
            var message = new InvocationMessage(GetInvocationId(), methodName, null, args);

            if (!string.IsNullOrEmpty(action))
            {
                message.AddAction(action);
            }
            if (!string.IsNullOrEmpty(connectionId))
            {
                message.AddConnectionId(connectionId);
            }
            if (!string.IsNullOrEmpty(groupName))
            {
                message.AddGroupName(groupName);
            }
            if (excludedId != null && excludedId.Any())
            {
                message.AddExcludedIds(excludedId);
            }
            return(message);
        }
Example #2
0
 public InvocationMessageBuilder WithExcludedIds(IReadOnlyList <string> excludedIds)
 {
     _message.AddExcludedIds(excludedIds);
     return(this);
 }