private void ValidateSubscribeRequest(SubscribeRequest subscribeRequest) { if (string.IsNullOrWhiteSpace(subscribeRequest.Channel)) { throw new ArgumentException("Parameter is mandatory", "Channel"); } if (!subscribeRequest.IsValideType("CommandQuery"))// SubscribeType { throw new ArgumentException("Invalid Subscribe Type for this Class.", "SubscribeType"); } }
private void ValidateSubscribeRequest(SubscribeRequest subscribeRequest) { if (string.IsNullOrWhiteSpace(subscribeRequest.Channel)) { throw new ArgumentException("Parameter is mandatory", "Channel"); } if (!subscribeRequest.IsValideType("Events"))// SubscribeType { throw new ArgumentException("Invalid Subscribe Type for this Class.", "SubscribeType"); } if (subscribeRequest.SubscribeType == SubscribeType.EventsStore) { if (string.IsNullOrWhiteSpace(subscribeRequest.ClientID)) { throw new ArgumentException("Parameter is mandatory for this type.", "ClientID"); } if (subscribeRequest.EventsStoreType == EventsStoreType.Undefined) { throw new ArgumentException("Parameter is mandatory for this type.", "EventsStoreType"); } } }