private static PersonalizationContainerCollector CreateSubject(IContentMap contentMap, params PersonalizationContainer[] containerData)
 {
     contentMap = contentMap ?? new Mock<IContentMap>().Object;
     var serializer = new Mock<PersonalizationContainerSerializer>();
     serializer.Setup(x => x.Deserialize(PersonalizationDataMockValue)).Returns(containerData ?? Enumerable.Empty<PersonalizationContainer>());
     return new PersonalizationContainerCollector(contentMap, serializer.Object);
 }
 public ComposerContainerTransform(IContentMap contentMap, ExportLinkResolver exportLinkResolver, IComposerImportOptions options)
 {
     _contentMap = contentMap;
     _exportLinkResolver = exportLinkResolver;
     options = options ?? ComposerImportOptions.Default;
     _includeUnusedBlocks = options.IncludeUnusedBlocks;
 }
 public ComposerContainerTransform(IContentMap contentMap, ExportLinkResolver exportLinkResolver, IComposerImportOptions options)
 {
     _contentMap          = contentMap;
     _exportLinkResolver  = exportLinkResolver;
     options              = options ?? ComposerImportOptions.Default;
     _includeUnusedBlocks = options.IncludeUnusedBlocks;
 }
示例#4
0
        private static PersonalizationContainerCollector CreateSubject(IContentMap contentMap, params PersonalizationContainer[] containerData)
        {
            contentMap = contentMap ?? new Mock <IContentMap>().Object;
            var serializer = new Mock <PersonalizationContainerSerializer>();

            serializer.Setup(x => x.Deserialize(PersonalizationDataMockValue)).Returns(containerData ?? Enumerable.Empty <PersonalizationContainer>());
            return(new PersonalizationContainerCollector(contentMap, serializer.Object));
        }
        public ComposerFunctionTransform(IContentMap contentMap, ComposerSerializer composerSerializer, ExportLinkResolver exportLinkResolver, IComposerImportOptions options)
        {
            _contentMap = contentMap;
            _composerSerializer = composerSerializer;
            _exportLinkResolver = exportLinkResolver;

            options = options ?? ComposerImportOptions.Default;
            _possibleFunctionNameProperties = new HashSet<string>(options.BlockNameProperties ?? Enumerable.Empty<string>());
            _includeUnusedBlocks = options.IncludeUnusedBlocks;
        }
示例#6
0
        public ComposerFunctionTransform(IContentMap contentMap, ComposerSerializer composerSerializer, ExportLinkResolver exportLinkResolver, IComposerImportOptions options)
        {
            _contentMap         = contentMap;
            _composerSerializer = composerSerializer;
            _exportLinkResolver = exportLinkResolver;

            options = options ?? ComposerImportOptions.Default;
            _possibleFunctionNameProperties = new HashSet <string>(options.BlockNameProperties ?? Enumerable.Empty <string>());
            _includeUnusedBlocks            = options.IncludeUnusedBlocks;
        }
 private static ContentAreaTransform CreateSubject(IContentMap contentMap = null, IContentTransferContext transferContext = null, ContentFragmentBuilder fragmentBuilder = null)
 {
     if (contentMap == null)
     {
         var mock = new Mock <IContentMap>();
         mock.Setup(x => x.GetContentFunctions(It.IsAny <Guid>(), It.IsAny <string>())).Returns(EmptyContentFunctionLookup);
         contentMap = mock.Object;
     }
     transferContext = transferContext ?? new Mock <IContentTransferContext>().Object;
     fragmentBuilder = fragmentBuilder ?? new Mock <ContentFragmentBuilder>(null, null).Object;
     return(new ContentAreaTransform(contentMap, fragmentBuilder, transferContext));
 }
示例#8
0
 private static ContentMapCollector CreateSubject(IContentMap contentMap, ComposerSerializer serializer)
 {
     contentMap = contentMap ?? new Mock <IContentMap>().Object;
     if (serializer == null)
     {
         var pageInfo = new ComposerPageInformation {
             Page = new ComposerPage {
                 Guid = Guid.NewGuid()
             }
         };
         serializer = CreateSerializer(pageInfo);
     }
     return(new ContentMapCollector(contentMap, serializer));
 }
 public ContentAreaTransform(IContentMap contentMap, ContentFragmentBuilder contentFragmentBuilder, IContentTransferContext transferContext)
 {
     _contentMap = contentMap;
     _contentFragmentBuilder = contentFragmentBuilder;
     _transferContext = transferContext;
 }
