Пример #1
0
        public virtual bool Matches(InstrumentSpec matchSpec)
        {
            if (matchSpec.Builder != Builder)
            {
                return(false);
            }

            if (!String.IsNullOrWhiteSpace(matchSpec.ModelName) &&
                !matchSpec.ModelName.Equals(ModelName, StringComparison.OrdinalIgnoreCase))
            {
                return(false);
            }

            if (matchSpec.Type != Type)
            {
                return(false);
            }

            if (matchSpec.BackWood != BackWood)
            {
                return(false);
            }

            if (matchSpec.TopWood != TopWood)
            {
                return(false);
            }

            return(true);
        }
Пример #2
0
        public override bool Matches(InstrumentSpec matchSpec)
        {
            if (!base.Matches(matchSpec))
            {
                return(false);
            }

            GuitarSpec guitarMatchSpec = matchSpec as GuitarSpec;

            if (guitarMatchSpec == null)
            {
                return(false);
            }

            if (guitarMatchSpec.NumStrings != NumStrings)
            {
                return(false);
            }

            return(true);
        }
Пример #3
0
        public override bool Matches(InstrumentSpec matchSpec)
        {
            if (!base.Matches(matchSpec))
            {
                return(false);
            }

            MandolinSpec mandolinMatchSpec = matchSpec as MandolinSpec;

            if (mandolinMatchSpec == null)
            {
                return(false);
            }

            if (mandolinMatchSpec.Style != Style)
            {
                return(false);
            }

            return(true);
        }
Пример #4
0
 public Instrument(InstrumentSpec spec)
 {
     Spec = spec;
 }
Пример #5
0
 public Instrument(String serialNumber, double price, InstrumentSpec spec)
 {
     SerialNumber = serialNumber;
     Price        = price;
     Spec         = spec;
 }