in
Forums
Blogs
Files
Devexpress.Com
Client Center
Support Center
DevExpress Channel

customize the smart constructor

Last post 11/2/2007 7:02 AM by Freek Bos. 0 replies.
Page 1 of 1 (1 items)
Sort Posts:
Previous Next
  • 11/2/2007 7:02 AM

    • Freek Bos
    • Top 500 Contributor
    • Joined on 10/25/2007
    • The Netherlands
    • Posts 27

    customize the smart constructor

    Is there a possibility to customize the smart constructor template?For example:
    I want to add comments to some private fields. Then when I call the smart constructor, I'dd like to see the comments added behind the privates to be in the summary XML comments. (or perhaps moved to the summary.)
    So the following code is what I create:public class NodeEventArgs : CancelEventArgs{
    #region Private declarations
    private ISupportDaaDragDrop source; // Source control
    private ISupportDaaDragDrop destination; // Destination control
    #endregion /Private declarations
    }
    Now I the (cc) smart constructor, it should create the following:public class NodeEventArgs : CancelEventArgs
    {
    #region Private declarations

    private ISupportDaaDragDrop source;
    private ISupportDaaDragDrop destination;

    #endregion /Private declarations #region Constructors/// <summary>
    ///
    Initializes a new instance of the NodeEventArgs class.
    ///
    </summary>
    ///
    <param name="source">Source control
    </param>
    ///
    <param name="destination">Destination control
    </param>
    public
    NodeEventArgs(ISupportDaaDragDrop source, ISupportDaaDragDrop destination)
    {
    this.source = source;
    this.destination = destination;
    }
    #endregion /Constructors#region Properties/// <summary>
    ///
    Source control
    ///
    </summary>
    public
    ISupportDaaDragDrop Source
    {
    get { return source;}
    }
    /// <summary>
    ///
    Destination control

    ///
    </summary>
    public
    ISupportDaaDragDrop Destination
    {
    get{return destination;}
    }
    #endregion /Properties
    }

    Regards,

    Freek Bos
    The Netherlands

Page 1 of 1 (1 items)
Copyright © 1998-2008 Developer Express Inc.
ALL RIGHTS RESERVED