Skip to content
This repository was archived by the owner on Feb 10, 2024. It is now read-only.

Commit 6386714

Browse files
committed
:neckbeard: Housekeeping
1 parent cc8b7cb commit 6386714

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

src/Our.Umbraco.DocTypeGridEditor/Helpers/DocTypeGridEditorHelper.cs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ private static IPublishedContent ConvertValue(string id, string contentTypeAlias
123123

124124
private static PreValueCollection GetPreValuesCollectionByDataTypeId(int dataTypeId)
125125
{
126-
return (PreValueCollection)ApplicationContext.Current.ApplicationCache.RuntimeCache.GetCacheItem("Our.Umbraco.DocTypeGridEditor.Helpers.DocTypeGridEditorHelper.GetPreValuesCollectionByDataTypeId_" + dataTypeId,
126+
return (PreValueCollection)ApplicationContext.Current.ApplicationCache.RuntimeCache.GetCacheItem(
127+
string.Concat("Our.Umbraco.DocTypeGridEditor.Helpers.DocTypeGridEditorHelper.GetPreValuesCollectionByDataTypeId_", dataTypeId),
127128
() => Services.DataTypeService.GetPreValuesCollectionByDataTypeId(dataTypeId));
128129
}
129130

@@ -133,17 +134,19 @@ private static ContentTypeContainer GetContentTypesByAlias(string contentTypeAli
133134
if (Guid.TryParse(contentTypeAlias, out contentTypeGuid))
134135
contentTypeAlias = GetContentTypeAliasByGuid(contentTypeGuid);
135136

136-
return (ContentTypeContainer)ApplicationContext.Current.ApplicationCache.RuntimeCache.GetCacheItem("Our.Umbraco.DocTypeGridEditor.Helpers.DocTypeGridEditorHelper.GetContentTypesByAlias_" + contentTypeAlias,
137+
return (ContentTypeContainer)ApplicationContext.Current.ApplicationCache.RuntimeCache.GetCacheItem(
138+
string.Concat("Our.Umbraco.DocTypeGridEditor.Helpers.DocTypeGridEditorHelper.GetContentTypesByAlias_", contentTypeAlias),
137139
() => new ContentTypeContainer
138-
{
139-
PublishedContentType = PublishedContentType.Get(PublishedItemType.Content, contentTypeAlias),
140-
ContentType = Services.ContentTypeService.GetContentType(contentTypeAlias)
141-
});
140+
{
141+
PublishedContentType = PublishedContentType.Get(PublishedItemType.Content, contentTypeAlias),
142+
ContentType = Services.ContentTypeService.GetContentType(contentTypeAlias)
143+
});
142144
}
143145

144146
private static string GetContentTypeAliasByGuid(Guid contentTypeGuid)
145147
{
146-
return (string)ApplicationContext.Current.ApplicationCache.RuntimeCache.GetCacheItem("Our.Umbraco.DocTypeGridEditor.Helpers.DocTypeGridEditorHelper.GetContentTypeAliasByGuid_" + contentTypeGuid,
148+
return (string)ApplicationContext.Current.ApplicationCache.RuntimeCache.GetCacheItem(
149+
string.Concat("Our.Umbraco.DocTypeGridEditor.Helpers.DocTypeGridEditorHelper.GetContentTypeAliasByGuid_", contentTypeGuid),
147150
() => Services.ContentTypeService.GetAliasByGuid(contentTypeGuid));
148151
}
149152
}

src/Our.Umbraco.DocTypeGridEditor/Web/Extensions/HtmlHelperExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public static HtmlString RenderDocTypeGridEditorItem(
8989
});
9090
}
9191

92-
// Check for preview view
92+
// Check for preview view
9393
if (!string.IsNullOrWhiteSpace(previewViewPath)
9494
&& helper.ViewContext.RequestContext.HttpContext.Request.QueryString["dtgePreview"] == "1")
9595
{

0 commit comments

Comments
 (0)