Example #1
0
 public static void SetDisabledMetadata(this ITaskItem taskItem, BaseTask baseTask, bool disabled, string description)
 {
     if (disabled)
     {
         baseTask.LogWarning($"{description} is disabled");
         taskItem.SetMetadata(MetadataType.Disabled, bool.TrueString);
     }
     else
     {
         baseTask.LogDebug($"{description} is enabled");
         taskItem.SetMetadata(MetadataType.Disabled, bool.FalseString);
     }
 }