Interface IForwardState
Where the user should be forwarded to.
Namespace: Softadmin.Api
Assembly: Softadmin.Api.dll
Syntax
public interface IForwardState
Examples
if (!this.ForwardState.IsReadOnly && !this.ForwardState.HasValue)
{
this.ForwardState.ForwardMenuItemId = ShowOpenIssueMenuItemId;
int issueId = 123;
this.ForwardState.SetPassingField("IssueId", issueId);
this.ForwardState.MakeReadOnly();
}
Properties
ForwardMenuGroupId
Gets or sets the menu group to forward the user to.
Declaration
int? ForwardMenuGroupId { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> |
Remarks
Setting this value clears see ForwardMenuItemId.
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | The state is read-only. |
ForwardMenuItemId
Gets or sets the menu item to forward the user to.
Declaration
int? ForwardMenuItemId { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> |
Remarks
Setting this value clears ForwardMenuGroupId.
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | The state is read-only. |
HasValue
Gets a value indicating whether a destination has been set.
Declaration
bool HasValue { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsReadOnly
Gets a value indicating whether the forward state is read-only.
Declaration
bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
MakeReadOnly()
Makes the forwarding properties read-only.
Declaration
void MakeReadOnly()
Remarks
Make the forward state read-only to prevent others from overwriting it. For example login links make the state read-only to prevent plugins from overwriting their destination.
See Also
SetPassingField(String, Boolean)
Sets a passing field. Overwrites any existing field with the same name.
Declaration
void SetPassingField(string name, bool value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of passing field, case insensitive. |
System.Boolean | value | Value. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.InvalidOperationException | ForwardMenuItemId is null. |
System.InvalidOperationException | The state is read-only. |
SetPassingField(String, Int32)
Sets a passing field. Overwrites any existing field with the same name.
Declaration
void SetPassingField(string name, int value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of passing field, case insensitive. |
System.Int32 | value | Value. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.InvalidOperationException | ForwardMenuItemId is null. |
System.InvalidOperationException | The state is read-only. |
SetPassingField(String, String)
Sets a passing field. Overwrites any existing field with the same name.
Declaration
void SetPassingField(string name, string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of passing field, case insensitive. |
System.String | value | Value. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.InvalidOperationException | ForwardMenuItemId is null. |
System.InvalidOperationException | The state is read-only. |