Skip to content

Commit

Permalink
Rename to Action
Browse files Browse the repository at this point in the history
  • Loading branch information
wieslawsoltes committed Sep 1, 2024
1 parent ca91842 commit b69aa86
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/Avalonia.Xaml.Interactions.Custom/AddClassAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Avalonia.Xaml.Interactions.Custom;
/// <summary>
/// Adds a specified <see cref="AddClassAction.ClassName"/> to the <see cref="StyledElement.Classes"/> collection when invoked.
/// </summary>
public class AddClassAction : ActionBase
public class AddClassAction : Avalonia.Xaml.Interactivity.Action
{
/// <summary>
/// Identifies the <seealso cref="ClassName"/> avalonia property.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Avalonia.Xaml.Interactions.Custom;
/// <summary>
/// An action that will change a specified Avalonia property to a specified value when invoked.
/// </summary>
public class ChangeAvaloniaPropertyAction : ActionBase
public class ChangeAvaloniaPropertyAction : Avalonia.Xaml.Interactivity.Action
{
/// <summary>
/// Identifies the <seealso cref="TargetProperty"/> avalonia property.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Avalonia.Xaml.Interactions.Custom;
/// <summary>
/// Focuses the associated or target control when executed.
/// </summary>
public class FocusControlAction : ActionBase
public class FocusControlAction : Avalonia.Xaml.Interactivity.Action
{
/// <summary>
/// Identifies the <seealso cref="TargetControl"/> avalonia property.
Expand Down
2 changes: 1 addition & 1 deletion src/Avalonia.Xaml.Interactions.Custom/PopupAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Avalonia.Xaml.Interactions.Custom;
/// An action that displays a <see cref="Popup"/> for the associated control when executed.
/// </summary>
/// <remarks>If the associated control is of type <see cref="Control"/> than popup inherits control <see cref="StyledElement.DataContext"/>.</remarks>
public class PopupAction : ActionBase
public class PopupAction : Avalonia.Xaml.Interactivity.Action
{
private Popup? _popup;

Expand Down
2 changes: 1 addition & 1 deletion src/Avalonia.Xaml.Interactions.Custom/RemoveClassAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Avalonia.Xaml.Interactions.Custom;
/// <summary>
/// Removes a specified <see cref="RemoveClassAction.ClassName"/> from <see cref="StyledElement.Classes"/> collection when invoked.
/// </summary>
public class RemoveClassAction : ActionBase
public class RemoveClassAction : Avalonia.Xaml.Interactivity.Action
{
/// <summary>
/// Identifies the <seealso cref="ClassName"/> avalonia property.
Expand Down
2 changes: 1 addition & 1 deletion src/Avalonia.Xaml.Interactions/Core/CallMethodAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace Avalonia.Xaml.Interactions.Core;
/// <summary>
/// An action that calls a method on a specified object when invoked.
/// </summary>
public class CallMethodAction : ActionBase
public class CallMethodAction : Avalonia.Xaml.Interactivity.Action
{
private Type? _targetObjectType;
private readonly List<MethodDescriptor> _methodDescriptors = new();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Avalonia.Xaml.Interactions.Core;
/// <summary>
/// An action that will change a specified property to a specified value when invoked.
/// </summary>
public class ChangePropertyAction : ActionBase
public class ChangePropertyAction : Avalonia.Xaml.Interactivity.Action
{
private static readonly char[] s_trimChars = { '(', ')' };
private static readonly char[] s_separator = { '.' };
Expand Down
2 changes: 1 addition & 1 deletion src/Avalonia.Xaml.Interactions/Core/InvokeCommandAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Avalonia.Xaml.Interactions.Core;
/// <summary>
/// Executes a specified <see cref="System.Windows.Input.ICommand"/> when invoked.
/// </summary>
public class InvokeCommandAction : ActionBase
public class InvokeCommandAction : Avalonia.Xaml.Interactivity.Action
{
/// <summary>
/// Identifies the <seealso cref="Command"/> avalonia property.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ namespace Avalonia.Xaml.Interactivity;
/// <summary>
/// A base class for action that calls a method on a specified object when invoked.
/// </summary>
public abstract class ActionBase : AvaloniaObject, IAction
public abstract class Action : AvaloniaObject, IAction
{
/// <summary>
/// Identifies the <seealso cref="IsEnabled"/> avalonia property.
/// </summary>
public static readonly StyledProperty<bool> IsEnabledProperty =
AvaloniaProperty.Register<ActionBase, bool>(nameof(IsEnabled), defaultValue: true);
AvaloniaProperty.Register<Avalonia.Xaml.Interactivity.Action, bool>(nameof(IsEnabled), defaultValue: true);

/// <summary>
/// Gets or sets a value indicating whether this instance is enabled.
Expand Down
2 changes: 1 addition & 1 deletion tests/Avalonia.Xaml.Interactivity.UnitTests/StubAction.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Avalonia.Xaml.Interactivity.UnitTests;

public class StubAction(object? returnValue) : ActionBase
public class StubAction(object? returnValue) : Avalonia.Xaml.Interactivity.Action
{
public StubAction() : this(null)
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Avalonia.Xaml.Interactivity.UnitTests/TestUitilties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ public static class TestUtilities
/// <summary>
/// Handles the difference between InvalidOperationException in managed and native.
/// </summary>
public static void AssertThrowsInvalidOperationException(Action action)
public static void AssertThrowsInvalidOperationException(System.Action action)
{
Assert.Throws<InvalidOperationException>(action);
}

public static void AssertThrowsArgumentException(Action action)
public static void AssertThrowsArgumentException(System.Action action)
{
Assert.Throws<ArgumentException>(action);
}
Expand Down

0 comments on commit b69aa86

Please sign in to comment.