Conversation
|
|
| } | ||
| } | ||
| if (!assetIds.IsNullOrEmpty()) |
Check warning
Code scanning / CodeQL
Dereferenced variable may be null
| if (aas != null) | ||
| { | ||
| if (aas.AssetInformation != null) | ||
| { | ||
| if (aas.AssetInformation.DefaultThumbnail != null && !string.IsNullOrEmpty(aas.AssetInformation.DefaultThumbnail.Path)) | ||
| { | ||
| _packageEnvService.DeleteAssetInformationThumbnail(packageIndex, aas.AssetInformation.DefaultThumbnail); | ||
| } | ||
| else | ||
| { | ||
| throw new NotFoundException($"No default thumbnail embedded in the AssetInformation of the requested AAS."); | ||
| } | ||
| } | ||
| } |
Check notice
Code scanning / CodeQL
Nested 'if' statements can be combined
| foreach (var submodelReference in aas.Submodels) | ||
| { | ||
| if (submodelReference.Matches(body)) | ||
| { | ||
| found = true; | ||
| break; | ||
| } | ||
| } |
Check notice
Code scanning / CodeQL
Missed opportunity to use Where
| foreach (var submodelReference in aas.Submodels) | ||
| { | ||
| if (submodelReference.GetAsExactlyOneKey().Value.Equals(submodelIdentifier)) | ||
| { return true; } | ||
| } |
Check notice
Code scanning / CodeQL
Missed opportunity to use Where
| private readonly IAdminShellPackageEnvironmentService _packageEnvService; | ||
| private readonly IMetamodelVerificationService _verificationService; | ||
| private readonly ISubmodelService _submodelService; | ||
| private AdminShellPackageEnv[] _packages; |
Check notice
Code scanning / CodeQL
Missed 'readonly' opportunity
Added a neutral copyright to .cs, .ps1 and .razor files.
Added a neutral copyright to .bat files (experimental).