Table of Contents

New In Version 6

For version 6.0, the client API has changed to add support for new product features. Some other changes have been made to improve usability and consistency of the API.

Platform Changes

The .NET target has been updated from net6.0-windows to net10.0-windows

Breaking Changes

Some API changes will require minor code changes in code using the API, but most of these changes are in parts of the API that customer applications are unlikely to be using. The following sections describe those changes.

Client Assembly

ApplicationIntegration

The static ApplicationIntegration.Connect now returns an IApplicationIntegration interface rather than an instance of the class. This was done to unify the integration surface used by user scripts, PowerShell scripts, and applications being run by adTempus. Unless you are using ApplicationIntegration.Connect these changes don't affect you.

The IApplicationIntegration interface and the ApplicationIntegration class were inconsistent in a few places; in these cases IApplicationIntegration compatiblity was preserved at the expense of ApplicationIntegration (class) compatibility because the interface is what all user scripts are expecting, whereas there are fewer consumers of the ApplicationIntegration class.

Version 5 Member Version 6 Replacement Notes
static Client.ApplicationIntegration Connect() static AppIntegration.IApplicationIntegration Connect() The return type is now the IApplicationIntegration interface.
int? JobInstanceID { get; } int? JobInstanceNumber { get; } The JobInstanceID now returns the unique ID (GUID string) of the job instance. To get the instance number, use JobInstanceNumber.
int? StepNumber { get; } int StepNumber { get; } No longer nullable. Returns 0 when the code is not running within a step.
Shared.IReadOnlyDictionary<string, string> JobVariables { get; } Shared.IJobVariableDictionary JobVariables { get; } Reading a value with the string indexer (JobVariables["name"]) still works. Code that declares the property type or uses dictionary members (Keys, Values, TryGetValue, enumeration as KeyValuePair) must be updated. Enumeration now yields IJobVariable objects; use ContainsKey and GetVariable for lookups.
void CaptureFileData(byte[] fileContents, string displayName, string originalPath, DateTime fileDate) void CaptureFileData(byte[] fileContents, string displayName, string originalPath, DateTime fileDate, bool treatAsCapturedConsole = false) New optional parameter.

ADTIndependentObject

Version 5 Member Version 6 Replacement Notes
GetObjectReferences(string[] referencesToFetch, bool fetchObjects, int options) GetObjectReferences(string[] referencesToFetch, bool fetchObjects, int options, OID[] referencesToIgnore = null) The two overloads were combined into one method with an optional parameter.
GetObjectReferences(string[] referencesToFetch, bool fetchObjects, int options, OID[] referencesToIgnore) GetObjectReferences(string[] referencesToFetch, bool fetchObjects, int options, OID[] referencesToIgnore = null)

TimeSpan Properties Changed to Nullable

These properties changed from TimeSpan to TimeSpan?. Assigning a value still compiles. Code that reads the value into a TimeSpan variable must use .Value, .GetValueOrDefault(), or ??. A null value means the default value is used.

Version 5 Member Version 6 Replacement
Client.EmailTrigger.PollingInterval : TimeSpan Client.EmailTrigger.PollingInterval : TimeSpan?
Client.FtpServer.ConnectionRetryDelay : TimeSpan Client.FtpServer.ConnectionRetryDelay : TimeSpan?
Client.FtpServer.NetworkTimeout : TimeSpan Client.FtpServer.NetworkTimeout : TimeSpan?
Client.FtpServer.OperationRetryDelay : TimeSpan Client.FtpServer.OperationRetryDelay : TimeSpan?
Client.FtpServer.ReadTimeout : TimeSpan Obsolete. This parameter was never used.
Client.SftpServer.ConnectionRetryDelay : TimeSpan Client.SftpServer.ConnectionRetryDelay : TimeSpan?
Client.SftpServer.NetworkTimeout : TimeSpan Client.SftpServer.NetworkTimeout : TimeSpan?
Client.SftpServer.OperationRetryDelay : TimeSpan Client.SftpServer.OperationRetryDelay : TimeSpan?
Client.SftpServer.ReadTimeout : TimeSpan Client.SftpServer.ReadTimeout : TimeSpan?
Client.WebRequestTask.MaxRunTime : TimeSpan Client.WebRequestTask.MaxRunTime : TimeSpan?

