private static void StoreZipfileAndCallback(KMLStyle kmlStyle, Action<KMLStyle> callback, ZipFile zipFile) { if (zipFile != null) { if (kmlStyle.ZipFile == null && !String.IsNullOrEmpty(kmlStyle.IconHref)) { kmlStyle.ZipFile = zipFile; } else { zipFile.Dispose(); } } callback(kmlStyle); }