Class WorkspaceExplorerBaseService
Inheritance
System.Object
WorkspaceExplorerBaseService
Implements
System.Web.SessionState.IReadOnlySessionState
System.Web.SessionState.IRequiresSessionState
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Terrasoft.Core.ServiceModel
Assembly: Terrasoft.Core.ServiceModel.dll
Syntax
public abstract class WorkspaceExplorerBaseService : BaseService, IReadOnlySessionState, IRequiresSessionState
Constructors
WorkspaceExplorerBaseService(UserConnection)
Declaration
protected WorkspaceExplorerBaseService(UserConnection userConnection)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection |
Methods
CheckCanManageSolution()
Checks that the user can manage configuration.
Declaration
protected void CheckCanManageSolution()
SafeExecute(Action, Boolean)
Executes a specified action after "CanManageSolution" operation check and handles all exceptions. If exception was handled, response with error information will be returned.
Declaration
protected BaseResponse SafeExecute(Action action, bool useRootException = false)
Parameters
Type | Name | Description |
---|---|---|
System.Action | action | Action to execute. |
System.Boolean | useRootException | Recursively find root inner exception to use in error information. |
Returns
Type | Description |
---|---|
BaseResponse | Response returned by executed action or response with error information. |
SafeExecute<T>(Func<T>, Boolean)
Executes a specified action after "CanManageSolution" operation check and handles all exceptions. If exception was handled, response with error information will be returned.
Declaration
protected T SafeExecute<T>(Func<T> action, bool useRootException = false)
where T : BaseResponse, new()
Parameters
Type | Name | Description |
---|---|---|
System.Func<T> | action | Action to execute. |
System.Boolean | useRootException | Recursively find root inner exception to use in error information. |
Returns
Type | Description |
---|---|
T | Response returned by executed action or response with error information. |
Type Parameters
Name | Description |
---|---|
T | Type of the response. |
Implements
System.Web.SessionState.IReadOnlySessionState
System.Web.SessionState.IRequiresSessionState