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); } }
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); } }
protected virtual void OnBookRemoved(LibEventArgs args) { EventHandler<LibEventArgs> tmp = Volatile.Read(ref BookRemoved); if (tmp != null) { tmp(this, args); } }
protected virtual void OnBookRemoved(LibEventArgs args) { EventHandler <LibEventArgs> tmp = Volatile.Read(ref BookRemoved); if (tmp != null) { tmp(this, args); } }
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); } }
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); } }