A test repo for trialing branching strategies and confirming our adoption and standards. We aim to use GitFlow as our primary strategy.
Guidance is largely stolen from the following articles:
| # Add the following task to support building dotnet 8 targets until such as time that MS update the images | |
| - task: UseDotNet@2 | |
| displayName: 'Use .NET 8 sdk' | |
| inputs: | |
| packageType: sdk | |
| version: 8.x | |
| includePreviewVersions: false |
A test repo for trialing branching strategies and confirming our adoption and standards. We aim to use GitFlow as our primary strategy.
Guidance is largely stolen from the following articles:
| let rec repeatString stringToRepeat numberOfTimesToRepeat = | |
| if numberOfTimesToRepeat = 0 then "" | |
| else | |
| stringToRepeat + (repeatString stringToRepeat (numberOfTimesToRepeat - 1)) |
| if (%1)==(NOPAUSE) goto :eof | |
| pause |
| \curl -L https://get.rvm.io | bash -s stable --autolibs=3 --rails |
| public static class HtmlHelperExtensions | |
| { | |
| public static MvcHtmlString EmptyRow(this HtmlHelper helper, string emptyTextMessage, int rowCount) | |
| { | |
| return new MvcHtmlString(string.Format("<tr class=\"emptyRow\"><td colspan=\"{0}\">{1}</td></tr>", rowCount, emptyTextMessage)); | |
| } | |
| } |
| public class MustBeEmptyAttribute : ValidationAttribute | |
| { | |
| public override bool IsValid(object value) | |
| { | |
| if (value == null) | |
| { | |
| return true; | |
| } | |
| if (value is string) | |
| { |
| kernel.Bind<IMyPrincipal>().ToMethod(c => Convert(HttpContext.Current.User)); | |
| private static IMyPrincipal Convert(IPrincipal principal) | |
| { | |
| if (principal is Common.CustomPrincipal) | |
| return (Common.CustomPrincipal)principal; | |
| else | |
| return new Common.AnonymousPrincipal(principal); | |
| } |
| -- Sneaky way to select from a specific table using a config value | |
| -- Views do not support IF or anything else useful | |
| -- Obviously the table schemas need to match otherwise the UNION will fail | |
| SELECT t.* FROM ATable t | |
| INNER JOIN Config c on 'ConfigKeyToMatch' = c.ConfigKey | |
| WHERE c.ConfigValue = 'True' | |
| UNION | |
| SELECT t.* FROM DifferentTable t |