Esempio n. 1
0
        public void SetName(string name)
        {
            DomainPreconditions.NotNull(name, nameof(name));
            DomainPreconditions.LongerThan(name, NAME_MAX_LENGTH, nameof(name));

            Name = name;
        }
Esempio n. 2
0
 private static void ValidateModel(string model)
 {
     DomainPreconditions.NotNull(model, nameof(Model));
     DomainPreconditions.NotEmpty(model, nameof(Model));
     DomainPreconditions.LongerThan(model, ModelMaxLengh, nameof(Model));
 }
Esempio n. 3
0
 private static void ValidateLicensePlate(string licensePlate)
 {
     DomainPreconditions.NotNull(licensePlate, nameof(LicensePlate));
     DomainPreconditions.NotEmpty(licensePlate, nameof(LicensePlate));
     DomainPreconditions.LongerThan(licensePlate, LicensePlateMaxLengh, nameof(LicensePlate));
 }
Esempio n. 4
0
 private static void ValidateCarFrame(string carFrame)
 {
     DomainPreconditions.NotNull(carFrame, nameof(CarFrame));
     DomainPreconditions.NotEmpty(carFrame, nameof(CarFrame));
     DomainPreconditions.LongerThan(carFrame, CarFrameMaxLengh, nameof(CarFrame));
 }