https://github.com/gingray/ncassette
This tool helps u too cache some long parts of ur program, will be helpfull for debuging specially.
https://github.com/gingray/ncassette
Last synced: 10 months ago
JSON representation
This tool helps u too cache some long parts of ur program, will be helpfull for debuging specially.
- Host: GitHub
- URL: https://github.com/gingray/ncassette
- Owner: gingray
- Created: 2014-04-11T20:48:14.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-07-08T05:38:03.000Z (almost 12 years ago)
- Last Synced: 2025-02-08T22:35:28.505Z (over 1 year ago)
- Language: C#
- Size: 215 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
NCassette
=======
NCassette its a tool specially for debugging purposes but u can use it how ever u want.
It can helps to 'mock' or 'caching' heavy parts of ur algorithms during debugging.
An attempt to create some kind of C# alternative of Ruby VCR or C# alternative Java Betamax,
but main idea not quite the same lib record the answer from service not trying to intercept the connection or something like that.
Thats mean that ucan record not only some network manipulation but what ever u want and its very simple
and light weigth, no additional dependencies.
Example below:
static void Main(string[] args)
{
var url = "http://google.com";
var result = NCassette.Record(() =>
{
//some very heavy manipulation here
var networkRespone = NetworkResponse();
var someClass = new CustomClass {SomeStringProperty = networkRespone};
return someClass;
})
.SerializeWayJson()
.WorkInReleaseMode()
.DependsOn(url)
.StorageInTempFiles()
.Execute();
Console.WriteLine("{0}", result.SomeStringProperty);
Console.WriteLine("Done");
Console.ReadLine();
}
The code in lambda wil execute only once all other calls will be cached.
Available on NuGet: Install-Package NCassette