internal void ValidateKey(SpatialElementKey spatialElementKey, MapBindingFieldPairCollection mapBindingFieldPairs)
        {
            if (m_spatialDataMapper.KeyTypes == null)
            {
                return;
            }
            int num = 0;

            while (true)
            {
                if (num >= spatialElementKey.KeyValues.Count)
                {
                    return;
                }
                object obj = spatialElementKey.KeyValues[num];
                if (obj != null)
                {
                    Type type  = obj.GetType();
                    Type type2 = m_spatialDataMapper.KeyTypes[num];
                    if (!(type2 == null) && type != type2)
                    {
                        object obj2 = Convert(obj, type, type2);
                        if (obj2 == null)
                        {
                            break;
                        }
                        spatialElementKey.KeyValues[num] = obj2;
                    }
                }
                num++;
            }
            throw new RenderingObjectModelException(RPRes.rsMapFieldBindingExpressionTypeMismatch(RPRes.rsObjectTypeMap, m_mapVectorLayer.MapDef.Name, m_mapVectorLayer.Name, SpatialDataMapper.GetBindingFieldName(mapBindingFieldPairs[num])));
        }
 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])));
     }
 }