Core.Cast-Transform-Convert
3.2.0.89
See the version list below for details.
dotnet add package Core.Cast-Transform-Convert --version 3.2.0.89
NuGet\Install-Package Core.Cast-Transform-Convert -Version 3.2.0.89
<PackageReference Include="Core.Cast-Transform-Convert" Version="3.2.0.89" />
paket add Core.Cast-Transform-Convert --version 3.2.0.89
#r "nuget: Core.Cast-Transform-Convert, 3.2.0.89"
// Install Core.Cast-Transform-Convert as a Cake Addin #addin nuget:?package=Core.Cast-Transform-Convert&version=3.2.0.89 // Install Core.Cast-Transform-Convert as a Cake Tool #tool nuget:?package=Core.Cast-Transform-Convert&version=3.2.0.89
An easy-to-use, portable, tested, documented, serializable, thread-safe, strongly typed library for changing between unrestricted, arbitrary data types
Learn more about Target Frameworks and .NET Standard.
-
- CSharp.Portable-Singleton (>= 2.0.0.4)
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 |
---|---|---|
3.2.0.94 | 2,213 | 11/1/2016 |
3.2.0.93 | 1,702 | 11/1/2016 |
3.2.0.92 | 1,714 | 11/1/2016 |
3.2.0.91 | 1,758 | 11/1/2016 |
3.2.0.89 | 1,433 | 10/19/2016 |
3.2.0.86 | 1,480 | 10/17/2016 |
3.2.0.84 | 1,511 | 10/17/2016 |
3.2.0.82 | 1,502 | 10/17/2016 |
3.2.0.81 | 1,472 | 10/14/2016 |
3.2.0.80 | 1,462 | 10/14/2016 |
3.2.0.79 | 1,475 | 10/14/2016 |
3.2.0.78 | 1,520 | 10/13/2016 |
3.2.0.77 | 1,452 | 10/13/2016 |
3.2.0 | 1,441 | 10/13/2016 |
3.1.0.69 | 1,442 | 10/9/2016 |
3.1.0.5 | 1,593 | 10/9/2016 |
3.1.0.2 | 2,263 | 9/21/2016 |
3.1.0 | 1,473 | 10/3/2016 |
3.0.1.4 | 1,538 | 9/13/2016 |
3.0.1 | 1,458 | 10/3/2016 |
=== Key Features ===
-Central thread-safe pool of converting functions
-Data Encapsulation
-Add converters at runtime or compile-time
-Consistent exception behavior
-Optional functions following the "Try" convention of .NET
-Instant improvement of source-code readability and maintainability
-Low overall performance impact
-Little to no learning curve
-Independent, portable library
______________________________________________________
### Changelog with the most recent changes
* 62 seconds ago (HEAD -> master, origin/master, origin/HEAD) Merge branch 'master' of https://github.com/lsauer/dotnet-portable-cast-convert-transform (Lorenz Lo Sauer)
|\
| * 4 minutes ago appveyor: added powershell scripts to the set of monitored build-files (Lorenz Lo Sauer)
* | 4 minutes ago appveyor: added powershell scripts to the set of monitored build-files (Lorenz Lo Sauer)
|/
* 7 minutes ago Nuget packaging: fixed missing dynamic build-path in the nuspec file (Lorenz Lo Sauer)
* 21 minutes ago Tests: Added new tests to the csproj; Added a direct csproj reference to the TypeCast library (Lorenz Lo Sauer)
* 22 minutes ago Tests: Added tests for custom NumberFormatInfo based conversions [ci skip] (Lorenz Lo Sauer)
* 26 minutes ago Improved: Added a new ConverterCollectionCause to the exception enumeration list; Better handling of a missing assembly exception during initialization (Lorenz Lo Sauer)
* 29 minutes ago Improved: Renamed variable to better reflect its purpose [ci skip] (Lorenz Lo Sauer)
* 30 minutes ago Improved: Allow Disambiguates when the ConverterMethodAttribute has a Name property set (Lorenz Lo Sauer)
* 31 minutes ago Improved: Better creation of Standard Converters, designated with object as Argument-Type [ci skip] (Lorenz Lo Sauer)
* 2 hours ago Tests: Added a CaptureDataException for throwing data-objects at a desired point outside a method for analysis [ci skip] (Lorenz Lo Sauer)
* 3 hours ago Improved: Cleaned up unecessary code-lines (Lorenz Lo Sauer)
* 26 hours ago Changed: Removed binaries due to a DevOps pipeline and automated release builds (Lorenz Lo Sauer)
* 32 hours ago Deploy: Include dynamic changelog of the most recent changes in the nuget package (Lorenz Lo Sauer)
* 33 hours ago Deploy: Improved Nuget packaging script to handle x64 platform packaging (Lorenz Lo Sauer)
* 2 days ago Tests: Added ConvertContext unit tests (Lorenz Lo Sauer)
* 2 days ago Fixed: Obsolete paths in some example-csproj references (Lorenz Lo Sauer)
* 2 days ago Improved: Worked off the remaining build messages, relating to xml comments, hidden properties and processor architecture; updates package dependency versions (Lorenz Lo Sauer)
* 3 days ago Improved: ConverterAttribute assignment in the Factory (Lorenz Lo Sauer)
* 3 days ago Tests: Added tests for 'ConverterMethodAttribute' (Lorenz Lo Sauer)
* 3 days ago Imrpoved: Renamed extension method for clarification (Lorenz Lo Sauer)
______________________________________________________
### Getting started in 4 steps
1. *Install* with the <a href="http://goo.gl/iekUWH" target="_blank">NuGet Package manager</a>: `PM> Install-Package Core.TypeCast`.
2. *Add the namespace* to your top-listed using directives: `using Core.TypeCast;`.
3. *Create a class* with one or more methods: `class MyConverter { ... int MyConverter(string argument) ... }`
4. *Attribute* any class with `[ConverterAttribute]`: _`public class MyConverter { ... }`_.
Subsequently, attribute the converting methods using `[ConverterMethodAttribute]`: _`public int MyConverter(string attribute){ ... }`__
5. **Done!**
Now, invoke conversions in your code anywhere as follows:
```cs
var castedInt = "500s".CastTo<int>();
var protein = "GAGTGCGCCCTCCCCGCACATGCGCCCTGACAGCCCAACAATGGCGGCGCCCGCGGAGTC".ConvertTo<IProtein>();
```
Use library functions which suit the change of type descriptively:
`var complimentary = "GAGTGCGCCCTCCCCGCACATGCGCCCTGACAGCCCAACAATGGCGGCGCCCGCGGAGTC".Transform<Complementary>();`
_____________________________________________________
### Code Glance
Provided below is an abbreviated example of what code may look like in your project:
```cs
using System.Runtime.CompilerServices;
// IPolyNucleotide.cs
public interface IPolyNucleotide { ... }
// used for "Tranform-Aliasing"
delegate DNA Complimentary(string dnaSequence, AModelClass arguments);
// DNA.cs
[Converter]
public class DNA : IPolyNucleotide
{
[ConverterMethod]
protected IProtein ToProtein(string dnaSequence, bool homologyLookup = false)
{
... ...
}
[ConverterMethod]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static DNA Complimentary(string dnaSequence, AModelClass arguments)
{
... ...
}
...
}
```