-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
142 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
Samples/DotNetClientConsole/SampleCollection/Sample24_DeleteSource.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// <copyright file="Sample24_DeleteSource.cs" company="Relativity ODA LLC"> | ||
// © Relativity All Rights Reserved. | ||
// </copyright> | ||
|
||
namespace Relativity.Import.Samples.DotNetClient.SampleCollection; | ||
|
||
using System.Text; | ||
using Relativity.Import.Samples.DotNetClient.Helpers; | ||
|
||
/// <summary> | ||
/// Class containing examples of using import service SDK. | ||
/// </summary> | ||
public partial class ImportServiceSample | ||
{ | ||
/// <summary> | ||
/// Example of deleting a folder associated with a specific workspace, job, and source in Relativity. | ||
/// </summary> | ||
/// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns> | ||
public async Task Sample24_DeleteSource() | ||
{ | ||
// Targetted workspace ID | ||
int workspaceId = 1036722; | ||
|
||
// Targetted job GUID | ||
Guid jobID = Guid.Parse("c107191e-242f-450d-bddd-b1e6d4d58e96"); | ||
|
||
// Targetted job source GUID | ||
Guid sourceID = Guid.Parse("644eca0b-33fa-40dc-ab6f-116b6f55b421"); | ||
|
||
using HttpClient client = HttpClientHelper.CreateHttpClient(); | ||
var content = new StringContent(string.Empty, Encoding.UTF8, "application/json"); | ||
|
||
var requestUri = RelativityImportEndpoints.GetImportSourceDeleteUri(workspaceId, jobID, sourceID); | ||
var response = await client.PostAsync(requestUri, content); | ||
await ImportJobSampleHelper.EnsureSuccessResponse(response); | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
Samples/DotNetClientConsole/SampleCollection/Sample25_GetLocation_Job.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// <copyright file="Sample25_GetLocation_Job.cs" company="Relativity ODA LLC"> | ||
// © Relativity All Rights Reserved. | ||
// </copyright> | ||
|
||
namespace Relativity.Import.Samples.DotNetClient.SampleCollection; | ||
|
||
using System.Text; | ||
using Relativity.Import.Samples.DotNetClient.Helpers; | ||
|
||
/// <summary> | ||
/// Class containing examples of using import service SDK. | ||
/// </summary> | ||
public partial class ImportServiceSample | ||
{ | ||
/// <summary> | ||
/// Example of getting default location for import job. | ||
/// </summary> | ||
/// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns> | ||
public async Task Sample25_GetLocation_Job() | ||
{ | ||
// Targetted workspace ID | ||
int workspaceId = 1036722; | ||
|
||
// Targetted job GUID | ||
Guid jobID = Guid.Parse("c107191e-242f-450d-bddd-b1e6d4d58e96"); | ||
|
||
using HttpClient client = HttpClientHelper.CreateHttpClient(); | ||
var content = new StringContent(string.Empty, Encoding.UTF8, "application/json"); | ||
|
||
var requestUri = RelativityImportEndpoints.GetImportSourceDefaultLocationUri(workspaceId, jobID); | ||
var response = await client.GetAsync(requestUri); | ||
var result = await ImportJobSampleHelper.EnsureSuccessValueResponse<string>(response); | ||
|
||
Console.WriteLine("Default location for job with ID {0} is: {1}", jobID, result.Value); | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
Samples/DotNetClientConsole/SampleCollection/Sample26_GetLocation_Workspace.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// <copyright file="Sample26_GetLocation_Workspace.cs" company="Relativity ODA LLC"> | ||
// © Relativity All Rights Reserved. | ||
// </copyright> | ||
|
||
namespace Relativity.Import.Samples.DotNetClient.SampleCollection; | ||
|
||
using System.Text; | ||
using Relativity.Import.Samples.DotNetClient.Helpers; | ||
|
||
/// <summary> | ||
/// Class containing examples of using import service SDK. | ||
/// </summary> | ||
public partial class ImportServiceSample | ||
{ | ||
/// <summary> | ||
/// Example of getting default import location for workspace. | ||
/// </summary> | ||
/// <returns>A <see cref="Task"/> representing the result of the asynchronous operation.</returns> | ||
public async Task Sample26_GetLocation_Workspace() | ||
{ | ||
// Targetted workspace ID | ||
int workspaceId = 1036722; | ||
|
||
using HttpClient client = HttpClientHelper.CreateHttpClient(); | ||
var content = new StringContent(string.Empty, Encoding.UTF8, "application/json"); | ||
|
||
var requestUri = RelativityImportEndpoints.GetImportJobDefaultLocationUri(workspaceId); | ||
var response = await client.GetAsync(requestUri); | ||
var result = await ImportJobSampleHelper.EnsureSuccessValueResponse<string>(response); | ||
|
||
Console.WriteLine("Default import location for workspace with ID {0} is: {1}", workspaceId, result.Value); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters