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 RelayCommand<T> : ICommand | |
| { | |
| private readonly Predicate<T> canExecute; | |
| private readonly Action<T> execute; | |
| public RelayCommand(Action<T> action) | |
| : this(x => true, action) | |
| { | |
| execute = action; | |
| } |
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
| module Constants = | |
| [<Literal>] | |
| let ImportDataFileUrl = "Data.csv" | |
| let YouTrackUrl = "http://LocalHost:8082" | |
| let YouTrackAdminUserName = "root" | |
| let YouTrackAdminPassword = "password" | |
| let YouTrackProjectID = "PROJ" | |
| #r "FSharp.Data.1.1.10/lib/net40/FSharp.Data.dll" | |
| #r "RestSharp.104.4.0/lib/net4/RestSharp.dll" |
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
| Roman numerals | |
| -------------- | |
| http://en.wikipedia.org/wiki/Roman_numerals | |
| Reading Roman numerals | |
| ---------------------- | |
| Based on seven symbols | |
| I = 1 |
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 static class Deserialize | |
| { | |
| public static TResponse Deserialize<TResponse>(string xmlString) | |
| { | |
| var serializer = new XmlSerializer(typeof(TResponse)); | |
| using (var stringReader = new StringReader(xmlString)) | |
| { | |
| return (TResponse)serializer.Deserialize(stringReader); | |
| } | |
| } |
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 static class TcpPort | |
| { | |
| public static int NextFreePort() | |
| { | |
| var l = new TcpListener(IPAddress.Loopback, 0); | |
| try | |
| { | |
| l.Start(); | |
| return ((IPEndPoint)l.LocalEndpoint).Port; |
NewerOlder