skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop

    Web

    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Test Studio Dev Edition Telerik JustMock

    CMS

    Sitefinity

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class RadService

Represents abstact class that provides service capabilities.

Inheritance
System.Object
DisposableObject
RadObject
RadService
RadDragDropService
Inherited Members
RadObject.BindingContextProperty
RadObject.RadType
RadObject.ReplaceDefaultDescriptors(PropertyDescriptorCollection)
RadObject.DisposeManagedResources()
RadObject.ClearPropertyStore()
RadObject.SuspendPropertyNotifications()
RadObject.ResumePropertyNotifications()
RadObject.GetPropertyValue(RadProperty)
RadObject.SetDefaultValueOverride(RadProperty, Object)
RadObject.SetValueAtDesignTime(RadProperty, Object)
RadObject.GetValue(RadProperty)
RadObject.SetValue(RadProperty, Object)
RadObject.ResetValue(RadProperty)
RadObject.ResetLocalValue(RadProperty)
RadObject.ResetValue(RadProperty, ValueResetFlags)
RadObject.UpdateValue(RadProperty)
RadObject.GetValueSource(RadProperty)
RadObject.GetRegisteredRadProperty(String)
RadObject.UpdateValueCore(RadPropertyValue)
RadObject.SetValueCore(RadPropertyValue, Object, Object, ValueSource)
RadObject.ResetValueCore(RadPropertyValue, ValueResetFlags)
RadObject.GetDefaultValue(RadPropertyValue, Object)
RadObject.CoerceValue(RadPropertyValue, Object)
RadObject.ShouldSerializeProperty(PropertyDescriptor)
RadObject.ShouldSerializeProperty(RadProperty)
RadObject.CanRaisePropertyChangeNotifications(RadPropertyValue)
RadObject.BindProperty(RadProperty, RadObject, RadProperty, PropertyBindingOptions)
RadObject.UnbindProperty(RadProperty)
RadObject.AddStylePropertySetting(IPropertySetting)
RadObject.RemoveStylePropertySetting(IPropertySetting)
RadObject.RemoveStylePropertySetting(RadProperty)
RadObject.GetInheritedValue(RadProperty)
RadObject.OnPropertyChanging(RadPropertyChangingEventArgs)
RadObject.OnPropertyChanged(RadPropertyChangedEventArgs)
RadObject.OnNotifyPropertyChanged(String)
RadObject.OnNotifyPropertyChanged(PropertyChangedEventArgs)
RadObject.OnShouldSerializeProperty(ShouldSerializePropertyEventArgs)
RadObject.IsPropertyCancelable(RadPropertyMetadata)
RadObject.PropertyValues
RadObject.IsDesignMode
RadObject.PropertyFilter
RadObject.RadObjectType
RadObject.BindingContext
RadObject.PropertyChanged
RadObject.RadPropertyChanged
RadObject.RadPropertyChanging
RadObject.ShouldSerializePropertyHandler
DisposableObject.GetBitState(Int64)
DisposableObject.SetBitState(Int64, Boolean)
DisposableObject.OnBitStateChanged(Int64, Boolean, Boolean)
DisposableObject.Dispose()
DisposableObject.Dispose(Boolean)
DisposableObject.PerformDispose(Boolean)
DisposableObject.DisposeUnmanagedResources()
DisposableObject.BitState
DisposableObject.Events
DisposableObject.IsDisposing
DisposableObject.IsDisposed
DisposableObject.Disposed
DisposableObject.Disposing
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: Telerik.WinControls
Assembly: Telerik.WinControls.dll

Syntax

public abstract class RadService : RadObject, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor

Constructors

RadService()

Initializes a new instance of the RadService class.

Declaration
protected RadService()

Properties

AvailableAtDesignTime

Determines whether the service is available at design-time. False by default.

Declaration
public virtual bool AvailableAtDesignTime { get; }
Property Value
System.Boolean

Context

Gets the context associated with the current operation. This member is valid only while the Service is started or paused.

Declaration
public object Context { get; }
Property Value
System.Object

Enabled

Determines whether the Service is enabled (may be started). If the Service is working and its is disabled, it will end its current operation.

Declaration
public bool Enabled { get; set; }
Property Value
System.Boolean

Name