示例#10
0
 public ContentAreaTransform(IContentMap contentMap, ContentFragmentBuilder contentFragmentBuilder, IContentTransferContext transferContext)
 {
     _contentMap             = contentMap;
     _contentFragmentBuilder = contentFragmentBuilder;
     _transferContext        = transferContext;
 }
 private static ComposerFunctionTransform CreateSubject(IContentMap contentMap = null, ComposerContentFunctionInformation functionInfo = null, ExportLinkResolver exportLinkResolver = null, IComposerImportOptions options = null)
 {
     contentMap = contentMap ?? new Mock<IContentMap>().Object;
     exportLinkResolver = exportLinkResolver ?? new Mock<ExportLinkResolver>(null).Object;
     return new ComposerFunctionTransform(contentMap, CreateSerializer(functionInfo), exportLinkResolver, options);
 }
 public PersonalizationContainerCollector(IContentMap contentMap, PersonalizationContainerSerializer serializer)
 {
     _contentMap = contentMap;
     _serializer = serializer;
 }
 private static ComposerContainerTransform CreateSubject(IContentMap contentMap, ExportLinkResolver exportLinkResolver)
 {
     contentMap = contentMap ?? new Mock<IContentMap>().Object;
     exportLinkResolver = exportLinkResolver ?? new Mock<ExportLinkResolver>(null).Object;
     return new ComposerContainerTransform(contentMap, exportLinkResolver, null);
 }
 private static ComposerFunctionTransform CreateSubject(IContentMap contentMap = null, ComposerContentFunctionInformation functionInfo = null, ExportLinkResolver exportLinkResolver = null, IComposerImportOptions options = null)
 {
     contentMap         = contentMap ?? new Mock <IContentMap>().Object;
     exportLinkResolver = exportLinkResolver ?? new Mock <ExportLinkResolver>(null).Object;
     return(new ComposerFunctionTransform(contentMap, CreateSerializer(functionInfo), exportLinkResolver, options));
 }
 public ContentMapCollector(IContentMap contentMap, ComposerSerializer composerSerializer)
 {
     _contentMap = contentMap;
     _composerSerializer = composerSerializer;
 }
 public PersonalizationContainerCollector(IContentMap contentMap, PersonalizationContainerSerializer serializer)
 {
     _contentMap = contentMap;
     _serializer = serializer;
 }
示例#17
0
 public IgnoredContentTransform(IContentMap contentMap)
 {
     _contentMap = contentMap;
 }
 private static ContentMapCollector CreateSubject(IContentMap contentMap, ComposerSerializer serializer)
 {
     contentMap = contentMap ?? new Mock<IContentMap>().Object;
     if (serializer == null)
     {
         var pageInfo = new ComposerPageInformation { Page = new ComposerPage { Guid = Guid.NewGuid() } };
         serializer = CreateSerializer(pageInfo);
     }
     return new ContentMapCollector(contentMap, serializer);
 }
 private static ComposerContainerTransform CreateSubject(IContentMap contentMap, ExportLinkResolver exportLinkResolver)
 {
     contentMap         = contentMap ?? new Mock <IContentMap>().Object;
     exportLinkResolver = exportLinkResolver ?? new Mock <ExportLinkResolver>(null).Object;
     return(new ComposerContainerTransform(contentMap, exportLinkResolver, null));
 }
 private static ContentAreaTransform CreateSubject(IContentMap contentMap = null, IContentTransferContext transferContext = null, ContentFragmentBuilder fragmentBuilder = null)
 {
     if (contentMap == null)
     {
         var mock = new Mock<IContentMap>();
         mock.Setup(x => x.GetContentFunctions(It.IsAny<Guid>(), It.IsAny<string>())).Returns(EmptyContentFunctionLookup);
         contentMap = mock.Object;
     }
     transferContext = transferContext ?? new Mock<IContentTransferContext>().Object;
     fragmentBuilder = fragmentBuilder ?? new Mock<ContentFragmentBuilder>(null, null).Object;
     return new ContentAreaTransform(contentMap, fragmentBuilder, transferContext);
 }
示例#21
0
 public ContentMapCollector(IContentMap contentMap, ComposerSerializer composerSerializer)
 {
     _contentMap         = contentMap;
     _composerSerializer = composerSerializer;
 }
 public IgnoredContentTransform(IContentMap contentMap)
 {
     _contentMap = contentMap;
 }