示例#1
0
        public static ContainerIdentification Parse(RawContainerIdentification rawContainerIdentification)
        {
            Utilities.Parse(rawContainerIdentification.Value, out var ownerCodeValue, out var equipmentCategoryString, out var serialNumberValue);

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

            return(containerIdentification);
        }
示例#2
0
        public static DescribedResult <bool> TryValidate(UnvalidatedRawContainerIdentification unvalidatedRawContainerIdentification, out RawContainerIdentification rawContainerIdentification)
        {
            var isValid = Utilities.IsValid(unvalidatedRawContainerIdentification);

            if (isValid.Value)
            {
                rawContainerIdentification = new RawContainerIdentification(unvalidatedRawContainerIdentification.Value);
            }
            else
            {
                rawContainerIdentification = RawContainerIdentification.Invalid;
            }

            return(isValid);
        }
示例#3
0
        public static DescribedResult <bool> IsValid(RawContainerIdentification rawContainerIdentification)
        {
            var output = Utilities.IsValidRawContainerIdentification(rawContainerIdentification.Value);

            return(output);
        }