net3000.common 10.0.1

dotnet add package net3000.common --version 10.0.1
                    
NuGet\Install-Package net3000.common -Version 10.0.1
                    
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="net3000.common" Version="10.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="net3000.common" Version="10.0.1" />
                    
Directory.Packages.props
<PackageReference Include="net3000.common" />
                    
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 net3000.common --version 10.0.1
                    
#r "nuget: net3000.common, 10.0.1"
                    
#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 net3000.common@10.0.1
                    
#: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=net3000.common&version=10.0.1
                    
Install as a Cake Addin
#tool nuget:?package=net3000.common&version=10.0.1
                    
Install as a Cake Tool

commonCore

Overview

The commonCore library is the foundational toolbox used by Net3000 applications. It includes configuration helpers, authentication utilities, messaging services, scheduling helpers, database abstractions, and numerous extensions shared across solutions. This README lists the public members available to consumers of the package.

Public API

<details> <summary>net3000.Msg</summary>

Member Summary Parameters
Msg Msg(string subject, MsgType type, int? account, string messageID, string messageDetails, Dictionary<string, string> appSetting) Msg. subject (string), type (MsgType), account (int?), messageID (string), messageDetails (string), appSetting (Dictionary<string, string>)

</details>

<details> <summary>net3000.accounts.dbContext.accountsDB</summary>

Member Summary Parameters
accountsDB accountsDB(DbContextOptions<accountsDB> options) Accounts DB. options (DbContextOptions<accountsDB>)

</details>

<details> <summary>net3000.accounts.dbContext.adminMenus</summary>

Member Summary Parameters
string toHtml(bool includeLinks) To Html. includeLinks (bool)

</details>

<details> <summary>net3000.accounts.dbContext.apiKey</summary>

Member Summary Parameters
string metaField(string fieldName) Meta Field. fieldName (string)

</details>

<details> <summary>net3000.accounts.dbContext.appMessage</summary>

Member Summary Parameters
string html() Html. None

</details>

<details> <summary>net3000.accounts.dbContext.applications</summary>

Member Summary Parameters
List<account> activeAccounts() Active Accounts. None
List<emailTemplate> emailList(int? account) Email List. account (int?)
List<account> inActiveAccounts() In Active Accounts. None
List<links> linkList(int? account) Link List. account (int?)
List<adminMenus> menuList(int? account) Menu List. account (int?)
List<appMessage> messageList(int? account) Message List. account (int?)
List<setting> settingList(int? account) Setting List. account (int?)

</details>

<details> <summary>net3000.accounts.dbContext.assetReferences</summary>

Member Summary Parameters
assetReferences assetReferences() Asset References. None

</details>

<details> <summary>net3000.accounts.dbContext.loginUser</summary>

Member Summary Parameters
loginUser loginUser() Login User. None
string metaField(string key) Meta Field. key (string)

</details>

<details> <summary>net3000.accounts.dbContext.ticket</summary>

Member Summary Parameters
ticket ticket() Ticket. None

</details>

<details> <summary>net3000.accounts.dbContext.tsk_tasks</summary>

Member Summary Parameters
tsk_tasks tsk_tasks() Tsk tasks. None

</details>

<details> <summary>net3000.accounts.dbContext.userNotification</summary>

Member Summary Parameters
userNotification userNotification() User Notification. None

</details>

<details> <summary>net3000.common.lib</summary>

