예제 #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);
        }
예제 #2
0
        public static DescribedResult <bool> TryValidate(UnvalidatedRawCheckedContainerIdentification unvalidatedRawCheckedContainerIdentification, out RawCheckedContainerIdentification rawCheckedContainerIdentification)
        {
            var isValid = Utilities.IsValid(unvalidatedRawCheckedContainerIdentification);

            if (isValid.Value)
            {
                rawCheckedContainerIdentification = new RawCheckedContainerIdentification(unvalidatedRawCheckedContainerIdentification.Value);
            }
            else
            {
                rawCheckedContainerIdentification = RawCheckedContainerIdentification.Invalid;
            }

            return(isValid);
        }
예제 #3
0
        public static DescribedResult <bool> IsValid(RawCheckedContainerIdentification rawCheckedContainerIdentification)
        {
            var output = Utilities.IsValidRawCheckedContainerIdentification(rawCheckedContainerIdentification.Value);

            return(output);
        }