Пример #1
0
        public string Map(IReferenceRecord record)
        {
            if (record.Properties.ContainsKey(_propertyName))
            {
                if (null == _valueFactory)
                {
                    return(record.Properties[_propertyName]);
                }
                else
                {
                    return(_valueFactory.CreateValue(record.Properties[_propertyName]));
                }
            }

            return(string.Empty);
        }
Пример #2
0
        public IReferenceRecord BuildRecord(IReferenceRecord templateRecord, string key, string value)
        {
            if (0 != string.CompareOrdinal(_key, key))
            {
                return(templateRecord);
            }

            if (templateRecord.Properties.ContainsKey(key))
            {
                templateRecord.Properties[key] = value;
            }
            else
            {
                templateRecord.Properties.Add(key, value);
            }

            return(templateRecord);
        }
        public IReferenceRecord BuildRecord(IReferenceRecord templateRecord, string key, string value)
        {
            if (0 != string.CompareOrdinal(_key, key))
            {
                return templateRecord;
            }

            if (templateRecord.Properties.ContainsKey(key))
            {
                templateRecord.Properties[key] = value;
            }
            else
            {
                templateRecord.Properties.Add(key, value);
            }

            return templateRecord;
        }