Add further progress
This commit is contained in:
@@ -191,9 +191,10 @@ namespace Umbraco.ModelsBuilder.Embedded.Building
|
||||
type.ClrName);
|
||||
sb.Append("\t\t\t=> PublishedModelUtility.GetModelPropertyType(GetModelContentType(publishedSnapshotAccessor), selector);\n");
|
||||
sb.Append("#pragma warning restore 0109\n\n");
|
||||
sb.Append("private IPublishedValueFallback _publishedValueFallback;");
|
||||
|
||||
// write the ctor
|
||||
sb.AppendFormat("\t\t// ctor\n\t\tpublic {0}(IPublished{1} content)\n\t\t\t: base(content)\n\t\t{{ }}\n\n",
|
||||
sb.AppendFormat("\t\t// ctor\n\t\tpublic {0}(IPublished{1} content, IPublishedValueFallback publishedValueFallback)\n\t\t\t: base(content)\n\t\t{{\n _publishedValueFallback = publishedValueFallback; \n}}\n\n",
|
||||
type.ClrName, type.IsElement ? "Element" : "Content");
|
||||
|
||||
// write the properties
|
||||
@@ -324,7 +325,7 @@ namespace Umbraco.ModelsBuilder.Embedded.Building
|
||||
WriteClrType(sb, property.ClrTypeName);
|
||||
sb.Append(">");
|
||||
}
|
||||
sb.AppendFormat("(\"{0}\");\n",
|
||||
sb.AppendFormat("(_publishedValueFallback, \"{0}\");\n",
|
||||
property.Alias);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user