Ejemplo n.º 1
0
        public ODataExpandMapping GetTopLevelParent()
        {
            ODataExpandMapping currentMapping = this;

            while (currentMapping.ParentService != null)
            {
                currentMapping = currentMapping.ParentService;
            }
            return(currentMapping);
        }
Ejemplo n.º 2
0
        public string GetParentsToString()
        {
            string             serviceString  = null;
            ODataExpandMapping currentMapping = this;

            while (currentMapping != null)
            {
                serviceString  = "/" + currentMapping.ServiceName + serviceString;
                currentMapping = currentMapping.ParentService;
            }
            return(serviceString.TrimStart('/'));
        }
Ejemplo n.º 3
0
 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;
            }
        }
Ejemplo n.º 5
0
 public ODataExpandMapping(string serviceName, ODataExpandMapping parent, ODataExpandMapping child)
 {
     ServiceName   = serviceName;
     ParentService = parent;
     ChildService  = child;
 }