inovationware.code 3.8.9

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

Code Repertoire

Code Repertoire is multi-purpose for everyday use in .Net. Following are usage examples.


SequelOrm

Lightweight ORM.

  • SqlServer is currently the only supported database provider; this implementation was tested on it.
  • Support for PostgreSql and MySql, as well as Logging and Transaction Isolation Levels, are actively WIP.
  • Parent-to-child foreign key convention is {ParentTypeName}_{idColumn} (e.g. Person {Id, Name, List(Of Phone)} ⇒ Phone {Id, Person_Id, PhoneNumber}).
  • Supports 1 : many (e.g. 1 Person can have many Phones); the rest are actively WIP and may not work as expected if implemented in this version.
  • Direct support for Enum types is actively WIP; workaround is to explicitly use Integer instead of the enum property (or string or an appropriate type, if not using the numeric/ordinal value), for instance, if your class contains an enum of AccountType, use public int Account { get; set; } not public AccountType Account { get; set; } (in VB: Public Property Account As Integer, not Public Property Account As AccountType)
  • Picks up non read-only properties only, and ignores RowVersion property if it doesnt exist.
  • Finally, you may need to install appropriate Sql Clients or Providers from nuget.org, e.g. System.Data.SqlClient.

C#:

using iNovation.Code;

// prerequisites
SupportedDbProvider provider = SupportedDbProvider.SqlServer; // others are WIP
string connectionString = "my connection string";

// the sync version
IOrm orm = SequelOrm.GetInstance(provider, connectionString);

// create a Person object
List<Phone> amyPhoneNumbers = new List<Phone> { new Phone { PhoneNumber = "01 001 AMY" } };
Person amy = new Person { Name = "Amy", Phones = amyPhoneNumbers };

// create a Person record
Person created = orm.Create<Person>(amy);

// find records of Person by sepcified conditions - the paged version
Condition condition = new Condition { Column = "PhoneNumber", SqlComparison = SqlComparisonOperator.SqlEquals, Value = "01 001 AMY" };
Page<Person> sought = orm.FindByPaged<Person>(new List<Condition> { condition }, 1, 10);
// retrieve the results by
List<Person> found = sought.Records;


// for the async version
IOrmAsync ormAsync = SequelOrmAsync.GetInstance(provider, connectionString);

// just call the async version of the methods, e.g.
Person createdByAsync = await ormAsync.CreateAsync<Person>(amy);


// please read the individual classes' documentations for important information.

// the above is based on these entities:

using iNovation.Code;

public class Person {
public int Id { get; set; }

[SqlType("NVARCHAR(100)")]
public string Name { get; set; }
public List<Phone> Phones { get; set; } = new List<Phone>();

public override string ToString()
{
    return Name + " (Id: " + Id + ")";
}

public class Phone {
    public int Id { get; set; }
    public int Person_Id { get; set; }
    public string PhoneNumber { get; set; }
    public override string ToString()
    {
        return PhoneNumber;
    }
}

VB:

Imports iNovation.Code

' prerequisites
Dim provider As SupportedDbProvider = SupportedDbProvider.SqlServer ' other providers are WIP
Dim connectionString As String = "my connection string"


' the sync version
Dim orm As IOrm = SequelOrm.GetInstance(provider, connectionString)

' create a Person object
Dim amyPhoneNumbers As New List(Of Phone) From {New Phone With {.PhoneNumber = "01 001 AMY"}}
Dim amy As New Person With {.Name = "Amy", .Phones = amyPhoneNumbers}


' create a Person record
Dim created As Person = orm.Create(Of Person)(amy)

' find records of Person by specified conditions - the paged version
Dim conditions As New List(Of Condition) From {New Condition With {.Column = "PhoneNumber", .SqlComparison = SqlComparisonOperator.SqlEquals, .Value = "01 001 AMY"}}
Dim sought As Page(Of Person) = orm.FindByPaged(Of Person)(conditions, 1, 10)
' retrieve the results by
Dim found As List(Of Person) = sought.Records


' for the async version
Dim ormAsync As IOrmAsync = SequelOrmAsync.GetInstance(provider, connectionString)

' just call the async version of the methods, e.g.
Dim personCreatedByAsync As Person = Await ormAsync.CreateAsync(Of Person)(amy)


' please read the individual classes' documentations for important information.

' the above is based on these entities:
Imports iNovation.Code

Public Class Person
    Public Property Id As Integer

