Exemple #1
0
 public MapHatchStyle GetHatchStyle(Style style, StyleInstance styleInstance, bool hasScope)
 {
     if (style != null && (!MappingHelper.IsPropertyExpression(style.BackgroundHatchType) || hasScope))
     {
         return(MapMapper.GetHatchStyle(style, styleInstance));
     }
     return(MapHatchStyle.None);
 }
Exemple #2
0
 public int GetShadowOffset(Style style, StyleInstance styleInstance, bool hasScope)
 {
     if (style != null && (!MappingHelper.IsPropertyExpression(style.ShadowOffset) || hasScope))
     {
         return(MapMapper.GetValidShadowOffset(MappingHelper.GetStyleShadowOffset(style, styleInstance, this.m_mapMapper.DpiX)));
     }
     return(0);
 }
Exemple #3
0
 public LineLayerMapper(MapLineLayer mapLineLayer, MapControl coreMap, MapMapper mapMapper)
     : base(mapLineLayer, coreMap, mapMapper)
 {
     if (mapLineLayer.MapLineTemplate != null)
     {
         this.m_lineTemplateMapper = new LineTemplateMapper(base.m_mapMapper, this, this.MapLineLayer);
     }
 }
Exemple #4
0
 internal RuleMapper(MapAppearanceRule mapRule, VectorLayerMapper vectorLayerMapper, CoreSpatialElementManager coreSpatialElementManager)
 {
     m_mapRule                   = mapRule;
     m_mapVectorLayer            = vectorLayerMapper.m_mapVectorLayer;
     m_coreMap                   = vectorLayerMapper.m_coreMap;
     m_coreSpatialElementManager = coreSpatialElementManager;
     m_mapMapper                 = vectorLayerMapper.m_mapMapper;
 }
Exemple #5
0
 public GradientType GetGradientType(Style style, StyleInstance styleInstance, bool hasScope)
 {
     if (style != null && (!MappingHelper.IsPropertyExpression(style.BackgroundGradientType) || hasScope))
     {
         return(MapMapper.GetGradientType(style, styleInstance));
     }
     return(GradientType.None);
 }
 private MarkerStyle?GetLegendSymbolMarker()
 {
     if (!(m_pointTemplateMapper is SymbolMarkerTemplateMapper))
     {
         return(MarkerStyle.None);
     }
     return(MapMapper.GetMarkerStyle(MapMapper.GetMarkerStyle(((MapMarkerTemplate)GetMapPointTemplate()).MapMarker, hasScope: false)));
 }
Exemple #7
0
 public RuleMapper(MapAppearanceRule mapRule, VectorLayerMapper vectorLayerMapper, CoreSpatialElementManager coreSpatialElementManager)
 {
     this.m_mapRule                   = mapRule;
     this.m_mapVectorLayer            = vectorLayerMapper.m_mapVectorLayer;
     this.m_coreMap                   = vectorLayerMapper.m_coreMap;
     this.m_coreSpatialElementManager = coreSpatialElementManager;
     this.m_mapMapper                 = vectorLayerMapper.m_mapMapper;
 }
 internal LineLayerMapper(MapLineLayer mapLineLayer, MapControl coreMap, MapMapper mapMapper)
     : base(mapLineLayer, coreMap, mapMapper)
 {
     if (mapLineLayer.MapLineTemplate != null)
     {
         m_lineTemplateMapper = new LineTemplateMapper(m_mapMapper, this, MapLineLayer);
     }
 }
 internal PointLayerMapper(MapPointLayer mapPointLayer, MapControl coreMap, MapMapper mapMapper)
     : base(mapPointLayer, coreMap, mapMapper)
 {
     if (mapPointLayer.MapPointTemplate != null)
     {
         m_pointTemplateMapper = CreatePointTemplateMapper();
     }
 }
Exemple #10
0
 public PointLayerMapper(MapPointLayer mapPointLayer, MapControl coreMap, MapMapper mapMapper)
     : base(mapPointLayer, coreMap, mapMapper)
 {
     if (mapPointLayer.MapPointTemplate != null)
     {
         base.m_pointTemplateMapper = base.CreatePointTemplateMapper();
     }
 }
