public MessageProperty(string name, int positionalValue, MessagePropertyValue value) { CheckParams(name, positionalValue, value); Name = name; Value = value; PositionalValue = positionalValue; }
private static void CheckParams(string name, int positionalValue, MessagePropertyValue value) { if (positionalValue < -1) { throw new ArgumentOutOfRangeException(nameof(positionalValue)); } if (string.IsNullOrWhiteSpace(name)) { throw new ArgumentNullException(nameof(name)); } if (value == null) { throw new ArgumentNullException(nameof(value)); } }