Click or drag to resize

Simplifier Class



Expands and Reduces subtrees. Expansion: 1) Replaces names with fully qualified dotted names. 2) Adds parentheses around expressions 3) Adds explicit casts/conversions where implicit conversions exist 4) Adds escaping to identifiers 5) Rewrites extension method invocations with explicit calls on the class containing the extension method. Reduction: 1) Shortens dotted names to their minimally qualified form 2) Removes unnecessary parentheses 3) Removes unnecessary casts/conversions 4) Removes unnecessary escaping 5) Rewrites explicit calls to extension methods to use dot notation
Inheritance Hierarchy
SystemObject
  Microsoft.CodeAnalysis.SimplificationSimplifier

Namespace:  Microsoft.CodeAnalysis.Simplification
Assembly:  Microsoft.CodeAnalysis.Workspaces (in Microsoft.CodeAnalysis.Workspaces.dll) Version: 2.3.0-dev-56735-00. Commit Hash: <developer build>
Syntax
public static class Simplifier

The Simplifier type exposes the following members.

Properties
  NameDescription
Public propertyStatic memberAnnotation
The annotation the reducer uses to identify sub trees to be reduced. The Expand operations add this annotation to nodes so that the Reduce operations later find them.
Public propertyStatic memberSpecialTypeAnnotation
This is the annotation used by the simplifier and expander to identify Predefined type and preserving them from over simplification
Top
Methods
See Also