コード例 #1
0
        /// <summary>
        /// Processes the message received from Transport as part of a project delivery.
        /// </summary>
        /// <param name="client"><see cref="InspireClient"/> used to communication with the API endpoint.</param>
        /// <param name="transportProjectId">The Transport Project Id.</param>
        /// <returns>Returns success or failure of the operation.</returns>
        public static bool ProcessTransportResponse(this InspireClient client, string transportProjectId)
        {
            if (string.IsNullOrEmpty(transportProjectId))
            {
                throw new ArgumentNullException(nameof(transportProjectId));
            }

            var request = client.CreateRequest($"/Translations/ProcessTransportResponse/{transportProjectId}", HttpMethod.Post);

            return(client.RequestContent <bool>(request));
        }
コード例 #2
0
        /// <summary>
        /// This method is used to update an existing role.
        /// </summary>
        /// <param name="client">Contains the <see cref="InspireClient"/> that is used for communication.</param>
        /// <param name="roleId">Contains the role identity.</param>
        /// <param name="inputModel">Contains the <see cref="RoleModel"/> input.</param>
        /// <returns>Returns the updated <see cref="RoleModel"/> object.</returns>
        public static RoleModel UpdateRole(this InspireClient client, long roleId, RoleModel inputModel)
        {
            if (inputModel == null)
            {
                throw new ArgumentNullException(nameof(inputModel));
            }

            var request = client.CreateRequest($"/Roles/{roleId}", HttpMethod.Put);

            return(client.RequestContent <RoleModel, RoleModel>(request, inputModel));
        }
コード例 #3
0
        /// <summary>
        /// This method is used to update existing folder permissions.
        /// </summary>
        /// <param name="client">Contains the <see cref="InspireClient"/> that is used for communication.</param>
        /// <param name="folderId">Contains the folder identity.</param>
        /// <param name="inputModel">Contains the <see cref="PermissionUpdateModel"/> input.</param>
        /// <returns>Returns the updated <see cref="PermissionUpdateModel"/> object.</returns>
        public static PermissionUpdateModel UpdateFolderPermissions(this InspireClient client, long folderId, PermissionUpdateModel inputModel)
        {
            if (inputModel == null)
            {
                throw new ArgumentNullException(nameof(inputModel));
            }

            var request = client.CreateRequest($"/Folders/{folderId}/Permissions", HttpMethod.Put);

            return(client.RequestContent <PermissionUpdateModel, PermissionUpdateModel>(request, inputModel));
        }
コード例 #4
0
        /// <summary>
        /// This method is used to initiate an export request and return details about the successfully submitted export request.
        /// </summary>
        /// <param name="client">Contains the <see cref="InspireClient"/> that is used for communication.</param>
        /// <param name="targetFolderId">Contains the folder identity.</param>
        /// <param name="exportId">Contains the export identity value.</param>
        /// <param name="includeSubFolders">Contains a flag indicating whether to include subfolders or not.</param>
        /// <returns>Returns a <see cref="ExportRequestModel"/> object if found.</returns>
        public static ExportRequestModel ExportFolder(this InspireClient client, long targetFolderId, long exportId = 0, bool includeSubFolders = false)
        {
            if (targetFolderId <= 0)
            {
                throw new ArgumentNullException(nameof(targetFolderId));
            }

            var request = client.CreateRequest($"/Folders/{targetFolderId}/Export/{exportId}/?includeSubFolders={includeSubFolders}", HttpMethod.Post);

            return(client.RequestContent <ExportRequestModel, ExportRequestModel>(request, new ExportRequestModel()));
        }
