コード例 #1
0
        private static void SetAddressPart(BulkLocationAdExtension adExtension, Action <Address> setFunc)
        {
            if (adExtension.LocationAdExtension.Address == null)
            {
                adExtension.LocationAdExtension.Address = new Address();
            }

            setFunc(adExtension.LocationAdExtension.Address);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
 private static string GetGeoPointPart(BulkLocationAdExtension adExtension, Func <GeoPoint, string> getFunc)
 {
     return(adExtension.LocationAdExtension.GeoPoint != null?getFunc(adExtension.LocationAdExtension.GeoPoint) : null);
 }
コード例 #4
0
 private static string GetAddressPart(BulkLocationAdExtension adExtension, Func <Address, string> getFunc)
 {
     return(adExtension.LocationAdExtension.Address != null?getFunc(adExtension.LocationAdExtension.Address) : null);
 }