public CpAddress Parse(string line) { CpAddress addr = CreateAddressStruct(); CpParserParse(line, ref addr); return(addr); }
private CpAddress CreateAddressStruct() { CpAddress addr = new CpAddress(); addr.AddressType = CpAddressType.UnknownAddress; addr.AddressNumber = ""; addr.PreDirectional = ""; addr.StreetName = ""; addr.Suffix = ""; addr.PostDirectional = ""; addr.SecondaryIdentifier = ""; addr.SecondaryRange = ""; addr.MailstopCode = ""; addr.Department = ""; addr.BoxNumber = ""; addr.MilitaryUnitType = ""; addr.MilitaryUnitNumber = ""; addr.MilitaryBoxNumber = ""; addr.MilitaryShipName = ""; addr.RuralRouteNumber = ""; addr.RuralRouteBoxNumber = ""; addr.HighwayContractNumber = ""; addr.City = ""; addr.State = ""; addr.Zip5 = ""; addr.Zip4 = ""; return(addr); }
private static extern void CpParserParse([MarshalAs(UnmanagedType.LPStr)] string line, ref CpAddress address);