I have download the April 2008 CTP Visual Studio Team System Code Name "Rosario" VPC Image to test the new features.
In this article I will talk about the Sequence Diagram feature. In VSTS "Rosario" we can either create a sequence diagram from scratch and generate the associated code or we can write our code and using reverse-engineer to generate our sequence diagram.
For example, I write a sample solution "TestingSequenceDiagrams" with a project "TestingSequenceDiagrams" with a typical "Hello World" windows form application with a form (Form1), a button (btnSubmit), a textbox (txtName), a label (lblHelloName) and a HelloWorld class with a SayHello function. The btnSubmit click event code is:
Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
Dim helloClass As New HelloWorld(txtName.Text)
lblHelloName.Text = helloClass.SayHello()
End Sub
Next, I add a new blank sequence diagram: Right button at the project element -> Add -> New Item... -> Common Items -> General -> Sequence Diagram.
Next step is going to View -> Architecture Explorer menu and choose:
Column 1) "TestingSequenceDiagrams" Solution
Column 2) Contains
Column 3) "TestingSequenceDiagrams" Project
Column 4) Contains
Column 5) "Form1"
Column 6) Contains
Column 7) "btnSubmit_Click"
Column 8) Insert into Active Diagram
And the result is the btnSubmit_Click method sequence diagram...
No comments:
Post a Comment