private static object GetBindingFieldValue(ISpatialElement coreSpatialElement, MapBindingFieldPair bindingFieldPair, string mapName, string layerName) { string bindingFieldName = SpatialDataMapper.GetBindingFieldName(bindingFieldPair); if (bindingFieldName == null) { return(null); } return(coreSpatialElement[SpatialDataMapper.GetUniqueFieldName(layerName, bindingFieldName)]); }
public void ValidateKey(SpatialElementKey spatialElementKey, MapBindingFieldPairCollection mapBindingFieldPairs) { if (this.m_spatialDataMapper.KeyTypes != null) { int num = 0; while (true) { if (num < spatialElementKey.KeyValues.Count) { object obj = spatialElementKey.KeyValues[num]; if (obj != null) { Type type = obj.GetType(); Type type2 = this.m_spatialDataMapper.KeyTypes[num]; if (type2 != null && type != type2) { object obj2 = VectorLayerMapper.Convert(obj, type, type2); if (obj2 == null) { break; } spatialElementKey.KeyValues[num] = obj2; } } num++; continue; } return; } throw new RenderingObjectModelException(RPRes.rsMapFieldBindingExpressionTypeMismatch(RPRes.rsObjectTypeMap, this.m_mapVectorLayer.MapDef.Name, this.m_mapVectorLayer.Name, SpatialDataMapper.GetBindingFieldName(((ReportElementCollectionBase <MapBindingFieldPair>)mapBindingFieldPairs)[num]))); } }