├── README.md
├── Rabbit.Web
├── Key.snk
├── IHasRequestContext.cs
├── Routes
│ ├── IRoutePublisher.cs
│ ├── IRouteProvider.cs
│ └── IRoutePublisherEventHandler.cs
├── app.config
├── Environment
│ └── IWebHost.cs
├── packages.config
├── IHttpContextAccessor.cs
├── UI
│ └── Navigation
│ │ ├── INavigationProvider.cs
│ │ └── INavigationManager.cs
├── Themes
│ ├── IThemeManager.cs
│ ├── Impl
│ │ ├── SafeModeThemeSelector.cs
│ │ └── TenantThemeSelector.cs
│ └── IThemeSelector.cs
├── Utility
│ └── Extensions
│ │ ├── ExtensionDescriptorExtensions.cs
│ │ └── WorkContextExtensions.cs
├── Works
│ ├── IWebWorkContextAccessor.cs
│ └── WebWorkContextModule.cs
├── WebModule.cs
├── Properties
│ └── AssemblyInfo.cs
└── Impl
│ └── HttpContextWorkContext.cs
├── Rabbit.Kernel
├── Key.snk
├── Bus
│ ├── ILocalBus.cs
│ ├── Impl
│ │ └── DefaultBus.cs
│ └── Exceptions
│ │ └── RequestTimeoutException.cs
├── Localization
│ ├── Localizer.cs
│ ├── LocalizationUtilities.cs
│ ├── IText.cs
│ ├── Services
│ │ ├── ILocalizedStringManager.cs
│ │ ├── ICultureManager.cs
│ │ └── ICultureSelector.cs
│ └── NullLocalizer.cs
├── FileSystems
│ ├── AppData
│ │ └── IAppDataFolder.cs
│ ├── Application
│ │ ├── IApplicationFolder.cs
│ │ └── Impl
│ │ │ └── DefaultApplicationFolder.cs
│ ├── VirtualPath
│ │ ├── IVirtualPathProvider.cs
│ │ ├── IVirtualPathMonitor.cs
│ │ └── Impl
│ │ │ └── DefaultVirtualPathProvider.cs
│ └── Dependencies
│ │ └── IDependenciesFolder.cs
├── packages.config
├── Events
│ └── IEventHandler.cs
├── Caching
│ ├── IVolatileProvider.cs
│ ├── IVolatileToken.cs
│ ├── ICacheContextAccessor.cs
│ ├── IAsyncTokenProvider.cs
│ ├── ICacheHolder.cs
│ ├── ICache.cs
│ ├── ISignals.cs
│ ├── Impl
│ │ ├── MemoryCachingBuilderExtensions.cs
│ │ ├── DefaultCacheContextAccessor.cs
│ │ └── DefaultCacheManager.cs
│ └── Weak.cs
├── Environment
│ ├── ShellBuilders
│ │ ├── Models
│ │ │ ├── DependencyBlueprintItem.cs
│ │ │ └── BlueprintItem.cs
│ │ ├── IShellContextFactory.cs
│ │ ├── IMinimumShellDescriptorProvider.cs
│ │ ├── IShellContainerRegistrations.cs
│ │ ├── IShellContainerFactory.cs
│ │ ├── ICompositionStrategy.cs
│ │ ├── Impl
│ │ │ ├── DefaultServiceTypeHarvester.cs
│ │ │ └── KernelMinimumShellDescriptorProvider.cs
│ │ └── ShellContext.cs
│ ├── IShim.cs
│ ├── IHostContainer.cs
│ ├── IShell.cs
│ ├── IShellEvents.cs
│ ├── IHostLocalRestart.cs
│ ├── Configuration
│ │ ├── IShellSettingsManagerEventHandler.cs
│ │ ├── TenantState.cs
│ │ └── IShellSettingsManager.cs
│ ├── Assemblies
│ │ ├── IAssemblyNameResolver.cs
│ │ └── Impl
│ │ │ └── AppDomainAssemblyNameResolver.cs
│ ├── Descriptor
│ │ └── IShellDescriptorCache.cs
│ ├── IHostEnvironment.cs
│ ├── IHost.cs
│ └── IBuildManager.cs
├── Tasks
│ ├── IBackgroundTask.cs
│ ├── IBackgroundService.cs
│ ├── ISweepGenerator.cs
│ └── IBackgroundServiceEvents.cs
├── Extensions
│ ├── IExtensionLoaderCoordinator.cs
│ ├── IExtensionMonitoringCoordinator.cs
│ ├── Models
│ │ ├── DependencyDescriptor.cs
│ │ └── Feature.cs
│ ├── Folders
│ │ ├── IExtensionFolders.cs
│ │ ├── IExtensionHarvester.cs
│ │ └── Impl
│ │ │ └── ModuleFolders.cs
│ ├── SuppressDependencyAttribute.cs
│ ├── ExtensionEntry.cs
│ ├── FeatureAttribute.cs
│ └── IFeatureDescriptorFilter.cs
├── Works
│ ├── WorkContextProperty.cs
│ ├── IWorkContextEvents.cs
│ ├── IWorkContextStateProvider.cs
│ ├── IWorkContextAccessor.cs
│ ├── IWorkContextScope.cs
│ └── Work.cs
├── Settings
│ ├── ITenantService.cs
│ ├── ITenant.cs
│ └── Impl
│ │ ├── DefaultTenantService.cs
│ │ └── CurrentTenantWorkContext.cs
├── WorkContextExtensions.cs
├── app.config
├── Exceptions
│ └── ExceptionExtensions.cs
├── Properties
│ └── AssemblyInfo.cs
├── Services
│ └── IClock.cs
└── CollectionOrderModule.cs
├── Tests
└── Rabbit.Kernel.Tests
│ ├── App_Data
│ └── Tenants
│ │ ├── Tenant1
│ │ └── Settings.txt
│ │ └── Tenant2
│ │ └── Settings.txt
│ ├── Modules
│ ├── Rabbit.Test
│ │ ├── bin
│ │ │ └── Rabbit.Test.dll
│ │ └── Module.txt
│ └── Rabbit.Test2
│ │ └── Module.txt
│ ├── packages.config
│ ├── App.config
│ ├── Extensions
│ └── ExtensionHarvesterTests.cs
│ ├── Config
│ └── Logging
│ │ └── LoggingConfig.config
│ ├── Environment
│ ├── HostEnvironmentTests.cs
│ └── BuildManagerTests.cs
│ ├── Properties
│ └── AssemblyInfo.cs
│ └── Caching
│ └── CacheManagerTests.cs
├── Rabbit.Web.Mvc
├── Key.snk
├── WebApi
│ ├── AutofacWebApiDependencyScope.cs
│ ├── DefaultWebApiHttpControllerSelector.cs
│ ├── DefaultWebApiHttpHttpControllerActivator.cs
│ └── Routes
│ │ └── IHttpRouteProvider.cs
├── UI
│ ├── Admin
│ │ ├── AdminAttribute.cs
│ │ └── AdminThemeSelector.cs
│ └── Zones
│ │ └── LayoutWorkContext.cs
├── Mvc
│ ├── Filters
│ │ ├── IFilterProvider.cs
│ │ └── RabbitFilterProvider.cs
│ ├── ViewEngines
│ │ ├── ThemeAwareness
│ │ │ ├── ILayoutAwareViewEngine.cs
│ │ │ ├── IConfiguredEnginesCache.cs
│ │ │ └── IThemeAwareViewEngine.cs
│ │ └── Razor
│ │ │ └── IRazorCompilationEvents.cs
│ ├── ModelBinders
│ │ ├── IModelBinderProvider.cs
│ │ ├── IModelBinderPublisher.cs
│ │ ├── ModelBinderDescriptor.cs
│ │ └── Impl
│ │ │ └── DefaultModelBinderPublisher.cs
│ └── Html
│ │ └── HtmlHelperExtensions.cs
├── Environment
│ └── ShellBuilders
│ │ └── Models
│ │ └── ControllerBlueprint.cs
├── DisplayManagement
│ ├── IShape.cs
│ ├── Implementation
│ │ ├── IDisplayManager.cs
│ │ ├── DisplayContext.cs
│ │ └── DisplayHelperFactory.cs
│ ├── INamedEnumerable.cs
│ ├── Descriptors
│ │ ├── ShapeTable.cs
│ │ ├── ShapePlacementStrategy
│ │ │ └── PlacementFile.cs
│ │ ├── ShapeTableLocator.cs
│ │ ├── ShapeAttributeStrategy
│ │ │ └── ShapeAttributeOccurrence.cs
│ │ └── Interfaces.cs
│ ├── IDisplayHelperFactory.cs
│ ├── ShapeAttribute.cs
│ ├── IShapeDisplay.cs
│ ├── Shapes
│ │ └── Impl
│ │ │ └── DefaultTagBuilderFactory.cs
│ └── IShapeFactory.cs
├── app.config
├── Themes
│ └── ThemedAttribute.cs
├── Works
│ └── MvcWorkContext.cs
├── Properties
│ └── AssemblyInfo.cs
├── Utility
│ └── Extensions
│ │ ├── WorkContextExtensions.cs
│ │ └── DefaultExtensionTypes.cs
└── packages.config
├── Rabbit.Web.WarmupStarter
├── Key.snk
└── Properties
│ └── AssemblyInfo.cs
└── Components
├── Rabbit.Components.Data
├── Key.snk
├── packages.config
├── IEntity.cs
├── EntityAttribute.cs
├── DataAnnotations
│ ├── ComplexTypeAttribute.cs
│ ├── NotMappedAttribute.cs
│ ├── ForeignKeyAttribute.cs
│ └── InversePropertyAttribute.cs
├── IRepositoryInitializer.cs
├── Models
│ └── RecordBlueprint.cs
├── Providers
│ ├── IDataServicesProvider.cs
│ └── SqlServerDataServicesProvider.cs
├── ITransactionManager.cs
├── Properties
│ └── AssemblyInfo.cs
└── Utility
│ └── Extensions
│ └── ShellBlueprintExtensions.cs
├── Rabbit.Components.Command
├── Key.snk
├── CommandAttribute.cs
├── packages.config
├── CommandAction.cs
└── Properties
│ └── AssemblyInfo.cs
├── Rabbit.Components.Data.Mvc
├── Key.snk
├── packages.config
├── DataBuilderExtensions.cs
├── TransactionFilter.cs
└── Properties
│ └── AssemblyInfo.cs
├── Rabbit.Components.DataBase
├── Key.snk
├── packages.config
├── Providers
│ └── IDbConnectionProvider.cs
├── BuilderExtensions.cs
└── Properties
│ └── AssemblyInfo.cs
├── Rabbit.Components.Security
├── Key.snk
├── packages.config
├── IUserRoles.cs
├── IUser.cs
├── Permissions
│ ├── PermissionStereotype.cs
│ ├── IPermissionProvider.cs
│ └── Permission.cs
├── CheckAccessContext.cs
├── IAuthorizationServiceEventHandler.cs
├── IAuthenticationService.cs
├── WorkContentExtensions.cs
├── Properties
│ └── AssemblyInfo.cs
├── IAuthorizationService.cs
└── CurrentUserWorkContext.cs
├── Rabbit.Components.Bus.SignalR
├── Key.snk
├── packages.config
├── Properties
│ └── AssemblyInfo.cs
└── BusBuilderExtensions.cs
├── Rabbit.Components.Web.SignalR
├── Key.snk
├── IRabbitHubConfiguration.cs
├── NullAssemblyLocator.cs
├── BuilderExtensions.cs
├── packages.config
├── RabbitHubConfiguration.cs
├── Properties
│ └── AssemblyInfo.cs
└── ConnectionAttribute.cs
├── Rabbit.Components.Data.Migrators
├── Key.snk
├── packages.config
├── VersionTable.cs
├── Providers
│ └── IMigratorDataServicesProvider.cs
└── Properties
│ └── AssemblyInfo.cs
├── Rabbit.Components.DataBase.MySql
├── Key.snk
├── packages.config
├── app.config
└── Properties
│ └── AssemblyInfo.cs
├── Rabbit.Components.Logging.NLog
├── Key.snk
├── ILoggerFactory.cs
├── packages.config
├── MinimumShellDescriptorProvider.cs
├── LogUtilities.cs
├── LoggerFactory.cs
├── LoggingBuilderExtensions.cs
└── Properties
│ └── AssemblyInfo.cs
├── Rabbit.Components.Security.Web
├── Key.snk
├── AlwaysAccessibleAttribute.cs
├── IRoleService.cs
├── packages.config
├── WebSecurityBuilderExtensions.cs
├── Properties
│ └── AssemblyInfo.cs
└── NavigationItemBuilderExtensions.cs
├── Rabbit.Components.Logging.NLog.Web
├── Key.snk
├── packages.config
├── Properties
│ └── AssemblyInfo.cs
└── UrlLayoutRenderer.cs
├── Rabbit.Components.Data.EntityFramework
├── Key.snk
├── packages.config
├── IDbContextFactory.cs
├── DefaultDbContext.cs
├── Providers
│ ├── IEntityFrameworkDataServicesProvider.cs
│ └── SqlServerEntityFrameworkDataServicesProvider.cs
├── GlobalConfig.cs
├── Conventions
│ ├── NotMappedTypeAttributeConvention.cs
│ ├── ComplexTypeAttributeConvention.cs
│ ├── InversePropertyAttributeConvention.cs
│ ├── ForeignKeyPrimitivePropertyAttributeConvention.cs
│ └── NotMappedPropertyAttributeConvention.cs
├── App.config
├── Properties
│ └── AssemblyInfo.cs
├── Impl
│ └── DefaultDbConfiguration.cs
└── Migrations
│ └── Configuration.cs
├── Rabbit.Components.Data.MySql
├── packages.config
├── app.config
├── DataBuilderExtensions.cs
├── MySqlDataServicesProvider.cs
└── Properties
│ └── AssemblyInfo.cs
├── Rabbit.Components.Data.Migrators.MySql
├── packages.config
├── DataBuilderExtensions.cs
└── Properties
│ └── AssemblyInfo.cs
└── Rabbit.Components.Data.EntityFramework.MySql
├── packages.config
├── DataBuilderExtensions.cs
├── MySqlEntityFrameworkDataServicesProvider.cs
└── Properties
└── AssemblyInfo.cs
/README.md:
--------------------------------------------------------------------------------
1 | # RabbitHub
2 | RabbitHub(兔窝)
3 |
--------------------------------------------------------------------------------
/Rabbit.Web/Key.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RabbitTeam/RabbitHub/HEAD/Rabbit.Web/Key.snk
--------------------------------------------------------------------------------
/Rabbit.Kernel/Key.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RabbitTeam/RabbitHub/HEAD/Rabbit.Kernel/Key.snk
--------------------------------------------------------------------------------
/Tests/Rabbit.Kernel.Tests/App_Data/Tenants/Tenant1/Settings.txt:
--------------------------------------------------------------------------------
1 | Name: Tenant1
2 | State: Running
--------------------------------------------------------------------------------
/Tests/Rabbit.Kernel.Tests/App_Data/Tenants/Tenant2/Settings.txt:
--------------------------------------------------------------------------------
1 | Name: Tenant2
2 | State: Running
--------------------------------------------------------------------------------
/Rabbit.Web.Mvc/Key.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RabbitTeam/RabbitHub/HEAD/Rabbit.Web.Mvc/Key.snk
--------------------------------------------------------------------------------
/Rabbit.Kernel/Bus/ILocalBus.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RabbitTeam/RabbitHub/HEAD/Rabbit.Kernel/Bus/ILocalBus.cs
--------------------------------------------------------------------------------
/Rabbit.Web.WarmupStarter/Key.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RabbitTeam/RabbitHub/HEAD/Rabbit.Web.WarmupStarter/Key.snk
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Data/Key.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RabbitTeam/RabbitHub/HEAD/Components/Rabbit.Components.Data/Key.snk
--------------------------------------------------------------------------------
/Rabbit.Kernel/Localization/Localizer.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RabbitTeam/RabbitHub/HEAD/Rabbit.Kernel/Localization/Localizer.cs
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Command/Key.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RabbitTeam/RabbitHub/HEAD/Components/Rabbit.Components.Command/Key.snk
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Data.Mvc/Key.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RabbitTeam/RabbitHub/HEAD/Components/Rabbit.Components.Data.Mvc/Key.snk
--------------------------------------------------------------------------------
/Components/Rabbit.Components.DataBase/Key.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RabbitTeam/RabbitHub/HEAD/Components/Rabbit.Components.DataBase/Key.snk
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Security/Key.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RabbitTeam/RabbitHub/HEAD/Components/Rabbit.Components.Security/Key.snk
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Bus.SignalR/Key.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RabbitTeam/RabbitHub/HEAD/Components/Rabbit.Components.Bus.SignalR/Key.snk
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Web.SignalR/Key.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RabbitTeam/RabbitHub/HEAD/Components/Rabbit.Components.Web.SignalR/Key.snk
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Data.Migrators/Key.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RabbitTeam/RabbitHub/HEAD/Components/Rabbit.Components.Data.Migrators/Key.snk
--------------------------------------------------------------------------------
/Components/Rabbit.Components.DataBase.MySql/Key.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RabbitTeam/RabbitHub/HEAD/Components/Rabbit.Components.DataBase.MySql/Key.snk
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Logging.NLog/Key.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RabbitTeam/RabbitHub/HEAD/Components/Rabbit.Components.Logging.NLog/Key.snk
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Security.Web/Key.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RabbitTeam/RabbitHub/HEAD/Components/Rabbit.Components.Security.Web/Key.snk
--------------------------------------------------------------------------------
/Rabbit.Kernel/FileSystems/AppData/IAppDataFolder.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RabbitTeam/RabbitHub/HEAD/Rabbit.Kernel/FileSystems/AppData/IAppDataFolder.cs
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Logging.NLog.Web/Key.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RabbitTeam/RabbitHub/HEAD/Components/Rabbit.Components.Logging.NLog.Web/Key.snk
--------------------------------------------------------------------------------
/Rabbit.Web.Mvc/WebApi/AutofacWebApiDependencyScope.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RabbitTeam/RabbitHub/HEAD/Rabbit.Web.Mvc/WebApi/AutofacWebApiDependencyScope.cs
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Command/CommandAttribute.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RabbitTeam/RabbitHub/HEAD/Components/Rabbit.Components.Command/CommandAttribute.cs
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Data.EntityFramework/Key.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RabbitTeam/RabbitHub/HEAD/Components/Rabbit.Components.Data.EntityFramework/Key.snk
--------------------------------------------------------------------------------
/Rabbit.Kernel/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Logging.NLog/ILoggerFactory.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RabbitTeam/RabbitHub/HEAD/Components/Rabbit.Components.Logging.NLog/ILoggerFactory.cs
--------------------------------------------------------------------------------
/Rabbit.Web.Mvc/WebApi/DefaultWebApiHttpControllerSelector.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RabbitTeam/RabbitHub/HEAD/Rabbit.Web.Mvc/WebApi/DefaultWebApiHttpControllerSelector.cs
--------------------------------------------------------------------------------
/Rabbit.Web.Mvc/WebApi/DefaultWebApiHttpHttpControllerActivator.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RabbitTeam/RabbitHub/HEAD/Rabbit.Web.Mvc/WebApi/DefaultWebApiHttpHttpControllerActivator.cs
--------------------------------------------------------------------------------
/Tests/Rabbit.Kernel.Tests/Modules/Rabbit.Test/bin/Rabbit.Test.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RabbitTeam/RabbitHub/HEAD/Tests/Rabbit.Kernel.Tests/Modules/Rabbit.Test/bin/Rabbit.Test.dll
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Data/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Components/Rabbit.Components.DataBase/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Security/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Data.MySql/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Logging.NLog.Web/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Components/Rabbit.Components.DataBase.MySql/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Rabbit.Kernel/Events/IEventHandler.cs:
--------------------------------------------------------------------------------
1 | namespace Rabbit.Kernel.Events
2 | {
3 | ///
4 | /// 一个抽象的事件处理程序。
5 | ///
6 | public interface IEventHandler : IDependency
7 | {
8 | }
9 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/Caching/IVolatileProvider.cs:
--------------------------------------------------------------------------------
1 | namespace Rabbit.Kernel.Caching
2 | {
3 | ///
4 | /// 一个抽象的挥发提供程序。
5 | ///
6 | public interface IVolatileProvider : ISingletonDependency
7 | {
8 | }
9 | }
--------------------------------------------------------------------------------
/Tests/Rabbit.Kernel.Tests/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Rabbit.Web.Mvc/UI/Admin/AdminAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Rabbit.Web.Mvc.UI.Admin
4 | {
5 | ///
6 | /// 管理标记。
7 | ///
8 | public sealed class AdminAttribute : Attribute
9 | {
10 | }
11 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/FileSystems/Application/IApplicationFolder.cs:
--------------------------------------------------------------------------------
1 | namespace Rabbit.Kernel.FileSystems.Application
2 | {
3 | ///
4 | /// 一个抽象的应用程序文件夹。
5 | ///
6 | public interface IApplicationFolder : IFolder
7 | {
8 | }
9 | }
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Logging.NLog/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Command/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Data.EntityFramework/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Rabbit.Web.Mvc/Mvc/Filters/IFilterProvider.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Kernel;
2 |
3 | namespace Rabbit.Web.Mvc.Mvc.Filters
4 | {
5 | ///
6 | /// 一个抽象的筛选器提供程序。
7 | ///
8 | public interface IFilterProvider : IDependency
9 | {
10 | }
11 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/Environment/ShellBuilders/Models/DependencyBlueprintItem.cs:
--------------------------------------------------------------------------------
1 | namespace Rabbit.Kernel.Environment.ShellBuilders.Models
2 | {
3 | ///
4 | /// 依赖项蓝图。
5 | ///
6 | public sealed class DependencyBlueprintItem : BlueprintItem
7 | {
8 | }
9 | }
--------------------------------------------------------------------------------
/Rabbit.Web.Mvc/Mvc/ViewEngines/ThemeAwareness/ILayoutAwareViewEngine.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Kernel;
2 | using System.Web.Mvc;
3 |
4 | namespace Rabbit.Web.Mvc.Mvc.ViewEngines.ThemeAwareness
5 | {
6 | internal interface ILayoutAwareViewEngine : IDependency, IViewEngine
7 | {
8 | }
9 | }
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Data.Migrators.MySql/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Tests/Rabbit.Kernel.Tests/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Rabbit.Kernel/Bus/Impl/DefaultBus.cs:
--------------------------------------------------------------------------------
1 | namespace Rabbit.Kernel.Bus.Impl
2 | {
3 | internal sealed class DefaultBus : Bus, ILocalBus
4 | {
5 | public DefaultBus(IMessageDispatcher messageDispatcher)
6 | : base(messageDispatcher)
7 | {
8 | }
9 | }
10 | }
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Data.EntityFramework/IDbContextFactory.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Kernel;
2 | using System.Data.Entity;
3 |
4 | namespace Rabbit.Components.Data.EntityFramework
5 | {
6 | internal interface IDbContextFactory : IDependency
7 | {
8 | DbContext CreateDbContext();
9 | }
10 | }
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Data/IEntity.cs:
--------------------------------------------------------------------------------
1 | namespace Rabbit.Components.Data
2 | {
3 | ///
4 | /// 表示一个抽象的带有键的实体。
5 | ///
6 | public interface IEntity
7 | {
8 | ///
9 | /// 键值。
10 | ///
11 | long Id { get; set; }
12 | }
13 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/Tasks/IBackgroundTask.cs:
--------------------------------------------------------------------------------
1 | namespace Rabbit.Kernel.Tasks
2 | {
3 | ///
4 | /// 一个抽象的后台任务。
5 | ///
6 | public interface IBackgroundTask : IDependency
7 | {
8 | ///
9 | /// 扫描。
10 | ///
11 | void Sweep();
12 | }
13 | }
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Web.SignalR/IRabbitHubConfiguration.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNet.SignalR;
2 | using Rabbit.Kernel;
3 |
4 | namespace Rabbit.Components.Web.SignalR
5 | {
6 | internal interface IRabbitHubConfiguration : IDependency
7 | {
8 | HubConfiguration ConnectionConfiguration { get; }
9 | }
10 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/Environment/IShim.cs:
--------------------------------------------------------------------------------
1 | namespace Rabbit.Kernel.Environment
2 | {
3 | ///
4 | /// 一个抽象的垫片。
5 | ///
6 | public interface IShim
7 | {
8 | ///
9 | /// 主机容器。
10 | ///
11 | IHostContainer HostContainer { get; set; }
12 | }
13 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/Tasks/IBackgroundService.cs:
--------------------------------------------------------------------------------
1 | namespace Rabbit.Kernel.Tasks
2 | {
3 | ///
4 | /// 一个抽象的后台服务。
5 | ///
6 | public interface IBackgroundService : IDependency
7 | {
8 | ///
9 | /// 扫描。
10 | ///
11 | void Sweep();
12 | }
13 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/FileSystems/VirtualPath/IVirtualPathProvider.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Kernel.Caching;
2 |
3 | namespace Rabbit.Kernel.FileSystems.VirtualPath
4 | {
5 | ///
6 | /// 一个抽象的虚拟路径提供者。
7 | ///
8 | public interface IVirtualPathProvider : IVirtualPathProviderBase, IVolatileProvider
9 | {
10 | }
11 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/Caching/IVolatileToken.cs:
--------------------------------------------------------------------------------
1 | namespace Rabbit.Kernel.Caching
2 | {
3 | ///
4 | /// 一个抽象的挥发令牌。
5 | ///
6 | public interface IVolatileToken
7 | {
8 | ///
9 | /// 标识缓存是否有效,true为有效,false为失效。
10 | ///
11 | bool IsCurrent { get; }
12 | }
13 | }
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Data.Migrators/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Data/EntityAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Rabbit.Components.Data
4 | {
5 | ///
6 | /// 表示类型是一个实体。
7 | ///
8 | [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
9 | public sealed class EntityAttribute : Attribute
10 | {
11 | }
12 | }
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Bus.SignalR/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Rabbit.Kernel/Caching/ICacheContextAccessor.cs:
--------------------------------------------------------------------------------
1 | namespace Rabbit.Kernel.Caching
2 | {
3 | ///
4 | /// 一个抽象的缓存上下文访问器。
5 | ///
6 | public interface ICacheContextAccessor
7 | {
8 | ///
9 | /// 当前获取上下文。
10 | ///
11 | IAcquireContext Current { get; set; }
12 | }
13 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/Extensions/IExtensionLoaderCoordinator.cs:
--------------------------------------------------------------------------------
1 | namespace Rabbit.Kernel.Extensions
2 | {
3 | ///
4 | /// 一个抽象的扩展装载机协调员。
5 | ///
6 | public interface IExtensionLoaderCoordinator
7 | {
8 | ///
9 | /// 安装扩展。
10 | ///
11 | void SetupExtensions();
12 | }
13 | }
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Data.EntityFramework.MySql/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Rabbit.Web/IHasRequestContext.cs:
--------------------------------------------------------------------------------
1 | using System.Web.Routing;
2 |
3 | namespace Rabbit.Web
4 | {
5 | ///
6 | /// 表示含有一个请求上下文的抽象接口。
7 | ///
8 | public interface IHasRequestContext
9 | {
10 | ///
11 | /// 请求上下文。
12 | ///
13 | RequestContext RequestContext { get; }
14 | }
15 | }
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Data/DataAnnotations/ComplexTypeAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Rabbit.Components.Data.DataAnnotations
4 | {
5 | ///
6 | /// 复杂类型标记。
7 | ///
8 | [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
9 | public sealed class ComplexTypeAttribute : Attribute
10 | {
11 | }
12 | }
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Security/IUserRoles.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Rabbit.Components.Security
4 | {
5 | ///
6 | /// 一个抽象的用户角色接口。
7 | ///
8 | public interface IUserRoles
9 | {
10 | ///
11 | /// 用户所有角色。
12 | ///
13 | IList Roles { get; }
14 | }
15 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/Works/WorkContextProperty.cs:
--------------------------------------------------------------------------------
1 | namespace Rabbit.Kernel.Works
2 | {
3 | ///
4 | /// 工作上下文属性。
5 | ///
6 | /// 属性类型。
7 | public sealed class WorkContextProperty
8 | {
9 | ///
10 | /// 属性值。
11 | ///
12 | public T Value { get; set; }
13 | }
14 | }
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Data/IRepositoryInitializer.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Kernel;
2 |
3 | namespace Rabbit.Components.Data
4 | {
5 | ///
6 | /// 一个抽象的数据库初始化器。
7 | ///
8 | public interface IRepositoryInitializer : IDependency
9 | {
10 | ///
11 | /// 初始化动作。
12 | ///
13 | void Initialize();
14 | }
15 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/Settings/ITenantService.cs:
--------------------------------------------------------------------------------
1 | namespace Rabbit.Kernel.Settings
2 | {
3 | ///
4 | /// 一个抽象的租户服务。
5 | ///
6 | public interface ITenantService : IDependency
7 | {
8 | ///
9 | /// 获取当前租户设置。
10 | ///
11 | /// 当前租户设置实例。
12 | ITenant GetTenantSettings();
13 | }
14 | }
--------------------------------------------------------------------------------
/Rabbit.Web.Mvc/Environment/ShellBuilders/Models/ControllerBlueprint.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Kernel.Environment.ShellBuilders.Models;
2 |
3 | namespace Rabbit.Web.Mvc.Environment.ShellBuilders.Models
4 | {
5 | internal sealed class ControllerBlueprint : BlueprintItem
6 | {
7 | public string AreaName { get; set; }
8 |
9 | public string ControllerName { get; set; }
10 | }
11 | }
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Data/DataAnnotations/NotMappedAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Rabbit.Components.Data.DataAnnotations
4 | {
5 | ///
6 | /// 不进行映射。
7 | ///
8 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property, AllowMultiple = false)]
9 | public sealed class NotMappedAttribute : Attribute
10 | {
11 | }
12 | }
--------------------------------------------------------------------------------
/Rabbit.Web.Mvc/DisplayManagement/IShape.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Web.Mvc.DisplayManagement.Shapes;
2 |
3 | namespace Rabbit.Web.Mvc.DisplayManagement
4 | {
5 | ///
6 | /// 一个抽象的形状。
7 | ///
8 | public interface IShape
9 | {
10 | ///
11 | /// 形状元数据。
12 | ///
13 | ShapeMetadata Metadata { get; set; }
14 | }
15 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/Environment/IHostContainer.cs:
--------------------------------------------------------------------------------
1 | namespace Rabbit.Kernel.Environment
2 | {
3 | ///
4 | /// 一个抽象的主机容器。
5 | ///
6 | public interface IHostContainer
7 | {
8 | ///
9 | /// 解析服务。
10 | ///
11 | /// 服务类型。
12 | /// 服务实例。
13 | T Resolve();
14 | }
15 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/Environment/IShell.cs:
--------------------------------------------------------------------------------
1 | namespace Rabbit.Kernel.Environment
2 | {
3 | ///
4 | /// 一个抽象的外壳接口。
5 | ///
6 | public interface IShell
7 | {
8 | ///
9 | /// 激活外壳。
10 | ///
11 | void Activate();
12 |
13 | ///
14 | /// 终止外壳。
15 | ///
16 | void Terminate();
17 | }
18 | }
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Security.Web/AlwaysAccessibleAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Rabbit.Components.Security.Web
4 | {
5 | ///
6 | /// 适用于控制器或动作,将阻止任何行动被过滤的 网站前端访问 许可。
7 | ///
8 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
9 | public class AlwaysAccessibleAttribute : Attribute
10 | {
11 | }
12 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/Localization/LocalizationUtilities.cs:
--------------------------------------------------------------------------------
1 | using Autofac;
2 |
3 | namespace Rabbit.Kernel.Localization
4 | {
5 | internal sealed class LocalizationUtilities
6 | {
7 | public static Localizer Resolve(IComponentContext context, string scope)
8 | {
9 | var text = context.Resolve(new NamedParameter("scope", scope));
10 | return text.Get;
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Data/Models/RecordBlueprint.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Kernel.Environment.ShellBuilders.Models;
2 |
3 | namespace Rabbit.Components.Data.Models
4 | {
5 | ///
6 | /// 记录蓝图项。
7 | ///
8 | public sealed class RecordBlueprint : BlueprintItem
9 | {
10 | ///
11 | /// 表名称。
12 | ///
13 | public string TableName { get; set; }
14 | }
15 | }
--------------------------------------------------------------------------------
/Tests/Rabbit.Kernel.Tests/Modules/Rabbit.Test2/Module.txt:
--------------------------------------------------------------------------------
1 | Name: Test2
2 | Category: Default
3 | Description: 测试模块2
4 | FeatureDescription:
5 | Version: 1.0.0.0
6 | KernelVersion: 1.0.0.0
7 | Runtime: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
8 | WebSite:
9 | Company:
10 | Author: majian
11 | Tags:
12 | Dependencies:
13 | Features:
--------------------------------------------------------------------------------
/Rabbit.Kernel/Tasks/ISweepGenerator.cs:
--------------------------------------------------------------------------------
1 | namespace Rabbit.Kernel.Tasks
2 | {
3 | ///
4 | /// 一个抽象的扫描发生器。
5 | ///
6 | public interface ISweepGenerator : ISingletonDependency
7 | {
8 | ///
9 | /// 激活。
10 | ///
11 | void Activate();
12 |
13 | ///
14 | /// 终止。
15 | ///
16 | void Terminate();
17 | }
18 | }
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Security/IUser.cs:
--------------------------------------------------------------------------------
1 | namespace Rabbit.Components.Security
2 | {
3 | ///
4 | /// 一个抽象的用户。
5 | ///
6 | public interface IUser
7 | {
8 | ///
9 | /// 用户标识。
10 | ///
11 | string Identity { get; set; }
12 |
13 | ///
14 | /// 用户名称。
15 | ///
16 | string UserName { get; set; }
17 | }
18 | }
--------------------------------------------------------------------------------
/Rabbit.Web.Mvc/Mvc/ViewEngines/Razor/IRazorCompilationEvents.cs:
--------------------------------------------------------------------------------
1 | using System.Web.Razor.Generator;
2 | using System.Web.WebPages.Razor;
3 |
4 | namespace Rabbit.Web.Mvc.Mvc.ViewEngines.Razor
5 | {
6 | internal interface IRazorCompilationEvents
7 | {
8 | void CodeGenerationStarted(RazorBuildProvider provider);
9 |
10 | void CodeGenerationCompleted(RazorBuildProvider provider, CodeGenerationCompleteEventArgs e);
11 | }
12 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/Environment/IShellEvents.cs:
--------------------------------------------------------------------------------
1 | namespace Rabbit.Kernel.Environment
2 | {
3 | ///
4 | /// 一个抽象的外壳事件。
5 | ///
6 | public interface IShellEvents : IDependency
7 | {
8 | ///
9 | /// 激活外壳完成后执行。
10 | ///
11 | void Activated();
12 |
13 | ///
14 | /// 终止外壳前候执行。
15 | ///
16 | void Terminating();
17 | }
18 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/Environment/IHostLocalRestart.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Kernel.Caching;
2 | using System;
3 |
4 | namespace Rabbit.Kernel.Environment
5 | {
6 | ///
7 | /// 一个抽象的本地主机重启器。
8 | ///
9 | public interface IHostLocalRestart
10 | {
11 | ///
12 | /// 监控动作。
13 | ///
14 | /// 监控动作。
15 | void Monitor(Action monitor);
16 | }
17 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/Works/IWorkContextEvents.cs:
--------------------------------------------------------------------------------
1 | namespace Rabbit.Kernel.Works
2 | {
3 | ///
4 | /// 一个抽象的工作上下文事件。
5 | ///
6 | public interface IWorkContextEvents : IUnitOfWorkDependency
7 | {
8 | ///
9 | /// 工作上下文启动之后执行。
10 | ///
11 | void Started();
12 |
13 | ///
14 | /// 工作上下文完成之后执行。
15 | ///
16 | void Finished();
17 | }
18 | }
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Data.EntityFramework/DefaultDbContext.cs:
--------------------------------------------------------------------------------
1 | using System.Data.Entity;
2 | using System.Data.Entity.Infrastructure;
3 |
4 | namespace Rabbit.Components.Data.EntityFramework
5 | {
6 | internal sealed class DefaultDbContext : DbContext
7 | {
8 | public DefaultDbContext(string nameOrConnectionString, DbCompiledModel dbCompiledModel)
9 | : base(nameOrConnectionString, dbCompiledModel)
10 | {
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/Rabbit.Web.Mvc/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Rabbit.Web/Routes/IRoutePublisher.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Kernel;
2 | using System.Collections.Generic;
3 |
4 | namespace Rabbit.Web.Routes
5 | {
6 | ///
7 | /// 一个抽象的路由发布者。
8 | ///
9 | public interface IRoutePublisher : IDependency
10 | {
11 | ///
12 | /// 发布路由。
13 | ///
14 | /// 路由集合。
15 | void Publish(IEnumerable routes);
16 | }
17 | }
--------------------------------------------------------------------------------
/Rabbit.Web/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Rabbit.Web/Environment/IWebHost.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Kernel.Environment;
2 |
3 | namespace Rabbit.Web.Environment
4 | {
5 | ///
6 | /// 一个抽象的Web主机。
7 | ///
8 | public interface IWebHost : IHost
9 | {
10 | ///
11 | /// 请求开始时执行。
12 | ///
13 | void BeginRequest();
14 |
15 | ///
16 | /// 请求结束时候执行。
17 | ///
18 | void EndRequest();
19 | }
20 | }
--------------------------------------------------------------------------------
/Rabbit.Web/Routes/IRouteProvider.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Kernel;
2 | using System.Collections.Generic;
3 |
4 | namespace Rabbit.Web.Routes
5 | {
6 | ///
7 | /// 一个抽象的路由提供程序。
8 | ///
9 | public interface IRouteProvider : IDependency
10 | {
11 | ///
12 | /// 获取路由信息。
13 | ///
14 | /// 路由集合。
15 | void GetRoutes(ICollection routes);
16 | }
17 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/Caching/IAsyncTokenProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Rabbit.Kernel.Caching
4 | {
5 | ///
6 | /// 一个抽象的异步象征提供程序。
7 | ///
8 | public interface IAsyncTokenProvider
9 | {
10 | ///
11 | /// 获取象征。
12 | ///
13 | /// 任务。
14 | /// 挥发象征。
15 | IVolatileToken GetToken(Action> task);
16 | }
17 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/Localization/IText.cs:
--------------------------------------------------------------------------------
1 | namespace Rabbit.Kernel.Localization
2 | {
3 | ///
4 | /// 一个抽象的文本。
5 | ///
6 | public interface IText
7 | {
8 | ///
9 | /// 获取本地化字符串。
10 | ///
11 | /// 文本示意。
12 | /// 参数。
13 | /// 本地化字符串。
14 | LocalizedString Get(string textHint, params object[] args);
15 | }
16 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/Extensions/IExtensionMonitoringCoordinator.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Kernel.Caching;
2 | using System;
3 |
4 | namespace Rabbit.Kernel.Extensions
5 | {
6 | ///
7 | /// 一个抽象的扩展监控协调者。
8 | ///
9 | public interface IExtensionMonitoringCoordinator
10 | {
11 | ///
12 | /// 监控扩展。
13 | ///
14 | /// 监控动作。
15 | void MonitorExtensions(Action monitor);
16 | }
17 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/Extensions/Models/DependencyDescriptor.cs:
--------------------------------------------------------------------------------
1 | namespace Rabbit.Kernel.Extensions.Models
2 | {
3 | ///
4 | /// 依赖描述符。
5 | ///
6 | public sealed class DependencyDescriptor
7 | {
8 | ///
9 | /// 扩展Id。
10 | ///
11 | public string ExtensionId { get; set; }
12 |
13 | ///
14 | /// 扩展版本范围。
15 | ///
16 | public VersionRange Version { get; set; }
17 | }
18 | }
--------------------------------------------------------------------------------
/Rabbit.Web.Mvc/Mvc/ModelBinders/IModelBinderProvider.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Kernel;
2 | using System.Collections.Generic;
3 |
4 | namespace Rabbit.Web.Mvc.Mvc.ModelBinders
5 | {
6 | ///
7 | /// 一个抽象的模型绑定提供程序。
8 | ///
9 | public interface IModelBinderProvider : IDependency
10 | {
11 | ///
12 | /// 获取模型绑定程序。
13 | ///
14 | /// 绑定程序集合。
15 | IEnumerable GetModelBinders();
16 | }
17 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/Extensions/Folders/IExtensionFolders.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Kernel.Extensions.Models;
2 | using System.Collections.Generic;
3 |
4 | namespace Rabbit.Kernel.Extensions.Folders
5 | {
6 | ///
7 | /// 一个抽象的扩展文件夹。
8 | ///
9 | public interface IExtensionFolders
10 | {
11 | ///
12 | /// 可用的扩展。
13 | ///
14 | /// 扩展描述条目符集合。
15 | IEnumerable AvailableExtensions();
16 | }
17 | }
--------------------------------------------------------------------------------
/Rabbit.Web/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Rabbit.Web.Mvc/Mvc/ModelBinders/IModelBinderPublisher.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Kernel;
2 | using System.Collections.Generic;
3 |
4 | namespace Rabbit.Web.Mvc.Mvc.ModelBinders
5 | {
6 | ///
7 | /// 一个抽象的模型绑定程序发布者。
8 | ///
9 | public interface IModelBinderPublisher : IDependency
10 | {
11 | ///
12 | /// 发布。
13 | ///
14 | /// 绑定信息。
15 | void Publish(IEnumerable binders);
16 | }
17 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/Environment/Configuration/IShellSettingsManagerEventHandler.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Kernel.Events;
2 |
3 | namespace Rabbit.Kernel.Environment.Configuration
4 | {
5 | ///
6 | /// 一个抽象的外壳设置管理者事件处理程序。
7 | ///
8 | public interface IShellSettingsManagerEventHandler : IEventHandler
9 | {
10 | ///
11 | /// 外壳设置保存成功之后。
12 | ///
13 | /// 外壳设置信息。
14 | void Saved(ShellSettings settings);
15 | }
16 | }
--------------------------------------------------------------------------------
/Components/Rabbit.Components.DataBase.MySql/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Rabbit.Web.Mvc/WebApi/Routes/IHttpRouteProvider.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Kernel;
2 | using Rabbit.Web.Routes;
3 | using System.Collections.Generic;
4 |
5 | namespace Rabbit.Web.Mvc.WebApi.Routes
6 | {
7 | ///
8 | /// 一个抽象的WebApi路由器提供程序。
9 | ///
10 | public interface IHttpRouteProvider : IDependency
11 | {
12 | ///
13 | /// 获取路由信息。
14 | ///
15 | /// 路由集合。
16 | void GetRoutes(ICollection routes);
17 | }
18 | }
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Data.Mvc/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Rabbit.Kernel/Works/IWorkContextStateProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Rabbit.Kernel.Works
4 | {
5 | ///
6 | /// 一个抽象的工作上下文状态提供者。
7 | ///
8 | public interface IWorkContextStateProvider : IDependency
9 | {
10 | ///
11 | /// 获取状态信值。
12 | ///
13 | /// 状态类型。
14 | /// 状态名称。
15 | /// 获取状态值的委托。
16 | Func Get(string name);
17 | }
18 | }
--------------------------------------------------------------------------------
/Rabbit.Web.Mvc/Mvc/ModelBinders/ModelBinderDescriptor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Web.Mvc;
3 |
4 | namespace Rabbit.Web.Mvc.Mvc.ModelBinders
5 | {
6 | ///
7 | /// 模型绑定程序描述符。
8 | ///
9 | public sealed class ModelBinderDescriptor
10 | {
11 | ///
12 | /// 类型。
13 | ///
14 | public Type Type { get; set; }
15 |
16 | ///
17 | /// 模型绑定者。
18 | ///
19 | public IModelBinder ModelBinder { get; set; }
20 | }
21 | }
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Web.SignalR/NullAssemblyLocator.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNet.SignalR.Hubs;
2 | using System.Collections.Generic;
3 | using System.Reflection;
4 |
5 | namespace Rabbit.Components.Web.SignalR
6 | {
7 | internal sealed class NullAssemblyLocator : IAssemblyLocator
8 | {
9 | #region Implementation of IAssemblyLocator
10 |
11 | public IList GetAssemblies()
12 | {
13 | return new Assembly[0];
14 | }
15 |
16 | #endregion Implementation of IAssemblyLocator
17 | }
18 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/FileSystems/VirtualPath/IVirtualPathMonitor.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Kernel.Caching;
2 |
3 | namespace Rabbit.Kernel.FileSystems.VirtualPath
4 | {
5 | ///
6 | /// 一个抽象的虚拟路径监视者。
7 | ///
8 | public interface IVirtualPathMonitor : IVolatileProvider
9 | {
10 | ///
11 | /// 检测路径是否被更改。
12 | ///
13 | /// 需要监测的虚拟路径。
14 | /// 挥发令牌。
15 | IVolatileToken WhenPathChanges(string virtualPath);
16 | }
17 | }
--------------------------------------------------------------------------------
/Rabbit.Web.Mvc/DisplayManagement/Implementation/IDisplayManager.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Kernel;
2 | using System.Web;
3 |
4 | namespace Rabbit.Web.Mvc.DisplayManagement.Implementation
5 | {
6 | ///
7 | /// 一个抽象的显示管理者。
8 | ///
9 | public interface IDisplayManager : IDependency
10 | {
11 | ///
12 | /// 执行。
13 | ///
14 | /// 显示上下文。
15 | /// Html字符串实例。
16 | IHtmlString Execute(DisplayContext context);
17 | }
18 | }
--------------------------------------------------------------------------------
/Rabbit.Web.Mvc/Mvc/ViewEngines/ThemeAwareness/IConfiguredEnginesCache.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Kernel;
2 | using System;
3 | using System.Web.Mvc;
4 |
5 | namespace Rabbit.Web.Mvc.Mvc.ViewEngines.ThemeAwareness
6 | {
7 | internal interface IConfiguredEnginesCache : ISingletonDependency
8 | {
9 | IViewEngine BindBareEngines(Func factory);
10 |
11 | IViewEngine BindShallowEngines(string themeName, Func factory);
12 |
13 | IViewEngine BindDeepEngines(string themeName, Func factory);
14 | }
15 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/Environment/ShellBuilders/IShellContextFactory.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Kernel.Environment.Configuration;
2 |
3 | namespace Rabbit.Kernel.Environment.ShellBuilders
4 | {
5 | ///
6 | /// 一个抽象的外壳上下文工厂。
7 | ///
8 | public interface IShellContextFactory
9 | {
10 | ///
11 | /// 创建一个外壳上下文工厂。
12 | ///
13 | /// 外壳设置。
14 | /// 外壳上下文。
15 | ShellContext CreateShellContext(ShellSettings settings);
16 | }
17 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/Environment/ShellBuilders/Models/BlueprintItem.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Kernel.Extensions.Models;
2 | using System;
3 |
4 | namespace Rabbit.Kernel.Environment.ShellBuilders.Models
5 | {
6 | ///
7 | /// 蓝图项。
8 | ///
9 | public class BlueprintItem
10 | {
11 | ///
12 | /// 类型。
13 | ///
14 | public Type Type { get; set; }
15 |
16 | ///
17 | /// 特性条目。
18 | ///
19 | public Feature Feature { get; set; }
20 | }
21 | }
--------------------------------------------------------------------------------
/Rabbit.Web.Mvc/Mvc/ViewEngines/ThemeAwareness/IThemeAwareViewEngine.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Kernel;
2 | using System.Web.Mvc;
3 |
4 | namespace Rabbit.Web.Mvc.Mvc.ViewEngines.ThemeAwareness
5 | {
6 | internal interface IThemeAwareViewEngine : IDependency
7 | {
8 | ViewEngineResult FindPartialView(ControllerContext controllerContext, string partialViewName, bool useCache, bool useDeepPaths);
9 |
10 | ViewEngineResult FindView(ControllerContext controllerContext, string viewName, string masterName, bool useCache, bool useDeepPaths);
11 | }
12 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/Extensions/Models/Feature.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace Rabbit.Kernel.Extensions.Models
5 | {
6 | ///
7 | /// 特性条目。
8 | ///
9 | public sealed class Feature
10 | {
11 | ///
12 | /// 特性描述符。
13 | ///
14 | public FeatureDescriptor Descriptor { get; set; }
15 |
16 | ///
17 | /// 特性中可导出的类型。
18 | ///
19 | public IEnumerable ExportedTypes { get; set; }
20 | }
21 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/Works/IWorkContextAccessor.cs:
--------------------------------------------------------------------------------
1 | namespace Rabbit.Kernel.Works
2 | {
3 | ///
4 | /// 一个抽象的工作上下文访问器。
5 | ///
6 | public interface IWorkContextAccessor
7 | {
8 | ///
9 | /// 获取工作上下文。
10 | ///
11 | /// 工作上下文。
12 | WorkContext GetContext();
13 |
14 | ///
15 | /// 创建一个工作上下文范围。
16 | ///
17 | /// 工作上下文范围。
18 | IWorkContextScope CreateWorkContextScope();
19 | }
20 | }
--------------------------------------------------------------------------------
/Tests/Rabbit.Kernel.Tests/Modules/Rabbit.Test/Module.txt:
--------------------------------------------------------------------------------
1 | Name: Test
2 | Category: Default
3 | Description: 测试模块
4 | FeatureDescription:
5 | Version: 1.0.0.0
6 | KernelVersion: 1.0.0.0
7 | Runtime: Autofac, Version=3.3.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da|Rabbit.Components.Caching.Memory, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
8 | WebSite:
9 | Company:
10 | Author: majian
11 | Tags:
12 | Dependencies:
13 | Features:
14 | Rabbit.Test.Feaure1:
15 | Name: Feaure1
16 | Description: Feaure1
17 | Category: Default
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Security.Web/IRoleService.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Kernel;
2 | using System.Collections.Generic;
3 |
4 | namespace Rabbit.Components.Security.Web
5 | {
6 | ///
7 | /// 一个抽象的角色服务。
8 | ///
9 | public interface IRoleService : IDependency
10 | {
11 | ///
12 | /// 根级角色的名称获取该角色所拥有的权限。
13 | ///
14 | /// 角色名称。
15 | /// 该角色所拥有的权限。
16 | IEnumerable GetPermissionsForRoleByName(string name);
17 | }
18 | }
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Data.EntityFramework/Providers/IEntityFrameworkDataServicesProvider.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Components.Data.Providers;
2 | using System.Data.Entity.Core.Common;
3 |
4 | namespace Rabbit.Components.Data.EntityFramework.Providers
5 | {
6 | ///
7 | /// 一个抽象的EntityFramework数据服务提供程序。
8 | ///
9 | public interface IEntityFrameworkDataServicesProvider : IDataServicesProvider
10 | {
11 | ///
12 | /// 数据库提供服务。
13 | ///
14 | DbProviderServices Instance { get; }
15 | }
16 | }
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Security/Permissions/PermissionStereotype.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Rabbit.Components.Security.Permissions
4 | {
5 | ///
6 | /// 一个立体的许可类型。
7 | ///
8 | public class PermissionStereotype
9 | {
10 | ///
11 | /// 许可名称。
12 | ///
13 | public string Name { get; set; }
14 |
15 | ///
16 | /// 许可集合。
17 | ///
18 | public IEnumerable Permissions { get; set; }
19 | }
20 | }
--------------------------------------------------------------------------------
/Rabbit.Web/IHttpContextAccessor.cs:
--------------------------------------------------------------------------------
1 | using System.Web;
2 |
3 | namespace Rabbit.Web
4 | {
5 | ///
6 | /// 一个抽象的Http上下文访问器。
7 | ///
8 | public interface IHttpContextAccessor
9 | {
10 | ///
11 | /// 当前Http上下文。
12 | ///
13 | /// Http上下文。
14 | HttpContextBase Current();
15 |
16 | ///
17 | /// 设置Http上下文。
18 | ///
19 | /// 存根。
20 | void Set(HttpContextBase stub);
21 | }
22 | }
--------------------------------------------------------------------------------
/Rabbit.Web/UI/Navigation/INavigationProvider.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Kernel;
2 |
3 | namespace Rabbit.Web.UI.Navigation
4 | {
5 | ///
6 | /// 一个抽象的导航提供者。
7 | ///
8 | public interface INavigationProvider : IDependency
9 | {
10 | ///
11 | /// 导航菜单名称。
12 | ///
13 | string MenuName { get; }
14 |
15 | ///
16 | /// 获取导航。
17 | ///
18 | /// 导航建造者。
19 | void GetNavigation(NavigationBuilder builder);
20 | }
21 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/Environment/ShellBuilders/IMinimumShellDescriptorProvider.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Kernel.Environment.Descriptor.Models;
2 | using System.Collections.Generic;
3 |
4 | namespace Rabbit.Kernel.Environment.ShellBuilders
5 | {
6 | ///
7 | /// 一个抽象的最新外壳描述符提供者。
8 | ///
9 | public interface IMinimumShellDescriptorProvider
10 | {
11 | ///
12 | /// 获取外壳描述符。
13 | ///
14 | /// 外壳特性描述符。
15 | void GetFeatures(ICollection features);
16 | }
17 | }
--------------------------------------------------------------------------------
/Rabbit.Web/Themes/IThemeManager.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Kernel;
2 | using Rabbit.Kernel.Extensions.Models;
3 | using System.Web.Routing;
4 |
5 | namespace Rabbit.Web.Themes
6 | {
7 | ///
8 | /// 一个抽象的主题管理者。
9 | ///
10 | public interface IThemeManager : IDependency
11 | {
12 | ///
13 | /// 获取当前请求的主题。
14 | ///
15 | /// 请求上下文。
16 | /// 主题。
17 | ExtensionDescriptorEntry GetRequestTheme(RequestContext requestContext);
18 | }
19 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/Bus/Exceptions/RequestTimeoutException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Rabbit.Kernel.Bus.Exceptions
4 | {
5 | ///
6 | /// 请求超时异常。
7 | ///
8 | [Serializable]
9 | public sealed class RequestTimeoutException : ApplicationException
10 | {
11 | ///
12 | /// 初始化一个新的请求超时异常。
13 | ///
14 | /// 消息。
15 | public RequestTimeoutException(MessageBase message)
16 | : base(string.Format("Bus请求超时,{0}。", message))
17 | { }
18 | }
19 | }
--------------------------------------------------------------------------------
/Rabbit.Web.Mvc/DisplayManagement/INamedEnumerable.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Rabbit.Web.Mvc.DisplayManagement
4 | {
5 | ///
6 | /// 一个抽象的命名枚举。
7 | ///
8 | /// 类型。
9 | public interface INamedEnumerable : IEnumerable
10 | {
11 | ///
12 | /// 阵地。
13 | ///
14 | IEnumerable Positional { get; }
15 |
16 | ///
17 | /// 命名。
18 | ///
19 | IDictionary Named { get; }
20 | }
21 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/Environment/Assemblies/IAssemblyNameResolver.cs:
--------------------------------------------------------------------------------
1 | namespace Rabbit.Kernel.Environment.Assemblies
2 | {
3 | ///
4 | /// 一个抽象的程序集名称解析器。
5 | ///
6 | public interface IAssemblyNameResolver
7 | {
8 | ///
9 | /// 排序。
10 | ///
11 | int Order { get; }
12 |
13 | ///
14 | /// 解析一个程序集短名称到一个完全名称。
15 | ///
16 | /// 程序集短名称。
17 | /// 程序集完全名称。
18 | string Resolve(string shortName);
19 | }
20 | }
--------------------------------------------------------------------------------
/Rabbit.Web.Mvc/DisplayManagement/Descriptors/ShapeTable.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Rabbit.Web.Mvc.DisplayManagement.Descriptors
4 | {
5 | ///
6 | /// 形状表格。
7 | ///
8 | public sealed class ShapeTable
9 | {
10 | ///
11 | /// 描述符字典表。
12 | ///
13 | public IDictionary Descriptors { get; set; }
14 |
15 | ///
16 | /// 绑定字典表。
17 | ///
18 | public IDictionary Bindings { get; set; }
19 | }
20 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/Caching/ICacheHolder.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Rabbit.Kernel.Caching
4 | {
5 | ///
6 | /// 一个抽象的缓存持有者。
7 | ///
8 | public interface ICacheHolder : ISingletonDependency
9 | {
10 | ///
11 | /// 获取缓存。
12 | ///
13 | /// 键类型。
14 | /// 结果类型。
15 | /// 组件类型。
16 | /// 缓存实例。
17 | ICache GetCache(Type component);
18 | }
19 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/Environment/ShellBuilders/IShellContainerRegistrations.cs:
--------------------------------------------------------------------------------
1 | using Autofac;
2 | using Rabbit.Kernel.Environment.ShellBuilders.Models;
3 |
4 | namespace Rabbit.Kernel.Environment.ShellBuilders
5 | {
6 | ///
7 | /// 一个抽象的外壳容器注册提供程序。
8 | ///
9 | public interface IShellContainerRegistrations
10 | {
11 | ///
12 | /// 注册动作。
13 | ///
14 | /// 容器建造者。
15 | /// 外壳蓝图。
16 | void Registrations(ContainerBuilder builder, ShellBlueprint blueprint);
17 | }
18 | }
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Data.MySql/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/Rabbit.Kernel/Localization/Services/ILocalizedStringManager.cs:
--------------------------------------------------------------------------------
1 | namespace Rabbit.Kernel.Localization.Services
2 | {
3 | ///
4 | /// 一个抽象的本地化字符串管理者。
5 | ///
6 | public interface ILocalizedStringManager : IDependency
7 | {
8 | ///
9 | /// 获取本地化字符串。
10 | ///
11 | /// 作用范围。
12 | /// 文本。
13 | /// 文化名称。
14 | /// 本地化字符串。
15 | string GetLocalizedString(string scope, string text, string cultureName);
16 | }
17 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/Caching/ICache.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Rabbit.Kernel.Caching
4 | {
5 | ///
6 | /// 一个抽象的缓存。
7 | ///
8 | /// 键类型。
9 | /// 值类型。
10 | public interface ICache
11 | {
12 | ///
13 | /// 根据键获取一个缓存结果。
14 | ///
15 | /// 键。
16 | /// 获取上下文。
17 | /// 缓存结果。
18 | TResult Get(TKey key, Func, TResult> acquire);
19 | }
20 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/Environment/Configuration/TenantState.cs:
--------------------------------------------------------------------------------
1 | namespace Rabbit.Kernel.Environment.Configuration
2 | {
3 | ///
4 | /// 租户状态。
5 | ///
6 | public enum TenantState
7 | {
8 | ///
9 | /// 未初始化。
10 | ///
11 | Uninitialized,
12 |
13 | ///
14 | /// 正在运行。
15 | ///
16 | Running,
17 |
18 | ///
19 | /// 关闭。
20 | ///
21 | Disabled,
22 |
23 | ///
24 | /// 无效。
25 | ///
26 | Invalid
27 | }
28 | }
--------------------------------------------------------------------------------
/Rabbit.Web/Utility/Extensions/ExtensionDescriptorExtensions.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Kernel.Extensions.Models;
2 |
3 | namespace Rabbit.Web.Utility.Extensions
4 | {
5 | ///
6 | /// 扩展描述符扩展方法。
7 | ///
8 | public static class ExtensionDescriptorExtensions
9 | {
10 | ///
11 | /// 获取基本主题。
12 | ///
13 | /// 扩展描述符。
14 | /// 基本主题。
15 | public static string GetBaseTheme(this ExtensionDescriptor descriptor)
16 | {
17 | return descriptor["BaseTheme"];
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Security.Web/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Rabbit.Kernel/Localization/NullLocalizer.cs:
--------------------------------------------------------------------------------
1 | namespace Rabbit.Kernel.Localization
2 | {
3 | ///
4 | /// 一个空的本地化实例。
5 | ///
6 | public static class NullLocalizer
7 | {
8 | static NullLocalizer()
9 | {
10 | Localizer = (format, args) => new LocalizedString((args == null || args.Length == 0) ? format : string.Format(format, args));
11 | }
12 |
13 | private static readonly Localizer Localizer;
14 |
15 | ///
16 | /// 本地化实例。
17 | ///
18 | public static Localizer Instance { get { return Localizer; } }
19 | }
20 | }
--------------------------------------------------------------------------------
/Rabbit.Web.Mvc/DisplayManagement/IDisplayHelperFactory.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Kernel;
2 | using System.Web.Mvc;
3 |
4 | namespace Rabbit.Web.Mvc.DisplayManagement
5 | {
6 | ///
7 | /// 一个抽象的显示助手工厂。
8 | ///
9 | public interface IDisplayHelperFactory : IDependency
10 | {
11 | ///
12 | /// 创建助手。
13 | ///
14 | /// 视图上下文。
15 | /// 视图数据容器。
16 | /// 显示助手。
17 | dynamic CreateHelper(ViewContext viewContext, IViewDataContainer viewDataContainer);
18 | }
19 | }
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Data.Migrators/VersionTable.cs:
--------------------------------------------------------------------------------
1 | using FluentMigrator.VersionTableInfo;
2 |
3 | namespace Rabbit.Components.Data.Migrators
4 | {
5 | [VersionTableMetaData]
6 | public class VersionTable : DefaultVersionTableMetaData
7 | {
8 | private static string _tableName;
9 |
10 | #region Overrides of DefaultVersionTableMetaData
11 |
12 | public override string TableName => _tableName;
13 |
14 | #endregion Overrides of DefaultVersionTableMetaData
15 |
16 | public static void SetTableName(string tableName)
17 | {
18 | _tableName = tableName;
19 | }
20 | }
21 | }
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Data.Mvc/DataBuilderExtensions.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Kernel;
2 |
3 | namespace Rabbit.Components.Data.Mvc
4 | {
5 | ///
6 | /// 数据建设者。
7 | ///
8 | public static class DataBuilderExtensions
9 | {
10 | ///
11 | /// 启用Mvc拦截器事物支持,当Action执行失败时执行事务回滚。
12 | ///
13 | /// 数据建设者。
14 | public static void EnableMvcFilterTransaction(this BuilderExtensions.IDataBuilder dataBuilder)
15 | {
16 | dataBuilder.KernelBuilder.RegisterExtension(typeof(DataBuilderExtensions).Assembly);
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/WorkContextExtensions.cs:
--------------------------------------------------------------------------------
1 | using Autofac;
2 | using Rabbit.Kernel.Works;
3 |
4 | namespace Rabbit.Kernel
5 | {
6 | ///
7 | /// 工作上下文扩展方法。
8 | ///
9 | public static class WorkContextExtensions
10 | {
11 | ///
12 | /// 创建一个工作上下文范围。
13 | ///
14 | /// 容器。
15 | /// 工作上下文范围。
16 | public static IWorkContextScope CreateWorkContextScope(this ILifetimeScope lifetimeScope)
17 | {
18 | return lifetimeScope.Resolve().CreateWorkContextScope();
19 | }
20 | }
21 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/Localization/Services/ICultureManager.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Kernel.Works;
2 |
3 | namespace Rabbit.Kernel.Localization.Services
4 | {
5 | ///
6 | /// 一个抽象的文化管理者。
7 | ///
8 | public interface ICultureManager : IDependency
9 | {
10 | ///
11 | /// 获取当前文化。
12 | ///
13 | /// 工作上下文。
14 | /// 文化名称。
15 | string GetCurrentCulture(WorkContext workContext);
16 |
17 | ///
18 | /// 获取租户文化。
19 | ///
20 | /// 文化名称。
21 | string GetTenantCulture();
22 | }
23 | }
--------------------------------------------------------------------------------
/Rabbit.Web/Themes/Impl/SafeModeThemeSelector.cs:
--------------------------------------------------------------------------------
1 | using System.Web.Routing;
2 |
3 | namespace Rabbit.Web.Themes.Impl
4 | {
5 | internal sealed class SafeModeThemeSelector : IThemeSelector
6 | {
7 | #region Implementation of IThemeSelector
8 |
9 | ///
10 | /// 根据当前请求获取主题。
11 | ///
12 | /// 请求上下文。
13 | /// 主题选择结果。
14 | public ThemeSelectorResult GetTheme(RequestContext context)
15 | {
16 | return new ThemeSelectorResult { Priority = -100, ThemeName = "Themes" };
17 | }
18 |
19 | #endregion Implementation of IThemeSelector
20 | }
21 | }
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Web.SignalR/BuilderExtensions.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Kernel;
2 |
3 | namespace Rabbit.Components.Web.SignalR
4 | {
5 | ///
6 | /// 建设者扩展。
7 | ///
8 | public static class BuilderExtensions
9 | {
10 | ///
11 | /// 开启 SignalR 功能。
12 | ///
13 | /// Web建设者。
14 | public static Rabbit.Web.BuilderExtensions.IWebBuilder EnableSignalR(this Rabbit.Web.BuilderExtensions.IWebBuilder webBuilder)
15 | {
16 | webBuilder.KernelBuilder.RegisterExtension(typeof(BuilderExtensions).Assembly);
17 | return webBuilder;
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/Components/Rabbit.Components.DataBase/Providers/IDbConnectionProvider.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Data;
3 |
4 | namespace Rabbit.Components.DataBase.Providers
5 | {
6 | ///
7 | /// 一个抽象的数据连接提供程序。
8 | ///
9 | public interface IDbConnectionProvider
10 | {
11 | ///
12 | /// 数据连接提供程序名称。
13 | ///
14 | string Name { get; }
15 |
16 | ///
17 | /// 创建一个数据连接。
18 | ///
19 | /// 参数。
20 | /// 数据连接。
21 | IDbConnection CreateDbConnection(IDictionary parameters);
22 | }
23 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/Environment/ShellBuilders/IShellContainerFactory.cs:
--------------------------------------------------------------------------------
1 | using Autofac;
2 | using Rabbit.Kernel.Environment.Configuration;
3 | using Rabbit.Kernel.Environment.ShellBuilders.Models;
4 |
5 | namespace Rabbit.Kernel.Environment.ShellBuilders
6 | {
7 | ///
8 | /// 一个抽象的外壳容器工厂。
9 | ///
10 | public interface IShellContainerFactory
11 | {
12 | ///
13 | /// 创建一个外壳容器。
14 | ///
15 | /// 外壳设置。
16 | /// 外壳蓝图。
17 | /// 外壳容器。
18 | ILifetimeScope CreateContainer(ShellSettings settings, ShellBlueprint blueprint);
19 | }
20 | }
--------------------------------------------------------------------------------
/Rabbit.Web/Utility/Extensions/WorkContextExtensions.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Kernel.Extensions.Models;
2 | using Rabbit.Kernel.Works;
3 |
4 | namespace Rabbit.Web.Utility.Extensions
5 | {
6 | ///
7 | /// 工作上下文扩展方法。
8 | ///
9 | public static class WorkContextExtensions
10 | {
11 | ///
12 | /// 获取当前主题。
13 | ///
14 | /// 工作上下文。
15 | /// 主题扩展描述符条目。
16 | public static ExtensionDescriptorEntry GetCurrentTheme(this WorkContext workContext)
17 | {
18 | return workContext.GetState("CurrentTheme");
19 | }
20 | }
21 | }
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Data.EntityFramework/Providers/SqlServerEntityFrameworkDataServicesProvider.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Components.Data.Providers;
2 | using System.Data.Entity.Core.Common;
3 | using System.Data.Entity.SqlServer;
4 |
5 | namespace Rabbit.Components.Data.EntityFramework.Providers
6 | {
7 | internal sealed class SqlServerEntityFrameworkDataServicesProvider : SqlServerDataServicesProvider, IEntityFrameworkDataServicesProvider
8 | {
9 | #region Implementation of IEntityFrameworkDataServicesProvider
10 |
11 | public DbProviderServices Instance { get { return SqlProviderServices.Instance; } }
12 |
13 | #endregion Implementation of IEntityFrameworkDataServicesProvider
14 | }
15 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Rabbit.Kernel/Environment/ShellBuilders/ICompositionStrategy.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Kernel.Environment.Configuration;
2 | using Rabbit.Kernel.Environment.Descriptor.Models;
3 | using Rabbit.Kernel.Environment.ShellBuilders.Models;
4 |
5 | namespace Rabbit.Kernel.Environment.ShellBuilders
6 | {
7 | ///
8 | /// 一个抽象的组合策略。
9 | ///
10 | public interface ICompositionStrategy
11 | {
12 | ///
13 | /// 组合外壳蓝图。
14 | ///
15 | /// 外壳设置。
16 | /// 外壳描述符。
17 | /// 外壳蓝图。
18 | ShellBlueprint Compose(ShellSettings settings, ShellDescriptor descriptor);
19 | }
20 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/Caching/ISignals.cs:
--------------------------------------------------------------------------------
1 | namespace Rabbit.Kernel.Caching
2 | {
3 | ///
4 | /// 一个抽象的信号量挥发提供程序。
5 | ///
6 | public interface ISignals : IVolatileProvider
7 | {
8 | ///
9 | /// 触发信号。
10 | ///
11 | /// 信号类型。
12 | /// 信号值。
13 | void Trigger(T signal);
14 |
15 | ///
16 | /// 根据 获取挥发令牌。
17 | ///
18 | /// 信号类型。
19 | /// 信号值。
20 | /// 挥发令牌。
21 | IVolatileToken When(T signal);
22 | }
23 | }
--------------------------------------------------------------------------------
/Rabbit.Web/Routes/IRoutePublisherEventHandler.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Kernel;
2 | using System.Collections.Generic;
3 |
4 | namespace Rabbit.Web.Routes
5 | {
6 | ///
7 | /// 一个抽象的录音发布者事件处理程序。
8 | ///
9 | public interface IRoutePublisherEventHandler : IDependency
10 | {
11 | ///
12 | /// 发布前。
13 | ///
14 | /// 路由描述符。
15 | void Publishing(IEnumerable routeDescriptors);
16 |
17 | ///
18 | /// 发布后。
19 | ///
20 | /// 路由描述符。
21 | void Published(IEnumerable routeDescriptors);
22 | }
23 | }
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Data.EntityFramework/GlobalConfig.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Configuration;
3 | using System.Linq;
4 |
5 | namespace Rabbit.Components.Data.EntityFramework
6 | {
7 | internal sealed class GlobalConfig
8 | {
9 | public static bool AutomaticMigrationsEnabled = false;
10 |
11 | static GlobalConfig()
12 | {
13 | const string key = "Data.EntityFramework.AutomaticMigrationsEnabled";
14 | var settings = ConfigurationManager.AppSettings;
15 | if (settings.AllKeys.Contains(key) && "true".Equals(settings[key], StringComparison.OrdinalIgnoreCase))
16 | {
17 | AutomaticMigrationsEnabled = true;
18 | }
19 | }
20 | }
21 | }
--------------------------------------------------------------------------------
/Rabbit.Web.Mvc/DisplayManagement/Descriptors/ShapePlacementStrategy/PlacementFile.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Rabbit.Web.Mvc.DisplayManagement.Descriptors.ShapePlacementStrategy
4 | {
5 | internal class PlacementFile : PlacementNode
6 | {
7 | }
8 |
9 | internal class PlacementNode
10 | {
11 | public IEnumerable Nodes { get; set; }
12 | }
13 |
14 | internal class PlacementMatch : PlacementNode
15 | {
16 | public IDictionary Terms { get; set; }
17 | }
18 |
19 | internal class PlacementShapeLocation : PlacementNode
20 | {
21 | public string ShapeType { get; set; }
22 |
23 | public string Location { get; set; }
24 | }
25 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/Extensions/SuppressDependencyAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Rabbit.Kernel.Extensions
4 | {
5 | ///
6 | /// 替换依赖标记。
7 | ///
8 | [AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
9 | public sealed class SuppressDependencyAttribute : Attribute
10 | {
11 | ///
12 | /// 初始化一个新的替换依赖标记。
13 | ///
14 | /// 替换的类型名称。
15 | public SuppressDependencyAttribute(string fullName)
16 | {
17 | FullName = fullName;
18 | }
19 |
20 | ///
21 | /// 替换的类型名称。
22 | ///
23 | public string FullName { get; set; }
24 | }
25 | }
--------------------------------------------------------------------------------
/Rabbit.Web.Mvc/UI/Admin/AdminThemeSelector.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Web.Themes;
2 | using System.Web.Routing;
3 |
4 | namespace Rabbit.Web.Mvc.UI.Admin
5 | {
6 | internal sealed class AdminThemeSelector : IThemeSelector
7 | {
8 | #region Implementation of IThemeSelector
9 |
10 | ///
11 | /// 根据当前请求获取主题。
12 | ///
13 | /// 请求上下文。
14 | /// 主题选择结果。
15 | public ThemeSelectorResult GetTheme(RequestContext context)
16 | {
17 | return AdminFilter.IsApplied(context) ? new ThemeSelectorResult { Priority = 100, ThemeName = "TheAdmin" } : null;
18 | }
19 |
20 | #endregion Implementation of IThemeSelector
21 | }
22 | }
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Data.MySql/DataBuilderExtensions.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Kernel;
2 |
3 | namespace Rabbit.Components.Data.MySql
4 | {
5 | ///
6 | /// 数据建设者扩展方法。
7 | ///
8 | public static class DataBuilderExtensions
9 | {
10 | ///
11 | /// 添加MySql的提供程序。
12 | ///
13 | /// 数据建设者。
14 | /// 数据建设者。
15 | public static BuilderExtensions.IDataBuilder AddMySqlProvider(this BuilderExtensions.IDataBuilder dataBuilder)
16 | {
17 | dataBuilder.KernelBuilder
18 | .RegisterExtension(typeof(DataBuilderExtensions).Assembly);
19 | return dataBuilder;
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/Rabbit.Kernel/Extensions/ExtensionEntry.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Kernel.Extensions.Models;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Reflection;
5 |
6 | namespace Rabbit.Kernel.Extensions
7 | {
8 | ///
9 | /// 扩展条目。
10 | ///
11 | public class ExtensionEntry
12 | {
13 | ///
14 | /// 扩展描述符。
15 | ///
16 | public ExtensionDescriptorEntry Descriptor { get; set; }
17 |
18 | ///
19 | /// 扩展程序集。
20 | ///
21 | public Assembly Assembly { get; set; }
22 |
23 | ///
24 | /// 扩展导出类型集合。
25 | ///
26 | public IEnumerable ExportedTypes { get; set; }
27 | }
28 | }
--------------------------------------------------------------------------------
/Components/Rabbit.Components.Web.SignalR/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Rabbit.Web/UI/Navigation/INavigationManager.cs:
--------------------------------------------------------------------------------
1 | using Rabbit.Kernel;
2 | using System.Collections.Generic;
3 |
4 | namespace Rabbit.Web.UI.Navigation
5 | {
6 | ///
7 | /// 一个抽象的导航管理者。
8 | ///
9 | public interface INavigationManager : IDependency
10 | {
11 | ///
12 | /// 生成菜单。
13 | ///
14 | /// 菜单名称。
15 | /// 菜单项集合。
16 | IEnumerable