    <SqlType("NVARCHAR(100)")>
    Public Property Name As String
    Public Property Phones As List(Of Phone) = New List(Of Phone)

    Public Overrides Function ToString() As String
        Return Name & " (Id: " & Id & ")"
    End Function

End Class

Public Class Phone
    Public Property Id As Integer
    Public Property Person_Id As Integer
    Public Property PhoneNumber As String
    Public Overrides Function ToString() As String
        Return PhoneNumber
    End Function

End Class

Bootstrap

Contains methods based on Bootstrap, currently 4 but upgrades are WIP.

C#:

using static iNovation.Code.Bootstrap

Alert("This is an alert");

VB:

Imports iNovation.Code.Bootstrap

Alert("This is an alert")

Charts

Contains methods for dynamically creating charts (Bar, Pie, Doughnut, Line) using given values or directly from database columns.

C#:

using static iNovation.Code.Charts

List<string> labels = new List<string> { "Q1", "Q2", "Q3" };
List<string> values  = new List<string> { "50", "25", "75" };
string html = BarChart(labels, values);

VB:

Imports iNovation.Code.Charts

Dim labels As New List(Of String) From {"Q1", "Q2", "Q3"}
Dim values As New List(Of String) From {"50", "25", "75"}
Dim html As String = BarChart(labels, values)

Desktop

Contains methods mainly towards desktop development.

C#:

using static iNovation.Code.Desktoop

enum TitleOfCourtesy{
    Mr, Mrs, Ms
}

//binds values of TitleOfCourtesy to comboBox1
EnumDrop(comboBox1, new TitleOfCourtesy());

VB:

Imports iNovation.Code.Desktop

Enum TitleOfCourtesy
    Mr
    Mrs
    Ms
End Enum

' binds values of TitleOfCourtesy to ComboBox1
EnumDrop(ComboBox1, New TitleOfCourtesy())

DesktopExtensions

Contains extension methods based on methods from Desktop.

C#:

using static iNovation.Code.DesktopExtensions

//The items of comboBox1 are turned into a List
comboBox1.ToList();

VB:

Imports iNovation.Code.DesktopExtensions

' The items of ComboBox1 are turned into a List
ComboBox1.ToList()

Encryption

Ligthweight Encryption/Decryption.

C#:

using static iNovation.Code.Encryption

string key = "MyKey";
string value = "What to encrypt";
string encrypted = Encrypt(key, value);

string original = Decrypt(key, encrypted);

VB:

Imports iNovation.Code.Encryption

Dim key As String = "MyKey"
Dim value = "What to encrypt"
Dim encrypted As String = Encrypt(key, value)

Dim original As String = Decrypt(key, encrypted)

EncryptionExtensions

Contains extension methods based on methods from Encryption.

C#:

using static iNovation.Code.EncryptionExtensions

string key = "MyKey";
string value = "What to encrypt";
string encrypted = value.Encrypt(key);

string original = encrypted.Decrypt(key);

VB:

Imports iNovation.Code.EncryptionExtensions

Dim key As String = "MyKey"
Dim value = "What to encrypt"
Dim encrypted As String = value.Encrypt(key)

Dim original As String = value.Decrypt(key)

Feedback

Contains routines for giving feedback with Text-To-Speech and MessageBox.

C#:

using iNovation.Code.Feedback

//Text to speech
string s = "Hi";
Feedback feedback = new Feedback();
feedback.Inform(s);

VB:

Imports iNovation.Code.Feedback

' Text to speech
Dim s As String = "Hi"
Dim f As New Feedback()
f.Inform(s)

FeedbackExtensions

Contains extension methods based on methods from Feedback.

C#:

using iNovation.Code.FeedbackExtensions

//Text to speech
string s = "Hi";
s.Inform();

VB:

Imports iNovation.Code.FeedbackExtensions

' Text to speech
Dim s As String = "Hi"
s.Inform()

General

Contains methods for general purposes.

C#:

using static iNovation.Code.General

string email = "@provider.com";
bool valid = IsEmail(email); //false

VB:

Imports iNovation.Code.General

Dim email As String = "@provider.com"
Dim valid = IsEmail(email) ' False

GeneralExtensions

Contains extension methods based on methods from General.

C#:

using static iNovation.Code.GeneralExtensions

string input = "how Are you doing";
string output = input.ToTitleCase(); //How Are You Doing

VB:

Imports iNovation.Code.GeneralExtensions

Dim input As String = "how Are you doing"
Dim output = input.ToTitleCase() ' How Are You Doing

LoggingExtensions

Contains extension methods useful for logging common data types.

C#:

using static iNovation.Code.LoggingExtensions

string input = "just a log";
input.Log();

VB:

Imports iNovation.Code.LoggingExtensions

Dim input As String = "just a log"
input.Log()

Machine

Contains methods for dealing with the machine directly.

C#:

using static iNovation.Code.Machine

//Mutes the PC
Mute(this);

VB:

Imports iNovation.Code.Machine

' Mutes the PC
Mute(Me)

Sequel

Contains methods for database access.

C#:

using static iNovation.Code.Sequel

string table = "TableName";
string[] fields = { "ColumnName" };
string[] where_params = { "Id" };
object[] where_params_values = { "Id", 10 };
string connection_string = "Connection_String";

//creates select query
string query = iNovation.Code.General.BuildSelectString(table, fields, where_params);

//creates a DataTable
DataTable dataTable = QDataTable(query, connection_string, where_params_values);

VB:

Imports iNovation.Code.Sequel

Dim table As String = "TableName"
Dim fields As String() = {"ColumnName"}
Dim where_params As String() = {"Id"}
Dim where_params_values As Object() = {"Id", 10}
Dim connection_string As String = "Connection_String"

' creates select query
Dim query As String = iNovation.Code.General.BuildSelectString(table, fields, where_params)

' creates a DataTable
Dim d As DataTable = QDataTable(query, connection_string, where_params_values)

Styler

Contains methods for desktop development, particularly, styling the Form.

C#:

using static iNovation.Code.Styler

Style(this, true);

VB:

Imports iNovation.Code.Styler

Style(Me, True)
Product Compatible and additional computed target framework versions.
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on inovationware.code:

Package Downloads
inovation.incode

Private

SecurityAdapter

Description

inovationware.securityAdapter

Private

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.8.9 132 5/4/2025
3.7.1 83 1/15/2025
3.7.0 106 11/23/2024
3.6.8 106 10/24/2024
3.6.7 112 10/20/2024
3.6.6 105 10/17/2024
3.6.5 93 9/20/2024
3.6.4 97 9/20/2024
3.6.3 104 9/20/2024
3.6.2 99 9/20/2024
3.6.1 109 9/20/2024
3.6.0 389 1/15/2024
3.5.9 380 1/11/2024 3.5.9 is deprecated.
3.5.8 345 1/7/2024
3.5.7 340 1/6/2024
3.5.6 404 12/23/2023
3.5.5 371 12/21/2023
3.5.4 377 12/20/2023
3.5.3 392 12/20/2023
3.5.2 419 12/15/2023
3.5.1 424 12/15/2023
3.5.0 400 12/15/2023
3.4.9 389 12/15/2023
3.4.8 421 12/13/2023
3.4.7 415 12/12/2023
3.4.6 411 12/12/2023
3.4.5 418 12/12/2023
3.4.4 431 12/9/2023
3.4.3 425 12/4/2023
3.4.2 488 11/29/2023
3.4.1 443 11/29/2023
3.4.0 453 11/29/2023
3.3.0 462 11/22/2023
3.2.8 451 11/22/2023
3.2.7 434 11/22/2023 3.2.7 is deprecated because it is no longer maintained.
3.2.6 450 11/20/2023
3.2.5 455 11/20/2023 3.2.5 is deprecated because it has critical bugs.
3.2.4 619 11/19/2023
3.2.3 717 11/12/2023
3.2.2 405 11/11/2023
3.2.1 435 11/11/2023
3.2.0 411 11/11/2023
3.1.9 474 10/22/2023
3.1.8 478 10/22/2023
3.1.7 524 10/22/2023
3.1.6 478 10/22/2023
3.1.5 435 10/22/2023
3.1.4 478 10/22/2023
3.1.3 448 10/22/2023
3.1.2 585 8/12/2023
3.1.1 586 8/12/2023
3.1.0 636 7/17/2023
3.0.9 621 7/12/2023
3.0.8 628 7/12/2023
3.0.7 613 7/12/2023
3.0.6 606 7/9/2023
3.0.5 633 7/9/2023
3.0.4 643 7/7/2023
3.0.3 728 6/29/2023
3.0.2 665 6/29/2023
3.0.1 634 6/29/2023
3.0.0 629 6/27/2023
2.0.2 662 6/24/2023
2.0.1 659 6/24/2023
2.0.0 635 6/24/2023
1.9.9 642 6/24/2023
1.9.8 630 6/23/2023
1.9.7 661 6/22/2023
1.9.6 634 6/17/2023
1.9.5 630 6/16/2023
1.9.4 603 6/10/2023
1.9.3 645 6/9/2023
1.9.2 676 6/9/2023
1.9.1 641 6/9/2023
1.9.0 647 6/9/2023
1.8.9 630 6/9/2023
1.8.8 640 6/9/2023
1.8.7 615 6/8/2023
1.8.6 664 6/6/2023
1.8.5 652 6/6/2023
1.8.4 644 6/6/2023
1.8.3 608 6/5/2023
1.8.1 612 6/5/2023
1.8.0 627 6/5/2023
1.7.9 624 6/4/2023
1.7.7 635 6/4/2023
1.7.6 620 6/3/2023
1.7.5 616 6/3/2023
1.7.4 658 6/1/2023
1.7.3 631 6/1/2023
1.7.2 719 5/31/2023
1.7.1 663 5/31/2023
1.7.0 644 5/31/2023
1.6.9 632 5/27/2023
1.6.8 641 5/27/2023
1.6.7 648 5/27/2023
1.6.6 625 5/27/2023
1.6.5 643 5/27/2023
1.6.4 665 5/27/2023
1.6.3 624 5/27/2023
1.6.2 637 5/23/2023
1.6.1 657 5/23/2023
1.6.0 644 5/23/2023
1.5.8 648 5/22/2023
1.5.7 657 5/22/2023
1.5.6 653 5/21/2023
1.5.5 626 5/21/2023
1.5.4 621 5/21/2023
1.5.3 645 5/21/2023
1.5.2 652 5/21/2023
1.5.1 618 5/21/2023
1.4.9 633 5/21/2023
1.4.8 661 5/21/2023
1.4.7 641 5/21/2023
1.4.6 577 5/8/2023
1.4.5 630 5/7/2023
1.4.4 630 5/6/2023
1.4.3 642 5/5/2023
1.4.2 628 5/5/2023
1.4.1 638 5/5/2023
1.4.0 607 5/5/2023
1.3.9 627 5/5/2023
1.3.8 595 5/5/2023
1.3.7 611 5/5/2023
1.3.6 639 5/2/2023
1.3.5 665 4/24/2023
1.3.4 625 4/23/2023
1.3.3 719 4/23/2023
1.3.2 647 4/23/2023
1.3.1 655 4/23/2023
1.3.0 620 4/23/2023
1.2.9 660 4/23/2023
1.2.8 680 4/23/2023
1.2.7 657 4/23/2023
1.2.6 638 4/13/2023
1.2.5 692 4/13/2023
1.2.3 675 4/12/2023
1.2.2 687 4/11/2023
1.2.1 662 4/11/2023
1.2.0 662 3/17/2023
1.1.9 731 3/17/2023
1.1.8 729 3/17/2023
1.1.7 833 12/27/2022
1.1.6 819 12/27/2022
1.1.5 778 12/27/2022
1.1.4 795 12/27/2022
1.1.3 808 12/24/2022
1.1.2 774 12/24/2022
1.1.1 790 12/24/2022
1.1.0 797 12/22/2022
1.0.9 1,024 9/11/2022
1.0.8 882 9/10/2022
1.0.7 904 9/10/2022
1.0.6 881 9/10/2022
1.0.5 1,591 8/9/2022
1.0.4 894 7/30/2022
1.0.3 874 7/29/2022
1.0.2 922 7/29/2022
1.0.1 1,544 4/3/2022

Code is now running .Net Framework 4.7.2