AOP编程实践之AspectWeaverSample1.0
来源:互联网 发布:数据统计怎么做 编辑:程序博客网 时间:2024/05/22 02:09
[More about Teddy's Aspect Weaver]
[More about AOP]
本范例基于Teddy’s Aspect Weaver Version 0.6,演示一个简单的AOP应用范例,范例中的具体Sample Aspect有:
1. SecurityAspect: Add additional security checking before Account.Login.
2. MethodSelfIntroduceAspect: Each method’s self-introduction – show each calling methods’ context info and argument lists.
3. LogAllWriteOperationAspect: Log all writing operations called positions.
4. DebugBookConstructorCall: Log after Book’s Constructors’ calling.
未织入前的运行结果
Begin an order handle process...
The order handle process is finished.
Begin an book update process...
The book update process is finished.
织入后的运行结果
Calling method: System.Void SampleApp.Logic.Sample::OrderHandleSample()
Begin an order handle process...
Checked addtional security for account login ok!
Calling method: System.Boolean SampleApp.Logic.Account::Login(System.String,System.String)
Arguments: name, pa$$word
Constructor of Book has been called at 'System.Void SampleApp.Logic.Book::.ctor()'
Calling method: System.Void SampleApp.Logic.Book::LoadBook(System.Int32)
Arguments: 2
Constructor of Book has been called at 'System.Void SampleApp.Logic.Book::.ctor()'
Calling method: System.Void SampleApp.Logic.Book::LoadBook(System.Int32)
Arguments: 1
Constructor of Book has been called at 'System.Void SampleApp.Logic.Book::.ctor(System.Int32)'
calling a write method at 'System.Void SampleApp.Logic.Sample::OrderHandleSample()'
Calling method: System.Void SampleApp.Logic.Order::HandleOrder()
The order handle process is finished.
Calling method: System.Void SampleApp.Logic.Sample::BookUpdateSample()
Begin an book update process...
Checked addtional security for account login ok!
Calling method: System.Boolean SampleApp.Logic.Account::Login(System.String,System.String)
Arguments: name, pa$$word
Constructor of Book has been called at 'System.Void SampleApp.Logic.Book::.ctor()'
Calling method: System.Void SampleApp.Logic.Book::LoadBook(System.Int32)
Arguments: 1
Constructor of Book has been called at 'System.Void SampleApp.Logic.Book::.ctor(System.Int32)'
Calling method: System.Void SampleApp.Logic.Book::set_BookName(System.String)
Arguments: updated book name
calling a write method at 'System.Void SampleApp.Logic.Sample::BookUpdateSample()'
Calling method: System.Void SampleApp.Logic.Book::UpdateBook()
The book update process is finished.
范例源码下载
AspectWeaverSample1.0.zip
- AOP编程实践之AspectWeaverSample1.0
- Spring实践之面向切面编程(AOP)
- Spring实践:面向切面编程(AOP)
- Spring AOP实践(二)编程篇
- IoC/AOP实践之CastleProject编译
- Spring实践之2:AOP的应用
- Spring进阶之AOP编程
- AOP编程之前置通知
- 初见Spring之AOP编程
- 极限编程之实践
- spring入门(9)---AOP编程之AOP介绍
- Spring AOP: Spring之面向方面编程
- Spring之面向方面编程(AOP)
- spring2.5AOP编程之xml
- Spring AOP: Spring之面向方面编程
- Spring之面向方面编程(AOP)
- JAVA AOP编程之动态代理技术
- Spring 基础教程之五:AOP编程介绍
- 让人哭笑不得的“Unable to load one or more of the types in the assembly”问题的解决!
- 国庆庆祝一下
- AOP Practice with AspectWeaver0.6 - DebugPropertyValueModifying
- 从Design Pattern浅谈AOP
- 滑雪
- AOP编程实践之AspectWeaverSample1.0
- 高精度计时器---QueryPerformanceFrequency()与QueryPerformanceCounter()的使用
- Teddy's Aspect Weaver Version 0.6
- Teddy's Aspect Weaver Version 0.5
- Teddy's Aspect Weaver Version 0.3 with Great Updating and Fixing, Especially the Implementing of Getting Runtime Method Context
- Teddy's Aspect Weaver Version 0.2 with Additional Custom Attribute Way Configuration
- miscdevice、platform_device区别?
- 微软发布了Internet Explorer Developer Toolbar Beta版 - 实在是太爽了,使用过后我就想亲Bill叔叔
- “Hello World” Example with AspectDNG