コード例 #1
0
 public static bool DuplicatePorts(PortTypes port = PortTypes.ALL)
 {
     return(port != PortTypes.ALL ? _bombInfo.IsDuplicatePortPresent(port.ToString()) : _bombInfo.IsDuplicatePortPresent());
 }
コード例 #2
0
 public static bool IsPortPresent(PortTypes port)
 {
     return(_bombInfo.IsPortPresent(port.ToString()));
 }
コード例 #3
0
 public static int PortCount(PortTypes port)
 {
     return(port == PortTypes.ALL ? _bombInfo.GetPortCount() : _bombInfo.GetPortCount(port.ToString()));
 }
コード例 #4
0
ファイル: PortConfig.cs プロジェクト: alfredp77/busfin.sg
        public static int GetPort(this IConfiguration config, PortTypes portType)
        {
            var key = $"ports:{portType.ToString().ToLower()}";

            return(config.GetValue <int>(key));
        }