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); }
public static ContainerIdentification NewFrom(string ownerCodeValue, string equipmentCategoryString, string serialNumberValue) { var ownerCode = ownerCodeValue.AsOwnerCode(); var equipmentCategory = Utilities.GetEquipmentCategory(equipmentCategoryString); // Assumes standard string. var serialNumber = serialNumberValue.AsSerialNumber(); var containerIdentification = ContainerIdentification.NewFrom(ownerCode, equipmentCategory, serialNumber); return(containerIdentification); }
public static ContainerIdentification NewFromUnvalidated(string unvalidatedOwnerCodeValue, string unvalidatedEquipmentCategoryValue, string unvalidatedSerialNumberValue) { var ownerCode = unvalidatedOwnerCodeValue.ToOwnerCode(); var equipmentCategory = unvalidatedEquipmentCategoryValue.ToEquipmentCategory(); var serialNumber = unvalidatedSerialNumberValue.ToSerialNumber(); var containerIdentification = ContainerIdentification.NewFrom(ownerCode, equipmentCategory, serialNumber); return(containerIdentification); }