Exemple #11
0
 public SpatialDataMapper(VectorLayerMapper vectorLayerMapper, Dictionary <SpatialElementKey, SpatialElementInfoGroup> spatialElementsDictionary, MapControl coreMap, MapMapper mapMapper)
 {
     this.m_vectorLayerMapper         = vectorLayerMapper;
     this.m_mapVectorLayer            = this.m_vectorLayerMapper.m_mapVectorLayer;
     this.m_spatialElementsDictionary = spatialElementsDictionary;
     this.m_coreMap   = coreMap;
     this.m_mapMapper = mapMapper;
 }
 internal SpatialDataMapper(VectorLayerMapper vectorLayerMapper, Dictionary <SpatialElementKey, SpatialElementInfoGroup> spatialElementsDictionary, MapControl coreMap, MapMapper mapMapper)
 {
     m_vectorLayerMapper         = vectorLayerMapper;
     m_mapVectorLayer            = m_vectorLayerMapper.m_mapVectorLayer;
     m_spatialElementsDictionary = spatialElementsDictionary;
     m_coreMap   = coreMap;
     m_mapMapper = mapMapper;
 }
Exemple #13
0
        public void SetSort()
        {
            var hbm    = new HbmMap();
            var mapper = new MapMapper <Animal, string, Animal>(hbm);

            mapper.Sort();
            hbm.Sort.Should().Be.EqualTo("natural");
        }
Exemple #14
0
        public void SetBatchSize()
        {
            var hbm    = new HbmMap();
            var mapper = new MapMapper <Animal, string, Animal>(hbm);

            mapper.BatchSize = 10;
            hbm.BatchSize.Should().Be.EqualTo(10);
        }
Exemple #15
0
        public void SetWhere()
        {
            var hbm    = new HbmMap();
            var mapper = new MapMapper <Animal, string, Animal>(hbm);

            mapper.Where = "c > 10";
            hbm.Where.Should().Be.EqualTo("c > 10");
        }
Exemple #16
0
        public void SetWhere()
        {
            var mapdoc = new HbmMapping();
            var hbm    = new HbmMap();
            var mapper = new MapMapper(typeof(Animal), typeof(string), typeof(Animal), hbm, mapdoc);

            mapper.Where("c > 10");
            hbm.Where.Should().Be.EqualTo("c > 10");
        }
Exemple #17
0
        public void SetCollectionTypeByType()
        {
            var mapdoc = new HbmMapping();
            var hbm    = new HbmMap();
            var mapper = new MapMapper(typeof(Animal), typeof(Animal), typeof(string), hbm, mapdoc);

            mapper.Type(typeof(FakeUserCollectionType));
            hbm.CollectionType.Should().Contain("FakeUserCollectionType");
        }
Exemple #18
0
        public void SetBatchSize()
        {
            var mapdoc = new HbmMapping();
            var hbm    = new HbmMap();
            var mapper = new MapMapper(typeof(Animal), typeof(string), typeof(Animal), hbm, mapdoc);

            mapper.BatchSize(10);
            hbm.BatchSize.Should().Be.EqualTo(10);
        }
Exemple #19
0
        public void SetSort()
        {
            var mapdoc = new HbmMapping();
            var hbm    = new HbmMap();
            var mapper = new MapMapper(typeof(Animal), typeof(string), typeof(Animal), hbm, mapdoc);

            mapper.Sort();
            hbm.Sort.Should().Be.EqualTo("natural");
        }
Exemple #20
0
        public void CanSetAFilterThroughAction()
        {
            var mapdoc = new HbmMapping();
            var hbm    = new HbmMap();
            var mapper = new MapMapper(typeof(Animal), typeof(Animal), typeof(string), hbm, mapdoc);

            mapper.Filter("filter1", f => f.Condition("condition1"));
            hbm.filter.Length.Should().Be(1);
            hbm.filter[0].Satisfy(f => f.name == "filter1" && f.condition == "condition1");
        }
