You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/i18n/en/docusaurus-plugin-content-docs/current/doc/GeneralUpdate.Core.md
+19-39Lines changed: 19 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -175,7 +175,7 @@ public GeneralUpdateBootstrap SetSource(
175
175
string?token=null)
176
176
```
177
177
178
-
`SetSource` is a lightweight entry point when identity metadata is discovered elsewhere, such as from `generalupdate.manifest.json`. When you need precise control over every manifest identity field, prefer `ManifestInfo.Load().ToUpdateRequest()` followed by `SetConfig(request)`.
178
+
`SetSource` is a lightweight entry point when identity metadata is provided by `generalupdate.manifest.json`, leaving only the server endpoint and secret in application code.
179
179
180
180
```csharp
181
181
awaitnewGeneralUpdateBootstrap()
@@ -336,65 +336,45 @@ The `GeneralUpdate.Tools` configuration flow parses the main-app and updater `.c
336
336
337
337
The sample publishing flow in the configuration UI also calls `SamplePublisherService.PublishAsync(...)` to place the main-app output, updater output, and manifest into one runnable sample directory. New users therefore do not need to hand-write a complete `UpdateRequest`: they can generate the manifest with Tools and only add server endpoints and secrets in application code.
338
338
339
-
### How Core reads the manifest
339
+
### Using the manifest with the bootstrap
340
340
341
-
Core provides `ManifestInfo`:
341
+
With the manifest in place, application code does not need to care about identity fields such as `MainAppName`, `ClientVersion`, `UpdateAppName`, `UpgradeClientVersion`, `ProductId`, or `UpdatePath`, and it does not need to load `generalupdate.manifest.json` manually. The bootstrap reads `InstallPath/generalupdate.manifest.json` internally during the update workflow and carries that identity metadata into version checking, downloading, updater launch, and version write-back.
342
342
343
-
```csharp
344
-
usingGeneralUpdate.Core.Configuration;
345
-
346
-
varmanifest=ManifestInfo.Load();
347
-
if (manifest==null)
348
-
thrownewFileNotFoundException("generalupdate.manifest.json was not found.");
`ManifestInfo.Load()` reads from `AppDomain.CurrentDomain.BaseDirectory` by default. `ManifestInfo.Load(path)` reads a specific file. `ToUpdateRequest()` converts the manifest into a minimal `UpdateRequest`, but it does not populate server URLs or secrets.
363
-
364
-
At the beginning of the standard workflow, `ClientStrategy` also calls `AppMetadataDiscoverer.Discover(context)` and fills empty identity fields from `InstallPath/generalupdate.manifest.json`. The precedence rule matters: **values already provided in code win; the manifest only fills empty fields**. This lets you use the manifest as the default identity source while still overriding individual fields in special environments.
365
-
366
-
### Recommended configuration pattern
367
-
368
-
For application code, the clearest pattern is "manifest for identity, code/environment for server and secrets".
355
+
If the actual install directory is not the current process base directory, provide `InstallPath` through `UpdateRequest` while still keeping manifest identity fields out of code:
0 commit comments