예제 #1
0
        public string ImportPartials(string projectId, string token, bool overwriteNewer = true,
                                     bool updateLdmObjects = false)
        {
            CheckAuthentication();
            var url = Url.Combine(Config.Url, Constants.MD_URI, projectId, Constants.PROJECT_PARTIAL_IMPORT_URI);

            var payload = new PartialImportRequest
            {
                PartialMDImport = new PartialMDImport
                {
                    Token            = token,
                    OverwriteNewer   = (overwriteNewer) ? 1 : 0,
                    UpdateLDMObjects = (updateLdmObjects)? 1 : 0
                }
            };
            var response       = PostRequest(url, payload);
            var importResponse = JsonConvert.DeserializeObject(response, typeof(UriResponse)) as UriResponse;

            return(importResponse.Uri);
        }
예제 #2
0
        public string ImportPartials(string projectId, string token, bool overwriteNewer = true,
											  bool updateLdmObjects = false)
        {
            CheckAuthentication();
            var url = Url.Combine(Config.ServiceUrl, Constants.MD_URI, projectId, Constants.PROJECT_PARTIAL_IMPORT_URI);

            var payload = new PartialImportRequest {
                PartialMDImport = new PartialMDImport {
                    Token = token,
                    OverwriteNewer = (overwriteNewer) ? 1 : 0,
                    UpdateLDMObjects = (updateLdmObjects) ? 1 : 0
                }
            };
            var response = JsonPostRequest(url, payload);
            var importResponse = JsonConvert.DeserializeObject(response, typeof(UriResponse)) as UriResponse;
            return importResponse.Uri;
        }