Exemplo n.º 1
0
        private OtherFilesToUpload GetFilledRandomOtherFilesToUpload(string OmitPropName)
        {
            OtherFilesToUpload otherFilesToUpload = new OtherFilesToUpload();

            if (OmitPropName != "MikeScenarioID")
            {
                otherFilesToUpload.MikeScenarioID = GetRandomInt(1, 11);
            }
            //CSSPError: property [TVFileList] and type [OtherFilesToUpload] is  not implemented

            return(otherFilesToUpload);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Validate function for all OtherFilesToUploadService commands
        /// </summary>
        /// <param name="validationContext">System.ComponentModel.DataAnnotations.ValidationContext (Describes the context in which a validation check is performed.)</param>
        /// <param name="actionDBType">[ActionDBTypeEnum] (CSSPEnums.ActionDBTypeEnum.html) action type to validate</param>
        /// <returns>IEnumerable of ValidationResult (Where ValidationResult is a container for the results of a validation request.)</returns>
        private IEnumerable <ValidationResult> Validate(ValidationContext validationContext, ActionDBTypeEnum actionDBType)
        {
            string             retStr             = "";
            Enums              enums              = new Enums(LanguageRequest);
            OtherFilesToUpload otherFilesToUpload = validationContext.ObjectInstance as OtherFilesToUpload;

            otherFilesToUpload.HasErrors = false;

            if (otherFilesToUpload.MikeScenarioID < 1)
            {
                otherFilesToUpload.HasErrors = true;
                yield return(new ValidationResult(string.Format(CSSPServicesRes._MinValueIs_, "MikeScenarioID", "1"), new[] { "MikeScenarioID" }));
            }

            //CSSPError: Type not implemented [TVFileList] of type [List`1]

            //CSSPError: Type not implemented [TVFileList] of type [TVFile]
            retStr = "";      // added to stop compiling CSSPError
            if (retStr != "") // will never be true
            {
                otherFilesToUpload.HasErrors = true;
                yield return(new ValidationResult("AAA", new[] { "AAA" }));
            }
        }
Exemplo n.º 3
0
 public OtherFilesToUploadTest()
 {
     otherFilesToUpload = new OtherFilesToUpload();
 }