text
stringlengths
14
100k
source
stringclasses
1 value
repo
stringclasses
810 values
language
stringclasses
13 values
<|fim_suffix|>EndOfLine DefaultEOL { get; set; } public bool TrimAutoWhitespace { get; set; } public BracketPairColorizationOptions? BracketPairColorizationOptions { get; set; } } <|fim_prefix|>///------------------------------------------------------------------------------------------------------------- //...
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>///------------------------------------------------------------------------------------------------------------- /// C# translation of the https://github.com/microsoft/monaco-editor/blob/main/website/typedoc/monaco.d.ts file ///----------------------------------------------------------------------------...
fim
DevToys-app/DevToys
csharp
<|fim_suffix|>---------------------------------------- namespace DevToys.Blazor.Components.Monaco.Editor; public class ThemeColor { public string? Id { get; set; } } <|fim_prefix|>///-------------------------------------------------------------------------------------------<|fim_middle|>------------------ /// C...
fim
DevToys-app/DevToys
csharp
///------------------------------------------------------------------------------------------------------------- /// C# translation of the https://github.com/microsoft/monaco-editor/blob/main/website/typedoc/monaco.d.ts file ///------------------------------------------------------------------------------------------...
fim
DevToys-app/DevToys
csharp
///------------------------------------------------------------------------------------------------------------- /// C# translation of the https://github.com/microsoft/monaco-editor/blob/main/website/typedoc/monaco.d.ts file ///------------------------------------------------------------------------------------------...
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>///------------------------------------------------------------------------------------------------------------- /// C# translation of the https://github.com/microsoft/monaco-editor/blob/main/website/typedoc/monaco.d.ts file ///----------------------------------------------------------------------------...
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>///------------------------------------------------------------------------------------------------------------- /// C# translation of the https://github.com/microsoft/monaco-editor/blob/main/website/typedoc/monaco.d.ts file ///----------------------------------------------------------------------------...
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>///-------------------------------<|fim_suffix|>o make calls back to the main thread. /// </summary> public object? Host { get; set; } /// <summary> /// Keep idle models. /// Defaults to false, which means that idle models will stop syncing after a while. /// </summary> publi...
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>///------------------------------------------------------------------------------------------------------------- /// C# translation of the https://github.com/microsoft/monaco-editor/blob/main/website/typedoc/monaco.d.ts file ///----------------------------------------------------------------------------...
fim
DevToys-app/DevToys
csharp
///------------------------------------------------------------------------------------------------------------- /// C# translation of the https://github.com/microsoft/monaco-editor/blob/main/website/typedoc/monaco.d.ts file ///------------------------------------------------------------------------------------------...
fim
DevToys-app/DevToys
csharp
<|fim_suffix|>------------------------------------------------------------------------------ namespace DevToys.Blazor.Components.Monaco; public class Environment { public bool? GlobalAPI { get; set; } public string? BaseUrl { get; set; } } <|fim_prefix|>///---------------------------------------------------...
fim
DevToys-app/DevToys
csharp
<|fim_suffix|>e = 112, AudioVolumeUp = 113, AudioVolumeDown = 114, BrowserSearch = 115, BrowserHome = 116, BrowserBack = 117, BrowserForward = 118, MediaTrackNext = 119, MediaTrackPrevious = 120, MediaStop = 121, MediaPlayPause = 122, LaunchMediaPlayer = 123, LaunchMail =...
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>///------------------------------------------------------------------------------------------------------------- /// C# translat<|fim_suffix|>oc/monaco.d.ts file ///------------------------------------------------------------------------------------------------------------- namespace DevToys.Blazor.Com...
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>usi<|fim_suffix|>ic string? Code { get; set; } } <|fim_middle|>ng System.Text.Json; ///------------------------------------------------------------------------------------------------------------- /// C# translation of the https://github.com/microsoft/monaco-editor/blob/main/website/typedoc/monaco.d.ts...
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>///---------------------------------------------------------------------------------<|fim_suffix|>y> public CompletionItemInsertTextRule InsertTextRules { get; set; } /// <summary> /// A range of text that should be replaced by this completion item. /// /// Defaults to a range from ...
fim
DevToys-app/DevToys
csharp
<|fim_suffix|> InsertAsSnippet = 4 } <|fim_prefix|>///------------------------------------------------------------------------------------------------------------- /// C# translation of the https://github.com/microsoft/monaco-editor/blob/main/website/typedoc/monaco.d.ts file ///------------------------------------...
fim
DevToys-app/DevToys
csharp
<|fim_suffix|>emKind { Method = 0, Function = 1, Constructor = 2, Field = 3, Variable = 4, Class = 5, Struct = 6, Interface = 7, Module = 8, Property = 9, Event = 10, Operator = 11, Unit = 12, Value = 13, Constant = 14, Enum = 15, EnumMember = 16, ...
fim
DevToys-app/DevToys
csharp
<|fim_suffix|>-------------------------------------------------------- /// C# translation of the https://github.com/microsoft/monaco-editor/blob/main/website/typedoc/monaco.d.ts file ///------------------------------------------------------------------------------------------------------------- namespace DevToys.Blaz...
fim
DevToys-app/DevToys
csharp
///------------------------------------------------------------------------------------------------------------- /// C# translation of the https://github.com/microsoft/monaco-editor/blob/main/website/typedoc/monaco.d.ts file ///------------------------------------------------------------------------------------------...
fim
DevToys-app/DevToys
csharp
<|fim_suffix|>------------------- namespace DevToys.Blazor.Components.Monaco; public enum MarkerSeverity { Hint = 1, Info = 2, Warning = 4, Error = 8 } <|fim_prefix|>///------------------------------------------------------------------------------<|fim_middle|>------------------------------- /// ...
fim
DevToys-app/DevToys
csharp
<|fim_suffix|>--------------------------------------------------------------------------- /// C# translation of the https://github.com/microsoft/monaco-editor/blob/main/website/typedoc/monaco.d.ts file ///------------------------------------------------------------------------------------------------------------- nam...
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>using System.Text.Json; ///------------------------------------------------------------------------------------------------------------- /// C# translation of the https://github.com/microsoft/monaco-editor/blob/main/website/typedoc/monaco.d.ts file ///---------------------------------------------------...
fim
DevToys-app/DevToys
csharp
<|fim_suffix|>s.Monaco; /// <summary> /// A position in the editor. This interface is suitable for serialization. /// </summary> public class Position { /// <summary> /// line number (starts at 1) /// </summary> public int LineNumber { get; set; } /// <summary> /// column (the first character ...
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>///---------------------------------------------------<|fim_suffix|>y> public int StartColumn { get; set; } /// <summary> /// Line number on which the range ends. /// </summary> public int EndLineNumber { get; set; } /// <summary> /// Column on which the range ends in line `...
fim
DevToys-app/DevToys
csharp
<|fim_suffix|>monaco.d.ts file ///------------------------------------------------------------------------------------------------------------- namespace DevToys.Blazor.Components.Monaco; public class ScrollEvent { public double ScrollTop { get; set; } public double ScrollLeft { get; set; } public doubl...
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>///------------------------------------------------------------------------------------------------------------- /// C# translation of the https://github.com/microsoft/monaco-editor/blob/main/website/<|fim_suffix|>blic int Height { get; set; } } <|fim_middle|>typedoc/monaco.d.ts file ///----------------...
fim
DevToys-app/DevToys
csharp
<|fim_suffix|> /// <summary> /// The column on `positionLineNumber` where the selection has ended. /// </summary> public int PositionColumn { get; set; } } <|fim_prefix|>///------------------------------------------------------------------------------------------------------------- /// C# translation o...
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>///----------------------------------------------------------------------------<|fim_suffix|>---- namespace DevToys.Blazor.Components.Monaco; /// <summary> /// The direction of a selection. /// </summary> public enum SelectionDirection { /// <summary> /// The selection starts above where it end...
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>using DevToys.Blazor.Components.Monaco.Editor; namespace DevToys.Blazor.Components.Monaco; /// <summary> /// A model. /// </summary> public class TextModel { /// <summary> /// Gets the resource associated with this editor model. /// </summary> public string? Uri { get; set; } /// <...
fim
DevToys-app/DevToys
csharp
<|fim_suffix|>aco; public class Token { public int Offset { get; set; } public string? Type { get; set; } public string? Language { get; set; } } <|fim_prefix|>///------------------------------------------------------------------------------------------------------------- /// C# translation of the http...
fim
DevToys-app/DevToys
csharp
<|fim_suffix|> public string? Authority { get; set; } public string? Path { get; set; } public string? Query { get; set; } public string? Fragment { get; set; } } <|fim_prefix|>///------------------------------------------------------------------------------------------------------------- /// C# tran...
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>using DevToys.Blazor.Components.Monaco.Editor; using DevToys.Core.Settings; namespace DevToys.Blazor.Components; public partial class MonacoEditor : RicherMonacoEditorBase { private readonly object _lock = new(); private bool _isLoaded; private bool _oldIsActuallyEnabled; private bool _...
fim
DevToys-app/DevToys
csharp
<|fim_suffix|></summary> internal ValueTask<Selection> GetSelectionAsync() => JSRuntime.InvokeAsync<Selection>("devtoys.MonacoEditor.getSelection", Id); /// <summary> /// Returns all the selections of the editor. /// </summary> internal ValueTask<List<Selection>> GetSelectionsAsync() ...
fim
DevToys-app/DevToys
csharp
<|fim_suffix|>= SettingsProvider.GetSetting(PredefinedSettings.TextEditorFont), WordWrap = SettingsProvider.GetSetting(PredefinedSettings.TextEditorTextWrapping) ? "on" : "off", LineNumbers = SettingsProvider.GetSetting(PredefinedSettings.TextEditorLineNumbers) ? "on" : "off", Render...
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>using System.Text.Json; using System.Text.Json.Serialization; using DevToys.Blazor.Components.Monaco; using DevToys.Blazor.Components.Monaco.Editor; ///------------------------------------------------------------------------------------------------------------- /// C# translation of the https://github....
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>using System.Text.Json; using System.Text.Json.Serialization; using DevToys.Blazor.Components.Monaco; using DevToys.Blazor.Components.Monaco.Editor; using DevToys.Core.Settings; namespace DevToys.Blazor.Components; public class RicherMonacoEditorBase : MonacoEditorBase { private readonly List<strin...
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>using System.Text.Json; using System.Text.Json.Serialization; using DevToys.Blazor.Components.Monaco; using DevToys.Blazor.Components.Monaco.Editor; using DevToys.Core.Settings; namespace DevToys.Blazor.Components; public abstract class RicherMonacoEditorDiffBase : MonacoEditorBase { private static...
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>using Microsoft.AspN<|fim_suffix|>f there's not enough space to display it fully. /// </summary> [Parameter] public bool CanTrim { get; set; } /// <summary> /// Gets or sets the text to display. /// </summary> [Parameter] public string? Text { get; set; } /// <summar...
fim
DevToys-app/DevToys
csharp
<|fim_suffix|>nly TextBlockAppearance BodyStrong = new("h5", "body-strong"); internal static readonly TextBlockAppearance BodyLarge = new("h5", "body-large"); internal static readonly TextBlockAppearance Subtitle = new("h4", "subtitle"); internal static readonly TextBlockAppearance Title = new("h3", "title"...
fim
DevToys-app/DevToys
csharp
<|fim_suffix|>); return new TextSpan(selection[0], selection[1] - selection[0]); } } private void SettingsProvider_SettingChanged(object? sender, SettingChangedEventArgs e) { FontFamily = _settingsProvider.GetSetting(PredefinedSettings.TextEditorFont); } } <|fim_prefix|>usi...
fim
DevToys-app/DevToys
csharp
export function getSelectionLength(input) { return input.selectionEnd - input.selectionStart; } export function getSelectionSpan(input) { return [input.selectionStart, input.selectionEnd]; } export function selectAll(input) { input.setSelectionRange(0, input.value.length); } export function initializeKeyboa...
fim
DevToys-app/DevToys
javascript
<|fim_suffix|>s HTMLInputElement; if (input.type === "number") { return; } if (e.key === "ArrowDown" || e.key === "ArrowUp") { e.preventDefault(); } } function onKeyPress(e: KeyboardEvent): void { if (e.key === "ArrowDown" || e.key === "ArrowUp") { e.preventDefault(); } ...
fim
DevToys-app/DevToys
typescript
<|fim_suffix|>rd, Number } <|fim_prefix|>namespace DevToys.Blazor.Components; public enum T<|fim_middle|>extBoxTypes { Text, Search, Passwo<|endoftext|>
fim
DevToys-app/DevToys
csharp
<|fim_suffix|> } } <|fim_prefix|>namespace DevToys.Blazor.Components.UIElements; public partial class UIButtonPresenter : ComponentBase { [Parameter] <|fim_middle|> public IUIButton UIButton { get; set; } = default!; internal async Task OnButtonClickAsync() { Guard.IsNotNull(UIButton); ...
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>namespace DevTo<|fim_suffix|>} <|fim_middle|>ys.Blazor.Components.UIElements; public partial class UICardPresenter : ComponentBase { [Parameter] public IUICard UICard { get; set; } = default!; <|endoftext|>
fim
DevToys-app/DevToys
csharp
<|fim_suffix|>bject? sender, EventArgs e) { if (_isInFullScreenMode && !UIDataGrid.IsVisible) { // If the element is not visible anymore, we need to exit the full screen mode. OnToggleFullScreenButtonClickAsync().Forget(); } } private async Task OnToggleFullS...
fim
DevToys-app/DevToys
csharp
<|fim_suffix|>ditable = !UIDiffTextInput.IsReadOnly, EnableSplitViewResizing = !UIDiffTextInput.InlineMode, RenderSideBySide = !UIDiffTextInput.InlineMode, AutomaticLayout = true }; } } <|fim_prefix|>using DevToys.Blazor.Components.Monaco; using DevToys.Blazor.Components...
fim
DevToys-app/DevToys
csharp
<|fim_suffix|> } public class UIDropDownMenuItemDropDownListItem : DropDownListItem { internal IUIDropDownMenuItem UIDropDownMenuItem { get; set; } = default!; } } <|fim_prefix|>using System.Collections.ObjectModel; namespace DevToys.Blazor.Components.UIElements; public partial class UIDropDownB...
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>namespace DevToys.Blazor.Components.UIElements; public partial class UIElementPresenter : ComponentBase, IDisposable { [Parameter] public IUIElement UIElement { get; set; } = default!; protected override void OnInitialized() { base.OnInitialized(); Guard.IsNotNull(UIElem...
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>using DevToys.Blazor.Core; using Microsoft.AspNetCore.Components.Forms; using SixLabors.ImageSharp; namespace DevToys.Blazor.Components.UIElements; public partial class UIFileSelectorPresenter : MefComponentBase { protected override string? JavaScriptFile => "./_content/DevToys.Blazor/Components/UI...
fim
DevToys-app/DevToys
csharp
<|fim_suffix|> false); }); element.removeEventListener("dragleave", unhighlightIfNeeded, false); element.removeEventListener("drop", unhighlight, false); } function preventDefaults(e) { e.preventDefault(); e.stopPropagation(); } function highlight(e) { if (e.dataTransfer.items.length > 0 && e.da...
fim
DevToys-app/DevToys
javascript
<|fim_prefix|>export function registerDropZone(id: string): void { const element = document.getElementById(id); // Prevent default drag behaviors ["dragenter", "dragover", "dragleave", "drop"].forEach(eventName => { element.addEve<|fim_suffix|>HTMLElement>e.currentTarget).getBoundingClientRect(); ...
fim
DevToys-app/DevToys
typescript
namespace DevToys.Blazor.Components.UIElements; public partial class UIGridPresenter : ComponentBase { [Parameter] public IUIGrid UIGrid { get; set; } = default!; protected override void OnInitialized() { base.OnInitialized(); UIGrid.CellsChanged += UIGrid_CellsChanged; } pu...
fim
DevToys-app/DevToys
csharp
<|fim_suffix|>senter : ComponentBase { [Parameter] public IUIIcon UIIcon { get; set; } = default!; } <|fim_prefix|>namespace DevToys.Blazor.Components.UIElements; publi<|fim_middle|>c partial class UIIconPre<|endoftext|>
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>// TODO: Add logs. using DevToys.Core; using SixLabors.ImageSharp; using SixLabors.ImageSharp.Formats.Png; namespace DevToys.Blazor.Components.UIElements; public partial class UIImageViewerPresenter : MefComponentBase { private readonly DisposableSemaphore _semaphore = new(); private Cancellati...
fim
DevToys-app/DevToys
csharp
<|fim_suffix|>oBarSeverity.Informational => InfoBarSeverity.Informational, UIInfoBarSeverity.Error => InfoBarSeverity.Error, UIInfoBarSeverity.Success => InfoBarSeverity.Success, UIInfoBarSeverity.Warning => InfoBarSeverity.Warning, _ => InfoBarSeverity.Informational, ...
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>namespace DevToys.Blazor.Components.UIElements; public partial class UILabelPresenter : ComponentBase, IDisposable { [Parameter] public IUILabel UILabel { get; set; } = default!; [Parameter] public TextBlockAppearance Appearance { get; set; } = default!; protected override void OnI...
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>namespace DevToys.Blazor.Components.UIElements; pu<|fim_suffix|>(UIList.CanSelectItem) { _selectedIndex = SelectedIndex; UIList.Select(SelectedIndex); } else { SelectedIndex = -1; UIList.Selec...
fim
DevToys-app/DevToys
csharp
<|fim_suffix|>UIMultiLineTextInputPresenter? GetPresenter(IUIMultiLineTextInput multiLineTextInput) { lock (allMultiLineTextInputToPresenterMap) { Guard.IsNotNull(multiLineTextInput); if (allMultiLineTextInputToPresenterMap.TryGetValue(multiLineTextInput, out UIMultiLineText...
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>using DevToys.Blazor.Components.Monaco; using DevToys.Blazor.Components.Monaco.Editor; using DevToys.Blazor.Core.Services; using Range = DevToys.Blazor.Components.Monaco.Range; namespace DevToys.Blazor.Components.UIElements; public partial class UIMultiLineTextInputPresenter : JSStyledComponentBase { ...
fim
DevToys-app/DevToys
csharp
namespace DevToys.Blazor.Components.UIElements; public partial class UINumberInputPresenter : StyledComponentBase { private UITextInputWrapper _textInputWrapper = default!; [Parameter] public IUINumberInput UINumberInput { get; set; } = default!; private void OnTextChanged(string newText) { ...
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>namespace DevToys.Blazor.Components.UIElements; public partial class UIPasswordInputPresente<|fim_suffix|>et; set; } = default!; private void OnTextChanged(string newText) { UIPasswordInput.Text(newText); } } <|fim_middle|>r : StyledComponentBase { private UITextInputWrapper _te...
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>namespace DevToys.Blazor.Components.UIElements; public partial class UIProgressBarPresenter : ComponentBase, IDisposable { [Parameter] public IUIProgressBar UIProgressBar { get; set; } = default!; protected override void OnIn<|fim_suffix|>ueChangingAsynchronously += UIProgressBar_ValueChang...
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>namespace DevToys.Blazor.Components.UIElements; public partial class UIProgressRingPresenter : ComponentBase, IDisposable <|fim_suffix|>ing?.Progress(percentage); }); } } <|fim_middle|>{ [Parameter] public IUIProgressRing UIProgressRing { get; set; } = default!; protected overri...
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>namespace DevToys.Blazor.Components.UIElements; public partial class UISelectDropDow<|fim_suffix|>= SelectedIndex; UISelectDropDownList.Select(SelectedIndex); } } private void UISelectDropDownList_SelectedItemChanged(object? sender, EventArgs e) { if (UISelectDro...
fim
DevToys-app/DevToys
csharp
<|fim_suffix|>null) { for (int i = 0; i < UISettingGroup.Children.Length; i++) { IUIElement element = UISettingGroup.Children[i]; if (element is IUISetting setting) { _settings.Add(setting); setting.S...
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>namespace DevToys.Blazor.Components.UIElements; public partial class UISettingPresenter : ComponentBase { [P<|fim_suffix|>c IUISetting UISetting { get; set; } = default!; } <|fim_middle|>arameter] publi<|endoftext|>
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>namespace DevToys.Blazor.Components.UIElements; public partial class UISingleLineTextInputPresenter : StyledComponentBase { private UITextInputWrapper _textInputWrapper = default!; [Parameter] public IUISingleLineTextIn<|fim_suffix|>xt); } } <|fim_middle|>put UISingleLineTextInput { get...
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>namespace DevToys.Blazor.Components.UIElements; public partial class UISplitGridPresenter : <|fim_suffix|>efault!; } <|fim_middle|>ComponentBase { [Parameter] public IUISplitGrid UISplitGrid { get; set; } = d<|endoftext|>
fim
DevToys-app/DevToys
csharp
namespace DevToys.Blazor.Components.UIElements; public partial class UIStackPresenter : ComponentBase { [Parameter] public IUIStack UIStack { get; set; } = default!; } <|endoftext|>
fim
DevToys-app/DevToys
csharp
namespace DevToys.Blazor.Components.UIElements; public partial class UISwitchPresenter : ComponentBase { [Parameter] public IUISwitch UISwitch { get; set; } = default!; private void OnCheckedChanged(bool value) { if (value) { UISwitch.On(); } else {...
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>using CommunityToolkit.Mvvm.Messaging; using DevToys.Core.Models; using DevToys.Core.Settings; using DevToys.Core.Tools; using Microsoft.AspNetCore.Components.Forms; using Microsoft.Extensions.Logging; namespace DevToys.Blazor.Components.UIElements; public partial class UITextInputWrapper : MefComponen...
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>export function registerResizeHandler(id, dotNetObjRef) { const element = document.getElementById(id); // Setup resize observer. const resizeObserver = new ResizeObserver((elements) => { dotNetObjRef.invokeMethodAsync("OnComponentResize", Math.trunc(elements[0].contentRect.width)); ...
fim
DevToys-app/DevToys
javascript
<|fim_prefix|>export functio<|fim_suffix|>ect(); // Check the mouseEvent coordinates are outside of the rectangle if (e.x > rect.left + rect.width || e.x < rect.left || e.y > rect.top + rect.height || e.y < rect.top) { unhighlight(e); } } function unhighlight(e: DragEvent) { (<HTMLElem...
fim
DevToys-app/DevToys
typescript
<|fim_suffix|>ync Task UpdateWebViewContentAsync() { using (await Semaphore.WaitAsync(CancellationToken.None)) { if (UIWebView.Source.HasValue) { if (UIWebView.Source.Value.TryPickT0(out string html, out Uri uri)) { await (a...
fim
DevToys-app/DevToys
csharp
<|fim_suffix|>bViewPresenter.razor.js.map<|fim_prefix|>export function webViewNavigateToUri(iframe, uri) { iframe.src = uri; } export function webViewNavigateToHtml(iframe, html) { <|fim_middle|> const iframeDocument = iframe.contentDocument || iframe.contentWindow.document; iframeDocument.body.innerHTML = h...
fim
DevToys-app/DevToys
javascript
<|fim_suffix|>ntentDocument || iframe.contentWindow.document; iframeDocument.body.innerHTML = html; }<|fim_prefix|>export function webViewNavigateToUri(iframe: HTMLIFrameElement, uri: string): voi<|fim_middle|>d { iframe.src = uri; } export function webViewNavigateToHtml(iframe: HTMLIFrameElement, html: string...
fim
DevToys-app/DevToys
typescript
<|fim_suffix|> get; set; } = default!; } <|fim_prefix|>namespace DevToys.Blazor.Components.UIElements; public partial class UIWrapPresenter : ComponentBase { [Parameter] public<|fim_middle|> IUIWrap UIWrap {<|endoftext|>
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>using Microsoft.AspNetCore.Components.Forms; using OneOf; namespace DevToys.Blazor.Core; internal sealed class BlazorSandboxedFileReader : SandboxedFileReader { private readonly OneOf<IBrowserFile, FileInfo> _file; private readonly IFileStorage? _fileS<|fim_suffix|>l(_fileStorage); ...
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>using System.Text.Json; using System.Text.Json.Serialization; namespace DevToys.Blazor.Core.Converters; internal sealed class PolymorphicConverter<T> : JsonConverter<T> { public override T Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { t<|fim_suffix...
fim
DevToys-app/DevToys
csharp
<|fim_suffix|> typeof(PolymorphicConverter<>).MakeGenericType(typeToConvert), BindingFlags.Instance | BindingFlags.Public, null, Array.Empty<object>(), null)!; } } <|fim_prefix|>using System.Reflection; using System.Text.Json; u<|fim_middle|>sing System.Text.J...
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>using Microsoft.Extensions.FileProviders; using Microsoft.Extensions.Primitives; namespace DevToys.Blazor.Core; public sealed class DevToysBlazorEmbeddedFileProvider : IFileProvider { private const string Content = "_content/"; private const string ContentDevToysBlazor = "_content/DevToys.Blazo...
fim
DevToys-app/DevToys
csharp
<|fim_suffix|>E: {ex.Message} STACK TRACE: {ex.StackTrace} == INNER EXCEPTION == MESSAGE: {ex.InnerException!.Message} STACK TRACE: {ex.InnerException!.StackTrace} ==========================="; } } <|fim_prefix|>using Microsoft.Extensions.Logging; namespace DevToys.Blazor.Core.Extensions; internal static class ...
fim
DevToys-app/DevToys
csharp
<|fim_suffix|>ropertyNamingPolicy = JsonNamingPolicy.CamelCase, Converters = { new PolymorphicConverterFactory() } }; // Handle all kind of complex objects object? result = JsonSerializer .Deserialize<JsonElement>( ...
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>using System.Globalization; namespace DevToys.Blazor.Core.Extensio<|fim_suffix|>rnal static string ToPercentage(this long? val) => val != null ? val.Value.ToPercentage() : string.Empty; internal static string ToPercentage(this double val) => $"{val.ToString("0.##", CultureInfo.InvariantCulture)}%";...
fim
DevToys-app/DevToys
csharp
<|fim_suffix|>a string. /// </summary> /// <param name="value"></param> public CssBuilder(string value) { _stringBuffer = value; _prefix = string.Empty; } /// <summary> /// Adds a raw string to the builder that will be concatenated with the next class or value added to the ...
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>namespace DevToys.Blazor.Core.Helpers; public struct StyleBuilder { private string? _stringBuffer; /// <summary> /// Creates a StyleBuilder used to define conditional in-line style used in a component. Call Build() to return the completed style as a string. /// </summary> /// <param...
fim
DevToys-app/DevToys
csharp
<|fim_suffix|>) : this; private ValueBuilder AddRaw(string style) { _stringBuffer += style; return this; } public override string ToString() => _stringBuffer != null ? _stringBuffer.Trim() : string.Empty; } <|fim_prefix|>namespace DevToys.Blazor.Core.Helpers; public class ValueBuilde...
fim
DevToys-app/DevToys
csharp
namespace DevToys.Blazor.Core.Languages; /// <summary> /// The 'flow-direction' property specifies whether the primary text advance /// direction shall be left-to-right or right-to-left. /// </summary> public enum FlowDirection { /// <internalonly> /// Sets the primary text advance direction to left-to-right,...
fim
DevToys-app/DevToys
csharp
<|fim_suffix|>ulture = new CultureInfo(identifier!); DisplayName = Culture.NativeName; InternalName = Culture.Name; } Identifier = Culture.Name; } } <|fim_prefix|>using System.Globalization; using DevToys.Blazor.BuiltInTools.Set<|fim_middle|>tings; namespace DevToys.Blazor...
fim
DevToys-app/DevToys
csharp
<|fim_suffix|> get; } public LanguageManager() { AvailableLanguages = new List<LanguageDefinition> { new LanguageDefinition() // default language }; IReadOnlyList<string> supportedLanguageIdentifiers = DevToys.Localization.CultureHelper.ApplicationCultures; ...
fim
DevToys-app/DevToys
csharp
<|fim_suffix|>ntArgs e) { if (!Debugger.IsAttached) { OnCloseContextMenuRequested(); } } } <|fim_prefix|>namespace DevToys.Blazor.Core.Services; public sealed class ContextMenuService { private readonly object _lock = new(); private readonly IWindowService _windowSe...
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>namespace DevToys.Blazor.Core.Services; public sealed class DocumentEventSe<|fim_suffix|> return new(eventSubscription, firstTimeRegistered); } } public void Dispose() { _semaphore.Dispose(); } private class EventSubscription : IAsyncDisposable { privat...
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>using System.Text; using DevToys.Core.Tools.Metadata; using Microsoft.Extensions.Logging; namespace DevToys.Blazor.Core.Services; public sealed partial class FontService { private readonly ILogger _logger; private readonly IJSRuntime _jsRuntime; #pragma warning disable IDE0044 // Add readonly ...
fim
DevToys-app/DevToys
csharp
<|fim_suffix|>if (!_isDisposed) { _isDisposed = true; _dialogService.IsDialogOpened = false; } } } } } <|fim_prefix|>namespace DevToys.Blazor.Core.Services; public sealed class GlobalDialogService { private readonly ob...
fim
DevToys-app/DevToys
csharp
<|fim_suffix|>ModeSupportedByPlatform { get; } } <|fim_prefix|>namespace D<|fim_middle|>evToys.Blazor.Core.Services; public interface IWindowService { event EventHandler<EventArgs>? WindowActivated; event EventHandler<EventArgs>? WindowDeactivated; event EventHandler<EventArgs>? WindowLocationChanged; ...
fim
DevToys-app/DevToys
csharp
<|fim_suffix|>s from the language service. IReadOnlyList<SemanticToken> semanticTokens = await languageService.Value.GetSemanticTokensAsync( presenter.UIMultiLineTextInput.Text, cancellationToken); if (semanticTokens is...
fim
DevToys-app/DevToys
csharp
<|fim_prefix|>using DevToys.Blazor.Components; namespa<|fim_suffix|>lic string? Class { get; private set; } public string? Style { get; private set; } public bool ShowContent { get; private set; } public DateTime? ActivationDate { get; private set; } public IDictionary<string, object>? AdditionalA...
fim
DevToys-app/DevToys
csharp
<|fim_suffix|> { if (!_isInitialized) { await _jsRuntime.InvokeVoidWithErrorHandlingAsync("devtoys.Popover.initialize", "main-layout", 0); _isInitialized = true; } } } ...
fim
DevToys-app/DevToys
csharp
namespace DevToys.Blazor.Core.Services; public sealed class UIDialogService { private readonly object _lock = new(); private readonly GlobalDialogService _globalDialogService; public UIDialogService(GlobalDialogService globalDialogService) { _globalDialogService = globalDialogService; } ...
fim
DevToys-app/DevToys
csharp