コード例 #1
0
ファイル: Extensions.cs プロジェクト: ITLec/Dynamics-365-XEP
        public static ContentMapProvider ConfigureContentMap(
            this IAppBuilder app,
            Func <CrmDbContext> createContext,
            CrmWebsite website,
            EventHubJobSettings eventHubJobSettings,
            PortalSolutions portalSolutions)
        {
            var solutionDefinitionProvider = new CmsSolutionDefinitionProvider(portalSolutions, website);
            var contentMapProvider         = new ContentMapProvider(createContext, solutionDefinitionProvider, eventHubJobSettings, portalSolutions);

            app.CreatePerOwinContext(() => contentMapProvider);

            // support legacy accessors
            AdxstudioCrmConfigurationProvider.Set(solutionDefinitionProvider);
            AdxstudioCrmConfigurationProvider.Set(contentMapProvider);

            return(contentMapProvider);
        }
 public override T Using <T>(DirectoryContentHash cwd, Func <IFileSystemContext, T> action)
 {
     return(ContentMapProvider.Using(map => Using(map, cwd, action)));
 }
 public override T Using <T>(Func <IFileSystemContext, T> action)
 {
     return(ContentMapProvider.Using(map => Using(map, action)));
 }