Beispiel #1
0
        public MapModule[] GetModules(MapStrategy strategy, Version license)
        {
            var creator           = MapStrategyCreator.Creator(strategy);
            var searchMapStrategy = creator.Factory();

            return(searchMapStrategy.GetModules(_root, license));
        }
Beispiel #2
0
 public static MapStrategy getMapStrategy()
 {
     if (_instance == null)
     {
         _instance = new LitMapFactory();
     }
     return(_instance);
 }
Beispiel #3
0
        internal static MapStrategyCreator Creator(MapStrategy strategy)
        {
            switch (strategy)
            {
            case MapStrategy.PerpetualLicense:
                return(new MapStrategyPerpetualLicenseCreator());

            default:
                return(new MapStrategySubscriptionCreator());
            }
        }
Beispiel #4
0
        public void AssertUrlChange(string originalUrl, string expectedCanonicalUrl)
        {
            var uriBuilder = new UriBuilder(originalUrl);

            var dictionary = new Dictionary <string, string>
            {
                { "/foo", "/bar" }
            };

            IUrlStrategy strategy = new MapStrategy(dictionary);

            strategy.Apply(uriBuilder);

            Assert.That(uriBuilder.Uri, Is.EqualTo(new Uri(expectedCanonicalUrl)));
        }
Beispiel #5
0
        public TReturn Map(IRecord record)
        {
            if (_mapStrategy == null)
            {
                lock (Locker)
                {
                    if (_mapStrategy == null)
                    {
                        _mapStrategy = new MapStrategy(record);
                    }
                }
            }

            return(_mapStrategy.Map(record));
        }
 public static MapStrategy getMapStrategy()
 {
     if (_instance == null)
         _instance = new BigMapFactory();
     return _instance;
 }