This repository has been archived by the owner on Aug 4, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
Analogy.Implementation.KafkaProvider/DownloadInformation.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Diagnostics; | ||
using System.Linq; | ||
using System.Reflection; | ||
using System.Runtime.Versioning; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Analogy.LogViewer.Template; | ||
|
||
namespace Analogy.LogViewer.KafkaProvider | ||
{ | ||
public class DownloadInformation : Analogy.LogViewer.Template.AnalogyDownloadInformation | ||
{ | ||
protected override string RepositoryURL { get; set; } = "https://api.github.com/repos/Analogy-LogViewer/Analogy.LogViewer.KafkaProvider"; | ||
public override TargetFrameworkAttribute CurrentFrameworkAttribute { get; set; } = (TargetFrameworkAttribute)Assembly.GetExecutingAssembly().GetCustomAttribute(typeof(TargetFrameworkAttribute)); | ||
|
||
public override Guid FactoryId { get; set; } = AnalogyKafkaFactory.Id; | ||
public override string Name { get; set; } = "Kafka Data Provider"; | ||
|
||
private string? _installedVersionNumber; | ||
public override string InstalledVersionNumber | ||
{ | ||
get | ||
{ | ||
if (_installedVersionNumber != null) | ||
{ | ||
return _installedVersionNumber; | ||
} | ||
Assembly assembly = Assembly.GetExecutingAssembly(); | ||
FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(assembly.Location); | ||
_installedVersionNumber = fvi.FileVersion; | ||
return _installedVersionNumber; | ||
} | ||
} | ||
} | ||
} |