コード例 #5
0
        /// <summary>
        /// Cancels a Translation Job.
        /// </summary>
        /// <param name="client"><see cref="InspireClient"/> used to communication with the API endpoint.</param>
        /// <param name="model">The <see cref="TranslationJobModel"/> used to Cancel the Translation Job.</param>
        /// <returns>Returns the <see cref="TranslationJobModel" /> object that was canceled.</returns>
        public static TranslationJobModel PutTranslationCancel(this InspireClient client, TranslationJobModel model)
        {
            if (model == null)
            {
                throw new ArgumentNullException(nameof(model));
            }

            var request = client.CreateRequest($"/Translations/{model.TranslationJobId}/Cancel", HttpMethod.Put);

            return(client.RequestContent <TranslationJobModel, TranslationJobModel>(request, model));
        }
コード例 #6
0
        /// <summary>
        /// Creates the translation integration.
        /// </summary>
        /// <param name="client">The client.</param>
        /// <param name="inputModel">The input model.</param>
        /// <returns>Returns the new <see cref="TranslationIntegrationModel"/> object.</returns>
        /// <exception cref="ArgumentNullException">InputModel cannot be null.</exception>
        public static TranslationIntegrationModel CreateTranslationIntegration(this InspireClient client, TranslationIntegrationModel inputModel)
        {
            if (inputModel == null)
            {
                throw new ArgumentNullException(nameof(inputModel));
            }

            var request = client.CreateRequest($"/TranslationIntegrations", HttpMethod.Post);

            return(client.RequestContent <TranslationIntegrationModel, TranslationIntegrationModel>(request, inputModel));
        }
コード例 #7
0
        /// <summary>
        /// This method is used to return folder permission details.
        /// </summary>
        /// <param name="client">Contains the <see cref="InspireClient"/> that is used for communication.</param>
        /// <param name="folderId">Contains the folder identity.</param>
        /// <returns>Returns a <see cref="PermissionUpdateModel"/> object if found.</returns>
        public static PermissionUpdateModel FindFolderPermissions(this InspireClient client, long folderId)
        {
            if (folderId <= 0)
            {
                throw new ArgumentNullException(nameof(folderId));
            }

            var request = client.CreateRequest($"/Folders/{folderId}/Permissions");

            return(client.RequestContent <PermissionUpdateModel>(request));
        }
コード例 #8
0
        /// <summary>
        /// This method is used to move a source folder to a target folder.
        /// </summary>
        /// <param name="client">Contains the <see cref="InspireClient"/> that is used for communication.</param>
        /// <param name="sourceFolderId">Contains the source folder identity.</param>
        /// <param name="targetFolderId">Contains the target folder identity to which to move this folder to.</param>
        /// <returns>Returns a <see cref="FolderBrowseModel"/> object if found.</returns>
        public static FolderBrowseModel MoveFolder(this InspireClient client, long sourceFolderId, long targetFolderId)
        {
            if (sourceFolderId <= 0 && targetFolderId <= 0)
            {
                throw new ArgumentNullException(nameof(sourceFolderId));
            }

            var request = client.CreateRequest($"/Folders/{sourceFolderId}/Move/{targetFolderId}");

            return(client.RequestContent <FolderBrowseModel>(request));
        }
コード例 #9
0
        /// <summary>
        /// Finds the translation jobs for the requested translation job Ids.
        /// </summary>
        /// <param name="client"><see cref="InspireClient"/> used to communication with the API endpoint.</param>
        /// <param name="translationJobIds">The translation job ids.</param>
        /// <returns>Returns a List of the requested <see cref="MinimalTranslationJobModel" /> objects.</returns>
        public static List <MinimalTranslationJobModel> FindTranslationJobs(this InspireClient client, List <long> translationJobIds)
        {
            if (translationJobIds == null)
            {
                throw new ArgumentNullException(nameof(translationJobIds));
            }

            var request = client.CreateRequest($"/Translations/RetrieveTranslationJobs", HttpMethod.Post);

            return(client.RequestContent <List <long>, List <MinimalTranslationJobModel> >(request, translationJobIds));
        }
