In the beginning of my methods that handle the calls from outside, I run this method to make sure that everything's OK, or let the caller know what's wrong:private static void Validate(Guid userId, EntityState state, object data){  if (userId == Guid.Empty)    throw new Exception(Token unrecognized!);  if (state == EntityState.Detached)    throw new Exception(Action unrecognized!);  if (data == null)    throw new Exception(Data unrecognized!);}I was happy with the method until R# remarked that I'm declaring the variables without using them, except for pre-condition check. Well, it's true that I do. It's kind of the whole idea.It bothers me that the tool remarks on it, because it feels like smarter people than me have put in the message there. However, turning it off isn't an option because that'd turn off even the checks for actually unnecessarily declared variables.Should I refactor the code? How can I improve it?
Function to validate a GUID, an EntityState, and some data
c#;validation