コード例 #1
0
        /// <summary>
        /// steelmadetype
        /// </summary>
        internal static string SteelMadeType(string val)
        {
            List <string> items = new List <string>()
            {
                "rolled", "cold_worked", "welded"
            };

            return(RestrictedString.RestrictionItems(val, items));
        }
コード例 #2
0
        /// <summary>
        /// edgetype
        /// </summary>
        internal static string EdgeType(string val)
        {
            List <string> items = new List <string>()
            {
                "line", "arc", "spline", "polyline", "circle"
            };

            return(RestrictedString.RestrictionItems(val, items));
        }
コード例 #3
0
        /// <summary>
        /// eurocodetype
        /// </summary>
        internal static string EurocodeType(string val)
        {
            List <string> items = new List <string>()
            {
                "common", "H", "RO", "DK", "S", "N", "FIN", "GB", "D", "PL", "TR", "EST", "LT", "n/a"
            };

            return(RestrictedString.RestrictionItems(val, items));
        }
コード例 #4
0
 /// <summary>
 /// Check if val in items.
 /// </summary>
 internal static string RestrictionItems(string val, List <string> items)
 {
     if (items.Contains(val))
     {
         return(val);
     }
     else
     {
         string msg = RestrictedString.RestrictionItemsMsg(items);
         throw new System.ArgumentException($"Value must be{msg}");
     }
 }