Skip to content

Commit e7c339f

Browse files
committed
Use <inheritdoc/> where needed
1 parent 3532fa1 commit e7c339f

File tree

8 files changed

+134
-334
lines changed

8 files changed

+134
-334
lines changed

Libraries/Opc.Ua.Configuration/ApplicationInstance.cs

Lines changed: 42 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -67,56 +67,39 @@ public ApplicationInstance(ApplicationConfiguration applicationConfiguration)
6767
#endregion
6868

6969
#region Public Properties
70-
/// <summary>
71-
/// Gets or sets the name of the application.
72-
/// </summary>
73-
/// <value>The name of the application.</value>
70+
71+
/// <inheritdoc/>
7472
public string ApplicationName
7573
{
7674
get { return m_applicationName; }
7775
set { m_applicationName = value; }
7876
}
7977

80-
/// <summary>
81-
/// Gets or sets the type of the application.
82-
/// </summary>
83-
/// <value>The type of the application.</value>
78+
/// <inheritdoc/>
8479
public ApplicationType ApplicationType
8580
{
8681
get { return m_applicationType; }
8782
set { m_applicationType = value; }
8883
}
8984

90-
/// <summary>
91-
/// Gets or sets the name of the config section containing the path to the application configuration file.
92-
/// </summary>
93-
/// <value>The name of the config section.</value>
85+
/// <inheritdoc/>
9486
public string ConfigSectionName
9587
{
9688
get { return m_configSectionName; }
9789
set { m_configSectionName = value; }
9890
}
9991

100-
/// <summary>
101-
/// Gets or sets the type of configuration file.
102-
/// </summary>
103-
/// <value>The type of configuration file.</value>
92+
/// <inheritdoc/>
10493
public Type ConfigurationType
10594
{
10695
get { return m_configurationType; }
10796
set { m_configurationType = value; }
10897
}
10998

110-
/// <summary>
111-
/// Gets the server.
112-
/// </summary>
113-
/// <value>The server.</value>
99+
/// <inheritdoc/>
114100
public IServerBase Server => m_server;
115101

