コード例 #1
0
 internal ChoKVPRecordFieldConfiguration(string name, ChoKVPRecordFieldAttribute attr = null) : base(name, attr)
 {
     FieldName = name;
     if (attr != null)
     {
         FieldName = attr.FieldName.IsNullOrWhiteSpace() ? Name.NTrim() : attr.FieldName.NTrim();
     }
 }
コード例 #2
0
 internal ChoKVPRecordFieldConfiguration(string name, ChoKVPRecordFieldAttribute attr = null, Attribute[] otherAttrs = null) : base(name, attr, otherAttrs)
 {
     FieldName = name;
     if (attr != null)
     {
         FieldName = attr.FieldName.IsNullOrWhiteSpace() ? Name : attr.FieldName;
     }
 }
コード例 #3
0
        internal ChoKVPRecordFieldConfiguration GetFieldConfiguration(string propertyName, ChoKVPRecordFieldAttribute attr = null, Attribute[] otherAttrs = null)
        {
            if (!KVPRecordFieldConfigurations.Any(fc => fc.Name == propertyName))
            {
                KVPRecordFieldConfigurations.Add(new ChoKVPRecordFieldConfiguration(propertyName, attr, otherAttrs));
            }

            return(KVPRecordFieldConfigurations.First(fc => fc.Name == propertyName));
        }