// properties private bool ResolveType(FtMetaSubstitution substitution, out string errorDescription) { errorDescription = ""; bool result = true; string attributeValue; if (!attributeDictionary.TryGetValue(FtMetaSubstitution.PropertyId.Type, out attributeValue)) { substitution.Type = FtMetaSubstitution.DefaultType; } else { FtSubstitutionType propertyValue; if (SubstitutionTypeFormatter.TryParseAttributeValue(attributeValue, out propertyValue)) { substitution.Type = propertyValue; } else { errorDescription = string.Format(Properties.Resources.SubstitutionReadElement_ResolveType_Invalid, attributeValue); result = false; } } return(result); }
private bool ResolveToken(FtMetaSubstitution substitution, out string errorDescription) { errorDescription = ""; bool result = true; string attributeValue; if (!attributeDictionary.TryGetValue(FtMetaSubstitution.PropertyId.Token, out attributeValue)) { errorDescription = string.Format(Properties.Resources.SubstitutionReadElement_ResolveToken_Missing, SubstitutionTypeFormatter.ToAttributeValue(substitution.Type)); result = false; } else { char propertyValue; if (FtStandardText.TryParse(attributeValue, out propertyValue)) { substitution.Token = propertyValue; } else { errorDescription = string.Format(Properties.Resources.SubstitutionReadElement_ResolveToken_Invalid, attributeValue); result = false; } } return(result); }