• Api Documentation
Show / Hide Table of Contents
  • Softadmin.Api
    • AdminMessageException
    • CustomComponent
    • ICookies
    • IEnvironment
    • IForwardState
    • IHttpHeaders
    • IParameters
    • ISessionVariables
    • ISystemSettings
    • Plugin
  • Softadmin.Api.Database
    • IDbRequest
    • IDbRequestFactory
  • Softadmin.Api.Diagnostics
    • ILogger
  • Softadmin.Api.Login
    • IUserState
    • LoginPlugin
    • PostLoginPlugin
    • PreLoginPlugin
    • UserAuthenticationPlugin
  • Softadmin.Api.Logout
    • LogoutPlugin
  • Softadmin.Api.Page
    • ICustomPage
    • PagePlugin
  • Softadmin.Api.Ui
    • IDebugWindow
    • IProgressWindow

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
IsReadOnly

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

name is null.

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

name is null.

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

name is null.

System.InvalidOperationException

ForwardMenuItemId is null.

System.InvalidOperationException

The state is read-only.

Back to top Generated by DocFX