CodeDom - Mixed Property Scope

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • chester

    CodeDom - Mixed Property Scope

    Hello,

    I have an app that uses codedom to generate classes. One of the
    features I'd very much like to support is mixed scope for gets/sets in
    properties ie...

    public string MyProperty
    {
    get { return mMyProperty; }
    private set { mMyProperty = value; }
    }

    I can't for the life of me figure out how I would accomplish that. I
    even went so far as to use a CodeSnippetStat ement to fill in the set
    value...

    cd.CodeSnippetS tatement cssSet = new
    cd.CodeSnippetS tatement(pSet.T oString());
    myproperty.SetS tatements.Add(c ssSet);

    but this of course returned a set within a set... not to mention, that
    makes me code in every language I intend to support.... which is why I
    would very much like to avoid doing properties by hand entirely.

    any help greatly appreciated!
  • jkoontz42@gmail.com

    #2
    Re: CodeDom - Mixed Property Scope

    On Aug 5, 5:03 pm, chester <jmartin...@gma il.comwrote:
    Hello,
    >
    I have an app that uses codedom to generate classes.  One of the
    features I'd very much like to support is mixed scope for gets/sets in
    properties ie...
    >
    public string MyProperty
    {
        get { return mMyProperty; }
        private set { mMyProperty = value; }
    >
    }
    >
    I can't for the life of me figure out how I would accomplish that.  I
    even went so far as to use a CodeSnippetStat ement to fill in the set
    value...
    >
                cd.CodeSnippetS tatement cssSet = new
    cd.CodeSnippetS tatement(pSet.T oString());
                myproperty.SetS tatements.Add(c ssSet);
    >
    but this of course returned a set within a set... not to mention, that
    makes me code in every language I intend to support.... which is why I
    would very much like to avoid doing properties by hand entirely.
    >
    any help greatly appreciated!
    I've got pretty much the same problem. Have you made any headway?

    Bueller.... Bueller.....?

    Comment

    Working...