Member Summary Parameters
string AutoGeneratePassword() Auto Generate Password. None
Task<bool> CheckCronJob(string code) Check Cron Job. code (string)
bool CheckCronJob(cronJob job) Check Cron Job. job (cronJob)
bool Checkquery(string qstring, queryExpected expecting, bool redirectme) Checkquery. qstring (string), expecting (queryExpected), redirectme (bool)
Task DeleteIfExists(string containerName, string fileName) Delete If Exists. containerName (string), fileName (string)
string DivTagFromQuery(string seedParameter) Div Tag From Query. seedParameter (string)
string ExtractShortCodes(string content) Extract Short Codes. content (string)
List<BlobItem> GetBlobs(string containerName, string pPrefix) Get Blobs. containerName (string), pPrefix (string)
List<string> GetBlobsList(string containerName, string pPrefix) Get Blobs List. containerName (string), pPrefix (string)
string GetFriendlyLink(string str) Get Friendly Link. str (string)
Task<string> GetMenuAsync() Get Menu Async. None
int PassQuery(string query, string dbName) Pass Query. query (string), dbName (string)
Task<int> PassQueryAsync(string query, string dbName) Pass Query Async. query (string), dbName (string)
Task RefreshToken(loginUser localUser) Refresh Token. localUser (loginUser)
bool ValidateEmail(string email) Validate Email. email (string)
apiResponse ValidatePasswordPolicy(string newPassword, int userid) Validate Password Policy. newPassword (string), userid (int)
bool ValidateURL(string url) Validate URL. url (string)
string accountFolder(bool physical) Account Folder. physical (bool)
string activeClass(string link, string activeClassName) Active Class. link (string), activeClassName (string)
Task<userNotification> addAccountNotificationAsync(int account, string title, string message, string link) Add Account Notification Async. account (int), title (string), message (string), link (string)
Task<userNotification> addAllNotificationAsync(string title, string message, string link) Add All Notification Async. title (string), message (string), link (string)
Task<userNotification> addGroupNotificationAsync(string groupId, string title, string message, string link) Add Group Notification Async. groupId (string), title (string), message (string), link (string)
Task<userNotification> addUserNotificationAsync(int userId, string title, string message, string link) Add User Notification Async. userId (int), title (string), message (string), link (string)
void addacivity(string message) Addacivity. message (string)
apiResponse apiAppMessage(string title, string appCode) Api App Message. title (string), appCode (string)
Task<apiResponse> apiAppMessageAsync(string title, string appCode) Api App Message Async. title (string), appCode (string)
string appSetting(string key) App Setting. key (string)
Dictionary<int, string> arrayToDictionary(string[] stringArray) Array To Dictionary. stringArray (string[])
apiResponse authorizeCode(string email, string code) Authorize Code. email (string), code (string)
Task<apiResponse> authorizeCodeAsync(string email, string code) Authorize Code Async. email (string), code (string)
Task<apiResponse> authorizeLink(string token, HttpContext myContext) Authorize Link. token (string), myContext (HttpContext)
apiResponse checkEmail(string email, string loginGroupID) Check Email. email (string), loginGroupID (string)
Task<apiResponse> checkEmailAsync(string email, string loginGroupID) Check Email Async. email (string), loginGroupID (string)
string cleanhtml(string content) Cleanhtml. content (string)
string connectionString(string dbName) Connection String. dbName (string)
string contentTypeHeader(string fileExt) Content Type Header. fileExt (string)
IEnumerable<countries> countries() Countries. None
Task<IEnumerable<countries>> countriesAsync() Countries Async. None
void creatAccountRowFile(int acc) Creat Account Row File. acc (int)
Task creatAccountRowFileAsync(int acc) Creat Account Row File Async. acc (int)
DataTable createTable(string tableName, string stringFields, string numericFields, string keyField) Create Table. tableName (string), stringFields (string), numericFields (string), keyField (string)
string decrypt(string data) Decrypt. data (string)
string decryptAES(string textValue, string myKey, string myIV) Decrypt AES. textValue (string), myKey (string), myIV (string)
string defaultcountry() Defaultcountry. None
string defaultprovince() Defaultprovince. None
string des(string str, int len, string suffix) Des. str (string), len (int), suffix (string)
string des2(string str, int len, string suffix) Des 2. str (string), len (int), suffix (string)
string downloadablefilesfolder() Downloadablefilesfolder. None
string encrypt(string data) Encrypt. data (string)
string encryptAES(string plainText, string myKey, string myIV) Encrypt AES. plainText (string), myKey (string), myIV (string)
string generateKey() Generate Key. None
account? getAccountByToken(string token) Get Account By Token. token (string)
Task<account?> getAccountByTokenAsync(string token) Get Account By Token Async. token (string)
account getAccountByURL(string url) Get Account By URL. url (string)
Task<account> getAccountByURLAsync(string url) Get Account By URL Async. url (string)
string getCookie(string name) Get Cookie. name (string)
string getCustomField(string title, Dictionary<string, string> myDictionary) Get Custom Field. title (string), myDictionary (Dictionary<string, string>)
string getCustomField(string title, string dictionary) Get Custom Field. title (string), dictionary (string)
Dictionary<string, string> getCustomFields(string value) Get Custom Fields. value (string)
float getDBNumber(string str, float def) Get DB Number. str (string), def (float)
DataView getData(string selectCommand, string dbName, string keyField) Get Data. selectCommand (string), dbName (string), keyField (string)
string? getHeader(string name) Get Header. name (string)
string getLink(string url, bool returnurl) Get Link. url (string), returnurl (bool)
string getLink(string pagePath, string queryString, bool returnurl, bool includedomain) Get Link. pagePath (string), queryString (string), returnurl (bool), includedomain (bool)
Task<string> getLinkAsync(string url, bool returnurl) Get Link Async. url (string), returnurl (bool)
Task<string> getLinkAsync(string pagePath, string queryString, bool returnurl, bool includedomain) Get Link Async. pagePath (string), queryString (string), returnurl (bool), includedomain (bool)
Dictionary<string, string> getParameters(string inputString, char separator, ') Get Parameters. inputString (string), separator (char), ' (value)
string getSetting(string settingTitle, string appCode) Get Setting. settingTitle (string), appCode (string)
Task<string> getSettingAsync(string settingTitle, string appCode) Get Setting Async. settingTitle (string), appCode (string)
int? getaccountID(int? id, string url) Getaccount ID. id (int?), url (string)
string getdbvalue(object str, string def) Getdbvalue. str (object), def (string)
string getdes(string str, int len) Getdes. str (string), len (int)
string getrnd(int codelength, bool numbersOnly) Getrnd. codelength (int), numbersOnly (bool)
DateTime googleDate(string stringDate) Google Date. stringDate (string)
string hashMe(string password, string mySalt) Hash Me. password (string), mySalt (string)
string htmlToText(string content) Html To Text. content (string)
DataTable importData(string path) Import Data. path (string)
DataSet initiateCustomFields() Initiate Custom Fields. None
int insertiden(string str, string dbname) Insertiden. str (string), dbname (string)
string languagefolder(string Culturestr) Languagefolder. Culturestr (string)
lib lib(int myAccount) Lib. myAccount (int)
Task<apiResponse> logMeIn(Dictionary<string, string> inputUser, HttpContext localContext) Log Me In. inputUser (Dictionary<string, string>), localContext (HttpContext)
Task<string> loginRedirect(HttpContext myContext) Login Redirect. myContext (HttpContext)
Task<string> loginRedirectAsync(HttpContext myContext) Login Redirect Async. myContext (HttpContext)
apiResponse loginResponse(loginUser login, HttpContext localContext) Login Response. login (loginUser), localContext (HttpContext)
string metaTagString(Dictionary<string, string> mytags) Meta Tag String. mytags (Dictionary<string, string>)
string mobilelink(string Str) Mobilelink. Str (string)
List<DateTime> monthCalendar(DateTime? month) Month Calendar. month (DateTime?)
loginUser myUser(ClaimsPrincipal myUser, bool getData, bool getAccount, bool admin) My User. myUser (ClaimsPrincipal), getData (bool), getAccount (bool), admin (bool)
loginUser myUser(HttpContext currentContext) My User. currentContext (HttpContext)
Task<loginUser> myUserAsync(ClaimsPrincipal myUser, bool getData, bool getAccount, bool admin) My User Async. myUser (ClaimsPrincipal), getData (bool), getAccount (bool), admin (bool)
Task<loginUser> myUserAsync(HttpContext currentContext) My User Async. currentContext (HttpContext)
string ordinalnumber(int? number) Ordinalnumber. number (int?)
string ordinalnumber(object number) Ordinalnumber. number (object)
Dictionary<string, string> parametersToDictionary() Parameters To Dictionary. None
bool passwordStrength(string password) Password Strength. password (string)
List<string> passwordStrengthCheck(string password) Password Strength Check. password (string)
string plural(object str, object count) Plural. str (object), count (object)
string plural(string str, int count) Plural. str (string), count (int)
void prepemsg(SmtpClient client, MailMessage emsg, string subject, string setting, string appCode, bool account) Prepemsg. client (SmtpClient), emsg (MailMessage), subject (string), setting (string), appCode (string), account (bool)
string prepmsg(string str, DataRow dr) Prepmsg. str (string), dr (DataRow)
Dictionary<string, string> propertiesToDictionary(object dynamiObject) Properties To Dictionary. dynamiObject (object)
bool propertyExists(dynamic obj, string propertyName) Property Exists. obj (dynamic), propertyName (string)
IEnumerable<provinces> provinces() Provinces. None
Task<IEnumerable<provinces>> provincesAsync() Provinces Async. None
string randomImage(string virtualPath) Random Image. virtualPath (string)
void removeLink(string pagePath, string pageQuery, bool nullAccount) Remove Link. pagePath (string), pageQuery (string), nullAccount (bool)
Task removeLinkAsync(string pagePath, string pageQuery, bool nullAccount) Remove Link Async. pagePath (string), pageQuery (string), nullAccount (bool)
string removePlaceHolders(string template) Remove Place Holders. template (string)
string removeStyle(string html, bool replaceDivwithP) Remove Style. html (string), replaceDivwithP (bool)
string replaceCustomFields(string setting, string CustomFields) Replace Custom Fields. setting (string), CustomFields (string)
string replacePlaceholders(string str, Dictionary<string, string> formData, List<string> currencyFields) Replace Placeholders. str (string), formData (Dictionary<string, string>), currencyFields (List<string>)
string rowstolistdv(DataView dvsource, string fieldname, string joinChar, ") Rowstolistdv. dvsource (DataView), fieldname (string), joinChar (string), " (value)
string rowstolistdv(DataTable dvsource, string fieldname, string joinChar, ") Rowstolistdv. dvsource (DataTable), fieldname (string), joinChar (string), " (value)
List<string> rowstolistofString(DataTable dvsource, string fieldname, string joinChar, ") Rowstolistof String. dvsource (DataTable), fieldname (string), joinChar (string), " (value)
List<string> rowstolistofString(DataView dvsource, string fieldname, string joinChar, ") Rowstolistof String. dvsource (DataView), fieldname (string), joinChar (string), " (value)
DateTime secondsToDate(int seconds) Seconds To Date. seconds (int)
string secureURL(string domain) Secure URL. domain (string)
apiResponse sendAuthorizationLink(string email, string template, string loginGroupID, loginUser user, string appCode) Send Authorization Link. email (string), template (string), loginGroupID (string), user (loginUser), appCode (string)
Task<apiResponse> sendAuthorizationLinkAsync(string email, string template, string loginGroupID, loginUser user, string appCode) Send Authorization Link Async. email (string), template (string), loginGroupID (string), user (loginUser), appCode (string)
void sendemails(string title, DataTable tbl) Sendemails. title (string), tbl (DataTable)
Task sendemailsAsync(string title, DataTable tbl) Sendemails Async. title (string), tbl (DataTable)
string serverMapPath(string myPath) Server Map Path. myPath (string)
void setCookie(string key, string value, bool rememberme) Set Cookie. key (string), value (string), rememberme (bool)
void setLink(links checkLink, bool nullAccount) Set Link. checkLink (links), nullAccount (bool)
Task setLinkAsync(links checkLink, bool nullAccount) Set Link Async. checkLink (links), nullAccount (bool)
string sqlstring(object fieldvalue) Sqlstring. fieldvalue (object)
string tabletocsv(DataTable tablename, string delimiter, ") Tabletocsv. tablename (DataTable), delimiter (string), " (value)
void thumbnail(string source, string destination, int? thumbWidth, int? thumbHeight, bool Transparent) Thumbnail. source (string), destination (string), thumbWidth (int?), thumbHeight (int?), Transparent (bool)
MemoryStream thumbnail(IFormFile sourceFile, int? thumbWidth, int? thumbHeight, bool Transparent) Thumbnail. sourceFile (IFormFile), thumbWidth (int?), thumbHeight (int?), Transparent (bool)
string tohtml(object ob) Tohtml. ob (object)
Task uploadToAccountBlob(int Account, string fileName, FileStream uploadFileStream) Upload To Account Blob. Account (int), fileName (string), uploadFileStream (FileStream)
Task uploadToAccountBlob(int Account, string fileName, Stream uploadFileStream) Upload To Account Blob. Account (int), fileName (string), uploadFileStream (Stream)
Task uploadToAccountBlob(int Account, string fileName, IFormFile uploadFile) Upload To Account Blob. Account (int), fileName (string), uploadFile (IFormFile)
Task uploadToblob(string containerName, string fileName, Stream uploadFileStream) Upload Toblob. containerName (string), fileName (string), uploadFileStream (Stream)
Task<apiResponse> validatePasswordPolicyAsync(string newPassword, int userid) Validate Password Policy Async. newPassword (string), userid (int)
apiResponse verifyMissingFields(List<string> fields, Dictionary<string, string> dictionary) Verify Missing Fields. fields (List<string>), dictionary (Dictionary<string, string>)
string webmaster() Webmaster. None

</details>

<details> <summary>net3000.content.dbContext.cm_banners</summary>

Member Summary Parameters
cm_banners cm_banners() Cm banners. None
string metaField(string key) Meta Field. key (string)

</details>

<details> <summary>net3000.content.dbContext.cm_categories</summary>

Member Summary Parameters
string metaField(string key) Meta Field. key (string)

</details>

<details> <summary>net3000.content.dbContext.cm_content</summary>

Member Summary Parameters
cm_content cm_content() Cm content. None
string metaField(string key) Meta Field. key (string)

</details>

<details> <summary>net3000.content.dbContext.cm_formSubs</summary>

Member Summary Parameters
cm_formSubs cm_formSubs() Cm form Subs. None
string dataField(string key) Data Field. key (string)

</details>

<details> <summary>net3000.content.dbContext.cm_forms</summary>

Member Summary Parameters
cm_forms cm_forms() Cm forms. None

</details>

<details> <summary>net3000.content.dbContext.cm_menuItems</summary>

Member Summary Parameters
cm_menuItems cm_menuItems() Cm menu Items. None

</details>

<details> <summary>net3000.content.dbContext.cm_menus</summary>

Member Summary Parameters
cm_menus cm_menus() Cm menus. None

</details>

<details> <summary>net3000.content.dbContext.contentDB</summary>

Member Summary Parameters
contentDB contentDB(DbContextOptions<contentDB> options) Content DB. options (DbContextOptions<contentDB>)

</details>

<details> <summary>net3000.emailMessage</summary>

Member Summary Parameters
Task SetEmailTemplateAsync(string value) Set Email Template Async. value (string)
void attachFiles(string[] files) Attach Files. files (string[])
void attachFiles(FileStream[] files) Attach Files. files (FileStream[])
emailMessage emailMessage() Email Message. None
emailMessage emailMessage(IConfiguration _configuration) Email Message. _configuration (IConfiguration)
emailMessage emailMessage(string _subject, string _settingTitle, string _appCode) Email Message. _subject (string), _settingTitle (string), _appCode (string)
void prepemsg() Prepemsg. None
void removePlaceHolders() Remove Place Holders. None
void send() Send. None
void sendAsync() Send Async. None
void setCredentials(string username, string password) Set Credentials. username (string), password (string)
void setCredentials() Set Credentials. None
void setTemplate(string value) Set Template. value (string)
void standardPlaceHolders() Standard Place Holders. None

</details>

<details> <summary>net3000.msgBox</summary>

Member Summary Parameters
Task SetMessageIDAsync(string value) Set Message ID Async. value (string)
string html() Html. None

</details>

<details> <summary>net3000.postForm</summary>

Member Summary Parameters
Dictionary<string, string> formDataToDictionary(NameValueCollection formData) Form Data To Dictionary. formData (NameValueCollection)
string getURL(string URL) Get URL. URL (string)
string getURL() Get URL. None
Task<string> getURLAsync() Get URL Async. None
string post() Post. None
Task<Stream> postMultiPart() Post Multi Part. None
Task<string> postRawAsync() Post Raw Async. None
Task<string> postUrlEncodedAsync() Post Url Encoded Async. None
string postform(string url, string strPost, string contenttype, SecurityProtocolType? protocol, CookieContainer CookieCont, Dictionary<string, string> headers) Postform. url (string), strPost (string), contenttype (string), protocol (SecurityProtocolType?), CookieCont (CookieContainer), headers (Dictionary<string, string>)

</details>

<details> <summary>net3000.scheduledTasksCore</summary>

Member Summary Parameters
string Get_StoppedCronJobstoAdmin() Get Stopped Cron Jobsto Admin. None
scheduledTasksCore scheduledTasksCore(IConfiguration _config, int account) Scheduled Tasks Core. _config (IConfiguration), account (int)

</details>

Usage Notes

  • The library expects configuration keys such as AppSettings:* and database contexts to be registered before invoking helpers like authentication or email services.
  • Many helpers expose async and sync variants; prefer the async overloads in ASP.NET Core apps to avoid blocking threads.
  • Review the scheduling and messaging sub-namespaces when integrating background tasks or email templates.

License

This library is proprietary to Net3000. Redistribution or use outside Net3000.ca solutions is not permitted.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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 (7)

Showing the top 5 NuGet packages that depend on net3000.common:

Package Downloads
apiConnectorCore

Package Description

net3000.google

Google API integration library for Net3000 solutions. Provides Google services integration including Analytics, Search Console, YouTube, Maps, and other Google APIs.

Net3000.PayPal

Package Description

Net3000.Almotawif

Travel and pilgrimage booking library for Net3000 solutions. Provides services for managing packages, categories, departures, reservations, supplier imports, marketing metadata, notifications, and integrations such as Facebook posting and Twilio SMS.

Net3000.Content

CMS tooling for Net3000 solutions. Provides form-processing workflows, content retrieval services, menu utilities, and video helpers that work together with the Net3000 content database.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.1 141 11/28/2025
10.0.0 111 11/28/2025
9.0.11 422 9/1/2025
9.0.10 186 8/31/2025
9.0.9 205 8/31/2025
9.0.8 133 7/29/2025
9.0.7 154 7/28/2025
9.0.6 204 7/15/2025
9.0.5 174 7/15/2025
9.0.4 183 7/15/2025
9.0.3 198 4/11/2025
9.0.2 511 3/25/2025
9.0.1 148 2/27/2025
9.0.0 136 2/27/2025
7.0.4 166 11/8/2024
7.0.3 196 7/15/2024
7.0.2 599 12/3/2023
7.0.1 504 11/30/2023
7.0.0 915 1/29/2023
5.0.0 1,022 12/25/2021
4.1.1 1,822 11/28/2021

Updated version with latest improvements and bug fixes