Click or drag to resize

PowerShellFormattingInfo Class

Provides formatting information for Microsoft PowerShell scripts.
Inheritance Hierarchy
SystemObject
  Ookii.FormatCPowerShellFormattingInfo

Namespace:  Ookii.FormatC
Assembly:  Ookii.FormatC (in Ookii.FormatC.dll) Version: 2.2.0
Syntax
public class PowerShellFormattingInfo : IFormattingInfo, 
	ICustomFormattingInfo

The PowerShellFormattingInfo type exposes the following members.

Constructors
  NameDescription
Public methodPowerShellFormattingInfo
Initializes a new instance of the PowerShellFormattingInfo class.
Top
Properties
  NameDescription
Public propertyCaseSensitive
Gets a value that indicates whether the language to be formatted is case sensitive.
Public propertyForceFallbackFormatting
Gets or sets a value that indicates whether regular expression based formatting should be used even if System.Management.Automation.PSParser is available.
Public propertyPatterns
Gets a list of regular expression patterns used to identify elements of the code.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFormatCode
Formats the specified source code.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks

This formatter will use System.Management.Automation to tokenize PowerShell code for more accurate formatting. To use this, you must either reference System.Management.Automation in your project, or manually load the assembly and pass it to the constructor.

If the System.Management.Automation.PSParser type could not used, regular expression based formatting will be used and the UsedFallbackFormatting will be set to after the formatting operation.

Thread Safety
Static members of this type are safe for multi-threaded operations. Instance members of this type are safe for multi-threaded operations.
See Also