Пример #1
0
        protected void NextButton_Click(object sender, EventArgs e)
        {
            FileBucketMeta meta = null;

            if (!String.IsNullOrEmpty(BucketId))
            {
                meta = FileBucketMetaStores.Current.Load(BucketId);
                meta.DisplayName = DisplayName.Text;
            }
            else
            {
                meta = new FileBucketService(FileBucketMetaStores.Current).CreateBucket(DisplayName.Text, FileSystem.SelectedValue, null);
            }

            var provider = FileSystemProviders.Get(meta.FileSystemProviderName);

            Response.Redirect(provider.GetConfigurationUrl(meta.BucketId));
        }
Пример #2
0
        void Application_Start(object sender, EventArgs e)
        {
            _logger.Info(UserReference.System(), "Application starting...");

            CmsConfiguration.Initialize();
            LicensingService.ValidateCurrentLicense();

            // Attribute mapping factory
            var mapperFactory = new AttributeMapperFactory();
            mapperFactory.RegisterMappers(new[] { Assembly.Load("Seeger.Core") });

            AttributeMapperFactories.Current = mapperFactory;

            Database.Initialize();

            TaskQueues.StartDefaultQueues();

            ResourceBundler.Initialize();

            GlobalConfiguration.Configure(WebApiConfig.Configure);

            // TODO: Better to provide some IStartupTask interface
            if (FileBucketMetaStores.Current.GetBucketCount() == 0)
            {
                var service = new FileBucketService(FileBucketMetaStores.Current);
                var meta = service.CreateBucket("Local", "Local", new Dictionary<string, string>
                {
                    { "BaseVirtualPath", "/Files/" }
                });

                service.SetDefault(meta.BucketId);
            }

            PluginManager.StartupEnabledPlugins();

            Event.Raise(new ApplicationStarted(this));
        }