Show / Hide Table of Contents

Class XsrfHelper

Helper class to update/parse XSRF Paths and store/update the user preference.

Inheritance
object
XsrfHelper
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SuperOffice.CRM
Assembly: SoDataBase.BusinessLogic.dll
Syntax
public class XsrfHelper

Constructors

XsrfHelper()

Helper class to update/parse XSRF Paths and store/update the user preference.

Declaration
public XsrfHelper()

Methods

GetXsrfPathsAsync(string, CancellationToken)

Helper class to update/parse XSRF Paths and store/update the user preference.

Declaration
public static Task<string[]> GetXsrfPathsAsync(string hostname, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string hostname
CancellationToken cancellationToken
Returns
Type Description
Task<string[]>

GetXsrfValueAsync(CancellationToken)

Returns the XSRF value and the last update time. If the value does not exist, it returns empty string and DateTime.MinValue.

Declaration
public static Task<(string, DateTime)> GetXsrfValueAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken

A cancellation token.

Returns
Type Description
Task<(string, DateTime)>

XSRF value and last update time in UTC

SetXsrfPathsAsync(string, string[], CancellationToken)

Helper class to update/parse XSRF Paths and store/update the user preference.

Declaration
public static Task SetXsrfPathsAsync(string hostname, string[] paths, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string hostname
string[] paths
CancellationToken cancellationToken
Returns
Type Description
Task

SetXsrfValueAsync(string, CancellationToken)

Sets the XSRF value for the current user. If the user is not authenticated, it does nothing.

Declaration
public static Task SetXsrfValueAsync(string xsrfValue, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string xsrfValue

The XSRF value to set.

CancellationToken cancellationToken

A cancellation token.

Returns
Type Description
Task

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
ObjectExtensions.AssignByReflection<T>(T, T)
ObjectExtensions.GraphCopy<T>(T)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top