BadScript 2
Loading...
Searching...
No Matches
SpecificationProperty.cs
Go to the documentation of this file.
1// Copyright 2005-2015 Giacomo Stelluti Scala & Contributors. All rights reserved. See License.md in the project root for license information.
2
3using System;
4using System.Reflection;
5
6using CSharpx;
7
8namespace CommandLine.Core
9{
10 internal class SpecificationProperty
11 {
12 private SpecificationProperty(Specification specification, PropertyInfo property, Maybe<object> value)
13 {
14 Property = property;
15 Specification = specification;
16 Value = value;
17 }
18
20
21 public PropertyInfo Property { get; }
22
23 public Maybe<object> Value { get; }
24
25 public static SpecificationProperty Create(Specification specification,
26 PropertyInfo property,
27 Maybe<object> value)
28 {
29 if (value == null)
30 {
31 throw new ArgumentNullException("value");
32 }
33
34 return new SpecificationProperty(specification, property, value);
35 }
36 }
37}
The Maybe type models an optional value. A value of type Maybe a either contains a value of type a (r...
Definition Maybe.cs:33
SpecificationProperty(Specification specification, PropertyInfo property, Maybe< object > value)
static SpecificationProperty Create(Specification specification, PropertyInfo property, Maybe< object > value)