< Summary

Information
Class: ValidateLib.Metadata.Descriptors.CommonPropertiesDescriptor
Assembly: validatelib.dll
File(s): C:\skola_karlovka\RP\code\csv-validator\CSV_Validator\ValidateLib\Metadata\Descriptors\CommonPropertiesDescriptor.cs
Line coverage
42%
Covered lines: 3
Uncovered lines: 4
Coverable lines: 7
Total lines: 31
Line coverage: 42.8%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

File(s)

C:\skola_karlovka\RP\code\csv-validator\CSV_Validator\ValidateLib\Metadata\Descriptors\CommonPropertiesDescriptor.cs

#LineLine coverage
 1using Newtonsoft.Json.Linq;
 2using ValidateLib.ErrorsAndWarnings.Warnings;
 3using ValidateLib.Metadata.Parsers;
 4using ValidateLib.Metadata.Properties;
 5using ValidateLib.Metadata.PropertyParsers;
 6
 7namespace ValidateLib.Metadata.Descriptors
 8{
 9    public class CommonPropertiesDescriptor : ContextDescriptor, Interfaces.IParsable<CommonPropertiesDescriptor>
 10    {
 111        public List<CommonProperty> commonProperties = new List<CommonProperty>();
 12
 013        public void AddProperty(CommonProperty property) => commonProperties.Add(property);
 14        new static List<Warning> NormalizeProperty(JProperty property, Context context)
 15        {
 016            return ContextDescriptor.NormalizeProperty(property, context);
 17        }
 18
 19        new public IPropertyParserBase? GetPropertyParser(JProperty property, List<Warning> warnings)
 20        {
 121            string propertyName = property.Name;
 122            if (CommonProperty.IsCommonProperty(propertyName)) { return new CommonPropertyParser(warnings, this); }
 023            else return ((ContextDescriptor)this).GetPropertyParser(property, warnings);
 24        }
 25
 26        public static IParser<CommonPropertiesDescriptor> GetParser(List<Warning> warnings, CommonPropertiesDescriptor? 
 27        {
 028            throw new NotImplementedException();
 29        }
 30    }
 31}