public ODataExpandMapping GetTopLevelParent() { ODataExpandMapping currentMapping = this; while (currentMapping.ParentService != null) { currentMapping = currentMapping.ParentService; } return(currentMapping); }
public string GetParentsToString() { string serviceString = null; ODataExpandMapping currentMapping = this; while (currentMapping != null) { serviceString = "/" + currentMapping.ServiceName + serviceString; currentMapping = currentMapping.ParentService; } return(serviceString.TrimStart('/')); }
public ODataExpandMapping(string serviceName, ODataExpandMapping relative, bool isParent) { ServiceName = serviceName; if (isParent) { ParentService = relative; } else { ChildService = relative; } }
public LookupAttribute(string serviceName, string altKey = null) { ServiceName = serviceName; ODataMapping = ODataMappings[serviceName]; ODataExpandMapping topParent = ODataMapping.GetTopLevelParent(); ServiceEntity = ServiceDictionary[topParent.ServiceName]; ServiceUri = new Uri(ServiceEntity.EntityService, UriKind.Relative); if (altKey != null) //if alternate key is provided, assign it to ServiceEntity { AltKey = altKey; } }
public ODataExpandMapping(string serviceName, ODataExpandMapping parent, ODataExpandMapping child) { ServiceName = serviceName; ParentService = parent; ChildService = child; }