Core.Cast-Transform-Convert 3.2.0

An easy-to-use, portable, tested, documented, serializable, thread-safe, strongly typed library for changing between unrestricted, arbitrary data types

There is a newer version of this package available.
See the version list below for details.
Install-Package Core.Cast-Transform-Convert -Version 3.2.0
dotnet add package Core.Cast-Transform-Convert --version 3.2.0
<PackageReference Include="Core.Cast-Transform-Convert" Version="3.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Core.Cast-Transform-Convert --version 3.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes

=== 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

______________________________________________________

### 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)
       {
           ... ...
       }
       ...
   }
```

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
3.2.0.94 394 11/1/2016
3.2.0.93 271 11/1/2016
3.2.0.92 257 11/1/2016
3.2.0.91 264 11/1/2016
3.2.0.89 258 10/19/2016
3.2.0.86 266 10/17/2016
3.2.0.84 337 10/17/2016
3.2.0.82 286 10/17/2016
3.2.0.81 255 10/14/2016
3.2.0.80 248 10/14/2016
3.2.0.79 254 10/14/2016
3.2.0.78 306 10/13/2016
3.2.0.77 270 10/13/2016
3.2.0 275 10/13/2016
3.1.0.69 259 10/9/2016
3.1.0.5 425 10/9/2016
3.1.0.2 706 9/21/2016
3.1.0 276 10/3/2016
3.0.1.4 287 9/13/2016
3.0.1 259 10/3/2016
Show less