Skip to content

Commit 0277ce5

Browse files
committed
Renames VelopackApp hook methods
Renames "With[HookName]" methods in VelopackApp to "On[HookName]" for consistency and improved readability. This change affects methods related to fast callback hooks such as OnFirstRun, OnAfterInstallFastCallback, etc.
1 parent 5d9f7f0 commit 0277ce5

File tree

12 files changed

+19
-19
lines changed

12 files changed

+19
-19
lines changed

docs/getting-started/csharp.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Get started with .NET 5+ (cross-platform) or .NET Framework.
7171
{
7272
// It's important to Run() the VelopackApp as early as possible in app startup.
7373
VelopackApp.Build()
74-
.WithFirstRun((v) => { /* Your first run code here */ })
74+
.OnFirstRun((v) => { /* Your first run code here */ })
7575
.Run();
7676
this.InitializeComponent();
7777
}

docs/integrating/overview.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ static void Main(string[] args)
3030
{
3131
ILogger log = CreateLogger();
3232
VelopackApp.Build()
33-
.WithBeforeUninstallFastCallback((v) => {
33+
.OnBeforeUninstallFastCallback((v) => {
3434
// delete / clean up some files before uninstallation
3535
})
36-
.WithFirstRun((v) => {
36+
.OnFirstRun((v) => {
3737
MessageBox.Show("Thanks for installing my application!");
3838
})
3939
.Run(log);

docs/integrating/shortcuts.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ using Velopack;
2525
using Velopack.Windows;
2626

2727
VelopackApp.Build()
28-
.WithAfterInstallFastCallback((v) => new Shortcuts().CreateShortcutForThisExe(ShortcutLocation.Desktop))
28+
.OnAfterInstallFastCallback((v) => new Shortcuts().CreateShortcutForThisExe(ShortcutLocation.Desktop))
2929
.Run()
3030
```

docs/migrating/clickonce.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ We will need to start by publishing your first Velopack release.
2323
0. Once `ClickOnceUninstaller` is added to your project, we can add a Velopack hook which uninstalls your clickonce app. You should already have `VelopackApp` in your main method at this point, and you'll need to modify it so that we add the clickonce uninstall code on Velopack install:
2424
```cs
2525
VelopackApp.Build()
26-
.WithAfterInstallFastCallback((appVersion) =>
26+
.OnAfterInstallFastCallback((appVersion) =>
2727
{
2828
var uninstallInfo = UninstallInfo.Find("Application Name");
2929
if (uninstallInfo != null)

docs/migrating/squirrel.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Here are the general steps needed:
4949
// Thank the user for installing the app on first run.
5050
// Note that the MessageBox class below comes from WinForms or WPF.
5151
VelopackApp.Build()
52-
.WithFirstRun(v => MessageBox.Show("Thanks for installing my application!"))
52+
.OnFirstRun(v => MessageBox.Show("Thanks for installing my application!"))
5353
.Run();
5454
}
5555
```

docs/reference/cs/Velopack/VelopackApp/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public sealed class VelopackApp
3737
| [WithAfterUpdateFastCallback(VelopackHook)](methods/WithAfterUpdateFastCallback.md) | WARNING: FastCallback hooks are run during critical stages of Velopack operations. Your code will be run and then Exit(int) will be called. If your code has not completed within 15 seconds, it will be terminated. Only supported on windows; On other operating systems, this will never be called. |
3838
| [WithBeforeUninstallFastCallback(VelopackHook)](methods/WithBeforeUninstallFastCallback.md) | WARNING: FastCallback hooks are run during critical stages of Velopack operations. Your code will be run and then Exit(int) will be called. If your code has not completed within 30 seconds, it will be terminated. Only supported on windows; On other operating systems, this will never be called. |
3939
| [WithBeforeUpdateFastCallback(VelopackHook)](methods/WithBeforeUpdateFastCallback.md) | WARNING: FastCallback hooks are run during critical stages of Velopack operations. Your code will be run and then Exit(int) will be called. If your code has not completed within 15 seconds, it will be terminated. Only supported on windows; On other operating systems, this will never be called. |
40-
| [WithFirstRun(VelopackHook)](methods/WithFirstRun.md) | This hook is triggered when the application is started for the first time after installation. |
40+
| [OnFirstRun(VelopackHook)](methods/OnFirstRun.md) | This hook is triggered when the application is started for the first time after installation. |
4141
| [WithRestarted(VelopackHook)](methods/WithRestarted.md) | This hook is triggered when the application is restarted by Velopack after installing updates. |
4242

4343
___

docs/reference/cs/Velopack/VelopackApp/methods/WithAfterInstallFastCallback.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</auto-generated>
66
-->
77

8-
# VelopackApp.WithAfterInstallFastCallback Method
8+
# VelopackApp.OnAfterInstallFastCallback Method
99

1010
**Declaring Type:** [VelopackApp](../index.md)
1111
**Namespace:** [Velopack](../../index.md)
@@ -15,7 +15,7 @@
1515
WARNING: FastCallback hooks are run during critical stages of Velopack operations. Your code will be run and then Exit(int) will be called. If your code has not completed within 30 seconds, it will be terminated. Only supported on windows; On other operating systems, this will never be called.
1616

1717
```csharp
18-
public VelopackApp WithAfterInstallFastCallback(VelopackHook hook);
18+
public VelopackApp OnAfterInstallFastCallback(VelopackHook hook);
1919
```
2020

2121
## Parameters

docs/reference/cs/Velopack/VelopackApp/methods/WithAfterUpdateFastCallback.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</auto-generated>
66
-->
77

8-
# VelopackApp.WithAfterUpdateFastCallback Method
8+
# VelopackApp.OnAfterUpdateFastCallback Method
99

1010
**Declaring Type:** [VelopackApp](../index.md)
1111
**Namespace:** [Velopack](../../index.md)
@@ -15,7 +15,7 @@
1515
WARNING: FastCallback hooks are run during critical stages of Velopack operations. Your code will be run and then Exit(int) will be called. If your code has not completed within 15 seconds, it will be terminated. Only supported on windows; On other operating systems, this will never be called.
1616

1717
```csharp
18-
public VelopackApp WithAfterUpdateFastCallback(VelopackHook hook);
18+
public VelopackApp OnAfterUpdateFastCallback(VelopackHook hook);
1919
```
2020

2121
## Parameters

docs/reference/cs/Velopack/VelopackApp/methods/WithBeforeUninstallFastCallback.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</auto-generated>
66
-->
77

8-
# VelopackApp.WithBeforeUninstallFastCallback Method
8+
# VelopackApp.OnBeforeUninstallFastCallback Method
99

1010
**Declaring Type:** [VelopackApp](../index.md)
1111
**Namespace:** [Velopack](../../index.md)
@@ -15,7 +15,7 @@
1515
WARNING: FastCallback hooks are run during critical stages of Velopack operations. Your code will be run and then Exit(int) will be called. If your code has not completed within 30 seconds, it will be terminated. Only supported on windows; On other operating systems, this will never be called.
1616

1717
```csharp
18-
public VelopackApp WithBeforeUninstallFastCallback(VelopackHook hook);
18+
public VelopackApp OnBeforeUninstallFastCallback(VelopackHook hook);
1919
```
2020

2121
## Parameters

docs/reference/cs/Velopack/VelopackApp/methods/WithBeforeUpdateFastCallback.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</auto-generated>
66
-->
77

8-
# VelopackApp.WithBeforeUpdateFastCallback Method
8+
# VelopackApp.OnBeforeUpdateFastCallback Method
99

1010
**Declaring Type:** [VelopackApp](../index.md)
1111
**Namespace:** [Velopack](../../index.md)
@@ -15,7 +15,7 @@
1515
WARNING: FastCallback hooks are run during critical stages of Velopack operations. Your code will be run and then Exit(int) will be called. If your code has not completed within 15 seconds, it will be terminated. Only supported on windows; On other operating systems, this will never be called.
1616

1717
```csharp
18-
public VelopackApp WithBeforeUpdateFastCallback(VelopackHook hook);
18+
public VelopackApp OnBeforeUpdateFastCallback(VelopackHook hook);
1919
```
2020

2121
## Parameters

0 commit comments

Comments
 (0)