KGy SOFT

SimpleCommand Class

KGy SOFT Core Libraries Help
Represents a command, which is unaware of its triggering sources and has no bound targets.
See the Remarks section of the ICommand interface for details and examples about commands.
Inheritance Hierarchy

SystemObject
  KGySoft.ComponentModelSimpleCommand

Namespace:  KGySoft.ComponentModel
Assembly:  KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 5.0.0-rc.1
Syntax

public sealed class SimpleCommand : ICommand, 
	IDisposable

The SimpleCommand type exposes the following members.

Constructors

  NameDescription
Public methodSimpleCommand(Action)
Initializes a new instance of the SimpleCommand class.
Public methodSimpleCommand(ActionICommandState)
Initializes a new instance of the SimpleCommand class.
Top
Methods

  NameDescription
Public methodDispose
Releases the delegate passed to the constructor. Should be called if the callback is an instance method, which holds references to other objects.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Extension Methods

  NameDescription
Public Extension MethodConvert(Type, CultureInfo)Overloaded.
Converts an Object specified in the obj parameter to the desired targetType.
See the Examples section of the generic ConvertTTarget(Object, CultureInfo) overload for an example.
(Defined by ObjectExtensions.)
Public Extension MethodCode exampleConvertTTarget(CultureInfo)Overloaded.
Converts an Object specified in the obj parameter to the desired TTarget.
(Defined by ObjectExtensions.)
Public Extension MethodCreateBinding(IDictionaryString, Object, Boolean)Overloaded.
Creates a binding for a command without any sources and targets. At least one source must be added by the ICommandBinding.AddSource method to make the command invokable. Targets can be added by the ICommandBinding.AddTarget method.
(Defined by Command.)
Public Extension MethodCreateBinding(Object, String, Object)Overloaded.
Creates a binding for a command using the specified source, eventName and targets.
(Defined by Command.)
Public Extension MethodCreateBinding(Object, String, IDictionaryString, Object, Object)Overloaded.
Creates a binding for a command using the specified source, eventName and targets as well as the optionally provided initial state of the binding.
(Defined by Command.)
Public Extension MethodIn (Defined by ObjectExtensions.)
Public Extension MethodTryConvert(Type, Object)Overloaded.
Tries to convert an Object specified in the obj parameter to the desired targetType.
(Defined by ObjectExtensions.)
Public Extension MethodTryConvert(Type, CultureInfo, Object)Overloaded.
Tries to convert an Object specified in the obj parameter to the desired targetType.
(Defined by ObjectExtensions.)
Public Extension MethodTryConvertTTarget(TTarget)Overloaded.
Tries to convert an Object specified in the obj parameter to the desired TTarget.
See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example.
(Defined by ObjectExtensions.)
Public Extension MethodTryConvertTTarget(CultureInfo, TTarget)Overloaded.
Tries to convert an Object specified in the obj parameter to the desired TTarget.
See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example.
(Defined by ObjectExtensions.)
Top
See Also

Reference