示例#1
0
        private static Ccv CreateInstanceImpl(int number)
        {
            var instance = new Ccv
            {
                Value = number
            };

            return(instance);
        }
示例#2
0
        public static CreditCard Create(CardNumber cardNumber, ExpiryDate expiryDate, Ccv ccv)
        {
            var instance = new CreditCard
            {
                CardNumber = cardNumber,
                ExpiryDate = expiryDate,
                Ccv        = ccv
            };

            Validator.ValidateAndThrow(instance);
            return(instance);
        }