Пример #1
0
        public static IOption CreateOption(string optionName, string dataType, string description, string apiName)
        {
            Type baseType = null;

            Type t = OptionBuilder.GetSystemType(dataType, out baseType);

            var     combinedType = baseType.MakeGenericType(t);
            IOption option       = (IOption)Activator.CreateInstance(combinedType);

            option.Description = description;
            option.Name        = optionName;
            option.IsAssigned  = false;
            option.ApiName     = apiName;
            return(option);
        }