Skip to content

daxiadongxin/PostsharpAspectsLibrary

 
 

Repository files navigation

Posharp Aspect Library

... is a bunch of aspects used to clean code from various cross-cutting concerns. It's based on PostSharp AOP. The library can be used with .NET 3.5 and .NET 4.0.

PostSharp AOP can be downloaded from http://www.sharpcrafters.com or just use the corresponding Nuget package. There is a free version which is very powerful and should be able to be used in most of your applications.

Included Aspects

  • LogCalls - Logging of entering and exciting the current method. Also logs exceptions.
  • TimeProfile - Metering the method execution time and writing it to log4net loggers.
  • ParameterNotNullCheck - Check if the given parameter is null, if null throws.
  • RetryOnError - Will retry the method execution, if there was an exception.
  • HandleException - Handles an exception occur in the current method. (Allows supression)
  • various PerformanceCounter -
  • PropertyChanging - change of property value notification
  • NotifyPropertyChanged (copy from PostSharp samples) - Implements the NotifyPropertyChanged for every property.
  • Threading (copy from PostSharp samples)
  • Caching (copy from PostSharp samples)
  • AddDataContract (copy from PostSharp samples) - Applies the DataContract Attribute to each class (WCF)

Used Libraries

About

A collection of items for using PostSharp

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 99.8%
  • Batchfile 0.2%