Skip to content

Commit

Permalink
Merge pull request #944 from Caliburn-Micro/943-fix-code-scanning-ale…
Browse files Browse the repository at this point in the history
…rt-local-scope-variable-shadows-member
  • Loading branch information
vb2ae authored Dec 16, 2024
2 parents ad63b83 + d139447 commit e6e1305
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/Caliburn.Micro.Platform/Platforms/Maui/Parameter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ void IAttachedObject.Detach()
/// <summary>
/// Makes the parameter aware of the <see cref="ActionMessage"/> that it's attached to.
/// </summary>
/// <param name="owner">The action message.</param>
internal void MakeAwareOf(ActionMessage owner)
/// <param name="actionMessageOwner">The action message.</param>
internal void MakeAwareOf(ActionMessage actionMessageOwner)
{
Owner = owner;
Owner = actionMessageOwner;
}

internal static void OnValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
Expand Down
19 changes: 10 additions & 9 deletions src/Caliburn.Micro.Platform/Platforms/Xamarin.Forms/Parameter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ namespace Caliburn.Micro
{
using System;
#if XFORMS
using global::Xamarin.Forms;
using DependencyObject = global::Xamarin.Forms.BindableObject;
using DependencyProperty = global::Xamarin.Forms.BindableProperty;
using FrameworkElement = global::Xamarin.Forms.VisualElement;
#else
using Windows.UI.Xaml;
#endif
Expand All @@ -18,7 +16,8 @@ namespace Caliburn.Micro
/// Represents a parameter of an <see cref="ActionMessage"/>.
/// </summary>
#if WINDOWS_UWP || XFORMS
public class Parameter : DependencyObject, IAttachedObject {
public class Parameter : DependencyObject, IAttachedObject
{
DependencyObject associatedObject;
#else
public class Parameter : FrameworkElement, IAttachedObject
Expand All @@ -35,7 +34,7 @@ public class Parameter : FrameworkElement, IAttachedObject
"Value",
typeof(object),
typeof(Parameter),
null,
null,
OnValueChanged
);

Expand All @@ -50,7 +49,8 @@ public object Value
}

#if WINDOWS_UWP || XFORMS
DependencyObject IAttachedObject.AssociatedObject {
DependencyObject IAttachedObject.AssociatedObject
{
#else
FrameworkElement IAttachedObject.AssociatedObject
{
Expand All @@ -69,7 +69,8 @@ protected ActionMessage Owner
}

#if WINDOWS_UWP || XFORMS
void IAttachedObject.Attach(DependencyObject dependencyObject) {
void IAttachedObject.Attach(DependencyObject dependencyObject)
{
#else
void IAttachedObject.Attach(FrameworkElement dependencyObject)
{
Expand All @@ -85,10 +86,10 @@ void IAttachedObject.Detach()
/// <summary>
/// Makes the parameter aware of the <see cref="ActionMessage"/> that it's attached to.
/// </summary>
/// <param name="owner">The action message.</param>
internal void MakeAwareOf(ActionMessage owner)
/// <param name="actionMessageOwner">The action message.</param>
internal void MakeAwareOf(ActionMessage actionMessageOwner)
{
Owner = owner;
Owner = actionMessageOwner;
}

static void OnValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
Expand Down

0 comments on commit e6e1305

Please sign in to comment.