@@ -22,32 +22,32 @@ private static ServiceContext Services
22
22
get { return ApplicationContext . Current . Services ; }
23
23
}
24
24
25
- public static IPublishedContent ConvertValueToContent ( string id , string docTypeAlias , string dataJson )
25
+ public static IPublishedContent ConvertValueToContent ( string id , string contentTypeAlias , string dataJson )
26
26
{
27
- if ( string . IsNullOrWhiteSpace ( docTypeAlias ) )
27
+ if ( string . IsNullOrWhiteSpace ( contentTypeAlias ) )
28
28
return null ;
29
29
30
30
if ( UmbracoContext . Current == null )
31
- return ConvertValue ( id , docTypeAlias , dataJson ) ;
31
+ return ConvertValue ( id , contentTypeAlias , dataJson ) ;
32
32
33
33
return ( IPublishedContent ) ApplicationContext . Current . ApplicationCache . RequestCache . GetCacheItem (
34
- string . Concat ( "DocTypeGridEditorHelper.ConvertValueToContent_" , id , "_" , docTypeAlias ) ,
34
+ string . Concat ( "DocTypeGridEditorHelper.ConvertValueToContent_" , id , "_" , contentTypeAlias ) ,
35
35
( ) =>
36
36
{
37
- return ConvertValue ( id , docTypeAlias , dataJson ) ;
37
+ return ConvertValue ( id , contentTypeAlias , dataJson ) ;
38
38
} ) ;
39
39
}
40
40
41
- private static IPublishedContent ConvertValue ( string id , string docTypeAlias , string dataJson )
41
+ private static IPublishedContent ConvertValue ( string id , string contentTypeAlias , string dataJson )
42
42
{
43
- using ( var timer = DisposableTimer . DebugDuration < DocTypeGridEditorHelper > ( string . Format ( "ConvertValueToContent ({0}, {1})" , id , docTypeAlias ) ) )
43
+ using ( var timer = DisposableTimer . DebugDuration < DocTypeGridEditorHelper > ( string . Format ( "ConvertValueToContent ({0}, {1})" , id , contentTypeAlias ) ) )
44
44
{
45
- Guid docTypeGuid ;
46
- if ( Guid . TryParse ( docTypeAlias , out docTypeGuid ) )
47
- docTypeAlias = Services . ContentTypeService . GetAliasByGuid ( docTypeGuid ) ;
45
+ Guid contentTypeGuid ;
46
+ if ( Guid . TryParse ( contentTypeAlias , out contentTypeGuid ) )
47
+ contentTypeAlias = Services . ContentTypeService . GetAliasByGuid ( contentTypeGuid ) ;
48
48
49
- var publishedContentType = PublishedContentType . Get ( PublishedItemType . Content , docTypeAlias ) ;
50
- var contentType = ApplicationContext . Current . Services . ContentTypeService . GetContentType ( docTypeAlias ) ;
49
+ var publishedContentType = PublishedContentType . Get ( PublishedItemType . Content , contentTypeAlias ) ;
50
+ var contentType = ApplicationContext . Current . Services . ContentTypeService . GetContentType ( contentTypeAlias ) ;
51
51
var properties = new List < IPublishedProperty > ( ) ;
52
52
53
53
// Convert all the properties
@@ -68,7 +68,7 @@ private static IPublishedContent ConvertValue(string id, string docTypeAlias, st
68
68
propType . DataTypeId ) ;
69
69
70
70
var contentPropData = new ContentPropertyData (
71
- jProp . Value != null ? jProp . Value . ToString ( ) : null ,
71
+ jProp . Value ,
72
72
propPreValues ,
73
73
new Dictionary < string , object > ( ) ) ;
74
74
0 commit comments