text stringlengths 14 100k | source stringclasses 1
value | repo stringclasses 810
values | language stringclasses 13
values |
|---|---|---|---|
<|fim_suffix|>Enabled = isChecked;
}
private void OnContinueButtonClick(MouseEventArgs ev)
{
SettingsProvider.SetSetting(PredefinedSettings.CheckForUpdate, _checkUpdateCheckBox.IsChecked);
SettingsProvider.SetSetting(PredefinedSettings.IsFirstStart, false);
_dialog.Close();
}
}
... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>e();
}
}
<|fim_prefix|>using System.Reflection;
using DevToys.Blazor.Components;
using Markdig;
using Microsoft.AspNetCore.Components.Web;
namespace DevToys.Blazor.Pages.Dialogs;
public partial class WhatsNewDialog : StyledComponentBase
{
private Dialog _dialog = default!;
#pragma warning disa... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>ol.ExtensionManagerToolName);
Guard.IsNotNull(extensionManagerTool);
ViewModel.SelectedMenuItem = ViewModel.GetBestMenuItemToSelect(extensionManagerTool);
}
private async Task<bool> ShowFirstStartAndOrWhatsNewDialogsAsync()
{
bool openedDialog = false;
if (Sett... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>using DevToys.Blazor.Core.Services;
using DevToys.Core.Settings;
namespace DevToys.Blazor.Pages;
public p<|fim_suffix|> });
Task.Delay(1000).ContinueWith(t =>
{
InvokeAsync(() =>
{
Class = "";
StateHasChanged();
}... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>OnToolSelected(object item)
{
Guard.IsOfType<GuiToolInstance>(item);
ViewModel.ToolSelectedCommand.Execute((GuiToolInstance)item);
}
private void OnOpenInNewWindow(GuiToolInstance item)
{
CommandLineLauncherService.LaunchTool(item.InternalComponentName);
}
#pr... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>export function initializeHero<|fim_suffix|> = SimpleBar.instances.get(gridView);
simpleBar
.getScrollElement()
.addEventListener("scroll", (ev) => {
onGridViewScroll(ev, heroId);
});
}
function onGridViewScroll(ev, heroId) {
const gridView = ev.target;
const hero =... | fim | DevToys-app/DevToys | javascript |
<|fim_suffix|>slationParallaxFactor = 3;
const opacityParallaxFactor = 2.5;
const opacity = 1 - Math.log(gridView.scrollTop / opacityParallaxFactor + 1) / Math.log(hero.clientHeight * opacityParallaxFactor);
hero.style.opacity = opacity > 0 ? opacity.toString() : "0";
if (gridView.scrollTop > 0) {
... | fim | DevToys-app/DevToys | typescript |
<|fim_prefix|>using DevToys.Blazor.Components;
using DevToys.Blazor.Core.Services;
using DevToys.Business.ViewModels;
using DevToys.Core.Debugger;
using DevToys.Core.Tools.ViewItems;
namespace DevToys.Blazor.Pages.SubPages;
public partial class ToolPage : MefComponentBase, IFocusable
{
private ScrollViewer? _scr... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>ng static DevToys.Api.GUI;
<|fim_prefix|>global using System.Reflection.Metadata;
global using<|fim_middle|> Microsoft.AspNetCore.Components;
global using Microsoft.JSInterop;
global using DevToys.Api;
global using DevToys.Blazor.Core.Helpers;
global using DevToys.Blazor.Core.Extensions;
global usi<|en... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>/// <binding BeforeBuild='devtoysJavaScript, devtoysSass' ProjectOpened='watchDevtoysSass, watchDevtoysJavaScript' />
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable no-undef */
const gulp = require("gulp"); // or import * as gulp = require('gulp'
const clea<|fim_suffix|>ript",
... | fim | DevToys-app/DevToys | javascript |
<|fim_suffix|> editorHolder;
}
return editorHolder;
}
}
// list of editor instances
MonacoEditor.editors = [];
// constructor
(() => {
// this will force loading the monaco library. It happens on the app startup.
require.config({ paths: { "vs": "_conte... | fim | DevToys-app/DevToys | javascript |
<|fim_prefix|>wind<|fim_suffix|>t();
// Prevent drop anything on the window (except where we will allow it).
e.dataTransfer.dropEffect = "none";
}, false);
window.addEventListener("drop", function (e) {
e.preventDefault();
}, false);<|fim_middle|>ow.addEventListener("dragover", function (e) {
e.preve... | fim | DevToys-app/DevToys | javascript |
<|fim_suffix|>tion (e) { return e.module ? e.module : e.module = { id: e.map.id, uri: e.map.url, config: function () { return getOwn(g.config, e.map.id) || {} }, exports: e.exports || (e.exports = {}) } } }, (e = function (e) { this.events = getOwn(r, e.id) || {}, this.map = e, this.shim = getOwn(g.shim, e.id), this.de... | fim | DevToys-app/DevToys | javascript |
// NOTE:
// This is a fork of simplebar - v6.2.5. Some custom changes have been made. Be careful if you decide to update this library.
/**
* simplebar - v6.2.5
* Scrollbars, simpler.
* https://grsmto.github.io/simplebar/
*
* Made by Adrien Denat from a fork by Jonathan Nicol
* Under MIT License
*/
var SimpleBa... | fim | DevToys-app/DevToys | javascript |
<|fim_prefix|>/*! split-grid - v1.0.11 */
(function (global, factory) {
typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory() :
typeof define === "function" && define.amd ? define(factory) :
(global = typeof globalThis !== "undefined" ? globalThis : global ||... | fim | DevToys-app/DevToys | javascript |
<|fim_suffix|>efProvider, T Parameter);
<|fim_prefix|>using DevToys.Api;
namespace DevToys.Business.Models;
internal record<|fim_middle|> NavigationParameters<T>(IMefProvider M<|endoftext|> | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>]
<|fim_prefix|>using System.Runtime.CompilerServices;
[assembly: Internals<|fim_middle|>VisibleTo("DevToys.Blazor")]
[assembly: InternalsVisibleTo("DevToys.Windows")]
[assembly: InternalsVisibleTo("DevToys.MacOS")]
[assembly: InternalsVisibleTo("DevToys.Linux")]
[assembly: InternalsVisibleTo("DevToys")... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>Helper.GetCommandLineArgument(ToolArgument);
if (!string.IsNullOrEmpty(toolName))
{
GuiToolInstance? tool = _guiToolProvider.GetToolFromInternalName(toolName);
if (tool is not null)
{
// Make sure MainWindowViewModel is initialized.
... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|> if (!cancellationToken.IsCancellationRequested && !AreOldAndNewClipboardDataEqual(_oldRawClipboardData, rawClipboardData))
{
// Reset recommended tools.
_guiToolProvider.ForEachToolViewItem(toolViewItem => toolViewItem.IsRecommended = false);
... | fim | DevToys-app/DevToys | csharp |
using CommunityToolkit.Mvvm.Collections;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using CommunityToolkit.Mvvm.Messaging;
using DevToys.Core.Models;
using DevToys.Core.Tools;
using DevToys.Core.Tools.Metadata;
using DevToys.Core.Tools.ViewItems;
using DevToys.Localization.Strings.M... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using DevToys.Api;
using DevToys.Core.Tools;
using DevToys.Core.Tools.ViewItems;
using DevToys.Localization.Strings.ToolPage;
namespace DevToys.Business.ViewModels;
[Export]
[PartCreationPolicy(CreationPolicy.NonShared)]
int... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>ce.IsPreviewVersion());
if (potentialRelease is not null)
{
var assemblyInformationalVersion
= (AssemblyInformationalVersionAttribute)Assembly
.GetExecutingAssembly()
.GetCu... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>
: "✕ Continuing without debugger");
return System.Diagnostics.Debugger.IsAttached;
#else
return await Task.FromResult(false);
#endif
}
}
<|fim_prefix|>namespace DevToys.Core.Debugger;
public static class DebuggerHelper
{
public static async Task<bool> WaitForDebugge... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|> Types = types;
}
public Type[]? Types { get; }
}
<|fim_prefix|>na<|fim_middle|>mespace DevToys.Core.Debugger;
public sealed class HotReloadEventArgs : EventArgs
{
internal HotReloadEventArgs(Type[]? types)
{
<|endoftext|> | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("CodeQuality", "IDE0051:Remove unused private members", Justification = "Invoked by .NET runtime on Hot Reload.")]
private static void UpdateApplication(Type[]? types)
{
if (System.Diagnostics.Debugger.IsAttached)
{... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Core;
/// <summary>
/// Provides methods for ordering and checking cycles in extensions.
/// </summary>
internal static class ExtensionOrderer
{
/// <summary>
/// Orders the extensions based on their metadata.
/// </summary>
/// <typeparam name="TExtension">The type of ... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|> }
}
}
double elapsedMilliseconds = (DateTime.UtcNow - startTime).TotalMilliseconds;
logger.LogInformation("Cleared temp files in {elapsedMilliseconds}ms", elapsedMilliseconds);
}
}
<|fim_prefix|>using System.Collections.Concurrent;
using Microsoft.Extensions... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Core;
public interface IGroup
{
/// <summary>
/// Gets all the children items of this group.
/// </summary>
IEnumerable<IItem>? Chil<|fim_suffix|>/// Gets whether the group should be expanded.
/// </summary>
public bool GroupShouldBeExpandedInUI { get; }
//... | fim | DevToys-app/DevToys | csharp |
namespace DevToys.Core;
public interface IItem
{
}
<|endoftext|> | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>{
}
<|fim_prefix|>namespace DevToys.Cor<|fim_middle|>e;
public interface ISeparator
<|endoftext|> | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|> logBuilder.Append(timeStamp.ToString("o"));
logBuilder.Append('\t');
logBuilder.Append(logLevel.ToString());
logBuilder.Append("\t[");
logBuilder.Append(_logName);
logBuilder.Append("]");
logBuilder.Append("\t[");
... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>using System.Collections.Concurrent;
using Microsoft.Extensions.Logging;
namespace DevToys.Core.Logging;
[ProviderAlias("File")]
public sealed class FileLoggerProvider : ILoggerProvider
{
public const string LogFolderName = "Logs";
private readonly ConcurrentDictionary<string, FileLogger> _log... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
namespace DevToys.Core.Logging;
public static class LoggingBuilderExtensions
{
/// <summary>
/// Adds a file logger.
/// </summary>
public static ILoggingBuilder AddFile(this ILoggingBuilder builder, <|f... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>using System.ComponentModel.Composition.Hosting;
using System.Reflection;
using Microsoft.Extensions.Logging;
namespace DevToys.Core.Mef;
/// <summary>
/// Provides a set of methods to initialize and manage MEF.
/// </summary>
public sealed partial class MefComposer : IDisposable
{
public const str... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>using System.ComponentModel.Composition.Hosting;
namespace DevToys.Core.Mef;
[Export(typeof(IMefProvider))]
internal sealed class<|fim_suffix|>tExports<TExport, TMetadataView>();
}
public void SatisfyImports(object @object)
{
ExportProvider!.SatisfyImportsOnce(@object);
}
}
<|f... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>chOption.AllDirectories);
if (pathFilter is not null)
{
files = files.Where(f => pathFilter(f));
}
_aggregateCatalog = new AggregateCatalog();
_aggregateCatalog.Changed += (o, e) =>
{
Changed?.Invoke(o, e);
};
_agg... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>DetectedTool? SmartDetectionInfo { get; }
}
<|fim_prefix|>using CommunityToolkit.Mvvm.Messaging.Messages;
using DevToys.Core.Tools;
namespace <|fim_middle|>DevToys.Core.Models;
public sealed class ChangeSelectedMenuItemMessage : ValueChangedMessage<GuiToolInstance>
{
public ChangeSelectedMenuItemMe... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>using System.Text.Json.Serialization;
namespace DevToys.Core.Models;
[DebuggerDisplay($"{{{nameof(Name)}}}")]
internal sealed class GitHubRelease
{
[JsonPr<|fim_suffix|>t; } = string.Empty;
}
<|fim_middle|>opertyName("prerelease")]
public bool PreRelease { get; set; }
[JsonPropertyName("dr... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Core;
public static class OSHelper
{
public static bool IsOsSupported(IReadOnlyList<Platform> targetPlatforms)
{
if (targetPlatforms.Count > 0)
{
Platform currentPlatform;
if (OperatingSystem.IsMacOS() || OperatingSystem.IsMacCatalyst())
... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|><|fim_suffix|>DevToys.Api;
<|fim_middle|>global using <|endoftext|> | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>using System.Diagnostics.CodeAnalysis;
namespace DevToys.Core.Settings;
/<|fim_suffix|>ting.
/// </summary>
void WriteSetting(string settingName, object? value);
/// <summary>
/// Reads an app setting.
/// </summary>
bool TryReadSetting(string settingName, [MaybeNullWhen(false)... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>= new(
name: nameof(IsFirstStart),
defaultValue: true);
/// <summary>
/// Equals to the last version the app runs. This setting is used to determine whether the user started the app
/// for the first time after an update
/// </summary>
public static readonly Se... | fim | DevToys-app/DevToys | csharp |
using System.Collections;
using System.Globalization;
using System.Text.Json;
using Microsoft.Extensions.Logging;
namespace DevToys.Core.Settings;
[Export(typeof(ISettingsProvider))]
internal sealed partial class SettingsProvider : ISettingsProvider
{
private readonly ILogger _logger;
private readonly ISetti... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>using Commu<|fim_suffix|>.
/// </summary>
[ObservableProperty]
private string? _titleWithToolName = MainWindow.WindowTitle;
}
<|fim_middle|>nityToolkit.Mvvm.ComponentModel;
using DevToys.Localization.Strings.MainWindow;
namespace DevToys.Core;
[Export]
public sealed partial class TitleBarIn... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>ated.
_ = View;
try
{
// Send the data to the tool.
_instance.Value.OnDataReceived(dataTypeName, parsedData);
}
catch (NotImplementedException) { }
catch (Exception ex)
{
LogPassSmartDetectedDataFailed(ex, Interna... | fim | DevToys-app/DevToys | csharp |
using System.Collections.ObjectModel;
using System.Globalization;
using System.Reflection;
using System.Resources;
using DevToys.Core.Tools.Metadata;
using DevToys.Core.Tools.ViewItems;
using DevToys.Localization;
using DevToys.Localization.Strings.MainWindow;
using FuzzySharp;
using FuzzySharp.PreProcess;
using Micro... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Core.Tools.Metadata;
[DebuggerDisplay($"DataTypeName = {{{nameof(DataTypeName)}}}, DataTypeBaseName = {{{nameof(DataTypeBaseName)}}}")]
public sealed class DataTypeDetectorMetadata
{
public DataTypeDetectorMetadata(IDictionary<string, object> metadata)
{
DataTypeName = ... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|> {
if (!string.IsNullOrEmpty(After[i]))
{
after.Add(After[i]);
}
}
After = after;
}
}
}
<|fim_prefix|>namespace DevToys.Core.Tools.Metadata;
[DebuggerDisplay($"InternalComponentName = {{{na... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Core.Tools.Metadata;
[DebuggerDisplay($"InternalComponentName = {{{nameof(InternalComponentName)}}}")]
public sealed class GuiToolMetadata : IOrderableMetadata
{
internal static GuiToolMetadata Create(
string internalComponentName,
string iconFontName,
strin... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Core.Tools.Metadata;
[DebuggerDisplay($"InternalComponentName = {{{nameof(Inte<|fim_suffix|>ntName { get; }
public LanguageServiceMetadata(IDictionary<string, object> metadata)
{
InternalComponentName = metadata.GetValueOrDefault(nameof(NameAttribute.InternalComponentN... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevToys.Core.Tools.Metadata;
public static class ReservedGuiToolGroupNames
{
public static readonly string AllTools = nameof(<|fim_suffix|>FavoriteTools);
}
<|fim_middle|>AllTools);
public static readonly string FavoriteTools = nameof(<|endoftext|> | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>na<|fim_suffix|>tValueOrDefault(nameof(NameAttribute.InternalComponentName)) as string ?? string.Empty;
Guard.IsNotNullOrWhiteSpace(InternalComponentName);
}
}
<|fim_middle|>mespace DevToys.Core.Tools.Metadata;
[DebuggerDisplay($"InternalComponentName = {{{nameof(InternalComponentName)}}}")]... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|> {
Guard.IsNotNull(toolInstance);
Guard.IsNotNullOrEmpty(dataTypeName);
ToolInstance = toolInstance;
DataTypeName = dataTypeName;
ParsedData = parsedData;
}
public GuiToolInstance ToolInstance { get; }
public string DataTypeName { get; }
public ob... | fim | DevToys-app/DevToys | csharp |
using DevToys.Core.Tools.Metadata;
using Microsoft.Extensions.Logging;
namespace DevToys.Core.Tools;
[Export(typeof(SmartDetectionService))]
public sealed partial class SmartDetectionService
{
private readonly ILogger _logger;
private readonly IReadOnlyList<DetectorNode> _detectorHierarchy;
private reado... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>using System.Collections.ObjectModel;
using CommunityToolkit.Mvvm.ComponentModel;
namespace DevToys.Core.Tools.ViewItems;
/// <summary>
/// Represents a group or category in the main menu.
/// </summary>
[DebuggerDisplay($"DisplayTitle = {{{nameof(DisplayTitle)}}}")]
public sealed class GroupViewItem :... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>using CommunityToolkit.Mvvm.ComponentModel;
namespace DevToys.Core.Tools.ViewItems;
/// <summary>
/// Represents a tool in the main menu.
/// </summary>
[DebuggerDisplay($"InternalComponentName = {{{<|fim_suffix|></summary>
public GuiToolInstance ToolInstance { get; }
public string MenuDisplay... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>using CommunityToolkit.Mvvm.ComponentModel;
namespace DevToys.Core.Tools.ViewItems;
/// <summary>
/// Represe<|fim_suffix|> SeparatorViewItem : ObservableObject, ISeparator
{
}
<|fim_middle|>nts a separator in the main menu.
/// </summary>
public sealed class<|endoftext|> | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>/// </summary>
bool IsPreviewVersion();
}
<|fim_prefix|>namespace DevToys.Core.Version;
/// <summary>
/// Represents a service that provides information about the version of the app.
/// </summary>
public interface IVersionSer<|fim_middle|>vice
{
/// <summary>
/// Indicates whether the curre... | fim | DevToys-app/DevToys | csharp |
namespace DevToys.Core.Version;
[Export(typeof(IVersionService))]
internal sealed class VersionService : IVersionService
{
public bool IsPreviewVersion()
{
return AppHelper.IsPreviewVersion.Value;
}
}
<|endoftext|> | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace DevT<|fim_suffix|>rashing.
/// If an error occurs, the method will return <see langword="null"/>.
/// </summary>
Task<string?> SafeGetStringAsync(Uri uri, CancellationToken cancellationToken);
}
<|fim_middle|>oys.Core.Web;
/// <summary>
/// Represents a service that provides method... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>using Microsoft.Extensions.Logging;
namespace DevToys.Core.Web;
[Export(typeof(IWebClientService))]
internal sealed class WebClientService : IWebClientService
{
private readonly ILogger _logger;
private readonly<|fim_suffix|>estHeaders.UserAgent.ParseAdd("DevToys");
}
public async Task... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>using DevToys.Api;
namespace DevToys.Localization;
[Export(typeof(IResourceAssemblyIdentifier)<|fim_suffix|>yIdentifier : IResourceAssemblyIdentifier
{
public ValueTask<FontDefinition[]> GetFontDefinitionsAsync()
{
throw new NotImplementedException();
}
}
<|fim_middle|>)]
[Name(name... | fim | DevToys-app/DevToys | csharp |
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//--... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-g... | fim | DevToys-app/DevToys | csharp |
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//--... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>//------------------------------------------------------------------------------
// <auto-generated>
// This code was genera<|fim_suffix|>e static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Pe... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-g... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|> ResourceManager.GetString("NotFindingToolSuggestIdea", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Open in a new window.
/// </summary>
public static string OpenInNewWindow {
get {
... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>ture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Globalization.CultureInfo... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-g... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regen<|fim_suffix|>.GetS... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|> /// </summary>
public static string SaveAsButtonTooltip {
get {
return ResourceManager.GetString("SaveAsButtonTooltip", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Unknown image.
... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>nk.
/// </summary>
public static string ShrinkButtonToolTip {
get {
return ResourceManager.GetString("ShrinkButtonToolTip", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Transfer to ... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>eturn ResourceManager.GetString("Ok", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to What's new in DevToys v{0}.
/// </summary>
public static string Title {
get {
return Resource... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>t(nameof(NameAttribute.InternalComponentName)) as string ?? string.Empty;
Name = metadata.GetValueOrDefault(nameof(CommandNameAttribute.Name)) as string ?? string.Empty;
Alias = metadata.GetValueOrDefault(nameof(CommandNameAttribute.Alias)) as string ?? string.Empty;
DescriptionRes... | fim | DevToys-app/DevToys | csharp |
using System.CommandLine;
using System.Reflection;
using System.Resources;
using DevToys.Api;
using Microsoft.Extensions.Logging;
namespace DevToys.CLI;
internal sealed partial class CommandToICommandLineToolMap
{
private readonly ILogger _logger;
internal CommandToICommandLineToolMap(ICommandLineTool comma... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>using DevToys.Core;
namespace DevToys.CLI.Core;
internal static class Constants
{
internal static readonly string AppCacheDirectory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolde<|fim_suffix|>cationData), AppHelper.IsPreviewVersion.Value ? "DevToys-CLI-preview" : "DevToys-CLI");
... | fim | DevToys-app/DevToys | csharp |
using DevToys.Api;
using DevToys.CLI.Strings.CliStrings;
using DevToys.Core;
namespace DevToys.CLI.Core.FileStorage;
[Export(typeof(IFileStorage))]
internal sealed class FileStorage : IFileStorage
{
[ImportingConstructor]
internal FileStorage()
{
AppCacheDirectory = Constants.AppCacheDirectory;
... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>using System.CommandLine;
using System.CommandLine.Parsing;
namespace <|fim_suffix|>?> parseArgument)
: base(optionName, parseArgument, isDefault: false, optionDescription)
{
Guard.IsTrue(oneOfTypeDefinition.IsAssignableTo(typeof(OneOf.IOneOf)));
OneOfTypeDefinition = oneOfT... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>using System.Diagnostics.CodeAnalysis;
namespace DevToys.CLI.Core;
internal static class OneOfParser
{
private delegate bool TryParseString(string token, [NotNullWhen(true)] out object? value);
// Forked from https://github.com/dotnet/command-line-api/blob/d12a6ff555b33670defb2243daecdc247caf8... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>e(SettingsFileName, replaceIfExist: true);
using TextWriter textWriter = new StreamWriter(stream);
foreach (KeyValuePair<string, string> item in _settings.Value)
{
textWriter.WriteLine($"{item.Key}={item.Value}");
}
... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>using System.Collections;
using System.Diagnostics.CodeAnalysis;
namespace DevToys.CLI.Core;
internal static class TypeExtensions
{
internal static bool IsEnumerable(this Type type)
{
if (type == typeof(string))
{
<|fim_suffix|>this Type type)
{
if (type.IsArray... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>using System.CommandLine;
using System.CommandLine.Parsing;
using System.Reflection;
using System.Resources;
using DevToys.Api;
using DevToys.CLI.Core;
using Microsoft.Extensions.Logging;
namespace DevToys.CLI;
internal sealed partial class OptionToICommandLineToolMap
{
private readonly ILogger _lo... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>using System.CommandLine;
using System.CommandLine.Invocation;
using System.Text;
using DevToys.Api;
using DevToys.CLI.Core;
using DevToys.CLI.Core.FileStorage;
using DevToys.Core;
using DevToys.Core.Logging;
using DevToys.Core.Mef;
using Microsoft.Extensions.Logging;
namespace DevToys.CLI;
internal pa... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class CliStrings {
private static global::Sys... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>)
{
LogAddingRootComponent(rootComponent.ComponentType?.FullName ?? string.Empty,
rootComponent.Selector ?? string.Empty, rootComponent.Parameters?.Count ?? 0);
// Since the page isn't loaded yet, this will always complete synchronously
_ = root... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|> // Ignore.
}
// Continue disposing
return base.DisposeAsyncCore();
}
/// <inheritdoc />
protected override void NavigateCore(Uri absoluteUri)
{
LogNavigatingToUri(absoluteUri);
_webview.LoadUri(absoluteUri.ToString());
}
/// <in... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.WebView;
namespace DevToys.Linux.Components;
/// <summary>
/// Describes a root component that can be added to a <see cref="BlazorWkWebView"/>.
/// </summary>
internal sealed class RootComponent
{
/// <summary>
/// Get... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>tion
{
/// <inheritdoc />
public JSComponentConfigurationStore JSComponents { get; } = new();
}
<|fim_prefix|>using System.Collections.ObjectModel;
using Microsoft.AspNetCore.Components.Web;
namespace DevToys.Linux.Components;
/// <summary>
/// A collection of <see cref="RootComponent"/> items.... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>using System.Reflection;
using System.Reflection.Metadata;
using System.Text;
using System.Text.RegularExpressions;
using DevToys.Api;
using DevToys.Linux.Components;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.WebView;
using Microsoft.Extensions.Logging;
using Microsoft.... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>tegy = urlLoadingStrategy;
}
/// <summary>
/// Gets the <see cref="Url">URL</see> to be loaded.
/// </summary>
internal Uri Url { get; }
/// <summary>
/// The policy to use when loading links from the webview.
/// Defaults to <see cref="UrlLoadingStrategy.OpenExternally"/... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>namespace Dev<|fim_suffix|>mponents;
/// <summary>
/// URL loading strategy for anchor tags <![CDATA[<a>]]> within a Blazor WebView.
///
/// Anchor tags with target="_blank" will always open in the default
/// browser and the UrlLoading event won't be called.
/// </summary>
internal enum UrlLoadingStra... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>gerMessage(0, LogLevel.Warning, "Failed to retrieve the clipboard data.")]
partial void LogGetClipboardFailed(Exception ex);
[LoggerMessage(1, LogLevel.Error, "Failed to set the clipboard text.")]
partial void LogSetClipboardTextFailed(Exception ex);
}
<|fim_prefix|>using System.Text;
using ... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>using D<|fim_suffix|>Directory()
{
string? applicationDataRootFolder = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
if (string.IsNullOrEmpty(applicationDataRootFolder))
{
applicationDataRootFolder = Environment.GetEnvironmentVariable(... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|> }
Gio.ListModel? fileListModel = fileChooser.GetFiles();
var fileResult = new List<SandboxedFileReader>();
if (fileListModel is not null)
{
uint fileCount = fileListModel.GetNItems();
if (fileCount == 1)
... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>var fonts = new List<string>();
for (uint i = 0; i < fontCount; i++)
{
var fontFamily = (Pango.FontFamily)families.GetObject(i)!;
fonts.Add(fontFamily.GetName()!);
}
return fonts.Order().ToArray();
}
return A... | fim | DevToys-app/DevToys | csharp |
<|fim_prefix|>using System.Collections.Concurrent;
using DevToys.Api;
using DevToys.Core.Settings;
namespace DevToys.Linux.Core;
[Export(typeof(ISettingsStorage))]
internal sealed class SettingsStorage : ISettingsStorage
{
private const string SettingsFileName = "settings.ini";
private readonly IFileStorage... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>Theme = ApplicationTheme.Light;
_gtkSettings.GtkApplicationPreferDarkTheme = false;
}
_ignoreOperatingSystemSettingChanged = false;
}
ThemeChanged?.Invoke(this, EventArgs.Empty);
}
internal void SetMainWindow(Gtk.Window window, IWindowServ... | fim | DevToys-app/DevToys | csharp |
using DevToys.Blazor.Core.Services;
using Object = GObject.Object;
using static GObject.Object;
namespace DevToys.Linux.Core;
internal sealed class WindowService : IWindowService
{
private Gtk.Window? _window;
// Not supported because GTK4 doesn't have APIs to move a window.
public bool IsCompactOverlayM... | fim | DevToys-app/DevToys | csharp |
<|fim_suffix|>tionActivate;
Application.OnShutdown -= OnApplicationShutdown;
}
private ServiceProvider InitializeServices()
{
_serviceCollection.AddBlazorWebView();
_serviceCollection.AddLogging((ILoggingBuilder builder) =>
{
#if DEBUG
builder.AddDebug();
... | 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.