Book a Demo

Author Topic: code generation and indexers in c#  (Read 3110 times)

JV

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
code generation and indexers in c#
« on: May 21, 2009, 12:27:50 am »
I am using indexers in c# as shown below. when I use use ea code generation to reverse engineer the code into ea, the resulting ea classes are missing the Public indexers and only the private properties are shown. It is as if the code generation is ignoring the indexers. Is there a solution to this

private private string _repository = "";
public string Repository
{
       get
       {
            return _repository;
        }
        set
        {
                _repository = value;

          }
  }


Thanks John

Kevin G. Watson

  • EA User
  • **
  • Posts: 217
  • Karma: +0/-0
  • I love EVERYTHING including Microsoft
    • View Profile
Re: code generation and indexers in c#
« Reply #1 on: May 24, 2009, 11:49:45 am »
Hi'ya John

This might not be very helpful, but what you have illustrated in the code snippet is in fact 'Property accessors' not indexers.  But the problem of the missing bits is worrying, to say the least.

kevin [smiley=2vrolijk_08.gif]

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: code generation and indexers in c#
« Reply #2 on: May 25, 2009, 08:32:15 am »
There is a diagram option for hiding properties.  Do you have that set?