コード例 #10
0
        /// <summary>
        /// This method is used to return a list of folders including the specified folder,
        /// its ancestor folders, and corresponding sibling folders.
        /// </summary>
        /// <param name="client">Contains the <see cref="InspireClient"/> that is used for communication.</param>
        /// <param name="folderId">Contains the folder identity.</param>
        /// <returns>Returns a list of <see cref="FolderBrowseModel"/> objects if found.</returns>
        public static List <FolderBrowseModel> FindAncestorSiblingFoldersByFolderId(this InspireClient client, long folderId)
        {
            if (folderId <= 0)
            {
                throw new ArgumentNullException(nameof(folderId));
            }

            var request = client.CreateRequest($"/Folders/{folderId}/AncestorsSiblings");

            return(client.RequestContent <List <FolderBrowseModel> >(request));
        }
コード例 #11
0
        /// <summary>
        /// This method is used to return components that are stored within a specific folder matching a specific search criteria.
        /// </summary>
        /// <param name="client">Contains the <see cref="InspireClient"/> that is used for communication.</param>
        /// <param name="folderId">Contains the folder identity to retrieve components from, pass a value of zero to retrieve all components.</param>
        /// <param name="inputModel">Contains the <see cref="FolderComponentsQueryModel"/> input.</param>
        /// <returns>Returns a <see cref="FolderComponentsResultModel"/> object if found.</returns>
        public static FolderComponentsResultModel FindComponentsByFolderId(this InspireClient client, long folderId, FolderComponentsQueryModel inputModel)
        {
            if (folderId < 0)
            {
                throw new ArgumentNullException(nameof(folderId));
            }

            var request = client.CreateRequest($"/Folders/{folderId}/Components", HttpMethod.Post);

            return(client.RequestContent <FolderComponentsQueryModel, FolderComponentsResultModel>(request, inputModel));
        }
コード例 #12
0
        /// <summary>
        /// This method is used to create a new project.
        /// </summary>
        /// <param name="client">Contains the <see cref="InspireClient"/> that is used for communication.</param>
        /// <param name="inputModel">Contains the <see cref="ProjectModel"/> input.</param>
        /// <returns>Returns the <see cref="ProjectModel"/> object if found.</returns>
        public static ProjectModel CreateProject(this InspireClient client, ProjectModel inputModel)
        {
            if (inputModel == null)
            {
                throw new ArgumentNullException(nameof(inputModel));
            }

            var request = client.CreateRequest($"/Projects", HttpMethod.Post);

            return(client.RequestContent <ProjectModel, ProjectModel>(request, inputModel));
        }
コード例 #13
0
        /// <summary>
        /// Sets the translation job statuses for each requested <see cref="TranslationExportJobModel"/>.
        /// </summary>
        /// <param name="client"><see cref="InspireClient"/> used to communication with the API endpoint.</param>
        /// <param name="models">The List of <see cref="TranslationExportJobModel"/> objects used to set translation job statuses.</param>
        /// <returns>Returns a List of <see cref="TranslationExportJobModel" /> objects.</returns>
        public static List <TranslationExportJobModel> SetTranslationJobStatus(this InspireClient client, List <TranslationExportJobModel> models)
        {
            if (models == null)
            {
                throw new ArgumentNullException(nameof(models));
            }

            var request = client.CreateRequest($"/Translations/Jobs/SetStatus", HttpMethod.Post);

            return(client.RequestContent <List <TranslationExportJobModel>, List <TranslationExportJobModel> >(request, models));
        }
コード例 #14
0
        /// <summary>
        /// This method is used to update an existing user.
        /// </summary>
        /// <param name="client">Contains the <see cref="InspireClient"/> that is used for communication.</param>
        /// <param name="userId">Contains the user identity.</param>
        /// <param name="inputModel">Contains the <see cref="UserModel"/> input.</param>
        /// <returns>Returns the updated <see cref="UserModel"/> object.</returns>
        public static UserModel UpdateUser(this InspireClient client, long userId, UserModel inputModel)
        {
            if (inputModel == null)
            {
                throw new ArgumentNullException(nameof(inputModel));
            }

            var request = client.CreateRequest($"/Users/{userId}", HttpMethod.Put);

            return(client.RequestContent <UserModel, UserModel>(request, inputModel));
        }
コード例 #15
0
        /// <summary>
        /// This method is used to rename an existing folder.
        /// </summary>
        /// <param name="client">Contains the <see cref="InspireClient"/> that is used for communication.</param>
        /// <param name="folderId">Contains the folder identity.</param>
        /// <param name="inputModel">Contains the <see cref="FolderBrowseModel"/> input.</param>
        /// <returns>Returns the renamed <see cref="FolderBrowseModel"/> object.</returns>
        public static FolderBrowseModel RenameFolder(this InspireClient client, long folderId, FolderBrowseModel inputModel)
        {
            if (inputModel == null)
            {
                throw new ArgumentNullException(nameof(inputModel));
            }

            var request = client.CreateRequest($"/Folders/{folderId}/Rename", HttpMethod.Put);

            return(client.RequestContent <FolderBrowseModel, FolderBrowseModel>(request, inputModel));
        }
コード例 #16
0
        /// <summary>
        /// This method is used to return a list of folders that are children of the specified parent folder.
        /// If parent folder is not specified, a list of root folders will be returned.
        /// </summary>
        /// <param name="client">Contains the <see cref="InspireClient"/> that is used for communication.</param>
        /// <param name="folderId">Contains the folder identity to retrieve child folders from, pass a value of zero to retrieve all folders.</param>
        /// <param name="includeAllDescendantFolders">Contains a value to indicate whether or not to include all descendant folders.</param>
        /// <param name="permissionFlag">Contains an optional <see cref="PermissionFlags"/> that will be used to filter the results of the query.</param>
        /// <returns>Returns a list of <see cref="FolderBrowseModel"/> objects if found.</returns>
        public static List <FolderBrowseModel> FindFoldersByFolderId(this InspireClient client, long folderId, bool includeAllDescendantFolders, PermissionFlags permissionFlag)
        {
            if (folderId < 0)
            {
                throw new ArgumentNullException(nameof(folderId));
            }

            var request = client.CreateRequest($"/Folders/{folderId}?allDescendants={includeAllDescendantFolders}&permissionFlag={permissionFlag}");

            return(client.RequestContent <List <FolderBrowseModel> >(request));
        }
コード例 #17
0
        /// <summary>
        /// This method is used to delete an existing folder.
        /// </summary>
        /// <param name="client">Contains the <see cref="InspireClient"/> that is used for communication.</param>
        /// <param name="folderId">Contains the folder identity.</param>
        /// <returns>Returns a boolean value indicating whether the action succeeded or not.</returns>
        public static bool DeleteFolder(this InspireClient client, long folderId)
        {
            if (folderId <= 0)
            {
                throw new ArgumentNullException(nameof(folderId));
            }

            var request = client.CreateRequest($"/Folders/{folderId}", HttpMethod.Delete);

            client.RequestContent(request);
            return(client.HasError);
        }
コード例 #18
0
        /// <summary>
        /// This method is used to create a project folder item model.
        /// </summary>
        /// <param name="client">Contains the <see cref="InspireClient"/> that is used for communication.</param>
        /// <param name="projectId">Contains the identity of the parent project.</param>
        /// <param name="model">Contains a <see cref="ProjectFolderItemModel"/> to create.</param>
        /// <returns>Returns the newly created <see cref="ProjectFolderItemModel"/> object.</returns>
        public static ProjectFolderItemModel CreateProjectFolder(this InspireClient client, long projectId, ProjectFolderItemModel model)
        {
            if (projectId <= 0)
            {
                throw new ArgumentNullException(nameof(projectId));
            }

            if (model == null)
            {
                throw new ArgumentNullException(nameof(model));
            }

            var request = client.CreateRequest($"/Projects/{projectId}/FolderItems", HttpMethod.Post);

            return(client.RequestContent <ProjectFolderItemModel, ProjectFolderItemModel>(request, model));
        }
コード例 #19
0
        /// <summary>
        /// This method is used to update project participants.
        /// </summary>
        /// <param name="client">Contains the <see cref="InspireClient"/> that is used for communication.</param>
        /// <param name="projectId">Contains the identity of the project that will have its participants updated.</param>
        /// <param name="models">Contains a list of <see cref="ProjectParticipantModel"/> related to the project.</param>
        /// <returns>Returns a list of <see cref="ProjectParticipantModel"/> objects.</returns>
        public static List <ProjectParticipantModel> UpdateProjectParticipants(this InspireClient client, long projectId, List <ProjectParticipantModel> models)
        {
            if (projectId <= 0)
            {
                throw new ArgumentNullException(nameof(projectId));
            }

            if (models == null)
            {
                throw new ArgumentNullException(nameof(models));
            }

            var request = client.CreateRequest($"/Projects/{projectId}/Participants", HttpMethod.Put);

            return(client.RequestContent <List <ProjectParticipantModel>, List <ProjectParticipantModel> >(request, models));
        }
コード例 #20
0
        /// <summary>
        /// This method is used to update an existing project.
        /// </summary>
        /// <param name="client">Contains the <see cref="InspireClient"/> that is used for communication.</param>
        /// <param name="projectId">Contains the identity of the project to update.</param>
        /// <param name="inputModel">Contains the <see cref="ProjectModel"/> input.</param>
        /// <returns>Returns the updated <see cref="ProjectModel"/> object.</returns>
        public static ProjectModel UpdateProject(this InspireClient client, long projectId, ProjectModel inputModel)
        {
            if (projectId <= 0)
            {
                throw new ArgumentNullException(nameof(projectId));
            }

            if (inputModel == null)
            {
                throw new ArgumentNullException(nameof(inputModel));
            }

            var request = client.CreateRequest($"/Projects/{projectId}", HttpMethod.Put);

            return(client.RequestContent <ProjectModel, ProjectModel>(request, inputModel));
        }
コード例 #21
0
        /// <summary>
        /// This method is used to request an export process for one or more components.
        /// </summary>
        /// <param name="client">Contains the <see cref="InspireClient"/> that is used for communication.</param>
        /// <param name="projectId">Contains the identity of the project.</param>
        /// <param name="folderId">Contains the identity of the project folder.</param>
        /// <param name="includeSubFolders">Contains a value indicating whether components in descendant sub-folders should be exported.</param>
        /// <param name="exportId">Contains the export identity.</param>
        /// <returns>The <see cref="ExportRequestModel"/> object with information about the export process.</returns>
        public static ExportRequestModel ExportComponents(this InspireClient client, long projectId, long folderId, bool includeSubFolders, long exportId = 0)
        {
            if (projectId <= 0)
            {
                throw new ArgumentNullException(nameof(projectId));
            }

            if (folderId <= 0)
            {
                throw new ArgumentNullException(nameof(folderId));
            }

            var request = client.CreateRequest($"/Projects/{projectId}/FolderItems/{folderId}/Export/{exportId}/?includeSubFolders={includeSubFolders}", HttpMethod.Post);

            return(client.RequestContent <ExportRequestModel>(request));
        }
コード例 #22
0
        /// <summary>
        /// This method is used to delete a project assignment.
        /// </summary>
        /// <param name="client">Contains the <see cref="InspireClient"/> that is used for communication.</param>
        /// <param name="projectId">Contains the identity of the project in which the assignment will be deleted.</param>
        /// <param name="projectAssignmentId">Contains the project assignment identity to delete.</param>
        /// <returns>Returns a boolean value indicating whether the action succeeded or not.</returns>
        public static bool DeleteProjectAssignment(this InspireClient client, long projectId, long projectAssignmentId)
        {
            if (projectId <= 0)
            {
                throw new ArgumentNullException(nameof(projectId));
            }

            if (projectAssignmentId <= 0)
            {
                throw new ArgumentNullException(nameof(projectAssignmentId));
            }

            var request = client.CreateRequest($"/Projects/{projectId}/Assignments/{projectAssignmentId}", HttpMethod.Delete);

            client.RequestContent(request);
            return(client.HasError);
        }
