شرکت فناوری اطلاعات رسمین

ارائه راهکارهای نرم افزاری برای واحد های کاری کوچک و بزرگ، بست و توسعه نرم افزار های کاربردی، طراحی وب سایت برای کلیه واحد های صنفی

شرکت فناوری اطلاعات رسمین

ارائه راهکارهای نرم افزاری برای واحد های کاری کوچک و بزرگ، بست و توسعه نرم افزار های کاربردی، طراحی وب سایت برای کلیه واحد های صنفی

شرکت فناوری اطلاعات رسمین

رسمین مخفف کلمات رستمی و مینو می باشد و با توجه به گسترش روز افزون استفاده از نرم افزار های کاربردی در سال 1392 تصمیم بر این شد که شرکت رسمین را برای ارائه خدمات کامپیوتری نظیر راهنمایی و مشاوره، ایجاد نرم افزار های سفارشی و وب سایت های مورد نیاز کارفرمایان را تأسیس نماییم.

طبقه بندی موضوعی
بایگانی

?What Is Interception

What Is Interception?

Interception is an advanced programming technique that allows you to intercept calls to an object so that you can add additional logic before or after the call. This interception process should be virtually transparent, so both the calling object and the target object can be oblivious to the interception process.

The following diagram shows how instance interception typically works:

 

Follow link to expand image

The calling object will typically ask the Unity dependency container for a target object. However, it will not receive a real TargetObject, but rather an intercepting proxy that is impersonating the real TargetObject, for example, by implementing the same interface. This way the calling object does not know if it calls the real target object or the proxy. The TargetObject also doesn't know that the calls have been intercepted. The fact that both classes don't know this about the interception process allows you to add custom logic before or after a member call, without having to change either the calling object or the target object.

 

Interception is quite similar to using the decorator pattern. With a decorator you'll typically have to program a custom decorator class for each target object. However, Unity will dynamically generate the interceptor for you, so all you have to do is implement the custom behaviors.

#Reference

  • احمد مینو

نظرات  (۰)

هیچ نظری هنوز ثبت نشده است
ارسال نظر آزاد است، اما اگر قبلا در بیان ثبت نام کرده اید می توانید ابتدا وارد شوید.
شما میتوانید از این تگهای html استفاده کنید:
<b> یا <strong>، <em> یا <i>، <u>، <strike> یا <s>، <sup>، <sub>، <blockquote>، <code>، <pre>، <hr>، <br>، <p>، <a href="" title="">، <span style="">، <div align="">
تجدید کد امنیتی