Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
netcoreplus
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
netcoreplus
Commits
c57593e5
Commit
c57593e5
authored
May 23, 2019
by
阿星Plus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Installer DefaultSettings
parent
3d55967b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
5 deletions
+37
-5
PlusCoreInstaller.cs
src/Plus/Dependency/Installers/PlusCoreInstaller.cs
+2
-0
IShouldInitialize.cs
src/Plus/IShouldInitialize.cs
+11
-0
Plus.csproj
src/Plus/Plus.csproj
+1
-1
PlusEngine.cs
src/Plus/PlusEngine.cs
+6
-3
PlusStarter.cs
src/Plus/PlusStarter.cs
+1
-1
RegularGuidGenerator.cs
src/Plus/RegularGuidGenerator.cs
+16
-0
No files found.
src/Plus/Dependency/Installers/PlusCoreInstaller.cs
View file @
c57593e5
using
Castle.MicroKernel.Registration
;
using
Castle.MicroKernel.SubSystems.Configuration
;
using
Castle.Windsor
;
using
Plus.Configuration
;
using
Plus.Configuration.Startup
;
using
Plus.Domain.Uow
;
using
Plus.Modules
;
...
...
@@ -17,6 +18,7 @@ namespace Plus.Dependency.Installers
public
void
Install
(
IWindsorContainer
container
,
IConfigurationStore
store
)
{
container
.
Register
(
Component
.
For
<
DefaultSettings
>().
ImplementedBy
<
DefaultSettings
>().
LifestyleSingleton
(),
Component
.
For
<
IUnitOfWorkDefaultOptions
,
UnitOfWorkDefaultOptions
>().
ImplementedBy
<
UnitOfWorkDefaultOptions
>().
LifestyleSingleton
(),
Component
.
For
<
IPlusStartupConfiguration
,
PlusStartupConfiguration
>().
ImplementedBy
<
PlusStartupConfiguration
>().
LifestyleSingleton
(),
Component
.
For
<
IPlusModuleManager
,
PlusModuleManager
>().
ImplementedBy
<
PlusModuleManager
>().
LifestyleSingleton
(),
...
...
src/Plus/IShouldInitialize.cs
0 → 100644
View file @
c57593e5
using
Castle.Core
;
namespace
Plus
{
/// <summary>
/// IShouldInitialize
/// </summary>
public
interface
IShouldInitialize
:
IInitializable
{
}
}
\ No newline at end of file
src/Plus/Plus.csproj
View file @
c57593e5
...
...
@@ -17,7 +17,7 @@
<PackageLicenseUrl>https://raw.githubusercontent.com/Meowv/.netcoreplus/master/LICENSE</PackageLicenseUrl>
<PackageTags>plus;.netcoreplus;</PackageTags>
<PackageReleaseNotes>Plus</PackageReleaseNotes>
<Version>1.0.
1.2
</Version>
<Version>1.0.
3
</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
...
...
src/Plus/PlusEngine.cs
View file @
c57593e5
using
Castle.Core.Logging
;
using
Plus.Configuration
;
using
Plus.Dependency
;
namespace
Plus
{
/// <summary>
///
PlusEngine
///
注入引擎
/// </summary>
public
class
PlusEngine
{
...
...
@@ -14,6 +15,8 @@ namespace Plus
public
ILogger
Logger
{
get
;
private
set
;
}
public
DefaultSettings
DefaultSettings
{
get
;
private
set
;
}
public
static
PlusEngine
Instance
{
get
;
private
set
;
}
static
PlusEngine
()
...
...
@@ -30,14 +33,14 @@ namespace Plus
_initialized
=
true
;
return
;
}
throw
new
PlusException
(
"PlusEngine
初始化
"
);
throw
new
PlusException
(
"PlusEngine
未初始化成功!
"
);
}
public
void
PostInitialize
()
{
if
(
_initialized
)
{
DefaultSettings
=
Resolve
<
DefaultSettings
>();
}
}
...
...
src/Plus/PlusStarter.cs
View file @
c57593e5
...
...
@@ -57,7 +57,7 @@ namespace Plus
try
{
RegisterStarter
();
_logger
.
Debug
(
"PlusStarter 初始化."
);
_logger
.
Debug
(
"PlusStarter
开始
初始化."
);
PlusEngine
.
Instance
.
IocManager
.
IocContainer
.
Install
(
new
PlusCoreInstaller
());
PlusEngine
.
Instance
.
PostInitialize
();
IocManager
.
Resolve
<
PlusStartupConfiguration
>().
Initialize
();
...
...
src/Plus/RegularGuidGenerator.cs
0 → 100644
View file @
c57593e5
using
Plus.Dependency
;
using
System
;
namespace
Plus
{
/// <summary>
/// RegularGuidGenerator
/// </summary>
public
class
RegularGuidGenerator
:
IGuidGenerator
,
ITransientDependency
{
public
virtual
Guid
Create
()
{
return
Guid
.
NewGuid
();
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment