IProductionPlaceholderManagerDeleteSingleAsync Method

Relativity.Productions.API
Deletes a placeholder in the workspace

Namespace:  Relativity.Productions.Services
Assembly:  Relativity.Productions.Services.Interfaces (in Relativity.Productions.Services.Interfaces.dll) Version: 11.1.0.1 9c084404c128f715df772c7792aa49f21535523c
Syntax

Task DeleteSingleAsync(
	int workspaceArtifactID,
	int placeholderArtifactID
)

Parameters

workspaceArtifactID
Type: SystemInt32
Workspace artifact ID.
placeholderArtifactID
Type: SystemInt32
Production placeholder artifact ID.

Return Value

Type: Task
Examples

Delete Placeholder Example
using Relativity.Productions.Services;
using Relativity.Services.ServiceProxy;
using Relativity.Services.Exceptions;

public partial class Example
{
    public async Task DeletePlaceholder_Example()
    {
        int workspaceID   = 11111;            // ArtifactID of Workspace where Placeholder exists
        int placeholderID = 22222;            // ArtifactID of Placeholder to delete
        var userName      = "user@test.com";  // User's login
        var userPassword  = "abc123456!";     // User's password

        var relativityServicesUri = @"http://localhost/relativity.services";
        var relativityRestUri     = @"http://localhost/relativity.rest/api";

        var usernamePasswordCredentials = new UsernamePasswordCredentials(userName, userPassword);
        ServiceFactorySettings settings = new ServiceFactorySettings(new Uri(relativityServicesUri), new Uri(relativityRestUri), usernamePasswordCredentials);
        ServiceFactory serviceFactory   = new ServiceFactory(settings);

        using (IProductionPlaceholderManager productionPlaceholderManager = serviceFactory.CreateProxy<IProductionPlaceholderManager>())
        {
            try
            {
                await productionPlaceholderManager.DeleteSingleAsync(workspaceID, placeholderID);
                // Delete is successful if exception was not thrown
            }
            catch (ValidationException e)
            {
                // Log validation exception details
                Console.WriteLine("There were validation errors: {0}", e.Message);
            }
            catch (ServiceException es)
            {
                // Log service exception details
                Console.WriteLine("There were errors: {0}", es.Message);
            }
        }
    }
}
See Also

Reference