ValeViolationPosition
The ValeViolationPosition class does something.
less than a minute
Definition
Source Code
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
class ValeViolationPosition {
[System.IO.FileInfo]$FileInfo
[int]$Line
[int]$StartColumn
[int]$EndColumn
[string] ToString() {
if ($null -ne $this.FileInfo) {
return @(
@(
$this.FileInfo.FullName
$this.Line
$this.StartColumn
) -join ':'
$this.EndColumn
) -join '-'
}
return @(
@(
$this.Line
$this.StartColumn
) -join ':'
$this.EndColumn
) -join '-'
}
[string] ToRelativeString() {
if ($null -ne $this.FileInfo) {
return @(
@(
(Resolve-Path -Path $this.FileInfo.FullName -Relative)
$this.Line
$this.StartColumn
) -join ':'
$this.EndColumn
) -join '-'
}
return @(
@(
$this.Line
$this.StartColumn
) -join ':'
$this.EndColumn
) -join '-'
}
}
An instance of the ValeViolationPosition class does something.
Examples
1. Parsing a string for links
This example demonstrates something.
2. Filtering a list of links by position
This example demonstrates something.
Constructors
ValeViolationPosition()
- Initializes a new instance of the ValeViolationPosition class.
Methods
Properties
Last modified March 10, 2023: (GH-71) Document Vale classes (ad1e42a)