Exemple #21
0
        public void CanSetCache()
        {
            var mapdoc = new HbmMapping();
            var hbm    = new HbmMap();
            var mapper = new MapMapper(typeof(Animal), typeof(Animal), typeof(string), hbm, mapdoc);

            mapper.Cache(x => x.Region("pizza"));

            hbm.cache.Should().Not.Be.Null();
        }
Exemple #22
0
        public void WhenActionIsNullThenAddFilterName()
        {
            var mapdoc = new HbmMapping();
            var hbm    = new HbmMap();
            var mapper = new MapMapper(typeof(Animal), typeof(Animal), typeof(string), hbm, mapdoc);

            mapper.Filter("filter1", null);
            hbm.filter.Length.Should().Be(1);
            hbm.filter[0].Satisfy(f => f.name == "filter1" && f.condition == null);
        }
Exemple #23
0
        public void CallKeyMapper()
        {
            var  hbm      = new HbmMap();
            var  mapper   = new MapMapper <Animal, string, Animal>(hbm);
            bool kmCalled = false;

            mapper.Key(km => kmCalled = true);
            hbm.Key.Should().Not.Be.Null();
            kmCalled.Should().Be.True();
        }
Exemple #24
0
        public void SetMutable()
        {
            var hbm    = new HbmMap();
            var mapper = new MapMapper <Animal, string, Animal>(hbm);

            mapper.Mutable = true;
            hbm.Mutable.Should().Be.True();
            mapper.Mutable = false;
            hbm.Mutable.Should().Be.False();
        }
        private MarkerStyle?GetLegendSymbolMarker()
        {
            if (!(this.m_pointTemplateMapper is SymbolMarkerTemplateMapper))
            {
                return(MarkerStyle.None);
            }
            MapMarkerStyle markerStyle = MapMapper.GetMarkerStyle(((MapMarkerTemplate)this.GetMapPointTemplate()).MapMarker, false);

            return(MapMapper.GetMarkerStyle(markerStyle));
        }
Exemple #26
0
        public void CallKeyMapper()
        {
            var  mapdoc   = new HbmMapping();
            var  hbm      = new HbmMap();
            var  mapper   = new MapMapper(typeof(Animal), typeof(string), typeof(Animal), hbm, mapdoc);
            bool kmCalled = false;

            mapper.Key(km => kmCalled = true);
            hbm.Key.Should().Not.Be.Null();
            kmCalled.Should().Be.True();
        }
Exemple #27
0
        public void SetMutable()
        {
            var mapdoc = new HbmMapping();
            var hbm    = new HbmMap();
            var mapper = new MapMapper(typeof(Animal), typeof(string), typeof(Animal), hbm, mapdoc);

            mapper.Mutable(true);
            hbm.Mutable.Should().Be.True();
            mapper.Mutable(false);
            hbm.Mutable.Should().Be.False();
        }
Exemple #28
0
 public MapDashStyle GetBorderStyle(Style style, StyleInstance styleInstance, bool hasScope)
 {
     if (style != null)
     {
         Border border = style.Border;
         if (border != null)
         {
             return(MapMapper.GetDashStyle(border, hasScope, false));
         }
     }
     return(MapDashStyle.Solid);
 }
Exemple #29
0
        public void SetLazy()
        {
            var hbm    = new HbmMap();
            var mapper = new MapMapper <Animal, string, Animal>(hbm);

            mapper.Lazy = CollectionLazy.Extra;
            hbm.Lazy.Should().Be.EqualTo(HbmCollectionLazy.Extra);
            mapper.Lazy = CollectionLazy.NoLazy;
            hbm.Lazy.Should().Be.EqualTo(HbmCollectionLazy.False);
            mapper.Lazy = CollectionLazy.Lazy;
            hbm.Lazy.Should().Be.EqualTo(HbmCollectionLazy.True);
        }
Exemple #30
0
        public void CanChangeAccessor()
        {
            var mapdoc = new HbmMapping();
            var hbm    = new HbmMap {
                name = "Children"
            };
            var mapper = new MapMapper(typeof(Animal), typeof(Animal), typeof(string), hbm, mapdoc);

            mapper.Access(Accessor.Field);

            hbm.Access.Should().Not.Be.Null();
        }