Table of Contents

Class WebRequestNameValueItem

Namespace
ArcanaDevelopment.adTempus.Shared.WebRequests
Assembly
ArcanaDevelopment.adTempus.Shared.dll

Base class for the name/value items (headers and parameters) used by a Web Request Task.

[Serializable]
[DataContract(Namespace = "")]
public abstract class WebRequestNameValueItem
Inheritance
object
WebRequestNameValueItem
Derived

Remarks

Values can contain variable tokens, which are expanded when the task runs.

If IsSecret is true, the value is not stored with the item. It is set using SetSecretValue(string) and stored encrypted by the task. A secret value cannot be retrieved by the client; HasSecretValue indicates whether one has been set.

Constructors

WebRequestNameValueItem()

Initializes a new item with a new Id.

protected WebRequestNameValueItem()

Properties

Enabled

Indicates whether the item is included in the request.

[DataMember(Order = 5)]
public bool Enabled { get; set; }

Property Value

bool

Remarks

Default: true

HasSecretValue

Indicates whether a secret value has been set for the item.

[DataMember(Order = 4)]
public bool HasSecretValue { get; }

Property Value

bool

Id

Uniquely identifies the item within the task.

[DataMember(Order = 0)]
public Guid Id { get; set; }

Property Value

Guid

Remarks

Used to associate the item with its encrypted secret value.

IsSecret

Indicates whether the value is secret.

[DataMember(Order = 3)]
public bool IsSecret { get; set; }

Property Value

bool

Remarks

Secret values are stored encrypted, are never returned to the client, and are redacted in logs.

Name

The name of the header or parameter.

[DataMember(Order = 1)]
[CanBeNull]
public string Name { get; set; }

Property Value

string

Value

The value of the header or parameter.

[IgnoreDataMember]
[CanBeNull]
public string Value { get; set; }

Property Value

string

Remarks

Not used if IsSecret is true. Use SetSecretValue(string) instead.

Methods

ConvertToSecret()

Converts the item to a secret item, moving its current Value to the secret value.

public void ConvertToSecret()

CopyTo(WebRequestNameValueItem)

Copies the common item values to another item.

protected void CopyTo(WebRequestNameValueItem target)

Parameters

NameTypeDescription
target WebRequestNameValueItem

SetSecretValue(string)

Sets the secret value for the item and marks the item as secret.

public void SetSecretValue(string value)

Parameters

NameTypeDescription
value string

The new value. Specify null or an empty string to clear the value.

Remarks

The value is saved, encrypted, when the task is saved.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.