Table of Contents

Class RequestExtensions

Namespace
Cyclotron.Utilities.CleanArchitecture
Assembly
Cyclotron.Utilities.dll

Provides extension methods for IUsecaseRequest to simplify request type checking.

public static class RequestExtensions
Inheritance
RequestExtensions
Inherited Members

Methods

HasLocalRequest(IUsecaseRequest)

Determines whether the request includes a local component.

public static bool HasLocalRequest(this IUsecaseRequest request)

Parameters

request IUsecaseRequest

The use case request to check.

Returns

bool

true if the request type includes local access (Local, LocalAndNetwork, or Sync); otherwise, false.

HasNetworkRequest(IUsecaseRequest)

Determines whether the request includes a network component.

public static bool HasNetworkRequest(this IUsecaseRequest request)

Parameters

request IUsecaseRequest

The use case request to check.

Returns

bool

true if the request type includes network access (Network, LocalAndNetwork, or Sync); otherwise, false.

IsLocalRequest(IUsecaseRequest)

Determines whether the request is exclusively a local request.

public static bool IsLocalRequest(this IUsecaseRequest request)

Parameters

request IUsecaseRequest

The use case request to check.

Returns

bool

true if the request is of type Local; otherwise, false.

IsNetworkRequest(IUsecaseRequest)

Determines whether the request is exclusively a network request.

public static bool IsNetworkRequest(this IUsecaseRequest request)

Parameters

request IUsecaseRequest

The use case request to check.

Returns

bool

true if the request is of type Network; otherwise, false.