From aca1f0d1866f45c1cfb4ddb973577d9c432bd3ed Mon Sep 17 00:00:00 2001 From: Shannon Date: Tue, 28 Mar 2017 15:46:33 +1100 Subject: [PATCH] Adds comments --- .../Repositories/DataTypeDefinitionRepository.cs | 5 +++++ src/Umbraco.Web/UmbracoHelper.cs | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Core/Persistence/Repositories/DataTypeDefinitionRepository.cs b/src/Umbraco.Core/Persistence/Repositories/DataTypeDefinitionRepository.cs index d40386ebbc..b8b4ac7818 100644 --- a/src/Umbraco.Core/Persistence/Repositories/DataTypeDefinitionRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/DataTypeDefinitionRepository.cs @@ -280,6 +280,11 @@ AND umbracoNode.id <> @id", return collection; } + /// + /// Gets a specific PreValue by its Id + /// + /// Id of the PreValue to retrieve the value from + /// PreValue as a string public string GetPreValueAsString(int preValueId) { var collections = RuntimeCache.GetCacheItemsByKeySearch(CacheKeys.DataTypePreValuesCacheKey + "_"); diff --git a/src/Umbraco.Web/UmbracoHelper.cs b/src/Umbraco.Web/UmbracoHelper.cs index 3c97551eaf..5befbda7cf 100644 --- a/src/Umbraco.Web/UmbracoHelper.cs +++ b/src/Umbraco.Web/UmbracoHelper.cs @@ -1389,10 +1389,15 @@ namespace Umbraco.Web return test ? new HtmlString(valueIfTrue) : new HtmlString(string.Empty); } - #endregion + #endregion #region Prevalues + /// + /// Gets a specific PreValue by its Id + /// + /// Id of the PreValue to retrieve the value from + /// PreValue as a string public string GetPreValueAsString(int id) { return DataTypeService.GetPreValueAsString(id);