コード例 #1
0
        public void GetFieldsStructureTest()
        {
            FieldsStructureReaderService service = new FieldsStructureReaderService("V");
            Fields fields = service.Get();

            Assert.NotNull(fields);
            Assert.NotEmpty(fields.Items);

            foreach (FieldItem item in fields.Items)
            {
                this.Output.WriteLine(
                    $"Name - {item.FieldName}, Type - {item.FieldType.GetType().ToString()}, Nullable Condition - {item.IsNullableCondition}");
            }
        }
コード例 #2
0
        /// <summary>
        /// This function returns TRUE if all fields structure collection has been read successfully.
        /// </summary>
        /// <returns></returns>
        private bool GetFieldsStructureCollection()
        {
            try
            {
                FieldsStructureReaderService service = new FieldsStructureReaderService(this.Model);
                this.FieldsCollection = service.Get();

                if (!this.FieldsCollection.Items.Any())
                {
                    throw new ArgumentNullException($"There ara no any fields found at all.");
                }
            }
            catch (Exception ex)
            {
                this.AddErrorMessage($"Fields structure initialization process: {ex.Message}");
            }

            return(this.IsValid);
        }
コード例 #3
0
        protected Fields GetFieldsStructureCollection(string model)
        {
            FieldsStructureReaderService service = new FieldsStructureReaderService(model);

            return(service.Get());
        }
コード例 #4
0
        private Fields GetFields()
        {
            FieldsStructureReaderService service = new FieldsStructureReaderService("V");

            return(service.Get());
        }