public getNavigationPathsResponse GetNavigationPaths([System.Xml.Serialization.XmlElementAttribute(Namespace = "urn:msdn-com:public-content-syndication")] getNavigationPathsRequest getNavigationPathsRequest) { object[] results = this.Invoke("GetNavigationPaths", new object[] { getNavigationPathsRequest }); return((getNavigationPathsResponse)(results[0])); }
/// <remarks/> public void GetNavigationPathsAsync(getNavigationPathsRequest getNavigationPathsRequest, object userState) { if ((this.GetNavigationPathsOperationCompleted == null)) { this.GetNavigationPathsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetNavigationPathsOperationCompleted); } this.InvokeAsync("GetNavigationPaths", new object[] { getNavigationPathsRequest }, this.GetNavigationPathsOperationCompleted, userState); }
// Returns the navigation node that corresponds to this content. If // we give it a navigation node already, it'll return that node, so // no harm done. public string GetNavigationNode() { // Load the contentItem. If we get a Toc entry, then we know it is // a navigation node rather than a content node. The reason is that // getNavigationPaths only returns the root node if the target node is // a navigation node already. We could check to see if we get one path // consisting of one node, but the user could give a target node that is // the same as the root node. Perf isn't an issue because this should // only be called once with the rootNode. this.Load(false); // Don't load images in case we are a content node. if (toc != null) { return(contentId); } navigationKey root = new navigationKey(); root.contentId = rootContentItem.contentId; root.locale = locale; root.version = rootContentItem.version; navigationKey target = new navigationKey(); // target.contentId = "AssetId:" + assetId; target.contentId = contentId; target.locale = locale; target.version = collection + "." + version; ContentService proxy = new ContentService(); getNavigationPathsRequest request = new getNavigationPathsRequest(); request.root = root; request.target = target; getNavigationPathsResponse response = proxy.GetNavigationPaths(request); // We need to deal with the case where the content appears in many // places in the TOC. For now, just use the first path. if (response.navigationPaths.Length == 0) { return(null); } // This is the last node in the first path. return(response.navigationPaths[0].navigationPathNodes[ response.navigationPaths[0].navigationPathNodes.Length - 1].navigationNodeKey.contentId); }
/// <remarks/> public void GetNavigationPathsAsync(getNavigationPathsRequest getNavigationPathsRequest) { this.GetNavigationPathsAsync(getNavigationPathsRequest, null); }
/// <remarks/> public System.IAsyncResult BeginGetNavigationPaths(getNavigationPathsRequest getNavigationPathsRequest, System.AsyncCallback callback, object asyncState) { return(this.BeginInvoke("GetNavigationPaths", new object[] { getNavigationPathsRequest }, callback, asyncState)); }
/// <remarks/> public void GetNavigationPathsAsync(getNavigationPathsRequest getNavigationPathsRequest, object userState) { if ((this.GetNavigationPathsOperationCompleted == null)) { this.GetNavigationPathsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetNavigationPathsOperationCompleted); } this.InvokeAsync("GetNavigationPaths", new object[] { getNavigationPathsRequest}, this.GetNavigationPathsOperationCompleted, userState); }
/// <remarks/> public System.IAsyncResult BeginGetNavigationPaths(getNavigationPathsRequest getNavigationPathsRequest, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetNavigationPaths", new object[] { getNavigationPathsRequest}, callback, asyncState); }