473,320 Members | 2,073 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Add custom attributes to ServicedComponent

Hi,

is it possible to use custom context-attributes with serviced components?

[AttributeUsage(AttributeTargets.Class)]
public class Logging : ContextAttribute
{
public Logging() {...}
public override void GetPropertiesForNewContext(IConstructionCallMessag e ctorMsg) {...}
}

[Logging]
public class LogMe : ServicedComponent
{

}

The attribute-instance itself is created, but GetPropertiesForNewContext
isn't called (which happens when i use the same attribute, but derive my
LogMe-Class from ContextBoundObject).

Precisely my question should have been: Is it possible to use
ContextAttributes with ServicedComponents to intercept function calls?
(ContextAttribute, IContextProperty, IMessageSink)


Our plan is to optimize our application architecture by introducing a kind
of aspect orientation. we've succeeded in intercepting function calls as
described in MSDN

Because some of our programs depend on EnterpriseServices we're now
evaluating the above mentioned technique for ServicedComponents. Does anyone know if it is possible?


Thanks for any help,

Lucas
Sep 12 '06 #1
0 1016

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Doug Holland | last post by:
Often you see code where an empty interface is used to indicate something about the class that realizes it. In the .NET world this can be done with custom attributes too, so which is better: ...
5
by: Stefan G. | last post by:
Hi, is it possible to use custom context-attributes with serviced components? public class Logging : ContextAttribute { public Logging() {...} public override void...
1
by: Bret Pehrson | last post by:
I've converted a non-trivial C++ library to managed, and get the following unhelpful linker error: Assignment.obj : error LNK2022: metadata operation failed (80131195) : Custom attributes are...
3
by: Edward Diener | last post by:
I understand the syntax of custom attributes, but I have no idea what they are supposed to do. Anyone care to give me a clue as to their functionality ?
1
by: Tamas Demjen | last post by:
I started to experiment with VC++ 2005 Beta1. So far everything went fine, and already have a working project, but soon I realized that the compiler was ancient (not supporting half of the C++/CLI...
3
by: The Developer | last post by:
Hi All, I have a web application where I am adding a custom attribute to my ASP.NET text box control and changing value of that attribute at client side using JavaScript. My problem is that...
9
by: wardy1975 | last post by:
Hi All, Looking for a little expert advice on a few web standards issues. I am currently trying to understand the impact of web standards for a web application I work with. I have been doing a...
3
by: Mark R. Dawson | last post by:
Hi all, I am trying to get custom attributes from a property. I can do this if I pass in the name of the property i.e. "Name" to the reflection methods, but if I pass in set_Name which is what...
3
by: zlf | last post by:
I am asked to complete a COM+ component, there is a class A derived from ServicedComponent. However, when executing , exception is thrown. Messaged: Unhandled Exception:...
2
by: prabhupr | last post by:
Hi Folks I was reading this article (http://www.dotnetbips.com/articles/displayarticle.aspx?id=32) on "Custom Attribute", written by Bipin. The only thing I did not understand in this article...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.