コード例 #1
0
        public void Register(VenueAddOns venueAddOn, VenueComponent venueDecorator)
        {
            //venue add on will never be null since its an enum
            if (venueDecorator == null)
            {
                throw new ArgumentNullException("Venue Decorator is null");
            }

            if (!venueFeatures.ContainsKey(venueAddOn))
            {
                venueFeatures[venueAddOn] = venueDecorator;
            }
        }
コード例 #2
0
 //Used to avoid an issue where venue would have to be passed in the
 //constructor instead, whichy would not be possible in the way this
 //was coded.
 public void SetBaseComponent(VenueComponent venueComponent)
 {
     this.venueComponent = venueComponent;
 }