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 Result | |
{ | |
protected internal Result(bool isSuccess, Error error) | |
{ | |
if (isSuccess && error != Error.None) | |
{ | |
throw new InvalidOperationException(); | |
} | |
if (!isSuccess && error == Error.None) |
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 System; | |
using System.Collections.Generic; | |
using System.Data; | |
using System.Data.SqlClient; | |
namespace Core.Data | |
{ | |
/// <summary> | |
/// | |
/// </summary> |
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
--modified from SO: http://stackoverflow.com/questions/5873170/generate-class-from-database-table | |
--added table and column | |
declare @TableName sysname = 'TableName' | |
declare @Result varchar(max) = '[Table(Name = "' + @TableName + '")] | |
public class ' + @TableName + ' | |
{' | |
select @Result = @Result + ' | |
[Column(DbType = "' + |
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
[HtmlTargetElement(Attributes = "is-active-page")] | |
public class ActivePageTagHelper : TagHelper | |
{ | |
/// <summary>The name of the action method.</summary> | |
/// <remarks>Must be <c>null</c> if <see cref="P:Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper.Route" /> is non-<c>null</c>.</remarks> | |
[HtmlAttributeName("asp-page")] | |
public string Page { get; set; } | |
/// <summary> | |
/// Gets or sets the <see cref="T:Microsoft.AspNetCore.Mvc.Rendering.ViewContext" /> for the current request. |
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
<?xml version="1.0" encoding="utf-8" standalone="yes"?> | |
<language alias="pt" intName="Portuguese Portugal" localName="Portuguese Portugal" lcid="" culture="pt-PT"> | |
<creator> | |
<name>The Umbraco community</name> | |
<link>https://our.umbraco.com/documentation/Extending-Umbraco/Language-Files</link> | |
</creator> | |
<area alias="actions"> | |
<key alias="assignDomain">Gerenciar hostnames</key> | |
<key alias="auditTrail">Caminho de Auditoria</key> | |
<key alias="browse">Navegar o Nó</key> |
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 Microsoft.AspNetCore.Mvc.Rendering; | |
using Microsoft.AspNetCore.Mvc.ViewFeatures; | |
using Microsoft.AspNetCore.Razor.TagHelpers; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace Microsoft.AspNetCore.Mvc.TagHelpers | |
{ | |
[HtmlTargetElement(Attributes = "is-active-route")] |
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
-- Umbraco Clear Old Document Versions To Decrease Database Size And Improve Performance | |
-- http://borism.net/2008/12/16/fixing-a-large-cmspropertydata-table-in-umbraco/ | |
DECLARE @createdDate Datetime = DATEADD(m, -1, getdate()) | |
-- dump logs | |
-- TRUNCATE TABLE umbracolog -- faster if log table is very big and you don't need anything | |
DELETE FROM umbracolog WHERE Datestamp < @createdDate | |
-- clean up old versions | |
DELETE FROM cmsPropertyData WHERE |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
</head> | |
<body> | |
<header> | |
<nav> |
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 System.Collections.Generic; | |
using System.Linq; | |
usingusing System.Collections.Generic; | |
using System.Linq; | |
using System.Web.Mvc; | |
namespace Gists.Mvc.Helpers | |
{ | |
public static class ModelExtensions | |
{ |
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 System; | |
using System.Linq; | |
using Umbraco.Core; | |
using Umbraco.Core.Logging; | |
using Umbraco.Web; | |
namespace Sniper.Umbraco | |
{ | |
public static class MultiNodeTreePickerIdToUdiMigrator | |
{ |
NewerOlder