Author Topic: Question - .NET framework classes  (Read 36358 times)

Tompl

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
  • I love YaBB 1 Gold!
    • View Profile
Question - .NET framework classes
« on: November 10, 2002, 11:35:47 pm »
Hello,
is some way to importing the .NET framework classes into EA?

Thanks for your ideas
Tom

Jason Kaczor

  • Guest
Re: Question - .NET framework classes
« Reply #1 on: November 22, 2002, 10:35:05 pm »
There are a couple ways to do this using EA's automation facilities:

You could do the "base class library", which is not all of the framework, but a decent chunk, using the XML source, located at:
http://msdn.microsoft.com/net/ecma/
(scroll to the bottom of the page, there is a link for an XML file describing the BCL)

Or, alternatively, you could use "System.Reflection", and reflect/recurse through the framework classes, automating EA and creating packages for each namespace appropriately.

Hmm, I seem to recall Wrox's subscription site, "C# Today" recently had a series about using reflection to create UML models...

Jason Kaczor

  • Guest
Re: Question - .NET framework classes
« Reply #2 on: November 23, 2002, 11:01:29 pm »
Here is the relevant article link from "C# Today", of course, I no longer subscribe...

http://www.csharptoday.com/content.asp?id=1837

Abstract
In this case study, Tony Loton looks at reverse engineering a C# program into a UML model, using the .NET System.Reflection classes to introspect a compiled assembly and a Rational Rose script to build an object model from the types and members that we discover. If you've been wondering about what reflection is and why you would ever want to use it, you'll see a really interesting application of that feature here. And if you're interested in reverse engineering .NET programs, you'll go away with a simple C# program / Rose script combination that will help you to do just that.  

Jason Kaczor

  • Guest
Re: Question - .NET framework classes
« Reply #3 on: November 24, 2002, 11:19:17 am »
Ha;

Yet another follow-up:

Ok, http://www.lotontech.com/visualmodeling has the .NET Framework classes available as a Rose model for $30.

I'm checking to see whether or not he can provide an XMI export as well, then test w/EA.

Jason Kaczor

  • Guest
Re: Question - .NET framework classes
« Reply #4 on: November 27, 2002, 08:54:51 am »
Ok, the author got in-touch w/me, and has a solution, the versions he provides for use with Visio are actually C# abstract definition code-files.

He sent me a sample, and EA imported it fine.  However, we it does not seem to support .NET-specific functionality ala "Properties", however ultimately it is still useful if you want to inherit from a base, or show interaction w/framework classes in a model.

So, for $30.00, I'm going to give it a shot.

gsparks

  • EA User
  • **
  • Posts: 325
  • Karma: +0/-0
  • I love YaBB 1 Gold!
    • View Profile
Re: Question - .NET framework classes
« Reply #5 on: December 03, 2002, 03:08:40 am »
Hi,

The latest build (584) of EA has an additional option to import an XML 'library' file of .NET framework classes as mention by Jason in an earlier post on this thread:

http://msdn.microsoft.com/net/ecma/
(scroll to the bottom of the page, there is a link for an XML file describing the BCL)

The option is on the right click on a package in the project tree ... under import/export.

We plan to put together some reflection based examples in C# to create suitable XML files for import using this option. In the meantime you can use this to import the BCL at least.

Hope this helps,

Geoff Sparks






Russ McClelland

  • Guest
Re: Question - .NET framework classes
« Reply #6 on: December 13, 2002, 08:01:39 am »
Is there a trick to importing this?  I encountered the following:

ERROR: Root package not found at: XMI.content/UML:Model/UML:Namespace.ownedElement/UML:Package

Please cc my email address if you reply.

Thanks!

timhawkins

  • EA User
  • **
  • Posts: 28
  • Karma: +0/-0
  • If a man says something and a woman is not around to hear him, is he still wrong?
    • View Profile
