b0AvueJ39UlXe2XX4xMDoxOjBrO-I4W8
Instructional Demo    SD11192
Advanced Revit Code Refactoring—C# Language Features and Design Patterns Can Help
b0AvueJ39UlXe2XX4xMDoxOjBrO-I4W8
Share
Comment
Bookmark
You must be signed in for this action Sign in
Close
Collapse Expand

Description

This class will explain how code based on the Revit software API can be refactored to simplify usage, isolate functionality, and improve maintainability. Class material will cover the use of C# language features and industry best practices to refactor code in Revit software add-ins and supporting library modules. A detailed look will be taken at extension methods, the Action and Func delegate classes, Microsoft LINQ, and design patterns. We will show specific before and after samples of code running in a production add-in. We will explore extension methods to show how you can attach functionality to the responsible object. We will use delegates to encapsulate code, making it less complex and more maintainable. We will demonstrate LINQ by selecting and processing groups of objects. Finally, we will show design patterns that separate command functionality from the user interface.

Key Learnings

  • Learn how to add extension methods to existing Revit API objects to add functionality
  • Learn how to utilize Action class delegates combined with lambda expressions to encapsulate functionality and simplify code
  • Learn how to create LINQ expressions to select and process operations on groups of objects
  • Learn how to use design patterns to separate code responsibilities and provide uniform code interfaces

Speakers

close
Transcript

Share Class

close-24

Comments

Login to join the discussion.
0 comments in this class
Be the first to share your thoughts.
close-24