This is a migrated thread and some comments may be shown as answers.

Generated Equality Methods

3 Answers 88 Views
Code Generation
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Matthias Bibo
Top achievements
Rank 1
Matthias Bibo asked on 17 Apr 2012, 10:52 AM
Hi,

I have been using JustCode to generate my Equals methods and noticed that the generated Equals and GetHashCode methods don't call the base Class methods. This causes Problems in my Project because Objects are only Equal if all Properties (including the base Class Properties) are Equal. I have build an example Application to illustrate my Problem, but I can't attach it.
How can I attach the sample Project to this Post?

I have also noticed that the generated code somethinge includes 'this.' and sometimes it dosen't which causes your code check (StyleCop)  to throw Warnings.

Best regards,
Matthias

3 Answers, 1 is accepted

Sort by
0
Stefan Avramov
Telerik team
answered on 20 Apr 2012, 02:11 PM
Hello,

Thanks for writing to us about that. We fixed the command to add calls to 'base' if overrides of Equals or GetHashCode exist there. There was also a bug with not considering your option in JustCode->Options->CodeStyle->C#->"Use 'this' qualifier for field or member accesses"  which is also fixed for our next major release. You receive some Telerik Points for that.

Also you should be able to attach files when posting: http://screencast.com/t/fVeptAHZ. However here is not the best place for that as it is public. Best open a support ticket for us and attach it there.

Greetings,
Stefan Avramov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Matthias Bibo
Top achievements
Rank 1
answered on 27 Apr 2012, 11:15 AM

Hello,

good to hear... 

I can only attach pictures, not sample projects...

When I tried to click the "For entire solution submit a support ticket with attachment."  I land on the "Get support" page, but where to open a ticket with a repro sample project?

Best regards,
Matthias

0
Stefan Avramov
Telerik team
answered on 27 Apr 2012, 04:51 PM
Hello,

Here is what you must do step by step:
1. Go to Telerik's Contact Support Team Page: http://screencast.com/t/MDsNPLpgCG
2. Locate JustCode's Submit support button: http://screencast.com/t/S3SvPRfCg
3. Zip your solution to one file.
4. At the bottom click attach files: http://screencast.com/t/015lv5cd
5. Click 'Send' and you should be done

Hope that helps! If you have any other issues do not hesitate to write back.

Kind regards,
Stefan Avramov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
Code Generation
Asked by
Matthias Bibo
Top achievements
Rank 1
Answers by
Stefan Avramov
Telerik team
Matthias Bibo
Top achievements
Rank 1
Share this question
or