> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Class CommandBase

Namespace: [VM](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM)\
Assembly: VM.dll

```csharp theme={null}
public abstract class CommandBase : ObservableObject, IObservableObject, IDisposableObject
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ←
[ObservableObject](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.ObservableObject.md) ←
[CommandBase](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.CommandBase.md)

#### Implements

[IObservableObject](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.IObservableObject.md),
[IDisposableObject](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.IDisposableObject.md)

#### Inherited Members

[ObservableObject.Dispose()](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.ObservableObject.md#VM_ObservableObject_Dispose),
[ObservableObject.RaisePropertyChanged(string)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.ObservableObject.md#VM_ObservableObject_RaisePropertyChanged_System_String_),
[ObservableObject.RaisePropertyChanged(string, object, object)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.ObservableObject.md#VM_ObservableObject_RaisePropertyChanged_System_String_System_Object_System_Object_),
[ObservableObject.Dispose(bool)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.ObservableObject.md#VM_ObservableObject_Dispose_System_Boolean_),
[ObservableObject.DisposeManagedResources()](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.ObservableObject.md#VM_ObservableObject_DisposeManagedResources),
[ObservableObject.DisposeUnmanagedResources()](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.ObservableObject.md#VM_ObservableObject_DisposeUnmanagedResources),
[ObservableObject.IsDisposed](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.ObservableObject.md#VM_ObservableObject_IsDisposed),
[ObservableObject.TryDisposing](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.ObservableObject.md#VM_ObservableObject_TryDisposing),
[ObservableObject.Disposed](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.ObservableObject.md#VM_ObservableObject_Disposed),
[ObservableObject.Disposing](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.ObservableObject.md#VM_ObservableObject_Disposing),
[ObservableObject.PropertyChanged](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.ObservableObject.md#VM_ObservableObject_PropertyChanged)

#### Extension Methods

[LinkPropertyItemCache.GetLinkProperties(object, LinkPropertyType)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkProperties_System_Object_VM_Models_Pre_LinkPropertyType_),
[LinkPropertyItemCache.GetLinkPropertiesAndValues(object, LinkPropertyType)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkPropertiesAndValues_System_Object_VM_Models_Pre_LinkPropertyType_),
[LinkPropertyItemCache.GetLinkedObjects\<T>(object, LinkPropertyType)](https://developer.synopsys.com/docs/motion/motion-standalone-preprocessor-c-sharp-library/2025-r2/lib/VM.Models.Pre.Cache.LinkPropertyItemCache.md#VM_Models_Pre_Cache_LinkPropertyItemCache_GetLinkedObjects__1_System_Object_VM_Models_Pre_LinkPropertyType_)

## Constructors

### CommandBase(Func\<object, bool>)

```csharp theme={null}
public CommandBase(Func<object, bool> canExecute)
```

#### Parameters

`canExecute` [Func](https://learn.microsoft.com/dotnet/api/system.func-2)\<[object](https://learn.microsoft.com/dotnet/api/system.object), [bool](https://learn.microsoft.com/dotnet/api/system.boolean)>

## Properties

### Description

```csharp theme={null}
public string Description { get; set; }
```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

### IsExecuting

```csharp theme={null}
protected bool IsExecuting { get; set; }
```

#### Property Value

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

## Methods

### CanExecute(object)

```csharp theme={null}
public bool CanExecute(object parameter)
```

#### Parameters

`parameter` [object](https://learn.microsoft.com/dotnet/api/system.object)

#### Returns

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### OnCanExecuteChanged()

```csharp theme={null}
protected void OnCanExecuteChanged()
```

### OnShouldExecute()

```csharp theme={null}
protected void OnShouldExecute()
```

### CanExecuteChanged

```csharp theme={null}
public virtual event EventHandler CanExecuteChanged
```

#### Event Type

[EventHandler](https://learn.microsoft.com/dotnet/api/system.eventhandler)

### ShouldExecute

```csharp theme={null}
public event EventHandler ShouldExecute
```

#### Event Type

[EventHandler](https://learn.microsoft.com/dotnet/api/system.eventhandler)
