Exemplo n.º 1
0
 private void BookWasRemoved(object o, LibEventArgs args)
 {
     if (_preferedGenre == Genre.Fantastic && args.Genre != Genre.Fantastic)
     {
         Console.WriteLine("{0}: I'm not going to read \"{1}\"", _name, args.Title);
     }
 }
Exemplo n.º 2
0
 private void BookWasRemoved(object o, LibEventArgs args)
 {
     if(_preferedGenre == Genre.Fantastic && args.Genre != Genre.Fantastic)
     {
         Console.WriteLine("{0}: I'm not going to read \"{1}\"", _name, args.Title);
     }
 }
Exemplo n.º 3
0
        protected virtual void OnBookRemoved(LibEventArgs args)
        {
            EventHandler<LibEventArgs> tmp = Volatile.Read(ref BookRemoved);

            if (tmp != null)
            {
                tmp(this, args);
            }
        }
Exemplo n.º 4
0
        protected virtual void OnBookRemoved(LibEventArgs args)
        {
            EventHandler <LibEventArgs> tmp = Volatile.Read(ref BookRemoved);

            if (tmp != null)
            {
                tmp(this, args);
            }
        }
Exemplo n.º 5
0
        private void NewBook(object o, LibEventArgs args)
        {
            if (args.Genre == Genre.Computer && _preferedGenre == Genre.Computer)
            {
                Console.WriteLine("{0}: I'm going to go to the library. Trere is a new computer book!", _name);
            }

            if (args.Genre == Genre.Fantastic && _preferedGenre == Genre.Fantastic)
            {
                Console.WriteLine("{0}: I want a home delivery of a new fantastic book!", _name);
            }
        }
Exemplo n.º 6
0
        private void NewBook(object o, LibEventArgs args)
        {
            if(args.Genre == Genre.Computer && _preferedGenre == Genre.Computer)
            {
                Console.WriteLine("{0}: I'm going to go to the library. Trere is a new computer book!", _name);
            }

            if(args.Genre == Genre.Fantastic && _preferedGenre == Genre.Fantastic)
            {
                Console.WriteLine("{0}: I want a home delivery of a new fantastic book!", _name);
            }
        }