Skip to content
This repository was archived by the owner on Dec 22, 2019. It is now read-only.

Commit ca1aeb8

Browse files
committed
Extra comments
1 parent d995d25 commit ca1aeb8

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

UpdateLib/UpdateLib/Updater.cs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,11 @@ public TimeSpan CacheInvalidationTime
185185
set { m_cacheInvalidation = value; }
186186
}
187187

188+
/// <summary>
189+
/// Gets or sets if the updater needs to launch as a new instance.
190+
/// <c>True</c> if you want cold-swapping, <c>False</c> if you want hot-swapping
191+
/// </summary>
192+
/// <remarks>Hot-swapping might cause issues if the files are still in use.</remarks>
188193
public bool NeedsRestartBeforeUpdate { get; set; } = true;
189194

190195
/// <summary>
@@ -209,20 +214,36 @@ public Updater ConfigureUnsafeConnections(bool allow)
209214
return this;
210215
}
211216

217+
/// <summary>
218+
/// Configures the logger
219+
/// </summary>
220+
/// <param name="logAction">Action to perform on the logger</param>
221+
/// <returns><see cref="Updater"/> </returns>
212222
public Updater ConfigureLogger(Action<ILogger> logAction)
213223
{
214224
logAction(Logger);
215225

216226
return this;
217227
}
218228

229+
/// <summary>
230+
/// Configures if the updater needs a restart before updating
231+
/// </summary>
232+
/// <remarks>Disabling this feature will allow for hot-swapping of the files. </remarks>
233+
/// <param name="needsRestartBeforeUpdate">Restart updater in new instance</param>
234+
/// <returns><see cref="Updater"/> </returns>
219235
public Updater ConfigureNeedsRestartBeforeUpdate(bool needsRestartBeforeUpdate)
220236
{
221237
NeedsRestartBeforeUpdate = needsRestartBeforeUpdate;
222238

223239
return this;
224240
}
225241

242+
/// <summary>
243+
/// Configures the time till the cache becomes invalid
244+
/// </summary>
245+
/// <param name="timeTillInvalidation">Specify the validity time</param>
246+
/// <returns><see cref="Updater"/> </returns>
226247
public Updater ConfigureCacheInvalidation(TimeSpan timeTillInvalidation)
227248
{
228249
CacheInvalidationTime = timeTillInvalidation;

0 commit comments

Comments
 (0)