コード例 #23
0
        /// <summary>
        /// This method is used to delete a project folder item model.
        /// </summary>
        /// <param name="client">Contains the <see cref="InspireClient"/> that is used for communication.</param>
        /// <param name="projectId">Contains the identity of the parent project.</param>
        /// <param name="model">Contains the existing <see cref="ProjectFolderItemModel"/> to delete.</param>
        /// <returns>Returns a boolean value indicating whether the action succeeded or not.</returns>
        public static bool DeleteProjectFolder(this InspireClient client, long projectId, ProjectFolderItemModel model)
        {
            if (projectId <= 0)
            {
                throw new ArgumentNullException(nameof(projectId));
            }

            if (model == null)
            {
                throw new ArgumentNullException(nameof(model));
            }

            var request = client.CreateRequest($"/Projects/{projectId}/FolderItems/0", HttpMethod.Delete);

            client.RequestContent(request, model);
            return(client.HasError);
        }
コード例 #24
0
        /// <summary>
        /// This method is used to add components to an existing folder.
        /// </summary>
        /// <param name="client">Contains the <see cref="InspireClient"/> that is used for communication.</param>
        /// <param name="projectId">Contains the identity of the parent project.</param>
        /// <param name="folderId">Contains the identity of the project folder.</param>
        /// <param name="models">A list of <see cref="MinimalComponentModel"/> objects.</param>
        /// <returns>Returns a list of <see cref="MinimalComponentModel"/> objects.</returns>
        public static List <MinimalComponentModel> AddComponentsToFolder(this InspireClient client, long projectId, long folderId, List <MinimalComponentModel> models)
        {
            if (projectId <= 0)
            {
                throw new ArgumentNullException(nameof(projectId));
            }

            if (folderId <= 0)
            {
                throw new ArgumentNullException(nameof(folderId));
            }

            if (models == null)
            {
                throw new ArgumentNullException(nameof(models));
            }

            var request = client.CreateRequest($"/Projects/{projectId}/Folders/{folderId}", HttpMethod.Post);

            return(client.RequestContent <List <MinimalComponentModel>, List <MinimalComponentModel> >(request, models));
        }
コード例 #25
0
        /// <summary>
        /// This method is used to update a project assignment completion status.
        /// </summary>
        /// <param name="client">Contains the <see cref="InspireClient"/> that is used for communication.</param>
        /// <param name="projectId">Contains the identity of the project.</param>
        /// <param name="projectAssignmentId">Contains the identity of the project assignment to update.</param>
        /// <param name="model">Contains the <see cref="ProjectAssignmentModel"/> object.</param>
        /// <returns>Returns the <see cref="ProjectAssignmentModel"/> object.</returns>
        public static ProjectAssignmentModel UpdateProjectAssignmentCompletionStatus(this InspireClient client, long projectId, long projectAssignmentId, ProjectAssignmentModel model)
        {
            if (projectId <= 0)
            {
                throw new ArgumentNullException(nameof(projectId));
            }

            if (projectAssignmentId <= 0)
            {
                throw new ArgumentNullException(nameof(projectAssignmentId));
            }

            if (model == null)
            {
                throw new ArgumentNullException(nameof(model));
            }

            var request = client.CreateRequest($"/Projects/{projectId}/Assignments/{projectAssignmentId}/State/Complete", HttpMethod.Put);

            return(client.RequestContent <ProjectAssignmentModel, ProjectAssignmentModel>(request, model));
        }
