This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Verify if a datetime is in a range | |
| public static bool BetweenInclusive(this DateTime dateToCompare, | |
| DateTime Left, DateTime Right) | |
| { | |
| bool result = (dateToCompare.CompareTo(Left) >= 0) && | |
| (dateToCompare.CompareTo(Right) <= 0); | |
| return result; | |
| } | |
| // Verify if a datetime is in a range |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private const string As400TimestampMask = "yyyy-MM-dd-HH.mm.ss.sss"; | |
| private const string As400TimeMask = "hh:mm:ss"; | |
| private const string As400DateMask = "yyyy-MM-dd"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://jsfiddle.net/n8fw5m4L/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public interface ISelectable | |
| { | |
| string GetValueField(); | |
| string GetTextField(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public struct DateRange | |
| { | |
| public DateRange(DateTime start, DateTime end) | |
| : this() | |
| { | |
| if (start > end) | |
| { | |
| throw new ArgumentException("Start date time cannot be after end date time"); | |
| } | |
| Start = start; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class DateRangeTests | |
| { | |
| [TestFixture] | |
| public class when_instantiating_date_ranges | |
| { | |
| [Test] | |
| public void then_should_set_start_date_given_start_date() | |
| { | |
| // Arrange // Act |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public struct DateRange | |
| { | |
| private readonly DateTime _start; | |
| private readonly DateTime _end; | |
| public DateRange(DateTime start, DateTime end) | |
| : this() | |
| { | |
| if (start > end) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [AttributeUsage(AttributeTargets.Property, AllowMultiple = true)] | |
| public class AtLeastOneAttribute : ValidationAttribute, IClientValidatable | |
| { | |
| public string GroupName { get; private set; } | |
| public AtLeastOneAttribute(string groupName) | |
| { | |
| GroupName = groupName; | |
| } | |
| public IEnumerable<ModelClientValidationRule> GetClientValidationRules(ModelMetadata metadata, ControllerContext context) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Import-Module WebAdministration | |
| if ($OctopusParameters -eq $null) | |
| { | |
| $OctopusParameters = @{ | |
| OctopusWebSiteName = "Default Web Site\SiteName" | |
| ApplicationPoolName = "AppPoolName" | |
| UseCustomAppPoolUser = false | |
| }; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public interface IApiRequester | |
| { | |
| Task<TResult> PostAsyncResult<TResult>(Uri uri, object data) where TResult : class; | |
| Task<TResult> GetAsyncResult<TResult>(Uri uri) where TResult : class; | |
| } |