PC Review


Reply
Thread Tools Rate Thread

XmlSerializer and Custom Attribute Inclusion?

 
 
lucius
Guest
Posts: n/a
 
      14th Feb 2007

I have a CustomAttribute class that decorates properties and methods
in a class that is serialized with the .NET 2.0 XmlSerializer. I would
like to have these attributes interpreted as XML Comments and embedded
inline or at least at the top of the result document when it is
serialized.

How can I do this?

Thanks.
 
Reply With Quote
 
 
 
 
Random
Guest
Posts: n/a
 
      14th Feb 2007
I posted earlier today with a similar question about how to coerce automatic
behavior from custom attributes. In your case, have you tried having your
CustomAttribute class inherit from whatever attribute class would normally
identify a property or method as a comment? Then, you'd extend that class
to include your own properties you need in CustomAttribute. Might work.


"lucius" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> I have a CustomAttribute class that decorates properties and methods
> in a class that is serialized with the .NET 2.0 XmlSerializer. I would
> like to have these attributes interpreted as XML Comments and embedded
> inline or at least at the top of the result document when it is
> serialized.
>
> How can I do this?
>
> Thanks.



 
Reply With Quote
 
WenYuan Wang
Guest
Posts: n/a
 
      16th Feb 2007
Hi Lucius,
Thanks for your post.

I just want to check if the issue has been resolved.
If there is anything unclear or you have any concern on this, please feel
free to reply me and we will follow up.

Have a great day.
Sincerely,
Wen Yuan

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XmlSerializer not creating attribute values John A Grandy Microsoft C# .NET 2 2nd Nov 2008 02:23 AM
Extracting innertext and attribute using XmlSerializer kishore Microsoft C# .NET 4 6th Feb 2007 10:02 PM
Using XmlSerializer to create an Xml document for SQL Server 2005 (having a date typed attribute) Henrik Dahl Microsoft C# .NET 10 5th Jan 2007 10:56 AM
DefaultValue Attribute breaks XmlSerializer =?Utf-8?B?U3RldmVU?= Microsoft C# .NET 4 7th Oct 2006 12:59 AM
Custom attribute applying another attribute Andrew Roberts Microsoft Dot NET Framework 1 4th Sep 2003 07:52 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:34 PM.