コード例 #1
0
        public static dynamic GetTSObject(NumericOperatorType dynEnum)
        {
            var tsType = TSActivator.CreateInstance("Tekla.Structures.Filtering.NumericOperatorType").GetType();

            switch (dynEnum)
            {
            case NumericOperatorType.IS_EQUAL:
                return(System.Enum.Parse(tsType, "IS_EQUAL"));

            case NumericOperatorType.IS_NOT_EQUAL:
                return(System.Enum.Parse(tsType, "IS_NOT_EQUAL"));

            case NumericOperatorType.SMALLER_THAN:
                return(System.Enum.Parse(tsType, "SMALLER_THAN"));

            case NumericOperatorType.SMALLER_OR_EQUAL:
                return(System.Enum.Parse(tsType, "SMALLER_OR_EQUAL"));

            case NumericOperatorType.GREATER_THAN:
                return(System.Enum.Parse(tsType, "GREATER_THAN"));

            case NumericOperatorType.GREATER_OR_EQUAL:
                return(System.Enum.Parse(tsType, "GREATER_OR_EQUAL"));

            default:
                throw new DynamicAPIException(dynEnum.ToString() + "- enum value is not implemented");
            }
        }
コード例 #2
0
 public NumericOperatorTypeAttribute(NumericOperatorType type)
 {
     Type = type;
 }