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
namespace MikeRobbins.Controllers | |
{ | |
[ServicesController] | |
public class ChartController : ServicesApiController | |
{ | |
private ISearcher _searcher; | |
private IMapper _mapper; | |
public ChartController(ISearcher iSearcher, IMapper iMapper) | |
{ |
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
parent.scForm.postRequest(\'\', \'\', \'\', \'contenteditor:launchtab(url={{DatasourceId}}, la=en, datasource=sitecore)\') |
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
<!-- | |
IMPORTANT: This configuration file is not intended for any production Sitecore installation. | |
Purpose: This include file contains some experimental optimizations that can speed up start-up. | |
Please, review each of the patched elements below and consider if some of the optimizations should be commented out due to the specifics of your solution. | |
Enabling this file without taking into account the specifics of your solution can have unexpected consequences. | |
To enable this include file, rename it to have a ".config" extension. |
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 DmsManager : IDmsManager | |
{ | |
readonly Guid _searchPageEventGuid = Sitecore.Context.Database.GetItem("{0C179613-2073-41AB-992E-027D03D523BF}").ID.Guid; | |
readonly Guid _downloadPageEventGuid = Sitecore.Context.Database.GetItem("{FA72E131-3CFD-481C-8E15-04496E9586DC}").ID.Guid; | |
private ICurrentPageContext CurrentPage() | |
{ | |
return Tracker.Current.Session.Interaction.CurrentPage; | |
} |
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; | |
using System.Collections.Generic; | |
using System.ComponentModel.DataAnnotations; | |
using System.Linq; | |
using System.Web; | |
namespace MikeRobbins.EntityServiceDemo.Models | |
{ | |
public class NewsArticle : Sitecore.Services.Core.Model.EntityIdentity | |
{ |
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
EntityService.utils.validator.add("notPastDate", function (value, params) { | |
var result = false; | |
var currentDate = new Date(); | |
result = value >= currentDate; | |
return result; | |
}); |
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; | |
using System.Collections.Generic; | |
using System.ComponentModel.DataAnnotations; | |
using System.Linq; | |
using System.Web; | |
using MikeRobbins.EntityServiceDemo.Attributes; | |
using Sitecore.Services.Core.MetaData; | |
namespace MikeRobbins.EntityServiceDemo.MetaData | |
{ |
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; | |
using System.Collections.Generic; | |
using System.ComponentModel.DataAnnotations; | |
using System.Linq; | |
using System.Web; | |
namespace MikeRobbins.EntityServiceDemo.Attributes | |
{ | |
public class NotPastDateAttribute : ValidationAttribute | |
{ |
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
[ServicesController] | |
public class EntityController : EntityService<Entity> | |
{ | |
public EntityController(Sitecore.Services.Core.IRepository<Entity> repository) | |
{ | |
} | |
} |
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 IoCRegistry : Registry | |
{ | |
public IoCRegistry() | |
{ | |
For(typeof(IRepository<Entity>)).Use(typeof(MikeRobbins.Repositories.EntityRespository)); | |
} | |
} |