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); }
public InvocationMessageBuilder WithExcludedIds(IReadOnlyList <string> excludedIds) { _message.AddExcludedIds(excludedIds); return(this); }