コード例 #26
0
        /// <summary>
        /// This method is used to move a project folder to another target folder.
        /// </summary>
        /// <param name="client">Contains the <see cref="InspireClient"/> that is used for communication.</param>
        /// <param name="model">Contains the existing project folder item model to move.</param>
        /// <param name="projectId">Contains the identity of the parent project.</param>
        /// <param name="itemId">Contains the identity of the folder item object.</param>
        /// <param name="targetFolderId">Contains the new target folder of the folder item.</param>
        /// <returns>Returns the <see cref="ProjectFolderItemModel"/> object.</returns>
        public static ProjectFolderItemModel MoveProjectFolder(this InspireClient client, ProjectFolderItemModel model, long projectId, string itemId, string targetFolderId = "")
        {
            if (projectId <= 0)
            {
                throw new ArgumentNullException(nameof(projectId));
            }

            if (string.IsNullOrEmpty(itemId))
            {
                throw new ArgumentNullException(nameof(itemId));
            }

            if (model == null)
            {
                throw new ArgumentNullException(nameof(model));
            }

            var request = client.CreateRequest($"/Projects/{projectId}/FolderItems/{itemId}/Move/{targetFolderId}", HttpMethod.Put);

            return(client.RequestContent <ProjectFolderItemModel, ProjectFolderItemModel>(request, model));
        }
コード例 #27
0
        /// <summary>
        /// This method is used to retrieve the specified Editor Xml Model.
        /// </summary>
        /// <param name="client"><see cref="InspireClient"/> used to communication with the API endpoint.</param>
        /// <param name="model">Contains the component load editor model.</param>
        /// <returns>Returns the <see cref="MinimalEditorXmlModel"/> object that represents the editor record created.</returns>
        public static MinimalEditorXmlModel FindEditorComponent(this InspireClient client, EditorLoadModel model)
        {
            if (model == null)
            {
                throw new ArgumentNullException(nameof(model));
            }

            if (model.ComponentId == 0 && string.IsNullOrWhiteSpace(model.Href))
            {
                throw new ArgumentException(Resources.InvalidEditorRequestMissingComponentErrorText, nameof(model));
            }

            string queryTemplate = "&editorMode={0}&editorType={1}&schema={2}&version={3}&mapReferenceId={4}";
            string query         = string.Format(queryTemplate,
                                                 model.EditorMode,
                                                 model.EditorType,
                                                 WebUtility.UrlEncode(model.SchemaType),
                                                 WebUtility.UrlEncode(model.Version),
                                                 model.MapReferenceId);

            if (model.ResolveReferences)
            {
                query += "&resolveReferences=true";
            }

            if (model.ChangesetId != Guid.Empty)
            {
                query += "&changesetId=" + model.ChangesetId.ToString();
            }

            if (model.EditorMode == EditorMode.Review)
            {
                query += "&reviewMode=" + model.ReviewMode.ToString();
            }

            query = (model.ComponentId > 0 ? "componentId=" + model.ComponentId.ToString() : "href=" + model.Href) + query;
            var request = client.CreateRequest($"/Editor?{query}");

            return(client.RequestContent <MinimalEditorXmlModel>(request));
        }
コード例 #28
0
 public static List <FolderBrowseModel> GetAncestorSiblingFoldersByFolderId(this InspireClient client, long folderId)
 {
     return(FindAncestorSiblingFoldersByFolderId(client, folderId));
 }
コード例 #29
0
 public static FolderComponentsResultModel GetComponentsByFolderId(this InspireClient client, long folderId, FolderComponentsQueryModel inputModel)
 {
     return(FindComponentsByFolderId(client, folderId, inputModel));
 }
コード例 #30
0
 public static List <FolderBrowseModel> GetFoldersByFolderId(this InspireClient client, long folderId, bool includeAllDescendantFolders, PermissionFlags permissionFlag)
 {
     return(FindFoldersByFolderId(client, folderId, includeAllDescendantFolders, permissionFlag));
 }