public TranslatedProperty(TranslateAttribute attr, PropertyInfo propertyInfo) { _propertyInfo = propertyInfo; if (propertyInfo.PropertyType != typeof(string)) { throw new InvalidOperationException("The property " + propertyInfo.DeclaringType.FullName + "." + propertyInfo.Name + " can not be translated because it does not have type string."); } Name = _propertyInfo.Name; }
public TranslatedProperty(TranslateAttribute attr, PropertyInfo propertyInfo) { _propertyInfo = propertyInfo; if(propertyInfo.PropertyType != typeof(string)) { throw new InvalidOperationException("The property " + propertyInfo.DeclaringType.FullName + "." + propertyInfo.Name + " can not be translated because it does not have type string."); } Name = _propertyInfo.Name; }