This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
winget install --id=Spotify.Spotify -e ; | |
winget install --id=Microsoft.WindowsTerminal -e ; | |
winget install --id=Microsoft.VisualStudioCode -e ; | |
winget install --id=7zip.7zip -e ; | |
winget install --id=Microsoft.AzureStorageExplorer -e ; | |
winget install --id=ScooterSoftware.BeyondCompare4 -e ; | |
winget install --id=Google.Chrome -e ; | |
winget install --id=Dropbox.Dropbox -e ; | |
winget install --id=Git.Git -e ; | |
winget install --id=Insomnia.Insomnia -e ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyComposer : IUserComposer | |
{ | |
public void Compose(Composition composition) | |
{ | |
// Register service into the container | |
composition.RegisterUnique<PaletteService>(); | |
composition.RegisterUnique<ThemeService>(); | |
// Add our PVC to the collection of stuff | |
composition.PropertyValueConverters().Append<ThemePickerPropertyConvertor>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[HttpPost] | |
public string FetchCompletions(RazorCode model) | |
{ | |
var host = new System.Web.Razor.RazorEngineHost(new CSharpRazorCodeLanguage()); | |
var templateEngine = new System.Web.Razor.RazorTemplateEngine(host); | |
var compiledCode = templateEngine.GenerateCode(new StringReader(model.Code)); | |
var parsed = templateEngine.ParseTemplate(new StringReader(model.Code)); | |
// Cannot convert from 'System.Web.Razor.Parser.SyntaxTree.Block' to 'Microsoft.CodeAnalysis.Document' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using Umbraco.Core.Composing; | |
using Umbraco.Web.WebApi; | |
namespace TestCollections.Code | |
{ | |
// Implement IDiscoverable (To help with typescanning speed/perf) | |
public interface IMyThing : IDiscoverable | |
{ | |
string Name { get; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Web.Http; | |
using Umbraco.Core; | |
using Umbraco.Core.Components; | |
namespace My.Website | |
{ | |
[RuntimeLevel(MinLevel = RuntimeLevel.Run)] | |
public class ApiComposer : IUserComposer | |
{ | |
public void Compose(Composition composition) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Umbraco.Core.Scoping; | |
namespace My.Website | |
public class DatabaseExample | |
{ | |
private IScopeProvider _scopeProvider; | |
public DatabaseExample(IScopeProvider scopeProvider) | |
{ | |
_scopeProvider = scopeProvider; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Linq; | |
using Umbraco.Core; | |
using Umbraco.Core.Components; | |
using Umbraco.Core.Events; | |
using Umbraco.Core.Models; | |
using Umbraco.Core.Services; | |
using Umbraco.Core.Services.Implement; | |
namespace Umbraco.Web.UI | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ECHO OFF | |
rem Check if VS Code is installed - Checks if its in the path | |
rem Not 100% sure best way as think installer allows yout to NOT put it in the %PATH% | |
CALL where /q code | |
IF ERRORLEVEL 1 ( | |
ECHO Visual Studio Code is not installed. | |
ECHO Downloading installer from https://vscode-update.azurewebsites.net/latest/win32/stable | |
rem Download the file & name it VSCodeSetup.exe relative to this running batch file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static bool UseLegacyEditors() | |
{ | |
return UmbracoVersion.Current < new Version(7, 4); | |
} | |
var someRoutePath = Core.Configuration.UseLegacyEditors() | |
? "/myApp/treeAlias/edit-legacy/" + someObj.Id | |
: "/myApp/treeAlias/edit/" + someObj.Id; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Threading; | |
using System.Threading.Tasks; | |
using System.Web.Http; | |
using NuGet.Configuration; | |
using NuGet.Protocol.Core.Types; | |
using NuGet.Protocol.Core.v3; | |
using NuGet.Versioning; | |
namespace Umbraco.Forms.UpdateChecker.Controller | |
{ |