Ejemplo n.º 1
0
        public Document(string number, EDocType type)
        {
            Number = number;
            Type   = type;

            AddNotifications(new Contract()
                             .IsFalse(Type == EDocType.CNPJ && !IsValidCnpj(), $"{nameof(Document)}.{nameof(Number)}", "CNPJ inválido.")
                             .IsFalse(Type == EDocType.CPF && !IsValidCpf(), $"{nameof(Document)}.{nameof(Number)}", "CPF inválido."));
        }
 public EDocTransformAttribute(EDocType transformType, EDocType targetType)
     : this(transformType)
 {
     this.TargetType = targetType;
 }
 public EDocTransformAttribute(EDocType transformType)
 {
     this.TransformType = transformType;
 }