Beispiel #1
0
        public StateDefinition GetState(string name)
        {
            ArgumentUtility.CheckNotNullOrEmpty("name", name);

            return(DefinedStatesInternal.Single(
                       s => s.Name == name,
                       () => CreateArgumentException("name", "The state '{0}' is not defined for the property '{1}'.", name, Name)));
        }
Beispiel #2
0
 public StateDefinition GetState(int stateValue)
 {
     return(DefinedStatesInternal.Single(
                s => s.Value == stateValue,
                () => CreateArgumentException("stateValue", "A state with the value {0} is not defined for the property '{1}'.", stateValue, Name)));
 }