PC Review


Reply
Thread Tools Rate Thread

Re: Custom TransformerProvider in Configuration Application Block

 
 
Alex
Guest
Posts: n/a
 
      6th Sep 2005
Hello Luke,

Thank you for your suggestion.

We will try it and get back to you.
(I remember we tried something similar and had issues with the namespace)

Best wishes,
Alex.

--
Address email to user "response" at domain "alexoren" with suffix "com"


"[MSFT]" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> Hello Alex,
>
> It is simple to create a custom TransformerProvider deriving from
> XmlSerializerTransformer, you only need to override its methods properties,
> like Deserialize, Serialize and ConfigurationName.
>
> The tough one is to use it in Application blocks. To use your customized
> XmlSerializerTransformer, you need to create your own
> XmlSerializerTransformerData class or modify the source code of
> XmlSerializerTransformerData.
>
> The dataTransformer is set in app.config file:
>
> <dataTransformer xsi:type="XmlSerializerTransformerData" name="Xml
> Serializer Transformer">
> <includeTypes />
> </dataTransformer>
>
> If you created customized XmlSerializerTransformerData, you should change
> value here.
>
> If you don't want to create a customized XmlSerializerTransformerData, you
> can modify its source code so that it will load your own
> XmlSerializerTransformer:
>
> XmlSerializerTransformerData.cs:
>
> [XmlIgnore]
> public override string TypeName
> {
> get { return
> typeof(XmlSerializerTransformer).AssemblyQualifiedName; }
> set
> {
> }
> }
>
> Replace "XmlSerializerTransformer" with your own XmlSerializerTransformer
> here.
>
> Hope this help
>
> Luke
>

 
Reply With Quote
 
 
 
 
[MSFT]
Guest
Posts: n/a
 
      7th Sep 2005
Hi Alex,

Thank you for the update. If you have any related questions, please feel
free to post here.

Regards,

Luke

 
Reply With Quote
 
Alex
Guest
Posts: n/a
 
      15th Sep 2005
Hi Luke,

"[MSFT]" <(E-Mail Removed)> wrote in message news:7WCn%(E-Mail Removed)...
> Hi Alex,
>
> Thank you for the update. If you have any related questions, please feel
> free to post here.


We had a problem in deserializing the config file because it couldn't find our custom XmlSerializerTransformer

Do we need to change the following line?

<enterpriselibrary.configurationSettings
xmlns:xsd=http://www.w3.org/2001/XMLSchema
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
applicationName="MyApp"
xmlns="http://www.microsoft.com/practices/enterpriselibrary/08-31-2004/configuration">


Best wishes,
Alex.

--
Address email to user "response" at domain "alexoren" with suffix "com"
 
Reply With Quote
 
[MSFT]
Guest
Posts: n/a
 
      16th Sep 2005
Hi Alex,

They are schema definitions and will be used in the config file. I think we
don't need to change these lines.

Luke


 
Reply With Quote
 
Alex
Guest
Posts: n/a
 
      16th Sep 2005

"[MSFT]" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> They are schema definitions and will be used in the config file. I think we
> don't need to change these lines.


What about the xmlns="http://www.microsoft.com/practices/enterpriselibrary/08-31-2004/configuration" part?


Best wishes,
Alex.

--
Address email to user "response" at domain "alexoren" with suffix "com"
 
Reply With Quote
 
[MSFT]
Guest
Posts: n/a
 
      21st Sep 2005
Hello Alex,

If we only want to create custom TransformerProvider, we don't need to
change this line too.

Luke

 
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
Configuration Application Block bhavikkgandhi@yahoo.com Microsoft ASP .NET 0 19th Nov 2005 05:55 AM
Re: Custom TransformerProvider in Configuration Application Block Mona Microsoft Dot NET Framework 0 7th Sep 2005 01:17 PM
Re: Custom TransformerProvider in Configuration Application Block Mona Microsoft Dot NET 0 7th Sep 2005 01:17 PM
Re: Custom TransformerProvider in Configuration Application Block Mona Microsoft C# .NET 0 7th Sep 2005 01:17 PM
Configuration Application Block: Multiple configuration sections in one file: probashi Microsoft C# .NET 1 21st Mar 2005 11:50 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:41 PM.