Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Add] Generate PropertyAccessor files; fixes #271 #272

Closed

Conversation

samatstariongroup
Copy link
Member

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following the COMET-SDK code style guidelines
  • I have provided test coverage for my change (where applicable)

Description

  • Added code-generated partial classes for POCO's that are called PropertyAccessors that provide the QuerValue method
  • This new functionality allows to query a model with path-like strings, examples:
var siteDirectory = new SiteDirectory(Guid.NewGuid(), null, null);
var domainOfExpertises = (List<DomainOfExpertise>)siteDirectory.QueryValue("domain[0..*]");
var names = (List<string>) siteDirectory.QueryValue("domain[0..*].name");
var aliases = (List<Alias>)siteDirectory.QueryValue("domain[0..*].alias[0..*]");
var contents = (List<string>)siteDirectory.QueryValue("domain[0..*].alias[0..*].content");

Is going to be used to configure a CSV generator capability

using System.Text.RegularExpressions;

/// <summary>
/// The <see cref="PropertyDescriptor"/> is used ...
Copy link
Contributor

@nathanatstariongroup nathanatstariongroup Aug 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have a more explicit description

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for spotting that, its updated

@sonarqubecloud
Copy link

sonarqubecloud bot commented Aug 7, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug C 8 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot E 1 Security Hotspot
Code Smell A 9 Code Smells

32.0% 32.0% Coverage
0.0% 0.0% Duplication

warning The version of Java (11.0.19) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@samatstariongroup
Copy link
Member Author

closed by 63ec241

@samatstariongroup samatstariongroup deleted the GH271-PropertyAccessor-QueryPropertyValue branch August 7, 2023 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants