Skip to content

Commit 03d1fc7

Browse files
committed
Fixed XML comments.
1 parent 7a5b02b commit 03d1fc7

File tree

5 files changed

+84
-9
lines changed

5 files changed

+84
-9
lines changed

src/Epoxy.Core/Anchor.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ static Anchor() =>
154154
(Pile?)d.GetValue(PileProperty);
155155

156156
/// <summary>
157-
/// Set Pile from this Anchor.
157+
/// Set Pile to this Anchor.
158158
/// </summary>
159159
public static void SetPile(DependencyObject d, Pile? pile) =>
160160
d.SetValue(PileProperty, pile);

src/Epoxy.Core/Fountain.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -145,19 +145,19 @@ static Fountain() =>
145145
#endif
146146

147147
/// <summary>
148-
/// Get Pile from this Anchor.
148+
/// Get Well from this Fountain.
149149
/// </summary>
150150
public static Well? GetWell(DependencyObject d) =>
151151
(Well?)d.GetValue(WellProperty);
152152

153153
/// <summary>
154-
/// Set Pile from this Anchor.
154+
/// Set Well to this Fountain.
155155
/// </summary>
156156
public static void SetWell(DependencyObject d, Well? well) =>
157157
d.SetValue(WellProperty, well);
158158

159159
/// <summary>
160-
/// Clear Pile from this Anchor.
160+
/// Clear Well from this Fountain.
161161
/// </summary>
162162
public static void ClearWell(DependencyObject d) =>
163163
d.ClearValue(WellProperty);

src/Epoxy.Core/Well.cs

+14-2
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,21 @@ private WellFactoryInstance()
130130
/// <example>
131131
/// <code>
132132
/// // Declared a Well into the ViewModel.
133-
/// this.KeyDownWell = Well.Factory.Create<Panel, KeyEventArgs>("KeyDown", async e =&gt;
133+
/// public Well&lt;Window&gt; WindowWell = Well.Factory.Create&lt;Window&gt;();
134+
///
135+
/// // ...
136+
///
137+
/// public MainWindowViewModel()
134138
/// {
135-
/// // Event received.
139+
/// this.WindowWell.Add(Window.Loaded, () =>
140+
/// {
141+
/// // Event received.
142+
/// });
143+
///
144+
/// this.WindowWell.Add&lt;KeyEventArgs&gt;("KeyDown", e =>
145+
/// {
146+
/// // Event received.
147+
/// });
136148
/// });
137149
/// </code>
138150
/// </example>

src/Epoxy/Well.cs

+64-2
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,21 @@ namespace Epoxy;
7373
/// <example>
7474
/// <code>
7575
/// // Declared a Well into the ViewModel.
76-
/// this.ReadyWell = Well.Factory.Create<Window>("Loaded", async () =&gt;
76+
/// public Well&lt;Window&gt; WindowWell = Well.Factory.Create&lt;Window&gt;();
77+
///
78+
/// // ...
79+
///
80+
/// public MainWindowViewModel()
7781
/// {
78-
/// // Event received.
82+
/// this.WindowWell.Add(Window.Loaded, () =>
83+
/// {
84+
/// // Event received.
85+
/// });
86+
///
87+
/// this.WindowWell.Add&lt;KeyEventArgs&gt;("KeyDown", e =>
88+
/// {
89+
/// // Event received.
90+
/// });
7991
/// });
8092
/// </code>
8193
/// </example>
@@ -88,6 +100,12 @@ public static class WellExtension
88100
/// <typeparam name="TUIElement">Target control type</typeparam>
89101
/// <param name="factory">Factory instance (not used)</param>
90102
/// <returns>Well instance</returns>
103+
/// <example>
104+
/// <code>
105+
/// // Declared a Well into the ViewModel.
106+
/// public Well&lt;Window&gt; WindowWell = Well.Factory.Create&lt;Window&gt;();
107+
/// </code>
108+
/// </example>
91109
public static Well<TUIElement> Create<TUIElement>(
92110
this WellFactoryInstance factory)
93111
where TUIElement : UIElement =>
@@ -102,6 +120,17 @@ public static Well<TUIElement> Create<TUIElement>(
102120
/// <param name="well">Well</param>
103121
/// <param name="eventName">Event name</param>
104122
/// <param name="action">Action delegate</param>
123+
/// <example>
124+
/// <code>
125+
/// public MainWindowViewModel()
126+
/// {
127+
/// this.WindowWell.Add&lt;KeyEventArgs&gt;("KeyDown", e =>
128+
/// {
129+
/// // Event received.
130+
/// });
131+
/// });
132+
/// </code>
133+
/// </example>
105134
public static void Add<TEventArgs>(
106135
this Well well,
107136
string eventName,
@@ -114,6 +143,17 @@ public static void Add<TEventArgs>(
114143
/// <param name="well">Well</param>
115144
/// <param name="eventName">Event name</param>
116145
/// <param name="action">Action delegate</param>
146+
/// <example>
147+
/// <code>
148+
/// public MainWindowViewModel()
149+
/// {
150+
/// this.WindowWell.Add("Loaded", () =>
151+
/// {
152+
/// // Event received.
153+
/// });
154+
/// });
155+
/// </code>
156+
/// </example>
117157
public static void Add(
118158
this Well well,
119159
string eventName,
@@ -138,6 +178,17 @@ public static void Remove(
138178
/// <param name="well">Well</param>
139179
/// <param name="routedEvent">RoutedEvent</param>
140180
/// <param name="action">Action delegate</param>
181+
/// <example>
182+
/// <code>
183+
/// public MainWindowViewModel()
184+
/// {
185+
/// this.WindowWell.Add(DragDrop.DragEnter, e =>
186+
/// {
187+
/// // Event received.
188+
/// });
189+
/// });
190+
/// </code>
191+
/// </example>
141192
public static void Add<TEventArgs>(
142193
this Well well,
143194
#if AVALONIA || AVALONIA11
@@ -155,6 +206,17 @@ public static void Add<TEventArgs>(
155206
/// <param name="well">Well</param>
156207
/// <param name="routedEvent">RoutedEvent</param>
157208
/// <param name="action">Action delegate</param>
209+
/// <example>
210+
/// <code>
211+
/// public MainWindowViewModel()
212+
/// {
213+
/// this.WindowWell.Add(Window.Loaded, () =>
214+
/// {
215+
/// // Event received.
216+
/// });
217+
/// });
218+
/// </code>
219+
/// </example>
158220
public static void Add(
159221
this Well well,
160222
RoutedEvent routedEvent,

src/FSharp.Epoxy/Well.fs

+2-1
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ open Avalonia.Interactivity;
5252
#endif
5353

5454
/// <summary>
55-
/// The Well factory.
55+
/// The Well is used with Fountation, there will bind and can transfer .NET event signal.
5656
/// </summary>
57+
/// <remarks>See Fountain guide: https://github.com/kekyo/Epoxy#fountain</remarks>
5758
[<DebuggerStepThrough>]
5859
[<AutoOpen>]
5960
module public WellExtension =

0 commit comments

Comments
 (0)