protected override void OnInitialized() { var workbookAppsDirectory = new FilePath(NSBundle.MainBundle.SharedSupportPath) .Combine("WorkbookApps"); if (workbookAppsDirectory.DirectoryExists) { WorkbookAppInstallation.RegisterSearchPath(workbookAppsDirectory); } WorkbookAppInstallation.RegisterPathMapper( WorkbookAppInstallation_MacosVersionPathMapper); }
public void ConfigureServices(IServiceCollection services) { var searchPath = Path.Combine( Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), "WorkbookApps"); if (Directory.Exists(searchPath)) { WorkbookAppInstallation.RegisterSearchPath(searchPath); } services.AddSingleton(new WebClientAppContainer()); services.AddMemoryCache(); services.AddMvc(); services .AddSignalR() .AddJsonProtocol(options => { options.PayloadSerializerSettings = new InteractiveJsonSerializerSettings(); }); }