Problem with Generate C# interface properties

General discussions about code engineering

Moderator: Moderators

Problem with Generate C# interface properties

Postby Chuck Logan » Mon Feb 02, 2009 2:39 pm

I have a C# interface file defined that includes properties with the
{get;set;} signature. If I start with the .cs file, and reverse the code,
the model is generated with the properties included as attributes. This is
all OK.

But if I immediately generate the .cs file from the same model, the
attributes do not get generated as properties in the .cs file. Only the
methods in the interface are generated.

Is there a way to cause the attributes in the MagicDraw interface model to
get generated as properties in the .cs interface file?

I'm using MagicDraw 14.0 Patch 1.

Chuck



Chuck Logan
 
Posts Rating:

Re: Problem with Generate C# interface properties

Postby Supat P. » Wed Feb 04, 2009 4:02 am

Hi Chuck,

I would like to thank you for the letter, it seems like the round-trip
object of interface in C# code engineering set couldn't contain the C#
auto-implemented properties(reverser as attributes in MagicDraw), so that is
the reason that you cannot generate them to cs.file. We will try to solve
this problem as soon as possible and release in the future version.
Sorry for your inconvenience.

Best regards,

Arnon L.
--
Customer Support Engineer
No Magic Asia Ltd.
(Asian Software Development Center)
719 KPN Tower, 22nd Floor, Huaykwang,
Bangkapi, Bangkok 10310 Thailand
Phone: + 66 2717-0250
Fax: + 662 717-0251
Email: support

----- Original Message -----
From:
"nntp://news.nomagic.com/nomagic.products.magicdrawuml.codeengineering"
<chuck.logan>
To: "2NMAsiaSupat_p null" <supat_p>
Sent: Wednesday, February 04, 2009 2:32 PM
Subject: Problem with Generate C# interface properties


>I have a C# interface file defined that includes properties with the
>{get;set;} signature. If I start with the .cs file, and reverse the code,
>the model is generated with the properties included as attributes. This is
>all OK.
>
> But if I immediately generate the .cs file from the same model, the
> attributes do not get generated as properties in the .cs file. Only the
> methods in the interface are generated.
>
> Is there a way to cause the attributes in the MagicDraw interface model to
> get generated as properties in the .cs interface file?
>
> I'm using MagicDraw 14.0 Patch 1.
>
> Chuck
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 3824 (20090204) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>

Supat P.
 
Posts Rating:

Re: Problem with Generate C# interface properties

Postby walshmagger@yahoo.com » Mon Mar 23, 2015 12:05 am

An Interface is a reference type and it contains only abstract members such as Events, Methods, Properties etc. It contain only declaration for its members and implementation defined as separate entities from classes. It can't contain constants, data fields, constructors, destructors and static members and all the member declarations inside interface are implicitly public. More abot.......C# Interface

Walsh
walshmagger@yahoo.com
Forum Newbie
Forum Newbie
 
Posts: 1
Posts Rating:0
Joined: Mon Mar 23, 2015 12:03 am
Full name: walshmmager


Return to Code engineering

Who is online

Users browsing this forum: No registered users and 1 guest