コード例 #1
0
        internal static EditableSite CreateEditableSite(CmsSite site)
        {
            var editableSite = Mapper.Map <CmsSite, EditableSite>(site);

            ShallowCopyProperties(site, editableSite);

            return(editableSite);
        }
コード例 #2
0
        private static void ShallowCopyProperties(CmsSite site, EditableSite editableSite)
        {
            var propertyItems      = site.Property.Select(Mapper.Map <PropertyItem, PropertyItem>).ToList();
            var propertyCollection = new PropertyCollection {
                Properties = propertyItems
            };

            editableSite.Property = propertyCollection;
        }
コード例 #3
0
 private static void ShallowCopyProperties(CmsSite site, EditableSite editableSite) {
     var propertyItems = site.Property.Select(Mapper.Map<PropertyItem, PropertyItem>).ToList();
     var propertyCollection = new PropertyCollection { Properties = propertyItems };
     
     editableSite.Property = propertyCollection;
 }
コード例 #4
0
        internal static EditableSite CreateEditableSite(CmsSite site) {
            var editableSite = Mapper.Map<CmsSite, EditableSite>(site);
            ShallowCopyProperties(site, editableSite);

            return editableSite;
        }