コード例 #1
0
 public MessageProperty(string name, int positionalValue, MessagePropertyValue value)
 {
     CheckParams(name, positionalValue, value);
     Name            = name;
     Value           = value;
     PositionalValue = positionalValue;
 }
コード例 #2
0
 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));
     }
 }