116-
/// <summary>
117-
/// Gets the application configuration used when the Start() method was called.
118-
/// </summary>
119-
/// <value>The application configuration.</value>
102+
/// <inheritdoc/>
120103
public ApplicationConfiguration ApplicationConfiguration
121104
{
122105
get { return m_applicationConfiguration; }
@@ -128,51 +111,29 @@ public ApplicationConfiguration ApplicationConfiguration
128111
/// </summary>
129112
public static IApplicationMessageDlg MessageDlg { get; set; }
130113

131-
/// <summary>
132-
/// Get or set the certificate password provider.
133-
/// </summary>
114+
/// <inheritdoc/>
134115
public ICertificatePasswordProvider CertificatePasswordProvider { get; set; }
135116

136-
/// <summary>
137-
/// Get or set bool which indicates if the auto creation
138-
/// of a new application certificate during startup is disabled.
139-
/// Default is enabled./>
140-
/// </summary>
141-
/// <remarks>
142-
/// Prevents auto self signed cert creation in use cases
143-
/// where an expired certificate should not be automatically
144-
/// renewed or where it is required to only use certificates
145-
/// provided by the user.
146-
/// </remarks>
117+
/// <inheritdoc/>
147118
public bool DisableCertificateAutoCreation { get; set; }
148119
#endregion
149120

150121
#region Public Methods
151-
/// <summary>
152-
/// Processes the command line.
153-
/// </summary>
154-
/// <returns>
155-
/// True if the arguments were processed; False otherwise.
156-
/// </returns>
122+
123+
/// <inheritdoc/>
157124
public bool ProcessCommandLine()
158125
{
159126
// ignore processing of command line
160127
return false;
161128
}
162129

163-
/// <summary>
164-
/// Starts the UA server as a Windows Service.
165-
/// </summary>
166-
/// <param name="server">The server.</param>
130+
/// <inheritdoc/>
167131
public void StartAsService(IServerBase server)
168132
{
169133
throw new NotImplementedException(".NetStandard Opc.Ua libraries do not support to start as a windows service");
170134
}
171135

172-
/// <summary>
173-
/// Starts the UA server.
174-
/// </summary>
175-
/// <param name="server">The server.</param>
136+
/// <inheritdoc/>
176137
public async Task Start(IServerBase server)
177138
{
178139
m_server = server;
@@ -185,17 +146,13 @@ public async Task Start(IServerBase server)
185146
server.Start(m_applicationConfiguration);
186147
}
187148

188-
/// <summary>
189-
/// Stops the UA server.
190-
/// </summary>
149+
/// <inheritdoc/>
191150
public void Stop()
192151
{
193152
m_server.Stop();
194153
}
195154

196-
/// <summary>
197-
/// Loads the configuration.
198-
/// </summary>
155+
/// <inheritdoc/>
199156
public async Task<ApplicationConfiguration> LoadAppConfig(
200157
bool silent,
201158
string filePath,
@@ -244,9 +201,7 @@ public async Task<ApplicationConfiguration> LoadAppConfig(
244201
}
245202
}
246203

247-
/// <summary>
248-
/// Loads the configuration.
249-
/// </summary>
204+
/// <inheritdoc/>
250205
public async Task<ApplicationConfiguration> LoadAppConfig(
251206
bool silent,
252207
Stream stream,
@@ -295,9 +250,7 @@ public async Task<ApplicationConfiguration> LoadAppConfig(
295250
}
296251
}
297252

298-
/// <summary>
299-
/// Loads the application configuration.
300-
/// </summary>
253+
/// <inheritdoc/>
301254
public async Task<ApplicationConfiguration> LoadApplicationConfiguration(Stream stream, bool silent)
302255
{
303256
ApplicationConfiguration configuration = null;
@@ -322,9 +275,7 @@ public async Task<ApplicationConfiguration> LoadApplicationConfiguration(Stream
322275
return configuration;
323276
}
324277

325-
/// <summary>
326-
/// Loads the application configuration.
327-
/// </summary>
278+
/// <inheritdoc/>
328279
public async Task<ApplicationConfiguration> LoadApplicationConfiguration(string filePath, bool silent)
329280
{
330281
ApplicationConfiguration configuration = null;
@@ -349,9 +300,7 @@ public async Task<ApplicationConfiguration> LoadApplicationConfiguration(string
349300
return configuration;
350301
}
351302

352-
/// <summary>
353-
/// Loads the application configuration.
354-
/// </summary>
303+
/// <inheritdoc/>
355304
public async Task<ApplicationConfiguration> LoadApplicationConfiguration(bool silent)
356305
{
357306
string filePath = ApplicationConfiguration.GetFilePathFromAppConfig(ConfigSectionName);
@@ -380,9 +329,7 @@ public static ApplicationConfiguration FixupAppConfig(
380329
return configuration;
381330
}
382331

383-
/// <summary>
384-
/// Create a builder for a UA application configuration.
385-
/// </summary>
332+
/// <inheritdoc/>
386333
public IApplicationConfigurationBuilderTypes Build(
387334
string applicationUri,
388335
string productUri
@@ -406,11 +353,7 @@ string productUri
406353
return new ApplicationConfigurationBuilder(this);
407354
}
408355

409-
/// <summary>
410-
/// Checks for a valid application instance certificate.
411-
/// </summary>
412-
/// <param name="silent">if set to <c>true</c> no dialogs will be displayed.</param>
413-
/// <param name="minimumKeySize">Minimum size of the key.</param>
356+
/// <inheritdoc/>
414357
[Obsolete("This method is obsolete since an application now supports different minKey sizes depending on certificate type")]
415358
public Task<bool> CheckApplicationInstanceCertificate(
416359
bool silent,
@@ -419,36 +362,14 @@ public Task<bool> CheckApplicationInstanceCertificate(
419362
return CheckApplicationInstanceCertificate(silent, minimumKeySize, CertificateFactory.DefaultLifeTime);
420363
}
421364

422-
/// <summary>
423-
/// Checks for a valid application instance certificate.
424-
/// </summary>
425-
/// <param name="silent">if set to <c>true</c> no dialogs will be displayed.</param>
365+
/// <inheritdoc/>
426366
public async Task<bool> CheckApplicationInstanceCertificates(
427367
bool silent)
428368
{
429369
return await CheckApplicationInstanceCertificates(silent, CertificateFactory.DefaultLifeTime).ConfigureAwait(false);
430370
}
431371

432-
/// <summary>
433-
/// Deletes all application certificates.
434-
/// </summary>
435-
public async Task DeleteApplicationInstanceCertificate(string[] profileIds = null, CancellationToken ct = default)
436-
{
437-
// TODO: delete only selected profiles
438-
if (m_applicationConfiguration == null) throw new ArgumentException("Missing configuration.");
439-
foreach (var id in m_applicationConfiguration.SecurityConfiguration.ApplicationCertificates)
440-
{
441-
await DeleteApplicationInstanceCertificateAsync(m_applicationConfiguration, id, ct).ConfigureAwait(false);
442-
}
443-
}
444-
445-
/// <summary>
446-
/// Checks for a valid application instance certificate.
447-
/// </summary>
448-
/// <param name="silent">if set to <c>true</c> no dialogs will be displayed.</param>
449-
/// <param name="minimumKeySize">Minimum size of the key.</param>
450-
/// <param name="lifeTimeInMonths">The lifetime in months.</param>
451-
/// <param name="ct"></param>
372+
/// <inheritdoc/>
452373
[Obsolete("This method is obsolete since an application now supports different minKey sizes depending on certificate type")]
453374
public async Task<bool> CheckApplicationInstanceCertificate(
454375
bool silent,
@@ -459,12 +380,7 @@ public async Task<bool> CheckApplicationInstanceCertificate(
459380
return await CheckApplicationInstanceCertificates(silent, lifeTimeInMonths, ct).ConfigureAwait(false);
460381
}
461382

462-
/// <summary>
463-
/// Checks for a valid application instance certificate.
464-
/// </summary>
465-
/// <param name="silent">if set to <c>true</c> no dialogs will be displayed.</param>
466-
/// <param name="lifeTimeInMonths">The lifetime in months.</param>
467-
/// <param name="ct"></param>
383+
/// <inheritdoc/>
468384
public async Task<bool> CheckApplicationInstanceCertificates(
469385
bool silent,
470386
ushort lifeTimeInMonths,
@@ -495,6 +411,24 @@ public async Task<bool> CheckApplicationInstanceCertificates(
495411

496412
return result;
497413
}
414+
415+
/// <inheritdoc/>
416+
public async Task DeleteApplicationInstanceCertificate(string[] profileIds = null, CancellationToken ct = default)
417+
{
418+
// TODO: delete only selected profiles
419+
if (m_applicationConfiguration == null) throw new ArgumentException("Missing configuration.");
420+
foreach (var id in m_applicationConfiguration.SecurityConfiguration.ApplicationCertificates)
421+
{
422+
await DeleteApplicationInstanceCertificateAsync(m_applicationConfiguration, id, ct).ConfigureAwait(false);
423+
}
424+
}
425+
426+
/// <inheritdoc/>
427+
public async Task AddOwnCertificateToTrustedStoreAsync(X509Certificate2 certificate, CancellationToken ct)
428+
{
429+
await AddToTrustedStoreAsync(m_applicationConfiguration, certificate, ct).ConfigureAwait(false);
430+
}
431+
498432
#endregion
499433

500434
#region Private Methods
@@ -631,17 +565,6 @@ private async Task<bool> CheckCertificateTypeAsync(
631565
return true;
632566
}
633567

634-
/// <summary>
635-
/// Adds a Certificate to the Trusted Store of the Application, needed e.g. for the GDS to trust it´s own CA
636-
/// </summary>
637-
/// <param name="certificate">The certificate to add to the store</param>
638-
/// <param name="ct">The cancellation token</param>
639-
/// <returns></returns>
640-
public async Task AddOwnCertificateToTrustedStoreAsync(X509Certificate2 certificate, CancellationToken ct)
641-
{
642-
await AddToTrustedStoreAsync(m_applicationConfiguration, certificate, ct).ConfigureAwait(false);
643-
}
644-
645568
/// <summary>
646569
/// Helper to suppress errors which are allowed for the application certificate validation.
647570
/// </summary>

Libraries/Opc.Ua.Configuration/IApplicationInstance.cs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -169,30 +169,32 @@ string productUri
169169
/// </summary>
170170
/// <param name="silent">if set to <c>true</c> no dialogs will be displayed.</param>
171171
/// <param name="minimumKeySize">Minimum size of the key.</param>
172+
[Obsolete("This method is obsolete since an application now supports different minKey sizes depending on certificate type")]
172173
Task<bool> CheckApplicationInstanceCertificate(
173174
bool silent,
174175
ushort minimumKeySize);
175176

177+
/// <summary>
178+
/// Checks for a valid application instance certificate.
179+
/// </summary>
180+
/// <param name="silent">if set to <c>true</c> no dialogs will be displayed.</param>
181+
Task<bool> CheckApplicationInstanceCertificates(
182+
bool silent);
183+
176184
/// <summary>
177185
/// Checks for a valid application instance certificate.
178186
/// </summary>
179187
/// <param name="silent">if set to <c>true</c> no dialogs will be displayed.</param>
180188
/// <param name="minimumKeySize">Minimum size of the key.</param>
181189
/// <param name="lifeTimeInMonths">The lifetime in months.</param>
182190
/// <param name="ct"></param>
191+
[Obsolete("This method is obsolete since an application now supports different minKey sizes depending on certificate type")]
183192
Task<bool> CheckApplicationInstanceCertificate(
184193
bool silent,
185194
ushort minimumKeySize,
186195
ushort lifeTimeInMonths,
187196
CancellationToken ct = default);
188197

189-
/// <summary>
190-
/// Checks for a valid application instance certificate.
191-
/// </summary>
192-
/// <param name="silent">if set to <c>true</c> no dialogs will be displayed.</param>
193-
Task<bool> CheckApplicationInstanceCertificates(
194-
bool silent);
195-
196198
/// <summary>
197199
/// Checks for a valid application instance certificate.
198200
/// </summary>

Libraries/Opc.Ua.Server/Diagnostics/CustomNodeManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1902,7 +1902,7 @@ public virtual void Write(
19021902

19031903
if (Server?.Auditing == true)
19041904
{
1905-
//current server supports auditing
1905+
//current server supports auditing
19061906
oldValue = new DataValue();
19071907
// read the old value for the purpose of auditing
19081908
handle.Node.ReadAttribute(systemContext, nodeToWrite.AttributeId, nodeToWrite.ParsedIndexRange, null, oldValue);
@@ -1915,7 +1915,7 @@ public virtual void Write(
19151915
nodeToWrite.ParsedIndexRange,
19161916
nodeToWrite.Value);
19171917

1918-
// report the write value audit event
1918+
// report the write value audit event
19191919
Server.ReportAuditWriteUpdateEvent(systemContext, nodeToWrite, oldValue?.Value, errors[ii]?.StatusCode ?? StatusCodes.Good);
19201920

19211921
if (!ServiceResult.IsGood(errors[ii]))

0 commit comments

Comments
 (0)