コード例 #1
0
        private AssignerTag GetAssignerTag(TypeCachingKey key)
        {
            if (!_assignerKeyToTag.TryGetValue(key, out AssignerTag value))
            {
                value = new AssignerTag
                {
                    Assign = CreateAssignerDelegate(key.ClassType, key.Field)
                };

                _assignerKeyToTag[key] = value;
            }

            return(value);
        }
コード例 #2
0
 public void AssignColumn(DataColumn dataColumn, Array classInstances, int classInstancesCount)
 {
     AssignerTag tag      = GetAssignerTag(new TypeCachingKey(_classType, dataColumn.Field));
     int         assigned = tag.Assign(dataColumn.Data, classInstances, classInstancesCount);
 }