public static IEnumerable <string> GetExistingMediaFiles(this BaseTask baseTask, string buildConfiguration) { var buildConfigAssetDir = baseTask.GetBuildConfigurationAssetDir(buildConfiguration); try { var files = Directory.EnumerateFiles(buildConfigAssetDir, "*.png", SearchOption.AllDirectories); if (baseTask.IsVerbose()) { if (files.Any()) { baseTask.LogVerbose("{0} png files found in resources folder {1}", files.Count(), buildConfigAssetDir); foreach (var file in files) { baseTask.LogDebug("Media file found {0}", file); } } else { baseTask.LogVerbose("No files found in resources folder {0}", buildConfigAssetDir); } } return(files); } catch (Exception ex) { baseTask.Log.LogErrorFromException(ex); } return(null); }
public static bool IsDebug(this BaseTask baseTask) { if (baseTask.TapSettings == null) { return(true); } if (baseTask.TapSettings.GetMetadata(MetadataType.TapLogLevel).ToLower() == LogLevelConsts.Debug.ToLower()) { return(true); } else if (baseTask.IsVerbose()) { return(true); } return(false); }