Click or drag to resize
CMSThread Class
CMS managed thread.
Inheritance Hierarchy

Namespace: CMS.Base
Assembly: CMS.Base (in CMS.Base.dll) Version: 8.2.23
Syntax
C#
public class CMSThread : AbstractWorker, IDisposable

The CMSThread type exposes the following members.

Constructors
Methods
  NameDescription
Public methodAbort
Aborts the thread execution.
Public methodStatic memberAllowEmptyContext
Allows anonymous thread to use new dedicated context in subsequent calls. Call this method in case the anonymous thread isn't initiated from a request thread, or in case you want to start with an empty thread context on purpose.
Protected methodCloseThreadContext
Closes the thread context.
Public methodDispose
Disposes the thread object.
Public methodStatic memberGetCurrentThreadId
Gets the current thread ID
Public methodGetDuplicityKey
Gets the duplicity key for the worker to eliminate duplicit queued workers.
(Inherited from AbstractWorker.)
Public methodStatic memberGetThread
Finds the thread based on the given GUID.
Public methodJoin
Blocks the calling thread until a thread terminates, while continuing to perform standard COM and SendMessage pumping.
Public methodLoadTargetDelegateInfo
Sets the target delegate information
Protected methodPrepareEmptyThreadContext
Prepares empty thread context for thread with UseEmptyContext set.
Protected methodPrepareThreadContext
Prepares the thread context
Protected methodRaiseStop
Raises OnStop event.
(Inherited from AbstractWorker.)
Public methodRun
Runs the action.
(Overrides AbstractWorkerRun.)
Public methodRunAsync
Runs the worker as a new thread. For internal purposes only, use method Start instead.
(Overrides AbstractWorkerRunAsync.)
Public methodStart
Starts the thread.
Public methodStop
Stops the thread execution.
Public methodStatic memberWaitForSequence
Waits for the current sequence thread to terminate
Public methodStatic memberWrap(Action, Boolean)
Wraps the given method into CMSThread context
Public methodStatic memberWrapT(ActionT, Boolean)
Wraps the given method into CMSThread context
Public methodStatic memberWrapT1, T2(ActionT1, T2, Boolean)
Wraps the given method into CMSThread context
Public methodStatic memberWrapFuncTResult(FuncTResult, Boolean)
Wraps the given method into CMSThread context
Public methodStatic memberWrapFuncT1, TResult(FuncT1, TResult, Boolean)
Wraps the given method into CMSThread context
Top
Extension Methods
  NameDescription
Public Extension MethodAsValue
Converts object to a query value which can be used as a query parameter
(Defined by QueryExtensions.)
Public Extension MethodGetAPIString
Gets the string by the specified resource key
(Defined by CoreExtensions.)
Public Extension MethodGetString
Gets the string by the specified resource key
(Defined by CoreExtensions.)
Public Extension MethodToBoolean
Returns the boolean representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToDateTime
Returns the DateTime representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToDouble
Returns the double representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToGuid
Returns the Guid representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToInteger
Returns the integer representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToString
Returns the string representation of an object or default value if not.
(Defined by CoreExtensions.)
Top
Fields
  NameDescription
Public fieldStatic memberABORT_REASON_STOP
Thread was stopped by the user.
Top
Properties
  NameDescription
Public propertyAllowAsyncActions
Indicates if new threads can be created within this thread. (By default no new threads are created.)
Public propertyCancel
If true, the worker is cancelled (doesn't execute)
(Inherited from AbstractWorker.)
Public propertyConnectionString
Connection string name that the thread should use to access the database
Public propertyInnerThread
Worker object.
Public propertyIsBackground
Defines if a thread is a background thread
Public propertyLog
Logs for long running operations.
Public propertyMethodClassName
Name of the class which is running the thread actions.
Public propertyMethodName
Name of the method which is running the thread actions.
Public propertyMode
If true, the thread runs synchronously
Public propertyPriority
Specifies the scheduling priority.
Public propertyRequestUrl
Request URL which created the thread.
Public propertyRunInSequence
If true, the thread is a part of the sequence and should perform the actions after the previous thread finishes.
(Inherited from AbstractWorker.)
Public propertyStatic memberRunningThreads
Counter of running Threads.
Public propertyThreadFinished
Time when the thread finished.
Public propertyThreadGUID
Thread GUID.
Public propertyThreadID
Thread ID.
Public propertyThreadStarted
Time when the thread started.
Top
Events
  NameDescription
Public eventOnStop
Raised when worker finishes.
(Inherited from AbstractWorker.)
Top
See Also