Beispiel #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);
     }
 }
Beispiel #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);
     }
 }
Beispiel #3
0
        protected virtual void OnBookRemoved(LibEventArgs args)
        {
            EventHandler<LibEventArgs> tmp = Volatile.Read(ref BookRemoved);

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

            if (tmp != null)
            {
                tmp(this, args);
            }
        }
Beispiel #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);
            }
        }
Beispiel #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);
            }
        }