开发者

Can SPRING.NET create an XML file, given the object I want to use for IoC?

I want Spring.NET to generate a matching XML file for the following class :

public class MyClass 
{ 
    public int Id { get; set; } 

    public DateTime Date { get; set; } 
    public string String1 { get; set; } 
    public string String2 { get; set; } 
    public string String3 { get; set; } 
    public string String4 { get; set; } 
} 

How can I do it? Does spring.NET support any serializing of this sort?

When I think about "spring .net serializing" I mean this output XML :

    <property name ="Id" value=""/>
    <property name ="Date" value=""/>
    <property name ="String1" value=""/>
    <property name ="String2" value=""/>
    <property name ="String3" value=""开发者_StackOverflow社区/>
    <property name ="String4" value=""/>

i.e. - I need to generate the matching XML to be used as a configuration file for my spring.net based product.


Spring.net does not come with such a tool, afaik. You might want to install the Spring.NET Visual Studio Add-In, which provides intellisense assistance when writing Spring XML configuration files in VS.NET 2010. It makes your Spring.NET xml life a lot easier.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