コード例 #1
0
        public ODataExpandMapping GetTopLevelParent()
        {
            ODataExpandMapping currentMapping = this;

            while (currentMapping.ParentService != null)
            {
                currentMapping = currentMapping.ParentService;
            }
            return(currentMapping);
        }
コード例 #2
0
        public string GetParentsToString()
        {
            string             serviceString  = null;
            ODataExpandMapping currentMapping = this;

            while (currentMapping != null)
            {
                serviceString  = "/" + currentMapping.ServiceName + serviceString;
                currentMapping = currentMapping.ParentService;
            }
            return(serviceString.TrimStart('/'));
        }
コード例 #3
0
 public ODataExpandMapping(string serviceName, ODataExpandMapping relative, bool isParent)
 {
     ServiceName = serviceName;
     if (isParent)
     {
         ParentService = relative;
     }
     else
     {
         ChildService = relative;
     }
 }
コード例 #4
0
        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;
            }
        }
コード例 #5
0
 public ODataExpandMapping(string serviceName, ODataExpandMapping parent, ODataExpandMapping child)
 {
     ServiceName   = serviceName;
     ParentService = parent;
     ChildService  = child;
 }