Gets the name of the service.

Declaration
public virtual string Name { get; }
Property Value
System.String

State

Gets the current state of the service.

Declaration
public RadServiceState State { get; }
Property Value
RadServiceState

Methods

Abort()

Aborts the current operation without applying any changes.

Declaration
protected virtual void Abort()

CanOperate()

Determines whether the service is operational and may perform actions.

Declaration
public virtual bool CanOperate()
Returns
System.Boolean

CanStart(Object)

Determines whether the service may be started. Validation is as follows:

  1. Check whether Enabled is true.
  2. Check the context through IsContextValid method. An exception is thrown if context is invalid.
  3. Checks the current state - it should be Initial or Stopped.
Declaration
protected virtual bool CanStart(object context)
Parameters
System.Object context

Returns
System.Boolean

Commit()

Ends the current operation and applies all changes.

Declaration
protected virtual void Commit()

IsContextValid(Object)

Evaluates the provided context. Some services may not operate without certain context provided.

Declaration
protected virtual bool IsContextValid(object context)
Parameters
System.Object context

Returns
System.Boolean

OnEnabledChanged()

Notifies for a change in the Enabled state.

Declaration
protected virtual void OnEnabledChanged()

OnStarted()

Notifies that the service has been successfully started. Allows inheritors to perform some additional logic upon start.

Declaration
protected virtual void OnStarted()

OnStarting(RadServiceStartingEventArgs)

Notifies that a start request has occured. Cancelable.

Declaration
protected virtual void OnStarting(RadServiceStartingEventArgs e)
Parameters
RadServiceStartingEventArgs e

OnStopped()

Notifies that a running operation has stopped. Allows inheritors to perform some additional logic upon stop.

Declaration
protected virtual void OnStopped()

OnStopping(RadServiceStoppingEventArgs)

Notifies that a stop request has occured. Cancelable.

Declaration
protected virtual void OnStopping(RadServiceStoppingEventArgs e)
Parameters
RadServiceStoppingEventArgs e

Pause()

Pauses a currently running operation.

Declaration
public void Pause()

PerformPause()

Performs the core Pause logic.

Declaration
protected virtual void PerformPause()

PerformResume()

Performs the core Resume logic.

Declaration
protected virtual void PerformResume()

PerformStart()

Performs the core Start logic.

Declaration
protected virtual void PerformStart()

PerformStop()

Stops the service. Performs the core logic.

Declaration
protected virtual void PerformStop()

Resume()

Resumes previously paused operation.

Declaration
public void Resume()

SetContext(Object)

Sets the provided object as the current context.

Declaration
protected virtual void SetContext(object context)
Parameters
System.Object context

Start(Object)

Starts the Service. If the service was previously paused, it should be re-started with the Resume method.

Declaration
public void Start(object context)
Parameters
System.Object context

A context passed to the service.

Stop(Boolean)

Stops currently working or previously stopped service.

Declaration
public void Stop(bool commit)
Parameters
System.Boolean commit

True to indicate that current operation ended successfully, false otherwise.

Events

Started

Raised right after the service is started.

Declaration
public event EventHandler Started
Event Type
System.EventHandler

Starting

Raised when the service is about to be started.

Declaration
public event EventHandler<RadServiceStartingEventArgs> Starting
Event Type
System.EventHandler<RadServiceStartingEventArgs>

Stopped

Raised when the service is stopped.

Declaration
public event EventHandler Stopped
Event Type
System.EventHandler

Stopping

Raised when the service is about to be stopped.

Declaration
public event EventHandler<RadServiceStoppingEventArgs> Stopping
Event Type
System.EventHandler<RadServiceStoppingEventArgs>

Extension Methods

CommonExtensions.ClearIfNoBindingAndSet(RadObject, RadProperty)
DispatcherExtensions.CheckAccess(RadObject)
CommonExtensions.SetIfDifferent(RadObject, RadProperty, Object)
CommonExtensions.ClearIfSet(RadObject, RadProperty)
CommonExtensions.IsLocalValueSet(RadObject, RadProperty)
DispatcherExtensions.CheckAccess(RadObject)
DispatcherExtensions.CheckAccess(RadObject)
DispatcherExtensions.CheckAccess(RadObject)
SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.