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

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

            return(_pool[identifier]);
        }