Struct Fragment
Represents a fragment of text in an editor. Used for context-specific syntax highlighting.
[Serializable]
public struct Fragment : IEquatable<Fragment>
- Implements
- Inherited Members
- Extension Methods
Constructors
Fragment(int, int, int, Color, bool, NavigationKind)
Creates a new instance of the Fragment structure.
public Fragment(int line, int column, int length, Color color, bool navigable = false, Fragment.NavigationKind navigationKind = NavigationKind.Default)
Parameters
lineintThe line which contains the first character of the fragment.
columnintThe column that is the first character of the fragment.
lengthintThe length of the fragment.
colorColorThe color of the fragment.
navigableboolSpecifies wheter the fragment can be reached by a navigation command.
navigationKindFragment.NavigationKindSpecifies the type of navigation target.
Properties
Color
The color of the fragment.
public Color Color { readonly get; set; }
Property Value
Column
The column that is the first character of the fragment.
public int Column { readonly get; set; }
Property Value
IsNavigationTarget
Specifies wheter the fragment can be reached by a navigation command. Supports the "Go to definition" feature of many editors.
public bool IsNavigationTarget { readonly get; set; }
Property Value
Length
The length of the fragment.
public int Length { readonly get; set; }
Property Value
Line
The line which contains the first character of the fragment.
public int Line { readonly get; set; }
Property Value
NavigationTargetKind
For navigation targets that could have different roles based on their fragment color, specifies the kind of navigation target.
public Fragment.NavigationKind NavigationTargetKind { readonly get; set; }
Property Value
SpecialColor
If the desired color is not contained in the Color enumeration, this property is used to set a specific color.
public string SpecialColor { readonly get; set; }
Property Value
ToolTip
A tooltip corresponding to the fragment.
public Tooltip ToolTip { readonly get; set; }
Property Value
Methods
Equals(Fragment)
Indicates whether the current object is equal to another object of the same type.
public readonly bool Equals(Fragment other)
Parameters
otherFragmentAn object to compare with this object.
Returns
Equals(object)
Indicates whether the current object is equal to another object of the same type.
public override readonly bool Equals(object obj)
Parameters
objobjectAn object to compare with this object.
Returns
GetHashCode()
Serves as the default hash function.
public override readonly int GetHashCode()
Returns
- int
A hash representing the current object.
Operators
operator ==(Fragment, Fragment)
Compares two instances of Fragment.
public static bool operator ==(Fragment a, Fragment b)
Parameters
Returns
operator !=(Fragment, Fragment)
Compares two instances of Fragment.
public static bool operator !=(Fragment a, Fragment b)