Example #1
0
        public static CheckedContainerIdentification Parse(RawCheckedContainerIdentification rawContainerIdentification)
        {
            Utilities.Parse(rawContainerIdentification.Value, out var ownerCodeValue, out var equipmentCategoryString, out var serialNumberValue, out var checkDigitStringValue);

            var containerIdentification = CheckedContainerIdentification.NewFrom(ownerCodeValue, equipmentCategoryString, serialNumberValue, checkDigitStringValue);

            return(containerIdentification);
        }
Example #2
0
        public static CheckedContainerIdentification NewFromUnvalidated(string unvalidatedOwnerCodeValue, string unvalidatedEquipmentCategoryValue, string unvalidatedSerialNumberValue, string unvalidatedCheckDigitStringValue)
        {
            var ownerCode         = unvalidatedOwnerCodeValue.ToOwnerCode();
            var equipmentCategory = unvalidatedEquipmentCategoryValue.ToEquipmentCategory();
            var serialNumber      = unvalidatedSerialNumberValue.ToSerialNumber();
            var checkDigit        = unvalidatedCheckDigitStringValue.ToCheckDigit();

            var checkedContainerIdentification = CheckedContainerIdentification.NewFrom(ownerCode, equipmentCategory, serialNumber, checkDigit);

            return(checkedContainerIdentification);
        }
Example #3
0
        public static CheckedContainerIdentification NewFrom(string ownerCodeValue, string equipmentCategoryString, string serialNumberValue, string checkDigitStringValue)
        {
            var ownerCode         = ownerCodeValue.AsOwnerCode();
            var equipmentCategory = Utilities.GetEquipmentCategory(equipmentCategoryString); // Assumes standard string.
            var serialNumber      = serialNumberValue.AsSerialNumber();
            var checkDigit        = checkDigitStringValue.AsCheckDigit();

            var containerIdentification = CheckedContainerIdentification.NewFrom(ownerCode, equipmentCategory, serialNumber, checkDigit);

            return(containerIdentification);
        }
        public static CheckedContainerIdentification From(this CheckedContainerIdentification containerIdentification,
                                                          OwnerCode ownerCode,
                                                          EquipmentCategory equipmentCategory,
                                                          SerialNumber serialNumber,
                                                          CheckDigit checkDigit)
        {
            containerIdentification.OwnerCode         = ownerCode;
            containerIdentification.EquipmentCategory = equipmentCategory;
            containerIdentification.SerialNumber      = serialNumber;
            containerIdentification.CheckDigit        = checkDigit;

            return(containerIdentification);
        }
Example #5
0
        public static CheckedContainerIdentification NewFrom(OwnerCode ownerCode, EquipmentCategory equipmentCategory, SerialNumber serialNumber, CheckDigit checkDigit)
        {
            var containerIdentification = new CheckedContainerIdentification().From(ownerCode, equipmentCategory, serialNumber, checkDigit);

            return(containerIdentification);
        }