Skip to content

Commit

Permalink
Apply code optimizations from VS
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco De Salvo committed Mar 14, 2024
1 parent 1e957b7 commit 7b08135
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ internal override RDFValidationReport ValidateConstraint(RDFShapesGraph shapesGr
IEnumerable<RDFPropertyConstraint> propertyConstraints = shape.Constraints.OfType<RDFPropertyConstraint>();
foreach (RDFPropertyConstraint propertyConstraint in propertyConstraints)
{
RDFPropertyShape propertyShape = shapesGraph.SelectShape(propertyConstraint.PropertyShapeUri.ToString()) as RDFPropertyShape;
if (propertyShape != null)
if (shapesGraph.SelectShape(propertyConstraint.PropertyShapeUri.ToString()) is RDFPropertyShape propertyShape)
allowedProperties.Add(propertyShape.Path);
}

Expand Down

0 comments on commit 7b08135

Please sign in to comment.