Obtain() static private method

static private Obtain ( Uri baseUri, List resourceIds, object>.Dictionary args = null, string username = "", string password = "" ) : ObtainResult
baseUri System.Uri
resourceIds List
args object>.Dictionary
username string
password string
return ObtainResult
コード例 #1
0
        public ObtainResult ObtainDocsByResourceLocator(string locator, bool ids_only = false)
        {
            Dictionary <string, object> args = new Dictionary <string, object>();

            if (ids_only)
            {
                args["ids_only"]  = "true";
                args["by_doc_ID"] = "true";                 //we only want doc ids
            }

            return(LRUtils.Obtain(_baseUri, locator, args));
        }
コード例 #2
0
        public lr_document ObtainDocByID(string docId)
        {
            Dictionary <string, object> args = new Dictionary <string, object>();

            args["by_doc_ID"] = true;

            var result = LRUtils.Obtain(_baseUri, docId, args, this.Username, this.Password);

            if (result.documents.Count < 1)
            {
                throw new Exception("Document with id " + docId + " does not exist.");
            }

            return(result.documents[0].document[0]);
        }
コード例 #3
0
ファイル: ObtainResult.cs プロジェクト: grrizzly/LR.Net
 protected override ResumableResult getPage()
 {
     return(LRUtils.Obtain(BaseUri, new List <string>(), _Args, HttpUsername, HttpPassword));
 }