Skip to content

Commit

Permalink
Prism.Avalonia UTF8-BOM to UTF-8
Browse files Browse the repository at this point in the history
  • Loading branch information
DamianSuess committed Dec 16, 2024
1 parent f10d13c commit 402993e
Show file tree
Hide file tree
Showing 17 changed files with 21 additions and 29 deletions.
16 changes: 5 additions & 11 deletions src/Avalonia/Prism.Avalonia/Common/ObservableObject.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.ComponentModel;
using System.ComponentModel;
using Prism.Extensions;
using Avalonia;
using Avalonia.Controls;
Expand All @@ -18,12 +18,10 @@ public class ObservableObject<T> : Control, INotifyPropertyChanged
/// <summary>
/// Identifies the Value property of the ObservableObject
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1000:DoNotDeclareStaticMembersOnGenericTypes", Justification = "This is the pattern for WPF dependency properties")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1000:DoNotDeclareStaticMembersOnGenericTypes", Justification = "This is the pattern for dependency properties")]
public static readonly StyledProperty<T> ValueProperty =
AvaloniaProperty.Register<Control, T>(name: nameof(Value));

//StyledProperty.Register("Value", typeof(T), typeof(ObservableObject<T>), new PropertyMetadata(ValueChangedCallback));

/// <summary>
/// Event that gets invoked when the Value property changes.
/// </summary>
Expand All @@ -35,18 +33,14 @@ public class ObservableObject<T> : Control, INotifyPropertyChanged
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods")]
public T Value
{
get { return (T)this.GetValue(ValueProperty); }
set { this.SetValue(ValueProperty, value); }
get => (T)GetValue(ValueProperty);
set => SetValue(ValueProperty, value);
}

private static void ValueChangedCallback(AvaloniaObject d, AvaloniaPropertyChangedEventArgs e)
{
ObservableObject<T> thisInstance = ((ObservableObject<T>)d);
PropertyChangedEventHandler eventHandler = thisInstance.PropertyChanged;
if (eventHandler != null)
{
eventHandler(thisInstance, new PropertyChangedEventArgs(nameof(Value)));
}
thisInstance.PropertyChanged?.Invoke(thisInstance, new PropertyChangedEventArgs(nameof(Value)));
}

static ObservableObject()
Expand Down
2 changes: 1 addition & 1 deletion src/Avalonia/Prism.Avalonia/Common/Stubs.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;

namespace Prism.Common
{
Expand Down
2 changes: 1 addition & 1 deletion src/Avalonia/Prism.Avalonia/Dialogs/DialogWindow.axaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Window xmlns="https://github.com/avaloniaui"
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Expand Down
2 changes: 1 addition & 1 deletion src/Avalonia/Prism.Avalonia/Dialogs/DialogWindow.axaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.ComponentModel;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Prism.Dialogs
namespace Prism.Dialogs
{
/// <summary>
/// <see cref="IDialogWindow"/> extensions.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Prism.Dialogs;
namespace Prism.Dialogs;

/// <summary>Provides Dialog Parameter Keys for well known parameters used by the <see cref="IDialogService"/></summary>
public static class KnownDialogParameters
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Avalonia;
using Avalonia;
using Avalonia.Controls;

namespace Prism
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using Avalonia.Reactive;
using Prism.Common;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// TODO: 2022-07-08 - Feature disabled until a workaround can be created
// TODO: 2022-07-08 - Feature disabled until a workaround can be created
// Consider using Avalonia.Styling.IStylable or Avalonia.Styling.Selector
// in place of WPF's `Selector` object or AvaloniaObject.
// This theory is untested and causes issues on code such as, `hostControl.Items`
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Avalonia/Prism.Avalonia/Properties/Resources.resx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Avalonia/Prism.Avalonia/Properties/Settings.settings
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version='1.0' encoding='utf-8'?>
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
using System.Runtime.CompilerServices;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Avalonia.Metadata;

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

[assembly: XmlnsDefinition("http://prismlibrary.com/", "Prism.DryIoc")]

[assembly: InternalsVisibleTo("Prism.DryIoc.Avalonia.Tests, PublicKey=00240000048000009400000006020000002400005253413100040000010001008f34b619d7a39e44cebe5ccbd5607eaa0784c9c124431ba336a14e4fecd874f151b57163961505e76943910c7cabea9c7229edc3553dfc33ac7b269087e5cef9404bdb491907ffd9f9b26d737fa2c359620a2cbf2802f54118471d7c0ead3b95c916783dd4b99b9b1a0cd2785e1b5d614d3d9140a60c8c64c217e1c2b0ec8296")]

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Expand Down
2 changes: 1 addition & 1 deletion src/Avalonia/Prism.DryIoc.Avalonia/build/Package.targets
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8" ?>
<Project>
<ItemGroup Condition=" '$(ImplicitUsings)' == 'true' OR '$(ImplicitUsings)' == 'enable' ">
<Using Include="DryIoc" />
Expand Down

0 comments on commit 402993e

Please sign in to comment.