private Tuple <NakedObjectField, NakedObjectSpecification> GetPropertyTypeInternal(string typeName, string propertyName) { if (string.IsNullOrEmpty(typeName.Trim()) || string.IsNullOrEmpty(propertyName.Trim())) { throw new BadRequestNOSException(); } NakedObjectSpecification spec = [email protected]().loadSpecification(typeName); if (spec is NoMemberSpecification) { throw new TypeResourceNotFoundNOSException(typeName); } string nof2Id = propertyName.ToLower(); NakedObjectField property = spec.getFields().SingleOrDefault(p => p.getId() == nof2Id); if (property == null) { throw new PropertyResourceNotFoundNOSException(propertyName); } return(new Tuple <NakedObjectField, NakedObjectSpecification>(property, spec)); }