public void DefaultParameterModelConvention_AppliesToAllParametersInApp() { // Arrange var app = new ApplicationModel(); var controllerType = typeof(HelloController); var controllerModel = new ControllerModel(controllerType.GetTypeInfo(), Array.Empty <object>()); app.Controllers.Add(controllerModel); var actionModel = new ActionModel(controllerType.GetMethod(nameof(HelloController.GetInfo)), Array.Empty <object>()); controllerModel.Actions.Add(actionModel); var parameterModel = new ParameterModel( controllerType.GetMethod(nameof(HelloController.GetInfo)).GetParameters()[0], Array.Empty <object>()); actionModel.Parameters.Add(parameterModel); var options = new MvcOptions(); options.Conventions.Add(new SimpleParameterConvention()); // Act options.Conventions[0].Apply(app); // Assert var kvp = Assert.Single(parameterModel.Properties); Assert.Equal("TestProperty", kvp.Key); Assert.Equal("TestValue", kvp.Value); }
public void ApplicationModelConventions_CopiesParameterModelCollectionOnApply_WhenRegisteredViaAttribute() { // Arrange var parameterModelConvention = new ParameterModelCollectionModifyingConvention(); var controllerType = typeof(HelloController).GetTypeInfo(); var app = new ApplicationModel(); var controllerModel = new ControllerModel(controllerType, Array.Empty <object>()) { Application = app }; app.Controllers.Add(controllerModel); var actionModel = new ActionModel(controllerType.GetMethod(nameof(HelloController.GetInfo)), Array.Empty <object>()) { Controller = controllerModel }; controllerModel.Actions.Add(actionModel); var parameterModel = new ParameterModel( controllerType.GetMethod(nameof(HelloController.GetInfo)).GetParameters()[0], new[] { parameterModelConvention }) { Action = actionModel }; actionModel.Parameters.Add(parameterModel); var conventions = new List <IApplicationModelConvention>(); // Act & Assert ApplicationModelConventions.ApplyConventions(app, conventions); }
private ParameterModel GetParameter(IParameterSymbol parameterSymbol) { var attributes = this.attributeInstantiator.Instantiate(parameterSymbol, this.diagnosticReporter).ToList(); var model = new ParameterModel(parameterSymbol) { HeaderAttribute = Get <HeaderAttribute>(), PathAttribute = Get <PathAttribute>(), QueryAttribute = Get <QueryAttribute>(), HttpRequestMessagePropertyAttribute = Get <HttpRequestMessagePropertyAttribute>(), RawQueryStringAttribute = Get <RawQueryStringAttribute>(), QueryMapAttribute = Get <QueryMapAttribute>(), BodyAttribute = Get <BodyAttribute>(), IsCancellationToken = SymbolEqualityComparer.Default.Equals(parameterSymbol.Type, this.wellKnownSymbols.CancellationToken), IsByRef = parameterSymbol.RefKind != RefKind.None, }; return(model); AttributeModel <T>?Get <T>() where T : Attribute { var(attribute, attributeData, type) = attributes.FirstOrDefault(x => x.attribute is T); return(attribute == null ? null : AttributeModel.Create((T)attribute, attributeData, type)); } }
/// <summary> /// Creates a <see cref="ParameterModel"/> for the given <see cref="ParameterInfo"/>. /// </summary> /// <param name="parameterInfo">The <see cref="ParameterInfo"/>.</param> /// <returns>A <see cref="ParameterModel"/> for the given <see cref="ParameterInfo"/>.</returns> internal static ParameterModel CreateParameterModel(ParameterInfo parameterInfo) { if (parameterInfo == null) { throw new ArgumentNullException(nameof(parameterInfo)); } var attributes = parameterInfo.GetCustomAttributes(inherit: true); //BindingInfo bindingInfo; //if (_modelMetadataProvider is ModelMetadataProvider modelMetadataProviderBase) //{ // var modelMetadata = modelMetadataProviderBase.GetMetadataForParameter(parameterInfo); // bindingInfo = BindingInfo.GetBindingInfo(attributes, modelMetadata); //} //else //{ // // GetMetadataForParameter should only be used if the user has opted in to the 2.1 behavior. // bindingInfo = BindingInfo.GetBindingInfo(attributes); //} var parameterModel = new ParameterModel(parameterInfo, attributes) { ParameterName = parameterInfo.Name, // BindingInfo = bindingInfo, }; return(parameterModel); }
public void GainTest(ParameterModel pm) { var p = GetParameter(pm); Assert.IsInstanceOf<GainedParameter>(p); Assert.AreEqual(pm.Gain.Value, ((GainedParameter) p).Gain); }
/// <summary> /// Creates a <see cref="ParameterModel"/> for the given <see cref="ParameterInfo"/>. /// </summary> /// <param name="parameterInfo">The <see cref="ParameterInfo"/>.</param> /// <returns>A <see cref="ParameterModel"/> for the given <see cref="ParameterInfo"/>.</returns> protected virtual ParameterModel CreateParameterModel(ParameterInfo parameterInfo) { if (parameterInfo == null) { throw new ArgumentNullException(nameof(parameterInfo)); } // CoreCLR returns IEnumerable<Attribute> from GetCustomAttributes - the OfType<object> // is needed to so that the result of ToArray() is object var attributes = parameterInfo.GetCustomAttributes(inherit: true); var parameterModel = new ParameterModel(parameterInfo, attributes); var bindingInfo = BindingInfo.GetBindingInfo(attributes); if (bindingInfo != null) { parameterModel.BindingInfo = bindingInfo; } else if (IsFormFileType(parameterInfo.ParameterType)) { parameterModel.BindingInfo = new BindingInfo { BindingSource = BindingSource.FormFile, }; } parameterModel.ParameterName = parameterInfo.Name; return(parameterModel); }
// Internal for unit testing. internal BindingSource InferBindingSourceForParameter(ParameterModel parameter) { var parameterType = parameter.ParameterInfo.ParameterType; if (ParameterExistsInAllRoutes(parameter.Action, parameter.ParameterName)) { return(BindingSource.Path); } else { ModelMetadata parameterMetadata; if (_modelMetadataProvider is ModelMetadataProvider modelMetadataProvider) { parameterMetadata = modelMetadataProvider.GetMetadataForParameter(parameter.ParameterInfo); } else { parameterMetadata = _modelMetadataProvider.GetMetadataForType(parameter.ParameterInfo.ParameterType); } if (parameterMetadata != null) { var bindingSource = parameterMetadata.IsComplexType ? BindingSource.Body : BindingSource.Query; return(bindingSource); } } return(null); }
private bool CanUseFormBodyBinding(ActionModel action, ParameterModel parameter) { if (AppConsts.FormBodyBindingIgnoredTypes.Any(t => t.IsAssignableFrom(parameter.ParameterInfo.ParameterType))) { return(false); } foreach (var selector in action.Selectors) { if (selector.ActionConstraints == null) { continue; } foreach (var actionConstraint in selector.ActionConstraints) { var httpMethodActionConstraint = actionConstraint as HttpMethodActionConstraint; if (httpMethodActionConstraint == null) { continue; } if (httpMethodActionConstraint.HttpMethods.All(hm => hm.IsIn("GET", "DELETE", "TRACE", "HEAD"))) { return(false); } } } return(true); }
internal static string Render(ParameterModel model, int tabCount = 0) { var tpl = new RequestBodyTemplate(); tpl.Initialize(model); return(ConversionUtilities.Tab(tpl.Render(), tabCount)); }
public HttpResponseMessage AddParameter([FromBody] ParameterModel parameter) { Regex reg = new Regex(@"^[^ %@#!*~&',;=?$\x22]+$"); var m = reg.IsMatch(parameter.Name); if (!m) { return(PageHelper.toJson(PageHelper.ReturnValue(false, "存在非法字符!"))); } ClassifyEntity ce = _classifyService.GetClassifyById(parameter.ClassifyId); ParameterEntity pe = new ParameterEntity() { Upduser = parameter.Upduser, Updtime = DateTime.Now, Sort = parameter.Sort, Name = parameter.Name, Classify = ce, //Adduser = parameter.Adduser, Adduser = _workContext.CurrentUser.Id.ToString(), Addtime = DateTime.Now, }; try { _parameterService.Create(pe); return(PageHelper.toJson(PageHelper.ReturnValue(true, "添加参数" + pe.Name + "成功"))); } catch (Exception e) { return(PageHelper.toJson(PageHelper.ReturnValue(false, "添加参数" + pe.Name + "失败"))); } }
public void Apply(ParameterModel parameter) { var param = parameter.BindingInfo?.BinderModelName ?? parameter.ParameterName; var constraint = new RequiredFromFormActionConstraint(param); parameter.Action.Selectors.Last().ActionConstraints.Add(constraint); }
public int Save(Object obj) { if (obj is FlightModel) { FlightModel newFlight = (FlightModel)obj; newFlight.FlightId = flights.Count + 1; flights.Add(newFlight); HttpContext.Current.Session["flights"] = flights; } else if (obj is ParameterModel) { ParameterModel newParameter = (ParameterModel)obj; newParameter.ParameterId = parameters.Count + 1; parameters.Add(newParameter); HttpContext.Current.Session["parameters"] = parameters; } else if (obj is PassengerModel) { PassengerModel newPassenger = (PassengerModel)obj; flights[newPassenger.FlightId - 1].passengers.Add(newPassenger); HttpContext.Current.Session["flights"] = flights; } return(1); }
public ActionResult HBLDetail(ParameterModel param) { var model = new HBLModel(); if (param.hidx != 0) { Mapper.CreateMap <HBL, HBLModel>(); var mblDto = blService.getHBL(param); model = Mapper.Map <HBL, HBLModel>(mblDto); model.itemList = mblDto.PRODUCTITEM.ToList(); } else { model.itemList = new List <PRODUCTITEM>(); } model.customerList = customerService.getCustomerList(new ParameterModel()).ToList(); model.statusList = commonService.getCodeList(new ParameterModel { GROUPCD = 1005 }).ToList(); model.clearanceList = commonService.getCodeList(new ParameterModel { GROUPCD = 1000 }).ToList(); model.transportList = commonService.getCodeList(new ParameterModel { GROUPCD = 1002 }).ToList(); model.weightTypeList = commonService.getCodeList(new ParameterModel { GROUPCD = 1001 }).ToList(); model.consigneeTypeList = commonService.getCodeList(new ParameterModel { GROUPCD = 1004 }).ToList(); return(View(model)); }
private static ParameterModel BuildParameter( PrimitiveTypeKind primitiveTypeKind, object defaultValue, string defaultValueSql = null, int?maxLength = null, byte?precision = null, byte?scale = null, bool?unicode = null, bool?fixedLength = null, string name = null, string storeType = null, bool outParameter = false) { ParameterModel parameterModel = new ParameterModel(primitiveTypeKind); parameterModel.MaxLength = maxLength; parameterModel.Precision = precision; parameterModel.Scale = scale; parameterModel.IsUnicode = unicode; parameterModel.IsFixedLength = fixedLength; parameterModel.DefaultValue = defaultValue; parameterModel.DefaultValueSql = defaultValueSql; parameterModel.Name = name; parameterModel.StoreType = storeType; parameterModel.IsOutParameter = outParameter; return(parameterModel); }
private bool IsComplexTypeParameter(ParameterModel parameter) { // No need for information from attributes on the parameter. Just use its type. var metadata = _modelMetadataProvider.GetMetadataForType(parameter.ParameterInfo.ParameterType); return(metadata.IsComplexType); }
void GetMethodCallParameters(List <ParameterModel> parameters, bool withLeadingComma) { for (int i = 0; i < parameters.Count; i++) { ParameterModel p = parameters[i]; if (withLeadingComma || (!withLeadingComma && i != 0)) { #line default #line hidden #line 47 "C:\Dev\Intent\IntentArchitect\Modules\Intent.Modules.Application.ServiceCallHandlers\Legacy\ServiceCallHandler\./../Services.ttinclude" this.Write(", "); #line default #line hidden #line 47 "C:\Dev\Intent\IntentArchitect\Modules\Intent.Modules.Application.ServiceCallHandlers\Legacy\ServiceCallHandler\./../Services.ttinclude" } #line default #line hidden #line 49 "C:\Dev\Intent\IntentArchitect\Modules\Intent.Modules.Application.ServiceCallHandlers\Legacy\ServiceCallHandler\./../Services.ttinclude" this.Write(this.ToStringHelper.ToStringWithCulture(p.Name)); #line default #line hidden #line 49 "C:\Dev\Intent\IntentArchitect\Modules\Intent.Modules.Application.ServiceCallHandlers\Legacy\ServiceCallHandler\./../Services.ttinclude" } }
private static ParameterModel BuildParameter( PrimitiveTypeKind primitiveTypeKind, object defaultValue, string defaultValueSql = null, int?maxLength = null, byte?precision = null, byte?scale = null, bool?unicode = null, bool?fixedLength = null, string name = null, string storeType = null, bool outParameter = false) { var parameter = new ParameterModel(primitiveTypeKind) { MaxLength = maxLength, Precision = precision, Scale = scale, IsUnicode = unicode, IsFixedLength = fixedLength, DefaultValue = defaultValue, DefaultValueSql = defaultValueSql, Name = name, StoreType = storeType, IsOutParameter = outParameter }; return(parameter); }
public void Apply(ParameterModel parameter) { if (parameter.Action.Selectors != null && parameter.Action.Selectors.Any()) { parameter.Action.Selectors.Last().ActionConstraints.Add(new RequiredFromQueryActionConstraint(parameter.BindingInfo?.BinderModelName ?? parameter.ParameterName)); } }
public static ParameterModel CreateParameterModel(ParameterInfo parameter) { var model = new ParameterModel { Name = parameter.Name, ParameterType = parameter.ParameterType.Name, Description = string.Empty }; var excelArgument = (ExcelArgumentAttribute)Attribute.GetCustomAttribute(parameter, typeof(ExcelArgumentAttribute)); if (excelArgument != null) { if (excelArgument.Name != null) { model.Name = excelArgument.Name; } if (excelArgument.Description != null) { model.Description = excelArgument.Description; } } model.Name = char.ToUpper(model.Name[0]) + model.Name.Substring(1); return(model); }
void IParameterModelConvention.Apply(ParameterModel parameter) { if (parameter.BindingInfo == null) { parameter.BindingInfo = new BindingInfo(); } parameter.BindingInfo.BindingSource = BindingSource.Query; }
public void EmitAddRawQueryStringParameter(ParameterModel parameter) { var methodInfo = MethodInfos.RequestInfo_AddRawQueryParameter.MakeGenericMethod(parameter.ParameterInfo.ParameterType); this.ilGenerator.Emit(OpCodes.Ldloc, this.requestInfoLocal); this.ilGenerator.Emit(OpCodes.Ldarg, parameter.ParameterInfo.Position + 1); this.ilGenerator.Emit(OpCodes.Callvirt, methodInfo); }
public Rparameter(ParameterModel model, Rparametric owner) { this.model = model; Owner = owner; ParameterType = Application[model.ViewModelId]; }
public void SetUp() { _name = "TestValue308762189"; _node = SyntaxFactory.Parameter(SyntaxFactory.Identifier("name")); _type = "TestValue1468504349"; _typeInfo = default(TypeInfo); _testClass = new ParameterModel(_name, _node, _type, _typeInfo); }
public ActionResult getRateLIst(ParameterModel param) { Mapper.CreateMap <RATE, RateModel>(); var rateListDto = custService.getRateList(param).ToList(); var rateList = rateListDto.Select(c => Mapper.Map <RATE, RateModel>(c)); return(Json(rateList, JsonRequestBehavior.AllowGet)); }
public void Apply(ParameterModel parameter) { if (parameter.Action?.Selectors?.Any() ?? false) { var restricao = new RequiredFromQueryActionConstraint(parameter.BindingInfo?.BinderModelName ?? parameter.ParameterName); parameter.Action.Selectors.Last().ActionConstraints.Add(restricao); } }
public void Apply(ParameterModel parameter) { if (parameter.Action.Selectors != null && parameter.Action.Selectors.Any()) { parameterName = parameter.BindingInfo?.BinderModelName ?? parameter.ParameterName; parameter.Action.Selectors.Last().ActionConstraints.Add(this); } }
public void ReportParameterMustHaveZeroOrOneAttributes(MethodModel _, ParameterModel parameter, List <AttributeModel> attributes) { this.AddDiagnostic( parameterMustHaveZeroOrOneAttributes, SymbolLocations(parameter.ParameterSymbol), parameter.Name, attributes.Count); }
public void Apply(ParameterModel model) { if (model.BindingInfo == null) { model.BindingInfo = new BindingInfo(); } model.BindingInfo.BindingSource = BindingSource.Path; }
public static ParameterBase ParameterBase(ParameterModel parameterModel) { return(new ParameterBase() { Name = parameterModel.Name, Type = GetOrAdd(parameterModel.Type) }); }
public ActionResult getCodeList(ParameterModel param) { //Mapper.CreateMap<CODE, CodeModel>(); var codeListDto = commonService.getCodeList(param).Where(c => c.CD != null).ToList(); var codeList = codeListDto.Select(c => Mapper.Map <CODE, CodeModel>(c)); return(Json(codeListDto, JsonRequestBehavior.AllowGet)); }
public ActionResult getCustomerList(ParameterModel param) { Mapper.CreateMap <CUSTOMER, CustomerModel>(); var customerListDto = custService.getCustomerList(param).OrderByDescending(c => c.cidx).ToList(); var customerList = customerListDto.Select(c => Mapper.Map <CUSTOMER, CustomerModel>(c)); return(Json(customerList, JsonRequestBehavior.AllowGet)); }
public void ClockDependentParameterTest(ParameterModel pm) { var p = GetParameter(pm) as DependencyParameter<Clock>; Console.WriteLine(pm.Command); Assert.IsNotNull(p, pm.Command); p.DependingOn.Devider = 4; p.SetDeviceValue(10); Assert.AreEqual(10, p.GetDeviceValue()); Assert.AreEqual(0.4, p.Value, 0.00001); p.DependingOn.Devider = 8; Assert.AreEqual(0.4, p.Value, 0.00001); Assert.AreEqual(5, p.GetDeviceValue()); p.Value = 0.8; Assert.AreEqual(0.8, p.Value); Assert.AreEqual(10, p.GetDeviceValue()); }
public JsonResult Update(string idParametro, string valor) { if (!String.IsNullOrWhiteSpace(idParametro) && !String.IsNullOrWhiteSpace(valor)) { //Monta o objeto para update var valorUpdate = IsDecimal(valor.Replace(",", ".")) ? valor.Replace(",", ".") : valor; var paramTemp = new ParameterModel { IdParametro = Convert.ToInt32(idParametro), Valor = valorUpdate }; var updateStatus = new Parameter().UpdateRecord(Settings.AutenticationKeyEarningSystem,paramTemp); if (updateStatus) { return Json(new JsonRequestResult { ResultType = JsonRequestResultType.Success, Message = Resources.Resource.GS_Parameter_Update_Success }, JsonRequestBehavior.AllowGet); } } return Json(new JsonRequestResult { ResultType = JsonRequestResultType.Error, Message = Resources.Resource.GS_Parameter_Update_Error }, JsonRequestBehavior.AllowGet); }
private string GetInputDirectory(ModelSystemStructureModel root, out ParameterModel parameter) { var inputDir = root.Type.GetProperty("InputBaseDirectory"); var attributes = inputDir.GetCustomAttributes(typeof(ParameterAttribute), true); if(attributes != null && attributes.Length > 0) { var parameterName = ((ParameterAttribute)attributes[0]).Name; var parameters = root.Parameters.GetParameters(); for(int i = 0; i < parameters.Count; i++) { if(parameters[i].Name == parameterName) { parameter = parameters[i]; return parameters[i].Value.ToString(); } } } parameter = null; return null; }
public void DescriptionTest(ParameterModel pm) { var p = GetParameter(pm); Assert.AreEqual(pm.Description, p.Description); }
public ContentResult ParameterSave(ParameterModel parameterModel, int? id) { JsonObjectResult jsonObjectResult = new JsonObjectResult(); try { //公共 YnParameterService.GetInstance().SetValue(MyParameter.doorLedTitle, parameterModel.doorLedTitle.Trim()); YnParameterService.GetInstance().SetValue(MyParameter.reserveInvalid, parameterModel.reserveInvalid.ToString()); decimal supplierPassDuration = (decimal)0.5; supplierPassDuration = (int)(parameterModel.supplierPassDuration / (decimal)0.5) * (decimal)0.5; if (supplierPassDuration > 24) supplierPassDuration = 24; if (supplierPassDuration < 0) supplierPassDuration = 0; YnParameterService.GetInstance().SetValue(MyParameter.supplierPassDuration, supplierPassDuration.ToString("0.0")); string employeeCarExemptionLevel_old = YnParameterService.GetInstance().GetValue(MyParameter.employeeCarExemptionLevel); YnParameterService.GetInstance().SetValue(MyParameter.employeeCarExemptionLevel, parameterModel.employeeCarExemptionLevel.Trim()); //设置员工车辆免检 if (employeeCarExemptionLevel_old.Trim() != parameterModel.employeeCarExemptionLevel.Trim()) { AscmEmployeeCarService.GetInstance().SetExemption(parameterModel.employeeCarExemptionLevel.Trim()); } jsonObjectResult.result = true; jsonObjectResult.message = ""; } catch (Exception ex) { jsonObjectResult.message = ex.Message; } string result = JsonConvert.SerializeObject(jsonObjectResult); return Content(result); }
public ActionResult ParameterIndex() { ParameterModel parameterModel = new ParameterModel(); #region 公共 //大门LED名称 parameterModel.doorLedTitle = YnParameterService.GetInstance().GetValue(MyParameter.doorLedTitle); //卸货点预约失效时间 int reserveInvalid = 5; int.TryParse(YnParameterService.GetInstance().GetValue(MyParameter.reserveInvalid), out reserveInvalid); parameterModel.reserveInvalid = reserveInvalid; //供应商到厂放行时长 decimal supplierPassDuration = (decimal)0.5; decimal.TryParse(YnParameterService.GetInstance().GetValue(MyParameter.supplierPassDuration), out supplierPassDuration); parameterModel.supplierPassDuration = supplierPassDuration; //员工车辆免检级别 parameterModel.employeeCarExemptionLevel = YnParameterService.GetInstance().GetValue(MyParameter.employeeCarExemptionLevel); #endregion return View(parameterModel); }
public ParameterDisplayModel(ParameterModel realParameter) { RealParameter = realParameter; realParameter.PropertyChanged += RealParameter_PropertyChanged; }
public void MinMaxTest(ParameterModel pm) { var p = GetParameter(pm); var c = pm.Command + " "; // default value Assert.AreEqual(pm.Default, p.GetDeviceValue(), c + "default"); Assert.Throws<ArgumentException>(() => p.SetDeviceValue(pm.Min - 1), c + "min - 1"); Assert.DoesNotThrow(() => p.SetDeviceValue(pm.Min), c + "min"); Assert.AreEqual(pm.Min, p.GetDeviceValue(), c + "min, are not equal"); Assert.DoesNotThrow(() => p.SetDeviceValue(pm.Max), c + "max"); Assert.AreEqual(pm.Max, p.GetDeviceValue(), c + "max, are not equal"); Assert.Throws<ArgumentException>(() => p.SetDeviceValue(pm.Max + 1), c + "max + 1"); }
public bool UpdateRecord(string authenticationKey, ParameterModel param) { object[] results = this.Invoke("UpdateRecord", new object[] { authenticationKey, param}); return ((bool)(results[0])); }
/// <remarks/> public void UpdateRecordAsync(string authenticationKey, ParameterModel param) { this.UpdateRecordAsync(authenticationKey, param, null); }
/// <remarks/> public void UpdateRecordAsync(string authenticationKey, ParameterModel param, object userState) { if ((this.UpdateRecordOperationCompleted == null)) { this.UpdateRecordOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateRecordOperationCompleted); } this.InvokeAsync("UpdateRecord", new object[] { authenticationKey, param}, this.UpdateRecordOperationCompleted, userState); }
private static ParameterModel[] GetParameterModels() { const string path = @"C:\Repository\Xbrt\XbrtTests\Spectral\Dpp\Caches\Parameters\TestCases.txt"; const bool hasHeader = true; var lines = File.ReadAllLines(path).Skip(hasHeader ? 1 : 0); var cases = new List<ParameterModel>(); foreach (var s in lines.Where(str => !String.IsNullOrEmpty(str)).Select(str => str.Split('\t'))) { try { var model = new ParameterModel { Command = s[0], Description = s[1], Default = long.Parse(s[2]), Min = long.Parse(s[3]), Max = long.Parse(s[4]), DeviceUnit = s[5], DisplayUnit = s[6], Gain = !String.IsNullOrEmpty(s[7]) ? (double?) double.Parse(s[7]) : null, DependingOn = s[8], Remarks = s[9] }; cases.Add(model); } catch { Assert.Fail("failed to parse:" + string.Concat(s)); } } return cases.ToArray(); }
private static Parameter GetParameter(ParameterModel pm) { return GetParameter(pm.Command); }
public void OtherParameterTest(ParameterModel pm) { var p = GetParameter(pm); TestParameter(p, 1, 4); }