Skip to content

sharebright/camalot.common

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

camalot.common

Camalot.Common is a collection of classes, extensions and other things that I have written over the years that I used to find myself copying the files in to my projects every time I created them.

Where do I get it?

Source

Well, I think you found that one already...

Binaries

Available on nuget

PS> Install-Package Camalot.Common

What does it have?

Extensions (Camalot.Common.Extensions)

  • There are way too many to list here. Go check out the source.

Serialization (Camalot.Common.Serialization)

  • JsonSerializationBuilder : This creates a Newtonsoft.Json Serializer
  • XmlSerializationBuilder : This creates an XmlSerializer

Camalot.Common.Mvc

There are additional libraries that are specifically built for ASPNET MVC. Support for versions MVC3, MVC4, MVC5.

Where do I get it?

Source

Well, I think you found that one already...

Binaries

Available on nuget

PS> Install-Package Camalot.Common.Mvc3

PS> Install-Package Camalot.Common.Mvc4

PS> Install-Package Camalot.Common.Mvc5

What does it have?

###Attributes (Camalot.Common.Mvc.Attributes)

  • AjaxOnly : The Action is only to be called via ajax.
  • NoCache : The Action will not be cached. This is good to use with AjaxOnly.
  • Compress : If the browsers supports it, the respose will be gzipped or commpressed using DEFLATE.
  • AjaxValidateAntiForgeryToken : This allows you to post JSON via ajax, and pass an Anti-Forgery Token along in the request headers. This can be used if you are posting normally with a Form as well.

Results (Camalot.Common.Mvc.Results)

  • JsonResult<T> : Like the default JsonResult, except it uses Newtonsoft JSON.NET
  • JsonpResult<T> : Support JSONP responses
  • XmlResult<T> : Xml Serialization Result

Extensions (Camalot.Common.Mvc.Extensions)

  • BundleCollection
  • LoadFromWebConfiguration : This loads Script/Style bundles from the web.config. See the <camalot.common/bundles> section in the web.config for samples. In the BundleConfig you can delete it all and just call this method and be done.
  • Controller
  • JSON<T>(T data) : A clean serialization of an object to JSON
  • JSONP<T>(T data [, callback]) : Support for JSONP Action Result.
  • XML<T>(T data) : A clean serialization of an object to XML

About

A library that I tend to create for just about every project... contains extensions and other things that I find useful, you might too (or maybe not).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published