To keep example illustrative and simple I will use simple code. Let’s suppose we have ASP.NET MVC application with following controller.
Let’s say we want to generate sequence diagram for AddToProducer() method. All we have to do is to right click on method with mouse, select “Generate Sequence Diagram …” and modify some options.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEwynMTiXEo6k3wy0eehcqCnjcCvn9ZOz6T3f5S03vhCNUMPdELUsJWIX2H1-W-V05Xk1gt6TWAnG2WB2vUi8qi2iUXWEWQ4ogcOHc0Tdai5MUIfyhsvE6kSmjJoWk4bkacG3N9izztnqi/s320/SD1.png)
You can choose various options like the Call Depth and Call scope as shown below:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSuDLUwDwKfKz1W4-r5WkxZfTi58zBkKIwhUa4wZQNmLJf-KYvRDEBXRSCBPLAEsGlSSEDt2UuQLJMjOzy4RnttPbKb6-Hno3XwtMXaKFi92y9Zwx4Fxqk3F2yWyITUjZuHZorUjJASya7/s320/SD2.png)
On hitting the OK button, VIsual Studio 2010 analyzes the code and builds a sequence diagram based on its analysis results as shown below:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaorL4HtfYQB4nljvcpvgfGBfi6wOtST9PWswboKa1gKFcpV58fT9Vn7xroVE3zWOdiJpSUyarFyrLUdbmktkm8UnYLzH9TXqut-ujvg-n3BWQasZsyF9rNFh7ieLomBn_oQWZ2rKfApKS/s320/SD3.png)
No comments:
Post a Comment