Facebook Group
LiveAppData
<Compile Include="App_Data\Models\*.generated.cs" />
using System.Linq; | |
using Umbraco.Core; | |
using Umbraco.Core.Composing; | |
using Umbraco.Web.Editors; | |
namespace CodeShare.Core.Composing | |
{ | |
[RuntimeLevel(MinLevel = RuntimeLevel.Run)] | |
public class EditorModelEventsComposer : ComponentComposer<EditorModelEventsComponent> | |
{ |
public IEnumerable<ISearchResult> GetMembersByKeys(string[] memberKeys) | |
{ | |
if (ExamineManager.Instance.TryGetIndex(Constants.UmbracoIndexes.MembersIndexName, out var index)) | |
{ | |
var searcher = index.GetSearcher(); | |
var criteria = searcher.CreateQuery(); | |
var query = criteria.GroupedOr(new[] { "__Key" }, memberKeys); | |
var searchResults = query.Execute(); | |
return searchResults; | |
} |
{name: "This is the first file"} |
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<handlers> | |
<clear /> | |
<add name="DOCX" path="*.docx" verb="*" type="CodeShare.Web.Handlers.MediaHandler" /> | |
<add name="XLSX" path="*.xlsx" verb="*" type="CodeShare.Web.Handlers.MediaHandler" /> | |
<add name="DOC" path="*.doc" verb="*" type="CodeShare.Web.Handlers.MediaHandler" /> | |
<add name="XLS" path="*.xls" verb="*" type="CodeShare.Web.Handlers.MediaHandler" /> | |
<add name="PDF" path="*.pdf" verb="*" type="CodeShare.Web.Handlers.MediaHandler" /> |
using System.Linq; | |
using System.Web.Http; | |
using Umbraco.Core.Models; | |
using Umbraco.Core.Services; | |
using Umbraco.Web.WebApi; | |
namespace CodeShare.Web.Controllers.ApiControllers | |
{ | |
public class ProtectedMediaApiController : UmbracoApiController | |
{ |
using CodeShare.Library.Helpers; | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Web; | |
namespace CodeShare.Web.Handlers | |
{ | |
public class MediaHandler : IHttpHandler | |
{ |
using Newtonsoft.Json; | |
using System; | |
using System.Collections.Generic; | |
using System.Net.Http; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace CodeShare.Library.Helpers | |
{ | |
public class ApiHelper |
using System.Collections.Generic; | |
namespace NINumberValidator | |
{ | |
public class NIValidator | |
{ | |
public bool IsValid(string niNumber) | |
{ | |
bool isValid = false; | |
if(!string.IsNullOrEmpty(niNumber)) |