private bool ResolveExactStringValue(FtExactStringMetaSequenceRedirect redirect, out string errorDescription) { errorDescription = ""; bool result = true; string attributeValue; if (!attributeDictionary.TryGetValue(FtMetaSequenceRedirect.PropertyId.Value, out attributeValue)) { errorDescription = string.Format(Properties.Resources.SequenceRedirectReadElement_ResolveExactStringValue_Missing, FtStandardSequenceRedirectType.ToName(redirectType)); result = false; } else { string propertyValue; if (FtStandardText.TryParse(attributeValue, out propertyValue)) { redirect.Value = propertyValue; } else { errorDescription = string.Format(Properties.Resources.SequenceRedirectReadElement_ResolveExactStringValue_Invalid, attributeValue); result = false; } } return(result); }
// properties private bool ResolveSequenceName(FtMetaSequenceRedirect redirect, FtMetaSequenceList sequenceList, out string errorDescription) { bool result = false; string attributeValue; if (!attributeDictionary.TryGetValue(FtMetaSequenceRedirect.PropertyId.SequenceName, out attributeValue)) { errorDescription = string.Format(Properties.Resources.SequenceRedirectReadElement_ResolveSequenceName_Missing, FtStandardSequenceRedirectType.ToName(redirectType)); } else { string sequenceName = attributeValue.Trim(); int sequenceIdx = sequenceList.IndexOfName(sequenceName); if (sequenceIdx < 0) { errorDescription = string.Format(Properties.Resources.SequenceRedirectReadElement_ResolveSequenceName_NotExist, sequenceName, FtStandardSequenceRedirectType.ToName(redirectType)); } else { redirect.Sequence = sequenceList[sequenceIdx]; errorDescription = ""; result = true; } } return(result); }