Advertisement
Guest User

Untitled

a guest
Sep 19th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.63 KB | None | 0 0
  1. public sealed class ParseResult<T>
  2.   {
  3.     public T Argument { get; private set; }
  4.     public List<FailedParameter> InvalidParameter { get; private set; }
  5.     public bool IsInvalidArgument { get { return this.InvalidParameter.Any(); } }
  6.  
  7.     public ParseResult()
  8.     {
  9.       this.InvalidParameter = new List<FailedParameter>();
  10.       this.Argument = default(T);
  11.     }
  12.  
  13.     public ParseResult(T argument)
  14.       :this()
  15.     {
  16.       if (argument == null)
  17.         throw new ArgumentNullException("The argument must not be null");
  18.  
  19.       this.Argument = argument;
  20.     }
  21.  
  22.     internal void AddArgument(T argument)
  23.     {
  24.  
  25.     }
  26.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement