// https://docs.microsoft.com/en-us/uwp/api/Windows.UI.Xaml.Controls.MediaElement#remarks public UseMediaPlayerElementTag(TagDependencies tagDeps) : base(tagDeps, "RXT402", TagErrorType.Warning) { this.ToolTip = StringRes.UI_XamlAnalysisUseMediaPlayerElementToolTip; this.Description = StringRes.UI_XamlAnalysisUseMediaPlayerElementDescription; this.ExtendedMessage = StringRes.UI_XamlAnalysisUseMediaPlayerElementExtendedMessage; }
protected RapidXamlDisplayedTag(TagDependencies deps, string errorCode, TagErrorType defaultErrorType) : base(deps.Span, deps.Snapshot, deps.FileName, deps.Logger) { if (deps.Span.Start > deps.Snapshot.Length) { if (deps.Snapshot.Length > 0) { deps.Logger?.RecordError( $"Span calculated outside snapshot for ErrorCode={errorCode}", deps.TelemetryProperties); } // Reset the span location to something that's definitely valid deps.Span = new Span(0, 0); } var line = deps.Snapshot.GetLineFromPosition(deps.Span.Start); var col = deps.Span.Start - line.Start.Position; this.ErrorCode = errorCode; this.Line = line.LineNumber; this.Column = col; this.DefaultErrorType = defaultErrorType; this.VsPfp = deps.VsPfp; this.ProjectFilePath = deps.ProjectFilePath; this.MoreInfoUrl = deps.MoreInfoUrl; this.CustomFeatureUsageOverride = deps.FeatureUsageOverride; }
public SelectedItemBindingModeTag(TagDependencies tagDeps) : base(tagDeps, "RXT160", TagErrorType.Warning) { this.SuggestedAction = typeof(SelectedItemBindingModeAction); this.ToolTip = StringRes.UI_XamlAnalysisSetBindingModeToTwoWayToolTip; this.Description = StringRes.UI_XamlAnalysisSetBindingModeToTwoWayDescription; }
public MissingRowDefinitionTag(TagDependencies tagDeps) : base(tagDeps, "RXT101", TagErrorType.Warning) { this.SuggestedAction = typeof(AddMissingRowDefinitionsAction); this.ToolTip = StringRes.UI_XamlAnalysisMissingRowDefinitionTooltip; this.ExtendedMessage = StringRes.UI_XamlAnalysisMissingRowDefinitionExtendedMessage; }
public AddTextBoxInputScopeTag(TagDependencies tagDeps) : base(tagDeps, "RXT150", TagErrorType.Suggestion) { this.SuggestedAction = typeof(AddTextBoxInputScopeAction); this.Description = StringRes.UI_XamlAnalysisTextBoxWithoutInputScopeDescription; this.ExtendedMessage = StringRes.UI_XamlAnalysisTextBoxWithoutInputScopeExtendedMessage; }
public UidTitleCaseTag(TagDependencies tagDeps, string value) : base(tagDeps, "RXT451", TagErrorType.Suggestion) { this.ToolTip = StringRes.UI_XamlAnalysisUidTitleCaseToolTip; this.Description = StringRes.UI_XamlAnalysisUidTitleCaseDescription.WithParams(value); this.CurrentValue = value; }
public NameTitleCaseTag(TagDependencies tagDeps, string value) : base(tagDeps, "RXT452", TagErrorType.Suggestion) { this.SuggestedAction = typeof(MakeNameStartWithCapitalAction); this.ToolTip = StringRes.UI_XamlAnalysisNameTitleCaseToolTip; this.Description = StringRes.UI_XamlAnalysisNameTitleCaseDescription.WithParams(value); this.CurrentValue = value; }
public HardCodedStringTag(TagDependencies tagDeps, string elementName, string attributeName, ProjectType projType) : base(tagDeps, "RXT200", TagErrorType.Warning) { this.ToolTip = StringRes.UI_XamlAnalysisHardcodedStringTooltip; this.ExtendedMessage = StringRes.UI_XamlAnalysisHardcodedStringExtendedMessage; this.ElementName = elementName; this.AttributeName = attributeName; this.ProjType = projType; }
// https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/checkbox#handle-click-and-checked-events public CheckBoxCheckedAndUncheckedEventsTag(TagDependencies tagDeps, string existingName, bool hasChecked) : base(tagDeps, "RXT401", TagErrorType.Warning) { this.ToolTip = StringRes.UI_XamlAnalysisCheckBoxCheckedAndUncheckedEventsToolTip; this.Description = StringRes.UI_XamlAnalysisCheckBoxCheckedAndUncheckedEventsDescription; this.ExtendedMessage = StringRes.UI_XamlAnalysisCheckBoxCheckedAndUncheckedEventsExtendedMessage; this.ExistingIsChecked = hasChecked; this.ExistingName = existingName; }
protected RapidXamlDisplayedTag(TagDependencies deps, string errorCode, TagErrorType defaultErrorType) : base(deps.Span, deps.Snapshot, deps.FileName, deps.Logger) { var line = deps.Snapshot.GetLineFromPosition(deps.Span.Start); var col = deps.Span.Start - line.Start.Position; this.ErrorCode = errorCode; this.Line = line.LineNumber; this.Column = col; this.DefaultErrorType = defaultErrorType; this.VsAbstraction = deps.VsAbstraction; this.ProjectFilePath = deps.ProjectFilePath; this.MoreInfoUrl = deps.MoreInfoUrl; this.CustomFeatureUsageOverride = deps.FeatureUsageOverride; }
public MissingColumnDefinitionTag(TagDependencies tagDeps) : base(tagDeps, "RXT102", TagErrorType.Warning) { this.ToolTip = StringRes.UI_XamlAnalysisMissingColumnDefinitionTooltip; this.ExtendedMessage = StringRes.UI_XamlAnalysisMissingColumnDefinitionExtendedMessage; }
public ColumnSpanOverflowTag(TagDependencies tagDeps) : base(tagDeps, "RXT104", TagErrorType.Warning) { this.SuggestedAction = typeof(ColumnSpanOverflowAction); this.ToolTip = StringRes.UI_XamlAnalysisColumnSpanOverflowTooltip; }
public RowSpanOverflowTag(TagDependencies tagDeps) : base(tagDeps, "RXT103", TagErrorType.Warning) { this.ToolTip = StringRes.UI_XamlAnalysisRowSpanOverflowTooltip; }