/// <summary> /// The handle home made. /// </summary> /// <param name="addCarrier"> /// The add carrier. /// </param> /// <param name="testdata"> /// The testdata. /// </param> /// <returns> /// The <see cref="bool"/>. /// </returns> private bool HandleHomeMade(IWowenWrap addCarrier, WovenTestData testdata) { if (string.IsNullOrEmpty(testdata.HomeMade)) { addCarrier.HomeMade = false; return(true); } addCarrier.HomeMade = true; addCarrier.Name = $"MyOwn_{Guid.NewGuid()}"; return(true); }
/// <summary> /// The brand pattern model. /// </summary> /// <param name="addCarrier"> /// The add carrier. /// </param> /// <param name="testdata"> /// The testdata. /// </param> /// <returns> /// The <see cref="bool"/>. /// </returns> private bool HandleBrandPatternModel(IWowenWrap addCarrier, WovenTestData testdata) { if (!string.IsNullOrEmpty(testdata.Brand)) { addCarrier.Brand = testdata.Brand; } addCarrier.Pattern = string.IsNullOrEmpty(testdata.Pattern) ? "--- without pattern ---" : testdata.Pattern; if (!string.IsNullOrEmpty(testdata.Model)) { addCarrier.Model = testdata.Model; } return(true); }
/// <summary> /// The handle size grade acquired. /// </summary> /// <param name="addCarrier"> /// The add carrier. /// </param> /// <param name="testdata"> /// The testdata. /// </param> /// <returns> /// The <see cref="bool"/>. /// </returns> private bool HandleSizeGradeAcquired(IWowenWrap addCarrier, WovenTestData testdata) { addCarrier.Size = testdata.Size; addCarrier.Grade = testdata.Grade; int daysOffSet; if (!int.TryParse(testdata.Acquired, out daysOffSet)) { daysOffSet = 0; } var acquired = DateTime.Now.AddDays(daysOffSet); addCarrier.Acquired = acquired; return(true); }