Are you using the Draw class and listening to the DrawComplete event?
You just need to convert the Polyline to a Polygon, creating a Ring for each Path and add all points. Then add the start point to the end to complete the draw.
After that submit the Polygon to the Geometry Service for Area and Length.