ImportExportFacility

Version 5 Member Version 6 Replacement Notes
ImportResult ImportData(ImportOptions options, out ReadOnlyCollection<ImportedObject> importedObjects) ImportResult ImportData(ImportOptions options, out IReadOnlyList<ImportedObject> importedObjects) The out parameter type changed. Alternatively, use the new ImportData(ImportOptions options, CancellationToken cancellationToken) overload and read the ImportedObjects field.
ReadOnlyCollection<ObjectComparison> ObjectComparisonReports { get; } IReadOnlyList<ObjectComparison> ObjectComparisonReports Code that only enumerates or indexes the value still compiles.

Job

Version 5 Member Version 6 Replacement Notes
static List<SupportedResponseEvent> GetStandardSupportedResponseEvents() static List<SupportedResponseEvent> GetStandardSupportedResponseEvents(Version serverVersion) Pass the version of the server the job will run on; the list of supported events depends on it.

Shared Assembly

Renamed Classes and Members

Version 5 Member Version 6 Replacement Notes
Shared.StringUtil (class) Shared.StringUtility Class renamed. All methods carry over with the same signatures except as noted below.
Shared.StringUtil.CaseInsensitiveStringEquals(string a, string b) Shared.StringUtility.Equals(string a, string b, StringComparison comparison = StringComparison.OrdinalIgnoreCase) The default comparison is case-insensitive, so StringUtility.Equals(a, b) is equivalent.
Shared.RegistryUtility.GetRegistryValue(RegistryKey root, string subkeyName, string valueName, string defaultValue = null) Shared.RegistryUtility.GetValue(RegistryKey root, string subkeyName, string valueName, string defaultValue = null) Method renamed. New GetValue overloads for bool and int values and TryGetValue/TryGetValueAsBool/TryGetValueAsInt methods were also added.
Shared.LogMessageClass.TriggerFailure (= 31) Shared.LogMessageClass.TriggerState (= 31) Enum member renamed; the numeric value is unchanged.

Changed Signatures

Version 5 Member Version 6 Replacement Notes
Shared.DateTimeHandling.FormatTimespan(TimeSpan? ts) Shared.DateTimeHandling.FormatTimespan(TimeSpan? ts, bool includeMilliseconds) New required parameter. Pass true for output closest to version 5 (milliseconds shown for values under one minute); pass false to omit milliseconds.
Shared.JobVariableExpander.ExpandTokens(StringBuilder source, IJobVariableContainer container, out bool changesMade) Shared.JobVariableExpander.ExpandTokens(StringBuilder source, IJobVariableContainer container, bool redactHiddenValues, out bool changesMade) New required parameter. Pass false for the version 5 behavior (hidden variable values are included in the result); pass true to redact hidden values.
Shared.DateTimeHandling.RepresentsFullYear(DateTime? StartDate, DateTime? EndDate) Shared.DateTimeHandling.RepresentsFullYear(DateTime? startDate, DateTime? endDate) Parameters renamed. Affects only callers that use named arguments.
Shared.EnumHelpers.IsIn<T>(T target, params T[] values) Shared.EnumHelpers.IsIn<T>(T valueToCheck, params T[] values) Parameter renamed. Affects only callers that use named arguments.

Removed Members

Version 5 Member Version 6 Replacement Notes
Shared.EnumHelpers.ParseEnum<T>(string source) Shared.Parsing.ParseEnum<T>(string source) Moved
Shared.EnumHelpers.ParseEnum<T>(string source, T defaultValue) Shared.Parsing.ParseEnum<T>(string source, T defaultValue) Moved