Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating C# events with Visual Studio Modeling Project

I started playing with UML modeling in VS. I tried creating diagram with a few classes, connect them and generate some code from the model - after installing the Feature Pack, everything seems to work fine.

However what I am missing is the ability to declare events - which play rather major part in .Net (and are often key to the design).

How do I declare events in the UML Class Diagram in Visual Studio?

EDIT:

To clear things up. I'm not interested in anything related to the Class Diagram feature present in C# projects in Visual Studio for some time.

This question is related to Modeling Project, which is a new feature in Visual Studio 2010 Ultimate.

like image 878
Matěj Zábský Avatar asked Jan 21 '12 09:01

Matěj Zábský


People also ask

How is C created?

A successor to the programming language B, C was originally developed at Bell Labs by Ritchie between 1972 and 1973 to construct utilities running on Unix. It was applied to re-implementing the kernel of the Unix operating system. During the 1980s, C gradually gained popularity.

What is C used to create?

C programming language is a machine-independent programming language that is mainly used to create many types of applications and operating systems such as Windows, and other complicated programs such as the Oracle database, Git, Python interpreter, and games and is considered a programming foundation in the process of ...

What is creating and running program in C?

Program consists of set of instructions written in a High-level language like English. The computer only understands Low-level language. We need a translator to convert high-level language to low-level language and vice versa. We have two translators known as compiler and interpreter.


2 Answers

UML is implementation language agnostic. The correct way to define a language specific idiom in UML is by using a stereotype. A stereotype is a specialisation of UML metaclass. Define a profile which extends Class into an EventHandler and Event stereotype which extends Message. Then apply those stereotypes to classes in your models appropriately. You can then place the language specific idiom implementation details in the stereotype.

like image 129
Martin Spamer Avatar answered Sep 22 '22 14:09

Martin Spamer


hope following link will help you.

http://developingfor.net/2007/11/29/visual-studio-2008-class-diagram/

like image 43
Chamika Sandamal Avatar answered Sep 22 '22 14:09

Chamika Sandamal