public Flyweight CreateFlyweight(string identifier)
        {
            if (!_pool.ContainsKey(identifier))
              {
            Flyweight flyweight = new ConcreteFlyweight();
            _pool.Add(flyweight.Identifier, flyweight);
              }

              return _pool[identifier];
        }
Beispiel #2
0
        public Flyweight CreateFlyweight(string identifier)
        {
            if (!_pool.ContainsKey(identifier))
            {
                Flyweight flyweight = new ConcreteFlyweight();
                _pool.Add(flyweight.Identifier, flyweight);
            }

            return(_pool[identifier]);
        }