NotifyCommuniNet 1.0.2

dotnet add package NotifyCommuniNet --version 1.0.2
                    
NuGet\Install-Package NotifyCommuniNet -Version 1.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NotifyCommuniNet" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NotifyCommuniNet" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="NotifyCommuniNet" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add NotifyCommuniNet --version 1.0.2
                    
#r "nuget: NotifyCommuniNet, 1.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package NotifyCommuniNet@1.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=NotifyCommuniNet&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=NotifyCommuniNet&version=1.0.2
                    
Install as a Cake Tool

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.2 265 12/28/2023
1.0.1 188 12/28/2023
1.0.0 191 12/28/2023