Re: Question - .NET framework classes
« Reply #7 on: December 14, 2002, 05:40:51 am »
>>Is there a trick to importing this?  I encountered the >>ERROR: Root package not found at: >>XMI.content/UML:Model/UML:Namespace.ownedElement/UMLackage

I get the same error with the latest build, I have been carefull to makesure that the DTD path has been fixed up to match the place I have stored the All.xml file in, and I can now open the xml file in Internet Explorer, so the xml is fine.

gsparks

  • EA User
  • **
  • Posts: 325
  • Karma: +0/-0
  • I love YaBB 1 Gold!
    • View Profile
Re: Question - .NET framework classes
« Reply #8 on: December 14, 2002, 01:40:00 pm »
Hi,

It sounds from the description you give that you have selected the wrong import function. The correct menu option to use is found by right clicking on a package, then going to the Import/Export submenu and choosing "Import .NET XML file". The error message sounds like the standard XMI importer.

The .NET XML files are not in XMI format - so a special function was supplied to import it.

Also NOTE! I have just downloaded the latest version of this file from the MS Website, and find it has been modified to include a hard coded DTD path ... although the DTD is supplied, the import will fail due to the hard coding of the DTD's location. You need to modify or comment out the DOCTYPE declaration at the start of the XML to get a clean import.

Hope this explains,

Geoff Sparks

flyingrobots

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
  • I love YaBB 1 Gold!
    • View Profile
Re: Question - .NET framework classes
« Reply #9 on: January 05, 2003, 06:35:13 pm »
Bummer...I imported the all.xml file, but alas...the System.Data namespace isn't in there...

Is there an update to this All.xml?  Or is reverse engineering in my future?   :)

Kevin

Jason Kaczor

  • Guest
Re: Question - .NET framework classes
« Reply #10 on: January 09, 2003, 01:04:16 am »
>but alas...the System.Data namespace isn't in there...

I would hazard an educated guess that it isn't there, because it is a Microsoft proprietary namespace, and not submitted to ECMA for standardization, much like WinForms & WebForms...  System.Data = ADO.NET, right?


DaveEchols

  • EA Novice
  • *
  • Posts: 13
  • Karma: +0/-0
  • !
    • View Profile
Re: Question - .NET framework classes
« Reply #11 on: March 07, 2003, 01:00:59 pm »
Has any more work been done on this? I have imported the BCL supplied on the MS site, but need objects/classes that are not in the BCL. I had looked at the possibility of using reflection in VB.NET to write out suitable XML files, but just don't know enough about the CLR to be able to get useful XML files.

rescobar

  • EA User
  • **
  • Posts: 69
  • Karma: +0/-0
  • Viva Bolivia
    • View Profile
Re: Question - .NET framework classes
« Reply #12 on: March 13, 2003, 10:07:34 am »
Import .NET XML runs ok (commenting out the DOCTYPE). But system.dat is missing. Is there another place to get an xml file with this namespace?
Thanks in advance
Sergio
Sergio Escobar
[email protected]

Dave Echols

  • Guest
Re: Question - .NET framework classes
« Reply #13 on: March 24, 2003, 07:31:41 pm »
I am very interested in this topic, and would be willing to look at any examples, do testing and help with coding of any examples that might make full .NET integration easier in EA.

fcotroneo

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • Francesco Cotroneo
    • View Profile
Re: Question - .NET framework classes
« Reply #14 on: March 26, 2003, 07:41:05 am »

Thank you.

I imported all.xml too in an EA repository (SQL 2000) , and worked fine.

I am very interested in this topic as well, and in any examples, articles, codes and help that might make full .NET integration easier in EA.

We're starting using Visual studio Net, main language C#, and EA as modeling tool, to be used in UP projects.

Francesco Cotroneo
ASMTEL Settimo Torinese
Turin
Italy
email:[email protected]
Francesco Cotroneo
ASMTEL srl
Settimo Torinese
Turin
Italy