Skip to content

Commit

Permalink
Fixed XML comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
kekyo committed Jun 11, 2024
1 parent 7a5b02b commit 03d1fc7
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Epoxy.Core/Anchor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ static Anchor() =>
(Pile?)d.GetValue(PileProperty);

/// <summary>
/// Set Pile from this Anchor.
/// Set Pile to this Anchor.
/// </summary>
public static void SetPile(DependencyObject d, Pile? pile) =>
d.SetValue(PileProperty, pile);
Expand Down
6 changes: 3 additions & 3 deletions src/Epoxy.Core/Fountain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,19 +145,19 @@ static Fountain() =>
#endif

/// <summary>
/// Get Pile from this Anchor.
/// Get Well from this Fountain.
/// </summary>
public static Well? GetWell(DependencyObject d) =>
(Well?)d.GetValue(WellProperty);

/// <summary>
/// Set Pile from this Anchor.
/// Set Well to this Fountain.
/// </summary>
public static void SetWell(DependencyObject d, Well? well) =>
d.SetValue(WellProperty, well);

/// <summary>
/// Clear Pile from this Anchor.
/// Clear Well from this Fountain.
/// </summary>
public static void ClearWell(DependencyObject d) =>
d.ClearValue(WellProperty);
Expand Down
16 changes: 14 additions & 2 deletions src/Epoxy.Core/Well.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,21 @@ private WellFactoryInstance()
/// <example>
/// <code>
/// // Declared a Well into the ViewModel.
/// this.KeyDownWell = Well.Factory.Create<Panel, KeyEventArgs>("KeyDown", async e =&gt;
/// public Well&lt;Window&gt; WindowWell = Well.Factory.Create&lt;Window&gt;();
///
/// // ...
///
/// public MainWindowViewModel()
/// {
/// // Event received.
/// this.WindowWell.Add(Window.Loaded, () =>
/// {
/// // Event received.
/// });
///
/// this.WindowWell.Add&lt;KeyEventArgs&gt;("KeyDown", e =>
/// {
/// // Event received.
/// });
/// });
/// </code>
/// </example>
Expand Down
66 changes: 64 additions & 2 deletions src/Epoxy/Well.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,21 @@ namespace Epoxy;
/// <example>
/// <code>
/// // Declared a Well into the ViewModel.
/// this.ReadyWell = Well.Factory.Create<Window>("Loaded", async () =&gt;
/// public Well&lt;Window&gt; WindowWell = Well.Factory.Create&lt;Window&gt;();
///
/// // ...
///
/// public MainWindowViewModel()
/// {
/// // Event received.
/// this.WindowWell.Add(Window.Loaded, () =>
/// {
/// // Event received.
/// });
///
/// this.WindowWell.Add&lt;KeyEventArgs&gt;("KeyDown", e =>
/// {
/// // Event received.
/// });
/// });
/// </code>
/// </example>
Expand All @@ -88,6 +100,12 @@ public static class WellExtension
/// <typeparam name="TUIElement">Target control type</typeparam>
/// <param name="factory">Factory instance (not used)</param>
/// <returns>Well instance</returns>
/// <example>
/// <code>
/// // Declared a Well into the ViewModel.
/// public Well&lt;Window&gt; WindowWell = Well.Factory.Create&lt;Window&gt;();
/// </code>
/// </example>
public static Well<TUIElement> Create<TUIElement>(
this WellFactoryInstance factory)
where TUIElement : UIElement =>
Expand All @@ -102,6 +120,17 @@ public static Well<TUIElement> Create<TUIElement>(
/// <param name="well">Well</param>
/// <param name="eventName">Event name</param>
/// <param name="action">Action delegate</param>
/// <example>
/// <code>
/// public MainWindowViewModel()
/// {
/// this.WindowWell.Add&lt;KeyEventArgs&gt;("KeyDown", e =>
/// {
/// // Event received.
/// });
/// });
/// </code>
/// </example>
public static void Add<TEventArgs>(
this Well well,
string eventName,
Expand All @@ -114,6 +143,17 @@ public static void Add<TEventArgs>(
/// <param name="well">Well</param>
/// <param name="eventName">Event name</param>
/// <param name="action">Action delegate</param>
/// <example>
/// <code>
/// public MainWindowViewModel()
/// {
/// this.WindowWell.Add("Loaded", () =>
/// {
/// // Event received.
/// });
/// });
/// </code>
/// </example>
public static void Add(
this Well well,
string eventName,
Expand All @@ -138,6 +178,17 @@ public static void Remove(
/// <param name="well">Well</param>
/// <param name="routedEvent">RoutedEvent</param>
/// <param name="action">Action delegate</param>
/// <example>
/// <code>
/// public MainWindowViewModel()
/// {
/// this.WindowWell.Add(DragDrop.DragEnter, e =>
/// {
/// // Event received.
/// });
/// });
/// </code>
/// </example>
public static void Add<TEventArgs>(
this Well well,
#if AVALONIA || AVALONIA11
Expand All @@ -155,6 +206,17 @@ public static void Add<TEventArgs>(
/// <param name="well">Well</param>
/// <param name="routedEvent">RoutedEvent</param>
/// <param name="action">Action delegate</param>
/// <example>
/// <code>
/// public MainWindowViewModel()
/// {
/// this.WindowWell.Add(Window.Loaded, () =>
/// {
/// // Event received.
/// });
/// });
/// </code>
/// </example>
public static void Add(
this Well well,
RoutedEvent routedEvent,
Expand Down
3 changes: 2 additions & 1 deletion src/FSharp.Epoxy/Well.fs
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ open Avalonia.Interactivity;
#endif

/// <summary>
/// The Well factory.
/// The Well is used with Fountation, there will bind and can transfer .NET event signal.
/// </summary>
/// <remarks>See Fountain guide: https://github.com/kekyo/Epoxy#fountain</remarks>
[<DebuggerStepThrough>]
[<AutoOpen>]
module public WellExtension =
Expand Down

0 comments on commit 03d1fc7

Please sign in to comment.