NotifyCommuniNet 1.0.2
dotnet add package NotifyCommuniNet --version 1.0.2
NuGet\Install-Package NotifyCommuniNet -Version 1.0.2
<PackageReference Include="NotifyCommuniNet" Version="1.0.2" />
<PackageVersion Include="NotifyCommuniNet" Version="1.0.2" />
<PackageReference Include="NotifyCommuniNet" />
paket add NotifyCommuniNet --version 1.0.2
#r "nuget: NotifyCommuniNet, 1.0.2"
#:package NotifyCommuniNet@1.0.2
#addin nuget:?package=NotifyCommuniNet&version=1.0.2
#tool nuget:?package=NotifyCommuniNet&version=1.0.2
Required system dependencies: 1. net6.0 2. Microsoft.Extensions.Configuration (>= 8.0.0) 3. Microsoft.Extensions.Configuration.Json (>= 8.0.0) 4. Newtonsoft.Json (>= 13.0.3)
Required steps: should have appsettings.json file with below keys and value(all are mandatory). //Below keys are mandatory. "NStarXNotificationLogFile": "C:\NStarXNotificationLog\NotificationLogs.txt", "NStarXNotificationFolder": "C:\NStarXNotificationLog", "WebhookURL": "https://healthstream.webhook.office.com/webhookb2/c70e7caf-91a67-492a-bc07-b6d4540ae4c6@be1b4fd9-5fce-4f73-b3dd-3005f9e18ec7/IncomingWebhook/317d3034f56d49d59c6a20ae4ca9e70d/c3f31b9d-84d7-40ce-aab9-643d6ae66415", "Summary": "Defalut summary", "SenderEmail": "nstarxinc@xxxx.com", "Password": "gpirkxdtpiejxxzkk", "RecipientEmail": "rb@xxxx.com", "Subject": "Your Subject comes here", "Client": "smtp.gmail.com", "Port": 587 ================================= OR ================================== Bind properies to below model's as required. 1. For Teams chat notification TeamsNotification.TeamsNotificationModel teamsNotificationModel = new(); 2. For Email notification EmailNotification.EmailNotificationModel emailNotificationModel = new();
Consume method: bool teamsNotificationResult = await TeamsNotification.TeamsNotificationAsync(teamsNotificationModel); bool emailNotificationResult = await EmailNotification.EmailNotificationAsync(emailNotificationModel);
Sample Code: public static string commonLogFile; public static string NStarXNotificationFolder; public static TeamsNotification.TeamsNotificationModel teamsNotificationModel = new(); public static EmailNotification.EmailNotificationModel emailNotificationModel = new(); public static async Task Main(string[] args) { IConfigurationRoot config = new ConfigurationBuilder() .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true) .Build();
NStarXNotificationFolder = config["NStarXNotificationFolder"];
Directory.CreateDirectory(NStarXNotificationFolder);
TeamsNotification.TeamsNotificationModel teamsNotificationModel = new()
{
WebhookURL = config["WebhookURL"],
Summary = config["Summary"],
Message = "Replace with your Message or bind value to this property"
};
var t = await TeamsNotification.TeamsNotificationAsync(teamsNotificationModel);
TeamsNotification.TeamsNotificationModel emailNotificationModel = new()
{
emailNotificationModel.SenderEmail = config["SenderEmail"];
emailNotificationModel.Password = config["Password"];
emailNotificationModel.RecipientEmail = config["RecipientEmail"];
emailNotificationModel.Subject = config["Subject"];
emailNotificationModel.Client = config["Client"];
emailNotificationModel.Port = Convert.ToInt16(config["Port"]);
emailNotificationModel.Message = "Email body comes here!";
}
var t1 = await EmailNotification.EmailNotificationAsync(emailNotificationModel);
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net6.0
- Microsoft.Extensions.Configuration (>= 8.0.0)
- Microsoft.Extensions.Configuration.Json (>= 8.0.0)
- Newtonsoft.Json (>= 13.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.