Exemplo n.º 1
0
 /// <summary>
 /// Check whether the given value for ServiceOperationResultKind is valid. If not, throw argument exception.
 /// </summary>
 /// <param name="kind">value for ServiceOperationResultKind</param>
 /// <param name="parameterName">name of the parameter</param>
 /// <exception cref="ArgumentException">if the value is not valid.</exception>
 private static void CheckServiceOperationResultKind(ServiceOperationResultKind kind, string parameterName)
 {
     if (kind < ServiceOperationResultKind.DirectValue ||
         kind > ServiceOperationResultKind.Void)
     {
         throw new ArgumentException(Strings.General_InvalidEnumValue(kind.GetType().Name), parameterName);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Check whether the given value for ServiceOperationResultKind is valid. If not, throw argument exception.
 /// </summary>
 /// <param name="kind">value for ServiceOperationResultKind</param>
 /// <param name="parameterName">name of the parameter</param>
 /// <exception cref="ArgumentException">if the value is not valid.</exception>
 private static void CheckServiceOperationResultKind(ServiceOperationResultKind kind, string parameterName)
 {
     if (kind < ServiceOperationResultKind.DirectValue ||
         kind > ServiceOperationResultKind.Void)
     {
         throw new ArgumentException(Strings.General_InvalidEnumValue(kind.GetType().Name), parameterName);
     }
 }
Exemplo n.º 3
0
 internal static void CheckServiceOperationResultKind(ServiceOperationResultKind kind, string parameterName)
 {
     if ((kind < ServiceOperationResultKind.DirectValue) || (kind > ServiceOperationResultKind.Void))
     {
         throw new ArgumentException(System.Data.Services.Strings.InvalidEnumValue(kind.GetType().Name), parameterName);
     }
 }