in src/Readers/Vipr.Reader.OData.v4/OdcmReader.cs [836:858]
private void CheckForDeprecation(OdcmObject odcmObject, IEdmVocabularyAnnotatable annotatableEdmEntity)
{
if (_checkDeprecated.Add(odcmObject))
{
if (!odcmObject.IsDeprecated && !CheckForDeprecationOnType(odcmObject, _edmModel.FindVocabularyAnnotations(annotatableEdmEntity).FirstOrDefault(x => x.Term.Name == "Revisions")))
{
OdcmProperty property;
if (!odcmObject.IsDeprecated && (property = odcmObject as OdcmProperty) != null)
{
OdcmType propertyType = property.Projection.Type;
if (!(propertyType is OdcmPrimitiveType))
{
IEdmVocabularyAnnotatable propertyTypeElement = _edmModel.SchemaElements.FirstOrDefault(s => s.SchemaElementKind == EdmSchemaElementKind.TypeDefinition && s.FullName() == propertyType.FullName);
if (propertyTypeElement != null)
{
CheckForDeprecation(propertyType, propertyTypeElement);
odcmObject.Deprecation = property.Projection.Type.Deprecation;
}
}
}
}
}
}