private static void SetAddressPart(BulkLocationAdExtension adExtension, Action <Address> setFunc) { if (adExtension.LocationAdExtension.Address == null) { adExtension.LocationAdExtension.Address = new Address(); } setFunc(adExtension.LocationAdExtension.Address); }
private static void SetGeoPointPart(BulkLocationAdExtension adExtension, Action <GeoPoint, string> setFunc, string value) { if (string.IsNullOrEmpty(value)) { return; } if (adExtension.LocationAdExtension.GeoPoint == null) { adExtension.LocationAdExtension.GeoPoint = new GeoPoint(); } setFunc(adExtension.LocationAdExtension.GeoPoint, value); }
private static string GetGeoPointPart(BulkLocationAdExtension adExtension, Func <GeoPoint, string> getFunc) { return(adExtension.LocationAdExtension.GeoPoint != null?getFunc(adExtension.LocationAdExtension.GeoPoint) : null); }
private static string GetAddressPart(BulkLocationAdExtension adExtension, Func <Address, string> getFunc) { return(adExtension.LocationAdExtension.Address != null?getFunc(adExtension.LocationAdExtension.Address) : null); }