text stringlengths 14 100k | source stringclasses 1
value | repo stringclasses 810
values | language stringclasses 13
values |
|---|---|---|---|
<|fim_suffix|> /// Sets the action to run when clicking on the button.
/// </summary>
/// <param name="element">The <see cref="IUIButton"/> instance.</param>
/// <param name="actionOnClick">The action to run when clicking on the button.</param>
/// <returns>The updated <see cref="IUIButton"/> instance... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// A component that represents an empty card and <see cref="IUIElement"/> for the option value.
/// </summary>
public interface IUICard : IUIElement
{
/// <summary>
/// Gets the <see cref="IUIElement"/> to display in the item.
/// </summary>
IUIEleme... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>alue) =>
{
onRowSelectedAction?.Invoke(value);
return ValueTask.CompletedTask;
};
return element;
}
/// <summary>
/// Sets the <see cref="IUIDataGridRow"/> that should be selected in the data grid.
/// If <paramref name="row"... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>urn new UIDataGridCell(uiElement);
}
}
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// A component that represents a cell in a <see cref="IUIDataGridRow"/>.
/// </summary>
public interface IUIDataGridCell
{
/// <summary>
/// Gets the <see cref="IUIElement"/> to display in the cell.
... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>
/// </summary>
/// <param name="value">The value associated to the item.</param>
/// <param name="details">The element to display as detail information in the row.</param>
/// <param name="cells">The cells to display in the row.</param>
public static IUIDataGridRow Row(object? value, ... | fim | DevToys-app/DevToys | csharp |
namespace DevToys.Api;
/// <summary>
/// A component that can be used to display side by side or inlined texts and highlight differences between them.
/// </summary>
public interface IUIDiffTextInput : IUISingleLineTextInput
{
/// <summary>
/// Gets the original text displayed to the left of the diff view.
... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// A component that represents a drop down button where the user can click on a menu item.
/// </summary>
public interface IUIDropDownButton : IUIElement
{
/// <summary>
/// Gets the list of items displayed in the drop down menu.
/// </summary>
IUIDr... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// A component that represents an item in a drop down list.
/// </summary>
public interface IUIDropDownListItem
{
/// <summary>
/// Gets<|fim_middle|> the text to display in the item.
/// </summary>
string? Text { get; }
/// <summ... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// A component that represents a menu item, which reacts when clicking on it.
/// </summary>
public interface IUIDropDownMenuItem
{
/// <summary>
/// Gets whether this menu item should be enabled or disabled. Default is true.
/// </summary>
bool IsEn... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>t) where T : IUIElement
{
if (element is UIElement strongElement)
{
strongElement.IsEnabled = true;
}
return element;
}
/// <summary>
/// Align the element horizontally.
/// </summary>
public static T AlignHorizontally<T>(this T element,... | fim | DevToys-app/DevToys | csharp |
namespace DevToys.Api;
/// <summary>
/// A base interface for all UI elements that can have children elements.
/// </summary>
public interface IUIElementWithChildren : IUIElement
{
/// <summary>
/// Gets the first child element with the specified id.
/// </summary>
/// <param name="id">The id of a chi... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// A component that represents a drop zone and selector for files, folders, images coming from the clipboard.
/// </summary>
public interface IUIFileSelector : IUIElement
{
/// <summary>
/// Gets the list of absolute path to the file(s) the user selected.
... | fim | DevToys-app/DevToys | csharp |
using System.Globalization;
namespace DevToys.Api;
/// <summary>
/// A component provides a flexible grid area that consists of columns and rows.
/// Child elements of the Grid are measured and arranged according to their row/column assignments and other logic.
/// </summary>
public interface IUIGrid : IUIElementWit... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>using System.Globalization;
namespace DevToys.Api;
/// <summary>
/// A component hosted by a <see cref="IUIGrid"/> that represents a cell in a flexible grid.
/// </summary>
public interface IUIGridCell
{
/// <summary>
/// Gets the row alignment of the cell.
/// </summary>
int Row { get;... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// A component that represents an icon.
/// </summary>
public interface IUIIcon : IUIElement
{
/// <summary>
/// Gets the name of the font containing the icon.
/// </summary>
string FontName { get; }
/// <summary>
/// Gets the glyph correspo... | fim | DevToys-app/DevToys | csharp |
using System.Collections.ObjectModel;
using OneOf;
using SixLabors.ImageSharp;
namespace DevToys.Api;
/// <summary>
/// A component that displays an image and allows the user to perform some read-only actions on it.
/// By default, image viewer supports BMP, GIF, JPEG, PBM, PNG, TIFF, TGA, WEBP, SVG formats.
/// </s... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>ventHandler? OnCloseActionChanged;
public event EventHandler? OnActionButtonClickChanged;
}
public static partial class GUI
{
/// <summary>
/// Create a component that displays a bar aiming at indicating a relevant information to the user.
/// </summary>
public static IUIInfoBar InfoB... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|> /// <summary>
/// Sets the text style.
/// </summary>
public static IUILabel Style(this IUILabel element, UILabelStyle style)
{
((UILabel)element).Style = style;
return element;
}
/// <summary>
/// Sets the <see cref="IUILabel.AutoWrap"/> to true.
/// </... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>using System.Collections.ObjectModel;
namespace DevToys.Api;
/// <summary>
/// A component that represents a list of items.
/// </summary>
public interface IUIList : IUIElementWithChildren
{
/// <summary>
/// Gets the list of items displayed in the list.
/// </summary>
ObservableCollect... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// A component that represents an item in a list.
/// </summary>
public interface IUIListItem
{
/// <summary>
/// Gets the <see cref="IUIElement"/> to display in the item.
/// </summary>
IUIElement UIElement { get; }
/// <summary>
/// Gets t... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// A component that can be used to display or edit unformatted text on multiple lines.
/// </summary>
public interface IUIMultiLineTextInput : IUISingleLineTextInput
{
/// <summary>
/// Gets the list of spans to highlight in the text document.
/// </summ... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// A component that can be used to display or edit numbers on a single line.
/// </summary>
public interface IUINumberInput : IUISingleLineTextInput
{
/// <summary>
/// Gets the minimum value possible. Default is <see cref="int.MinValue"/>.
/// </summary... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// A component that can be used to display or edit passwords on a single line.
/// </summary>
public interface <|fim_suffix|>sed to display or edit passwords on a single line.
/// </summary>
public static IUIPasswordInput PasswordInput()
{
return... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// A component that indicates the progress of an operation.
/// </summary>
public interface IUIProgressBar : IUIElement
{
/// <summary>
/// Gets the current position of the progress bar between 0 and 100.
/// </summary>
double Value { get; }
///... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>ress of an operation.
/// </summary>
/// <param name="id">An optional unique identifier for this UI element.</param>
public static IUIProgressRing ProgressRing(string? id)
{
return new UIProgressRing(id);
}
}
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// A circular c... | fim | DevToys-app/DevToys | csharp |
namespace DevToys.Api;
/// <summary>
/// A component that represents a drop down list where the user can select one item in it.
/// </summary>
public interface IUISelectDropDownList : IUITitledElement
{
/// <summary>
/// Gets the list of items displayed in the drop down list.
/// </summary>
IUIDropDow... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>ing"/> instance.</returns>
/// <remarks>
/// The binding with the setting is going in both directions. When the setting is set, the switch is updated. When the switch is toggled, the setting is updated.
/// </remarks>
public static IUISetting Handle(
this IUISetting element,
... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|> return ValueTask.CompletedTask;
});
}
/// <summary>
/// Sets a <see cref="IUISelectDropDownList"/> to <see cref="IUISetting.InteractiveElement"/> and automatically associate the
/// given <paramref name="settingDefinition"/> to the switch state.
/// </summary>
/// <ty... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>yValue(ref _canCopyWhenEditable, value, CanCopyWhenEditableChanged);
}
public IUIElement? CommandBarExtraContent
{
get => _commandBarExtraContent;
internal set => SetPropertyValue(ref _commandBarExtraContent, value, CommandBarExtraContentChanged);
}
public bool HideCo... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>tatic IUISplitGrid WithLeftPaneChild(this IUISplitGrid element, IUIElement? child)
{
((UISplitGrid)element).LeftOrTopCellContent = child;
return element;
}
/// <summary>
/// Set the element to display in the right pane.
/// </summary>
public static IUISplitGrid Wit... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// A component that stacks child elements into a single line that can be oriented horizontally or vertically.
/// </summary>
public interface IUIStack : IUIElementWithChildren
{
/// <summary>
/// Gets whether this element should use the full height available... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>using DevToys.Api.Strings.ApiText;
namespace DevToys.Api;
/// <summary>
/// A component that represents a changeable switch.
/// </summary>
public interface IUISwitch : IUIElement
{
/// <summary>
/// Gets the current state of the switch.
/// </summary>
bool IsOn { get; }
/// <summa... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>turn element;
}
}
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// A base interface for all UI elements that can have a title / header on top of the element.
/// </summary>
public interface IUITitledElement : IUIElement
{
/// <summary>
/// Gets a title to display for this element.
... | fim | DevToys-app/DevToys | csharp |
namespace DevToys.Api;
/// <summary>
/// A base interface for all UI elements that can have a title / header on top of the element along with children elements.
/// </summary>
public interface IUITitledElementWithChildren : IUITitledElement, IUIElementWithChildren
{
}
internal abstract class UITitledElementWithChild... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>he glyph.
/// </summary>
int Utf32Glyph { get; }
}
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// Provides an interface for UI components that support<|fim_middle|> UTF-32 glyphs.
/// </summary>
public interface IUIUtf32GlyphProvider
{
/// <summary>
/// Gets the UTF-32 code point... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// A component that represents an icon with a UTF-32 glyph.
/// </summary>
public interface IUIUtf32Icon : IUIIcon, IUIUtf32GlyphProvider
{
}
<|fim_suffix|>// <param name="glyph">The UTF-32 code point of the icon glyph.</param>
public static IUIUtf32Icon Glyph(t... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// A component that represents a button, which reacts when clicking on it.
/// </summary>
public interface IUIUtf32IconButton : IUIButton, IUIUtf32IconProvider
{
}
[DebuggerDisplay($"Id = {{{nameof(Id)}}}, Text = {{{nameof(Text)}}}")]
internal sealed class UIUtf32I... | fim | DevToys-app/DevToys | csharp |
namespace DevToys.Api;
/// <summary>
/// A component that represents a drop down button where the user can click on a menu item.
/// </summary>
public interface IUIUtf32IconDropDownButton : IUIDropDownButton, IUIUtf32IconProvider
{
}
[DebuggerDisplay($"Id = {{{nameof(Id)}}}, Text = {{{nameof(Text)}}}")]
internal sea... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>ontName"/>.</param>
/// <param name="text">The text to display in the menu item.</param>
public static IUIUtf32IconDropDownMenuItem DropDownMenuItem(string iconFontName, int iconGlyph, string text)
{
return (IUIUtf32IconDropDownMenuItem)DropDownMenuItem(iconFontName, iconGlyph).Text(te... | fim | DevToys-app/DevToys | csharp |
namespace DevToys.Api;
/// <summary>
/// Provides an interface for UI components that support UTF-32 icons.
/// </summary>
public interface IUIUtf32IconProvider
{
/// <summary>
/// Gets the UTF-32 code point of the icon glyph.
/// </summary>
int Utf32IconGlyph { get; }
}
<|endoftext|> | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>t;
}
}
<|fim_prefix|>using OneOf;
namespace DevToys.Api;
/// <summary>
/// A component that represents a web view.
/// </summary>
public interface IUIWebView : IUITitledElement
{
/// <summary>
/// The HTML content to display, or URI to the page to display.
/// </summary>
OneOf<strin... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>ry>
public static IUIWrap NoSpacing(this IUIWrap element)
{
((UIWrap)element).Spacing = UISpacing.None;
return element;
}
/// <summary>
/// Sets a small spacing between children.
/// </summary>
public static IUIWrap SmallSpacing(this IUIWrap element)
{
... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// Represents a modal dialog.
/// </summary>
public sealed class UIDialog : IDisposable
{
private readonly TaskCompletionSource _dialogCloseCompletionSource = new();
/// <summary>
/// Initializes a new instance of the <see cref="UIDialog"/> class with t... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>gl1, UIGridLength gl2)
{
return !(gl1 == gl2);
}
/// <summary>
/// Determines whether the <see cref="UIGridLength"/> is equal to the specified object.
/// </summary>
/// <param name="o">The object with which to test equality.</param>
/// <returns>True if the objects ar... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>o = 0,
/// <summary>
/// The row or column is sized in device independent pixels.
/// </summary>
Pixel = 1,
/// <summary>
/// The row or column is sized as a weighted proportion of available space.
/// </summary>
Fraction = 2,
}
<|fim_prefix|>namespace DevToys.Api;
/// ... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>tedTextSpanColor.Default)
: base(span)
{
Color = color;
}
/// <summary>
/// Gets the color of the highlighted text span.
/// </summary>
public UIHighlightedTextSpanColor Color { get; }
}
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// Represents a highligh... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// Represents the color options for a highlighted text span in the UI.
/// </summary>
public enum UIHighlightedTextSpanColor
{
/// <summa<|fim_suffix|>mmary>
Default,
/// <summary>
/// The blue color.
/// </summary>
Blue,
/// <summary>
... | fim | DevToys-app/DevToys | csharp |
namespace DevToys.Api;
/// <summary>
/// Indicates where an element should be displayed on the horizontal axis relative to the allocated layout slot of the parent element.
/// </summary>
public enum UIHorizontalAlignment
{
/// <summary>
/// An element aligned to the left of the layout slot for the parent elem... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>ontain the information to display on hover
/// </summary>
public string Tooltip { get; }
}
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// Represents the Tooltip to display on hover
/// </summary>
public record UIHoverTooltip : TextSpan
{
///<|fim_middle|> <summary>
/// Initialize... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// Represents the severity level of a <see cref="IUIInfoBar"/>.
/// </summary>
public enum UIInfoBarSeverity
{
/// <summary>
/// Informational severity.
/// </summary>
Informational,
/// <summary>
/// Error severity.
/// </summary>
E... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// Represents the style of a <see cref="IUILabel"/>.
/// </summary>
public enum UILabelStyle
{
/// <summary>
/// The caption style.
/// </summary>
Caption,
///<|fim_suffix|> /// <summary>
/// The large body style.
/// </summary>
Bo... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// Defines the different orientations that an element <|fim_suffix|> /// Element or layout should be vertically oriented.
/// </summary>
Vertical = 2
}
<|fim_middle|>or layout can have.
/// </summary>
[Flags]
public enum UIOrientation
{
/// <summary>
... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// Defines the different spacing to apply between element in the layout.
/// </summary>
public enum UISpacing
{
/// <summary>
/// No space between element. Use this space between element or text th<|fim_suffix|>s of a same group.
/// </summary>
Small... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// End of line character preference.
/// </summary>
public enum UITextEndOfLinePreference
{
/// <summary>
/// Use the end of line character id<|fim_suffix|>line feed (\n) as the end of line character.
/// </summary>
LF = 1,
/// <summary>
///... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|> number.
/// </summary>
Hide
}
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// Describes how the line number should be displayed in the text editor.
/// </summa<|fim_middle|>ry>
public enum UITextLineNumber
{
/// <summary>
/// Automatically show or hide the line number depending o... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// Describes how a text in an element should wrap when it reached the maximum horizontal space it can take.
/// </summary>
public enum UITextWrapMode
{
<|fim_suffix|>ap,
/// <summary>
/// Do not wrap the text to a new line.
/// </summary>
NoWrap
}... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>Scrollable)
: this(isScrollable, null)
{
}
/// <summary>
/// Creates a new instance of the <see cref="UIToolView"/> class.
/// </summary>
/// <param name="isScrollable">Indicates whether the UI of the tool is scrollable or should fits to the window boundaries.</param>
... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>ot.
/// </summary>
Stretch
}
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// Describes how a child element is vertically positioned or stretched within a parent's layout slot.
/// </summary>
public enum UIVerticalAlignment
{
/// <summary>
/// The child element is aligned to the to... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>mary>
/// (optional) Gets or sets the name of the group that will be told to the user when using screen reader.
/// </summary>
public virtual string AccessibleName { get; protected set; } = string.Empty;
}
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// Represents a group or category ... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Api;
/// <<|fim_suffix|>ameof(MyProject.Strings.Description), // Optional
/// AccessibleNameResourceName = nameof(MyProject.Strings.AccessibleName), // Optional
/// SearchKeywordsResourceName = nameof(MyProject.Strings.SearchKeywo... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// Represents an item in the auto-completion list of <see cref="IUIMultiLineTextInput"/>.
/// </summary>
[DebuggerDisplay($"Title = {{{nameof(Title)}}}, Kind = {{{nameof(Kind)}}}")]
public class AutoCompletionItem
{
/// <summary>
/// Initializes a new instan... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// Represents the kind of an auto-completion item.
/// See also https://microsoft.github.io/monaco-editor/typedoc/enums/languages.CompletionItemKind.html
/// </summary>
public enum AutoCompletionItemKind
{
/// <summary>
/// Represents a method.
<|fim_suf... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// Represents the declaration of a language service for <see cref="IUIMultiLineTextInput"/>.
/// </summary>
/// <remarks>
/// <para>
/// The value of <see cref="NameAttribute"/> should correspond to the <see cref="IUIMultiLineTextInput.SyntaxColorizationLanguageName... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// Represents a semantic token.
/// </summary>
[DebuggerDisplay($"Line = {{{nameof(DeltaLine)}}}, Column = {{{nameof(DeltaColumn)}}}, Length = {{{nameof(Length)}}}, Type = {{{nameof(TokenType)}}}")]
public class SemanticToken
{
/// <summary>
/// Initializes ... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Api;
// See https://code.visualstudio.com/api/language-extensions/semantic-highlight-guide#standard-token-types-and-modifiers
/// <summary>
/// Represents a semantic token modifier.
/// </summary>
publ<|fim_suffix|>r definitions of symbols, for example, in header files.
/// </summa... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>e a type that is not covered above.
/// </summary>
Type = 6,
/// <summary>
/// For identifiers that declare or reference a function or method parameters.
/// </summary>
Parameter = 7,
/// <summary>
/// For identifiers that declare or reference a local or global variable.
... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// Represents the predefined common tool group names.
/// </summary>
public static class PredefinedCommonToolGroupNames
{
/// <su<|fim_suffix|>ncoders / Decoders";
/// <summary>
/// Represents the tool group for converters.
/// </summary>
public... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// Represents a predefin<|fim_suffix|>ile extensions representing image formats supported by default.
/// They include BMP, GIF, JPEG, PBM, PNG, TIFF, TGA, WEBP formats.
/// </summary>
public static readonly string[] ImageFileExtensions
= new[] {... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>s stored in RESX files, or Fonts.
/// </summary>
/// <remarks>
/// <example>
/// <code>
/// [Export(typeof(MyResourceAssemblyIdentifier))]
/// [Name(nameof(MyResourceAssemblyIdentifier))]
/// internal sealed class MyResourceAssemblyIdentifier : IResourceAssemblyIdentifier
/// ... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// Defines a data type accepted by the <see cref="IGuiTool"/> as an input. This information is used to identify what tool can
/// be recommended based on Smart Detection finding.
/// The value of <see cref="DataTypeName"/> should match a name defined by a <see cref=... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|> value;
}
/// <summary>
/// Gets or sets whether the option is required.
/// </summary>
public bool IsRequired { get; set; }
}
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// Defines an option for a <see cref="ICommandLineTool"/>.
/// </summary>
[MetadataAttribute]
[Attribute... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>g DescriptionResourceName
{
get => _descriptionResourceName;
set
{
Guard.IsNotNullOrEmpty(value);
_descriptionResourceName = value;
}
}
/// <summary>
/// Gets or sets the name of the resource manager's base name to use when looking f... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace Dev<|fim_suffix|>baseName = null)
{
Guard.IsNotEmpty(name);
DataTypeName = name;
DataTypeBaseName = baseName;
}
}
<|fim_middle|>Toys.Api;
/// <summary>
/// Defines a data type name attached to a <see cref="IDataTypeDetector"/>.
/// </summary>
[MetadataAttribute]... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>in the body.
/// </summary>
Body,
/// <summary>
/// The menu is placed in the footer.
/// </summary>
Footer
}
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// Represents the placement of a menu.
/// </summary>
public enum MenuPlacement
{
/// <summary<|fim_middle|>>
... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// Indicates where the <see cref="IGuiTool"/> should be displayed in the navigation view.
/<|fim_suffix|>ealed class MenuPlacementAttribute : Attribute
{
/// <summary>
/// Gets the menu placement for the <see cref="IGuiTool"/>.
/// </summary>
public ... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|> Gets the internal name of this component.
/// </summary>
public string InternalComponentName { get; }
/// <summary>
/// Initializes a new instance of the <see cref="NameAttribute"/> class with the specified internal component name.
/// </summary>
/// <param name="internalComponen... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>ompact Overlay mode.
/// </summary>
public bool NoCompactOverlaySupport { get; } = true;
}
<|fim_prefix|><|fim_middle|>namespace DevToys.Api;
/// <summary>
/// Indicates that the <see cref="IGuiTool"/> does not support Compact Overlay mode.
/// </summary>
[MetadataAttribute]
[AttributeUsage(Attr... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>ttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
public sealed class NotFavorableAttribute : Attribute
{
/// <summary>
/// Gets a value indicating whether the <see cref="IGuiTool"/> is not favorable.
/// </summary>
public bool NotFavorable { get; } = true;
}
<|fim_prefix|>nam... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|> cref="IGuiTool"/> is not searchable.
/// </summary>
public bool NotSearchable { get; } = true;
}
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// Indicates that the <see cref="IGuiTool"/> can not be searched.
/// </summary>
[MetadataAttribute]
[AttributeUsage(AttributeTargets.Class, Allow... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// Defines the priority of this component over others.
/// </summary>
[MetadataAttribute]
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public sealed class OrderAttribute : Attribute
{
private string _before = string.Empty;
private string _a... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>n<|fim_suffix|>e platform on which the application runs.
/// </summary>
public enum Platform
{
/// <summary>
/// The Windows platform.
/// </summary>
Windows,
/// <summary>
/// The MacOS or MacCatalyst platform.
/// </summary>
MacOS,
/// <summary>
/// The Linux p... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Api;
/// <summa<|fim_suffix|>
public Platform TargetPlatform { get; }
/// <summary>
/// Initializes a new instance of the <see cref="TargetPlatformAttribute"/> class.
/// </summary>
/// <param name="platform">The target platform.</param>
public TargetPlatformAt... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>t are searched in the localized environment.
/// </summary>
public string SearchKeywordsResourceName
{
get => _searchKeywordsResourceName;
set
{
Guard.IsNotNullOrWhiteSpace(value);
_searchKeywordsResourceName = value;
}
}
/// <su... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevT<|fim_suffix|> /// <summary>
/// Gets the list of items that should come before this component.
/// </summary>
IReadOnlyList<string> Before { get; }
/// <summary>
/// Gets the list of items that should come after this component.
/// </summary>
IReadOnlyList<s... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>
/// </summary>
public Type? DataType => Data?.GetType();
/// <summary>
/// Represents an unsuccessful data detection result.
/// </summary>
public static readonly DataDetectionResult Unsuccessful = new(false, null);
}
<|fim_prefix|>namespace DevToys.Api;
/// <summary>
/// Repre... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>// </summary>
/// <remarks>
/// <para>
/// When the data successfully got parsed, pass the parsed value to <see cref="DataDetectionResult.Data"/>.
/// </para>
/// <para>
/// Ultimately, when detection is successful, the <see cref="DataDetectionResult.Data"/> will be
/// passed ... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>64Text";
/// <summary>
/// Represents the Base64 image data type.
/// </summary>
public const string Base64Image = "base64Image";
/// <summary>
/// Represents the "mage data type.
/// </summary>
public const string Image = "image";
/// <summary>
/// Represents th... | fim | DevToys-app/DevToys | csharp |
using System.Runtime.CompilerServices;
namespace DevToys.Api;
internal abstract class ViewModelBase : INotifyPropertyChanged
{
public event PropertyChangedEventHandler? PropertyChanged;
protected bool SetPropertyValue<T>(
ref T field,
T value,
EventHandler? propertyChangedEventHandle... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>ement && (focusedElement.tagName.toLowerCase() === 'input')) {
// Cast the element to HTMLInputElement
const inputElement = focusedElement;
// Get the current selection
const startPos = inputElement.selectionStart;
const endPos = inputElement.sel... | fim | DevToys-app/DevToys | javascript |
import MonacoEditor from "./monacoEditor";
class DOM {
public static setFocus(element: HTMLElement): boolean {
element.focus();
if (document.activeElement != element) {
// We failed to give focus to the given element. Let's find the first child element that can
// accept th... | fim | DevToys-app/DevToys | typescript |
<|fim_prefix|>export { default as DOM } from "./dom";
export { default as Popover } from "./popover";
export { default as MonacoEditor<|fim_suffix|> from "./monacoEditor";
export { default as MonacoEditorLanguage } from "./monacoEditorLanguage";
//# sourceMappingURL=index.esm.js.map<|fim_middle|> }<|endoftext|> | fim | DevToys-app/DevToys | javascript |
<|fim_suffix|>ditor } from "./monacoEditor";
export { default as MonacoEditorLanguage } from "./monacoEditorLanguage";<|fim_prefix|>export { default as DOM } from "./dom";
export { default as Pop<|fim_middle|>over } from "./popover";
export { default as MonacoE<|endoftext|> | fim | DevToys-app/DevToys | typescript |
<|fim_suffix|>evealRangeAtTop(range, scrollType);
}
static revealRangeInCenter(id, range, scrollType) {
const editor = this.getEditor(id);
editor.revealRangeInCenter(range, scrollType);
}
static revealRangeInCenterIfOutsideViewport(id, range, scrollType) {
const editor = this.get... | fim | DevToys-app/DevToys | javascript |
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
///<reference path="../../node_modules/monaco-editor/monaco.d.ts" />
// eslint-disable-next-line @typescript-eslint/no-explicit-any
declare const require: any;
class MonacoEditorHolder {
public id: string;
public editor: monaco.editor.IStan... | fim | DevToys-app/DevToys | typescript |
<|fim_prefix|>// eslint-disable-next-line @typescript-eslint/triple-slash-reference
///<reference path="../../node_modules/monaco-editor/monaco.d.ts" />
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(functi... | fim | DevToys-app/DevToys | javascript |
<|fim_suffix|>
const end = model.getOffsetAt(new monaco.Position(range.endLineNumber, range.endColumn));
let modelName: string = model.uri.path;
if (modelName.startsWith("/")) {
modelName = modelName.substring(1);
}... | fim | DevToys-app/DevToys | typescript |
<|fim_suffix|> 0) {
offsetX = -selfRect.width;
offsetY = 0;
}
else if (classList.indexOf("popover-center-left") >= 0) {
offsetX = 0;
offsetY = -selfRect.height / 2;
}
else if (classList.indexOf("popover-center-center") >= 0) {
o... | fim | DevToys-app/DevToys | javascript |
<|fim_suffix|>{
left = boundingRect.left + boundingRect.width;
top = boundingRect.top + boundingRect.height / 2;
} else if (classList.indexOf("popover-anchor-bottom-left") >= 0) {
left = boundingRect.left;
top = boundingRect.top + boundingRect.height;
} el... | fim | DevToys-app/DevToys | typescript |
<|fim_suffix|>aDetectionResult.Unsuccessful);
}
}
<|fim_prefix|>namespace DevToys.Blazor.BuiltInDataTypeDetectors;
[Export(typeof(IDataTypeDetector))]
[DataTypeName(PredefinedCommonDataTypeNames.Base64Image, baseName: PredefinedCommonDataTypeNames.Text)]
internal sealed partial class Base64ImageDataTypeDetector :... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>using System.Text;
using System.Text.RegularExpressions;
namespace DevToys.Blazor.BuiltInDataTypeDetectors;
[Export(typeof(IDataTypeDetector))]
[DataTypeName(PredefinedCommonDataTypeNames.Base64Text, baseName: PredefinedCommonDataTypeNames.Text)]
internal sealed partial class Base64TextDataTypeDetector... | fim | DevToys-app/DevToys | csharp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.