CodeStyleOption<T> Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a code style option and an associated notification option. Supports
being instantiated with T as a Boolean or an enum type
.
CodeStyleOption also has some basic support for migration a Boolean option
forward to an enum type
option. Specifically, if a previously serialized
bool-CodeStyleOption is then deserialized into an enum-CodeStyleOption then 'false'
values will be migrated to have the 0-value of the enum, and 'true' values will be
migrated to have the 1-value of the enum.
Similarly, enum-type code options will serialize out in a way that is compatible with hosts that expect the value to be a boolean. Specifically, if the enum value is 0 or 1 then those values will write back as false/true.
generic <typename T>
public ref class CodeStyleOption : IEquatable<Microsoft::CodeAnalysis::CodeStyle::CodeStyleOption<T> ^>
public class CodeStyleOption<T> : IEquatable<Microsoft.CodeAnalysis.CodeStyle.CodeStyleOption<T>>
public sealed class CodeStyleOption<T> : IEquatable<Microsoft.CodeAnalysis.CodeStyle.CodeStyleOption<T>>
type CodeStyleOption<'T> = class
interface IEquatable<CodeStyleOption<'T>>
Public Class CodeStyleOption(Of T)
Implements IEquatable(Of CodeStyleOption(Of T))
Public NotInheritable Class CodeStyleOption(Of T)
Implements IEquatable(Of CodeStyleOption(Of T))
Type Parameters
- T
- Inheritance
-
CodeStyleOption<T>
- Implements
Constructors
CodeStyleOption<T>(T, NotificationOption) | Microsoft.CodeAnalysis.CodeStyle.CodeStyleOption2`1 |
Properties
Default | Microsoft.CodeAnalysis.CodeStyle.CodeStyleOption2`1 |
Notification | Microsoft.CodeAnalysis.CodeStyle.CodeStyleOption2`1 |
Value | Microsoft.CodeAnalysis.CodeStyle.CodeStyleOption2`1 |
Methods
Equals(CodeStyleOption<T>) | Microsoft.CodeAnalysis.CodeStyle.CodeStyleOption2`1 |
Equals(Object) | Microsoft.CodeAnalysis.CodeStyle.CodeStyleOption2`1 |
FromXElement(XElement) | Microsoft.CodeAnalysis.CodeStyle.CodeStyleOption2`1 |
GetHashCode() | Microsoft.CodeAnalysis.CodeStyle.CodeStyleOption2`1 |
ToXElement() | Microsoft.CodeAnalysis.CodeStyle.CodeStyleOption2`1 |
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for