/// <summary> /// Demonstrate change set and batch get functionality. /// </summary> /// <param name="parentDefinition">The parent definition for which PSets will be created.</param> /// <returns>Does not return anything.</returns> private async Task RunBulkOperationsDemo(Definition parentDefinition) { // Asynchronous change set demo await this.RunAsyncChangeSetWorkflow(parentDefinition).ConfigureAwait(false); // Batch-get multiple libraries, definitions and PSets LibraryIdentity[] libs = new LibraryIdentity[] { new LibraryIdentity { LibraryId = parentDefinition.LibraryId, }, new LibraryIdentity { LibraryId = Guid.NewGuid().ToString(), // Inexistent, will not be found } }; DefinitionIdentity[] defs = new DefinitionIdentity[] { new DefinitionIdentity { LibraryId = parentDefinition.LibraryId, DefinitionId = parentDefinition.Id, }, new DefinitionIdentity { LibraryId = parentDefinition.LibraryId, DefinitionId = Guid.NewGuid().ToString(), // Inexistent, will not be found }, }; PSetIdentity[] psets = new PSetIdentity[ChangeSetPSetCount]; for (int psetIdx = 0; psetIdx < ChangeSetPSetCount; ++psetIdx) { psets[psetIdx] = new PSetIdentity { LibraryId = parentDefinition.LibraryId, DefinitionId = parentDefinition.Id, // FRN links may not contain special characters. See: https://drive.google.com/file/d/1gR1PEhrR58WGlrZt8PPWqTPbjvbEwXVK/view Link = string.Format(ChangeSetLinkPattern, psetIdx), }; } await this.BatchGet(libs, defs, psets).ConfigureAwait(false); }
/// <summary> /// Demonstrate change set and batch get functionality. /// </summary> /// <param name="parentDefinition">The parent definition for which PSets will be created.</param> /// <returns>Does not return anything.</returns> private async Task RunBulkOperationsDemo(Definition parentDefinition) { // Asynchronous change set demo await this.RunAsyncChangeSetWorkflow(parentDefinition).ConfigureAwait(false); // Batch-get multiple libraries, definitions and PSets LibraryIdentity[] libs = new LibraryIdentity[] { new LibraryIdentity { LibraryId = parentDefinition.LibraryId, }, new LibraryIdentity { LibraryId = Guid.NewGuid().ToString(), // Inexistent, will not be found } }; DefinitionIdentity[] defs = new DefinitionIdentity[] { new DefinitionIdentity { LibraryId = parentDefinition.LibraryId, DefinitionId = parentDefinition.Id, }, new DefinitionIdentity { LibraryId = parentDefinition.LibraryId, DefinitionId = Guid.NewGuid().ToString(), // Inexistent, will not be found }, }; PSetIdentity[] psets = new PSetIdentity[ChangeSetPSetCount]; for (int psetIdx = 0; psetIdx < ChangeSetPSetCount; ++psetIdx) { psets[psetIdx] = new PSetIdentity { LibraryId = parentDefinition.LibraryId, DefinitionId = parentDefinition.Id, Link = string.Format(ChangeSetLinkPattern, psetIdx), }; } await this.BatchGet(libs, defs, psets).ConfigureAwait(false); }