void ParseInput() { var utilValues = Enum.GetValues(typeof(BuildUtilityTaskEnum)).Cast <BuildUtilityTaskEnum>(); if (!string.IsNullOrWhiteSpace(UtilityName)) { foreach (BuildUtilityTaskEnum member in utilValues) { if (member.GetDescriptionAttributeValue().Equals(UtilityName, StringComparison.OrdinalIgnoreCase)) { BuildUtility = member; break; } } } if (BuildUtility == BuildUtilityTaskEnum.NotSupported) { string helpStrFormat = "msbuild build.proj /t:Util /p:UtilityName={0}"; foreach (BuildUtilityTaskEnum member in utilValues) { if (member != BuildUtilityTaskEnum.NotSupported) { TaskLogger.LogWarning(helpStrFormat, member.ToString()); } } //TaskLogger.LogException<ApplicationException>("Unable to execute task without valid UtilityName"); } }
public UtilTask() { UtilityName = string.Empty; BuildUtility = BuildUtilityTaskEnum.NotSupported; }