Flyweight.UnsharedConcreteFlyweight.Operation C# (CSharp) Method

Operation() public method

public Operation ( int extrinsicstate ) : void
extrinsicstate int
return void
        public override void Operation(int extrinsicstate)
        {
            Console.WriteLine("UnsharedConcreteFlyweight: " +
              extrinsicstate);
        }

Usage Example

Example #1
0
        static void Main(string[] args)
        {
            //externo
            int ext = 10;

            FlyweightFactory fabrica = new FlyweightFactory();

            Flyweight f1 = fabrica.getFlyweight("A");

            f1.Operation(ext++);

            Flyweight f2 = fabrica.getFlyweight("B");

            f2.Operation(ext++);
            Flyweight f3 = fabrica.getFlyweight("C");

            f3.Operation(ext++);
            Flyweight f4 = fabrica.getFlyweight("A");

            f4.Operation(ext++);

            Flyweight f5 = new UnsharedConcreteFlyweight();

            f5.Operation(ext++);

            Console.ReadLine();
        }
All Usage Examples Of Flyweight.UnsharedConcreteFlyweight::Operation
UnsharedConcreteFlyweight