This file contains hidden or 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
<umb-control-group label="Label" description="Description"> | |
{{value}} | |
</umb-control-group> |
This file contains hidden or 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
return new PaymentFormResult() | |
{ | |
Form = new PaymentForm(cancelUrl, FormMethod.Get) | |
.WithAttribute("onsubmit", "return handlePaylikeCheckout(event)") | |
.WithJsFile("//sdk.paylike.io/3.js") | |
.WithJs(@" | |
var paylike = Paylike('" + publicKey + @"'); | |
window.handlePaylikeCheckout = function (e) { | |
e.preventDefault(); | |
paylike.popup({ |
This file contains hidden or 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
- powershell: | # generates a hash of all packages.config and saves each on a single line on 'packages.hash.txt' | |
Get-FileHash -Algorithm MD5 -Path (Get-ChildItem packages.config -Recurse) >> packages.hash.txt | |
Write-Host "Hash File saved to packages.hash.txt" | |
displayName: 'Calculate and save packages.config hash' | |
- task: Cache@2 | |
inputs: | |
key: 'nuget | "$(Agent.OS)" | packages.hash.txt' | |
restoreKeys: | | |
nuget | "$(Agent.OS)" |
This file contains hidden or 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.Composing; | |
using Vendr.Core.Events.Notification; | |
namespace MyNamespace | |
{ | |
public class MyComposer : IUserComposer | |
{ | |
public void Compose(Composition composition) | |
{ | |
composition.WithNotificationEvent<OrderFinalizedNotification>() |
This file contains hidden or 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
(function () { | |
'use strict'; | |
function MyController($scope, vendrMyResource, vendrRouteCache) | |
{ | |
vendrRouteCache.getOrFetch("currentThing", () => vendrMyResource.getMyThing()).then(function (thing) { | |
// TODO: Handle my thing | |
console.log(thing); | |
}); |
This file contains hidden or 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
angular.module('umbraco').factory('MyPropEditorClipboardActionHandler', function clipboardFactory() { | |
return { | |
handle: function () { | |
// Do something | |
} | |
} | |
}); |
This file contains hidden or 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 MyController : SurfaceController, IRenderController | |
{ | |
// Hijack route for doc type MyPage | |
[HijackRoute("MyPage")] | |
public ActionResult MyPage(ContentModel model) | |
{ | |
// Do some stuff here, then return the base method | |
return base.Index(model); | |
} | |
This file contains hidden or 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
{ | |
"bindings": [ | |
{ | |
"name": "Timer", | |
"type": "timerTrigger", | |
"direction": "in", | |
"schedule": "0 */5 * * * *" | |
} | |
] | |
} |
This file contains hidden or 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 interface IOrderService { | |
IEnumerable<IOrder> GetOrders(Guid storeId); | |
IOrder GetOrder(Guid storeId, Guid id); | |
IOrder CreateOrder(Guid storeId); | |
void SaveOrder(IOrder order); | |
void DeleteOrder(IOrder order); | |
} | |
public interface ICurrencyService { | |
IEnumerable<ICurrency> GetCurrencies(Guid storeId); |
This file contains hidden or 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
// All service have access to an ISessionManager that persists | |
// the current ids for the session (ISessionManager interface | |
// defined in core, with implementation in web project to | |
// store values in session / cookies OOTB) | |
OrderService.Get/SetCurrentOrder(); | |
CurrencyService.Get/SetCurrentCurrency(); | |
CountryService.Get/SetCurrentPaymentCountry(); | |
CountryService.Get/SetCurrentPaymentRegion(); | |
CountryService.Get/SetCurrentShippingCountry(); |