Skip to content

Commit 4fd0747

Browse files
resolving schema types
implementing new method for resolving schema property types
1 parent 81f0b77 commit 4fd0747

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

ODataDataProvider/ODataVirtualDataSourceDataProvider.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,23 @@ public int IndexOfKey(object[] key)
620620
{
621621
return -1;
622622
}
623+
624+
public DataSourceSchemaPropertyType ResolveSchemaPropertyType(string propertyPath)
625+
{
626+
var propertiesInPath = propertyPath.Split('.');
627+
if (propertiesInPath.Length == 1 && this.ActualSchema != null)
628+
{
629+
for (int i = 0; i < this.ActualSchema.PropertyNames.Length; i++)
630+
{
631+
if (this.ActualSchema.PropertyNames[i] == propertiesInPath[0])
632+
{
633+
return this.ActualSchema.PropertyTypes[i];
634+
}
635+
}
636+
}
637+
638+
return DataSourceSchemaPropertyType.ObjectValue;
639+
}
623640
}
624641

625642

0 commit comments

Comments
 (0)