Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
guo450212436
et
提交
01ee3176
E
et
项目概览
guo450212436
/
et
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
et
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
01ee3176
编写于
9月 15, 2015
作者:
T
tanghai
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
使用.net4.6
上级
244cfd32
变更
35
隐藏空白更改
内联
并排
Showing
35 changed file
with
84 addition
and
103 deletion
+84
-103
CSharp/App/Editor/Editor.csproj
CSharp/App/Editor/Editor.csproj
+1
-1
CSharp/App/Editor/app.config
CSharp/App/Editor/app.config
+15
-15
CSharp/App/Infrastructure/Infrastructure.csproj
CSharp/App/Infrastructure/Infrastructure.csproj
+1
-1
CSharp/App/Infrastructure/app.config
CSharp/App/Infrastructure/app.config
+1
-1
CSharp/App/Modules/BehaviorTreeModule/AllTreeView.xaml.cs
CSharp/App/Modules/BehaviorTreeModule/AllTreeView.xaml.cs
+1
-1
CSharp/App/Modules/BehaviorTreeModule/BehaviorTreeModule.csproj
.../App/Modules/BehaviorTreeModule/BehaviorTreeModule.csproj
+1
-1
CSharp/App/Modules/BehaviorTreeModule/app.config
CSharp/App/Modules/BehaviorTreeModule/app.config
+8
-8
CSharp/Exe/Profile/App.config
CSharp/Exe/Profile/App.config
+1
-1
CSharp/Exe/Profile/Profile.csproj
CSharp/Exe/Profile/Profile.csproj
+1
-1
CSharp/Game/Controller/Controller.csproj
CSharp/Game/Controller/Controller.csproj
+1
-1
CSharp/Game/Model/ACategory.cs
CSharp/Game/Model/ACategory.cs
+1
-1
CSharp/Game/Model/Actor.cs
CSharp/Game/Model/Actor.cs
+1
-1
CSharp/Game/Model/Component/BehaviorTreeComponent.cs
CSharp/Game/Model/Component/BehaviorTreeComponent.cs
+4
-4
CSharp/Game/Model/Component/BuffComponent.cs
CSharp/Game/Model/Component/BuffComponent.cs
+2
-4
CSharp/Game/Model/Component/ConfigComponent.cs
CSharp/Game/Model/Component/ConfigComponent.cs
+3
-3
CSharp/Game/Model/Component/EventComponent.cs
CSharp/Game/Model/Component/EventComponent.cs
+8
-11
CSharp/Game/Model/Component/FactoryComponent.cs
CSharp/Game/Model/Component/FactoryComponent.cs
+1
-1
CSharp/Game/Model/Component/MessageComponent.cs
CSharp/Game/Model/Component/MessageComponent.cs
+3
-8
CSharp/Game/Model/Component/NetworkComponent.cs
CSharp/Game/Model/Component/NetworkComponent.cs
+1
-2
CSharp/Game/Model/Model.csproj
CSharp/Game/Model/Model.csproj
+1
-1
CSharp/Platform/Common/Base/Entity.cs
CSharp/Platform/Common/Base/Entity.cs
+3
-9
CSharp/Platform/Common/Common.csproj
CSharp/Platform/Common/Common.csproj
+1
-1
CSharp/Platform/Common/Helper/LoaderHelper.cs
CSharp/Platform/Common/Helper/LoaderHelper.cs
+1
-1
CSharp/Platform/Common/Helper/StringHelper.cs
CSharp/Platform/Common/Helper/StringHelper.cs
+1
-2
CSharp/Platform/TNet/TBuffer.cs
CSharp/Platform/TNet/TBuffer.cs
+1
-2
CSharp/Platform/TNet/TNet.csproj
CSharp/Platform/TNet/TNet.csproj
+1
-1
CSharp/Platform/TNet/TService.cs
CSharp/Platform/TNet/TService.cs
+1
-1
CSharp/Platform/TNet/TSocket.cs
CSharp/Platform/TNet/TSocket.cs
+5
-5
CSharp/Platform/UNet/Library.cs
CSharp/Platform/UNet/Library.cs
+1
-1
CSharp/Platform/UNet/UNet.csproj
CSharp/Platform/UNet/UNet.csproj
+1
-1
CSharp/Test/ModelTest/ModelTest.csproj
CSharp/Test/ModelTest/ModelTest.csproj
+1
-1
CSharp/Test/TNetTest/TNetTest.csproj
CSharp/Test/TNetTest/TNetTest.csproj
+1
-1
CSharp/Test/UNetTest/UNetTest.csproj
CSharp/Test/UNetTest/UNetTest.csproj
+1
-1
CSharp/ThirdParty/Nuget/Nuget.csproj
CSharp/ThirdParty/Nuget/Nuget.csproj
+1
-1
CSharp/ThirdParty/Nuget/app.config
CSharp/ThirdParty/Nuget/app.config
+8
-8
未找到文件。
CSharp/App/Editor/Editor.csproj
浏览文件 @
01ee3176
...
...
@@ -10,7 +10,7 @@
<AppDesignerFolder>
Properties
</AppDesignerFolder>
<RootNamespace>
App.Editor
</RootNamespace>
<AssemblyName>
Editor
</AssemblyName>
<TargetFrameworkVersion>
v4.
5.2
</TargetFrameworkVersion>
<TargetFrameworkVersion>
v4.
6
</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<FileAlignment>
512
</FileAlignment>
...
...
CSharp/App/Editor/app.config
浏览文件 @
01ee3176
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
configuration
>
<
runtime
>
<
assemblyBinding
xmlns
=
"urn:schemas-microsoft-com:asm.v1"
>
<
dependentAssembly
>
<
assemblyIdentity
name
=
"Microsoft.Practices.Prism"
publicKeyToken
=
"31bf3856ad364e35"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-4.1.0.0"
newVersion
=
"4.1.0.0"
/>
<
assemblyIdentity
name
=
"Microsoft.Practices.Prism"
publicKeyToken
=
"31bf3856ad364e35"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-4.1.0.0"
newVersion
=
"4.1.0.0"
/>
</
dependentAssembly
>
<
dependentAssembly
>
<
assemblyIdentity
name
=
"MySql.Data"
publicKeyToken
=
"c5687fc88969c44d"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-6.6.4.0"
newVersion
=
"6.6.4.0"
/>
<
assemblyIdentity
name
=
"MySql.Data"
publicKeyToken
=
"c5687fc88969c44d"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-6.6.4.0"
newVersion
=
"6.6.4.0"
/>
</
dependentAssembly
>
<
dependentAssembly
>
<
assemblyIdentity
name
=
"Microsoft.Practices.ServiceLocation"
publicKeyToken
=
"31bf3856ad364e35"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-1.3.0.0"
newVersion
=
"1.3.0.0"
/>
<
assemblyIdentity
name
=
"Microsoft.Practices.ServiceLocation"
publicKeyToken
=
"31bf3856ad364e35"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-1.3.0.0"
newVersion
=
"1.3.0.0"
/>
</
dependentAssembly
>
<
dependentAssembly
>
<
assemblyIdentity
name
=
"System.Windows.Interactivity"
publicKeyToken
=
"31bf3856ad364e35"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-4.0.0.0"
newVersion
=
"4.0.0.0"
/>
<
assemblyIdentity
name
=
"System.Windows.Interactivity"
publicKeyToken
=
"31bf3856ad364e35"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-4.0.0.0"
newVersion
=
"4.0.0.0"
/>
</
dependentAssembly
>
<
dependentAssembly
>
<
assemblyIdentity
name
=
"Microsoft.Practices.Prism.SharedInterfaces"
publicKeyToken
=
"31bf3856ad364e35"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-1.1.1.0"
newVersion
=
"1.1.1.0"
/>
<
assemblyIdentity
name
=
"Microsoft.Practices.Prism.SharedInterfaces"
publicKeyToken
=
"31bf3856ad364e35"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-1.1.1.0"
newVersion
=
"1.1.1.0"
/>
</
dependentAssembly
>
<
dependentAssembly
>
<
assemblyIdentity
name
=
"Microsoft.Practices.Prism.PubSubEvents"
publicKeyToken
=
"31bf3856ad364e35"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-1.1.0.0"
newVersion
=
"1.1.0.0"
/>
<
assemblyIdentity
name
=
"Microsoft.Practices.Prism.PubSubEvents"
publicKeyToken
=
"31bf3856ad364e35"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-1.1.0.0"
newVersion
=
"1.1.0.0"
/>
</
dependentAssembly
>
</
assemblyBinding
>
</
runtime
>
<
startup
>
<
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.
5.2"
/>
<
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.
6"
/>
</
startup
>
<
appSettings
>
<
add
key
=
"NodePath"
value
=
"D:\Source\SLOL\Program\Unity\Assets\Resources\Config\"
/>
<
add
key
=
"NodePath"
value
=
"D:\Source\SLOL\Program\Unity\Assets\Resources\Config\"
/>
</
appSettings
>
</
configuration
>
CSharp/App/Infrastructure/Infrastructure.csproj
浏览文件 @
01ee3176
...
...
@@ -10,7 +10,7 @@
<AppDesignerFolder>
Properties
</AppDesignerFolder>
<RootNamespace>
App.Infrastructure
</RootNamespace>
<AssemblyName>
Infrastructure
</AssemblyName>
<TargetFrameworkVersion>
v4.
5.2
</TargetFrameworkVersion>
<TargetFrameworkVersion>
v4.
6
</TargetFrameworkVersion>
<FileAlignment>
512
</FileAlignment>
<SolutionDir
Condition=
"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'"
>
..\..\CSharp\
</SolutionDir>
<RestorePackages>
true
</RestorePackages>
...
...
CSharp/App/Infrastructure/app.config
浏览文件 @
01ee3176
...
...
@@ -16,4 +16,4 @@
</
dependentAssembly
>
</
assemblyBinding
>
</
runtime
>
<
startup
><
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.
5.2
"
/></
startup
></
configuration
>
<
startup
><
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.
6
"
/></
startup
></
configuration
>
CSharp/App/Modules/BehaviorTreeModule/AllTreeView.xaml.cs
浏览文件 @
01ee3176
...
...
@@ -83,7 +83,7 @@ namespace Modules.BehaviorTreeModule
cfg
.
AppSettings
.
Settings
[
"NodePath"
].
Value
=
path
;
cfg
.
Save
();
ConfigurationManager
.
AppSettings
[
"NodePath"
]
=
path
;
Application
.
Current
.
MainWindow
.
Title
=
string
.
Format
(
"行为树编辑器 当前工作目录[{0}]"
,
ConfigurationManager
.
AppSettings
[
"NodePath"
])
;
Application
.
Current
.
MainWindow
.
Title
=
$"行为树编辑器 当前工作目录[
{
ConfigurationManager
.
AppSettings
[
"NodePath"
]}
]"
;
}
private
void
MenuItem_Remove
(
object
sender
,
RoutedEventArgs
e
)
...
...
CSharp/App/Modules/BehaviorTreeModule/BehaviorTreeModule.csproj
浏览文件 @
01ee3176
...
...
@@ -10,7 +10,7 @@
<AppDesignerFolder>
Properties
</AppDesignerFolder>
<RootNamespace>
Modules.BehaviorTreeModule
</RootNamespace>
<AssemblyName>
BehaviorTreeModule
</AssemblyName>
<TargetFrameworkVersion>
v4.
5.2
</TargetFrameworkVersion>
<TargetFrameworkVersion>
v4.
6
</TargetFrameworkVersion>
<FileAlignment>
512
</FileAlignment>
<Utf8Output>
true
</Utf8Output>
<ExpressionBlendVersion>
4.0.20621.0
</ExpressionBlendVersion>
...
...
CSharp/App/Modules/BehaviorTreeModule/app.config
浏览文件 @
01ee3176
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
configuration
>
<
runtime
>
<
assemblyBinding
xmlns
=
"urn:schemas-microsoft-com:asm.v1"
>
<
dependentAssembly
>
<
assemblyIdentity
name
=
"Microsoft.Practices.ServiceLocation"
publicKeyToken
=
"31bf3856ad364e35"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-1.3.0.0"
newVersion
=
"1.3.0.0"
/>
<
assemblyIdentity
name
=
"Microsoft.Practices.ServiceLocation"
publicKeyToken
=
"31bf3856ad364e35"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-1.3.0.0"
newVersion
=
"1.3.0.0"
/>
</
dependentAssembly
>
<
dependentAssembly
>
<
assemblyIdentity
name
=
"Microsoft.Practices.Prism.SharedInterfaces"
publicKeyToken
=
"31bf3856ad364e35"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-1.1.1.0"
newVersion
=
"1.1.1.0"
/>
<
assemblyIdentity
name
=
"Microsoft.Practices.Prism.SharedInterfaces"
publicKeyToken
=
"31bf3856ad364e35"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-1.1.1.0"
newVersion
=
"1.1.1.0"
/>
</
dependentAssembly
>
<
dependentAssembly
>
<
assemblyIdentity
name
=
"Microsoft.Practices.Prism.PubSubEvents"
publicKeyToken
=
"31bf3856ad364e35"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-1.1.0.0"
newVersion
=
"1.1.0.0"
/>
<
assemblyIdentity
name
=
"Microsoft.Practices.Prism.PubSubEvents"
publicKeyToken
=
"31bf3856ad364e35"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-1.1.0.0"
newVersion
=
"1.1.0.0"
/>
</
dependentAssembly
>
</
assemblyBinding
>
</
runtime
>
<
startup
><
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.
5.2"
/></
startup
></
configuration
>
<
startup
><
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.
6"
/></
startup
></
configuration
>
CSharp/Exe/Profile/App.config
浏览文件 @
01ee3176
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
configuration
>
<
startup
>
<
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.
5.2
"
/>
<
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.
6
"
/>
</
startup
>
</
configuration
>
CSharp/Exe/Profile/Profile.csproj
浏览文件 @
01ee3176
...
...
@@ -9,7 +9,7 @@
<AppDesignerFolder>
Properties
</AppDesignerFolder>
<RootNamespace>
Profile
</RootNamespace>
<AssemblyName>
Profile
</AssemblyName>
<TargetFrameworkVersion>
v4.
5.2
</TargetFrameworkVersion>
<TargetFrameworkVersion>
v4.
6
</TargetFrameworkVersion>
<FileAlignment>
512
</FileAlignment>
<TargetFrameworkProfile
/>
</PropertyGroup>
...
...
CSharp/Game/Controller/Controller.csproj
浏览文件 @
01ee3176
...
...
@@ -9,7 +9,7 @@
<AppDesignerFolder>
Properties
</AppDesignerFolder>
<RootNamespace>
Controller
</RootNamespace>
<AssemblyName>
Controller
</AssemblyName>
<TargetFrameworkVersion>
v4.
5.2
</TargetFrameworkVersion>
<TargetFrameworkVersion>
v4.
6
</TargetFrameworkVersion>
<FileAlignment>
512
</FileAlignment>
<TargetFrameworkProfile
/>
</PropertyGroup>
...
...
CSharp/Game/Model/ACategory.cs
浏览文件 @
01ee3176
...
...
@@ -18,7 +18,7 @@ namespace Model
if
(!
Directory
.
Exists
(
path
))
{
throw
new
Exception
(
string
.
Format
(
"not found config path: {0}"
,
path
)
);
throw
new
Exception
(
$"not found config path:
{
path
}
"
);
}
foreach
(
string
file
in
Directory
.
GetFiles
(
path
))
...
...
CSharp/Game/Model/Actor.cs
浏览文件 @
01ee3176
...
...
@@ -32,7 +32,7 @@ namespace Model
}
catch
(
Exception
e
)
{
Log
.
Trace
(
string
.
Format
(
e
.
ToString
()
));
Log
.
Trace
(
e
.
ToString
(
));
}
}
}
...
...
CSharp/Game/Model/Component/BehaviorTreeComponent.cs
浏览文件 @
01ee3176
...
...
@@ -29,7 +29,7 @@ namespace Model
Type
classType
=
type
;
if
(
this
.
dictionary
.
ContainsKey
(
attribute
.
Type
))
{
throw
new
GameException
(
string
.
Format
(
"已经存在同类节点: {0}"
,
attribute
.
Type
)
);
throw
new
GameException
(
$"已经存在同类节点:
{
attribute
.
Type
}
"
);
}
this
.
dictionary
.
Add
(
attribute
.
Type
,
config
=>
(
Node
)
Activator
.
CreateInstance
(
classType
,
config
));
}
...
...
@@ -51,7 +51,7 @@ namespace Model
BehaviorTree
behaviorTree
;
if
(!
this
.
behaviorTrees
.
TryGetValue
(
id
,
out
behaviorTree
))
{
throw
new
GameException
(
string
.
Format
(
"无法找到行为树: {0}"
,
id
)
);
throw
new
GameException
(
$"无法找到行为树:
{
id
}
"
);
}
return
behaviorTree
;
}
...
...
@@ -59,10 +59,10 @@ namespace Model
private
Node
CreateOneNode
(
NodeConfig
proto
)
{
NodeType
nodeType
=
(
NodeType
)
proto
.
Type
;
NodeType
nodeType
=
proto
.
Type
;
if
(!
this
.
dictionary
.
ContainsKey
(
nodeType
))
{
throw
new
KeyNotFoundException
(
string
.
Format
(
"NodeType没有定义该节点: {0}"
,
nodeType
)
);
throw
new
KeyNotFoundException
(
$"NodeType没有定义该节点:
{
nodeType
}
"
);
}
return
this
.
dictionary
[
nodeType
](
proto
);
}
...
...
CSharp/Game/Model/Component/BuffComponent.cs
浏览文件 @
01ee3176
...
...
@@ -49,14 +49,12 @@ namespace Model
{
if
(
this
.
buffs
.
Contains
(
buff
))
{
throw
new
ArgumentException
(
string
.
Format
(
"already exist same buff, Id: {0} ConfigId: {1}"
,
buff
.
Id
,
buff
.
Config
.
Id
));
throw
new
ArgumentException
(
$"already exist same buff, Id:
{
buff
.
Id
}
ConfigId:
{
buff
.
Config
.
Id
}
"
);
}
if
(
this
.
idBuff
.
ContainsKey
(
buff
.
Id
))
{
throw
new
ArgumentException
(
string
.
Format
(
"already exist same buff, Id: {0} ConfigId: {1}"
,
buff
.
Id
,
buff
.
Config
.
Id
));
throw
new
ArgumentException
(
$"already exist same buff, Id:
{
buff
.
Id
}
ConfigId:
{
buff
.
Config
.
Id
}
"
);
}
Env
env
=
new
Env
();
...
...
CSharp/Game/Model/Component/ConfigComponent.cs
浏览文件 @
01ee3176
...
...
@@ -34,7 +34,7 @@ namespace Model
ICategory
iCategory
=
obj
as
ICategory
;
if
(
iCategory
==
null
)
{
throw
new
Exception
(
string
.
Format
(
"class: {0} not inherit from ACategory"
,
type
.
Name
)
);
throw
new
Exception
(
$"class:
{
type
.
Name
}
not inherit from ACategory"
);
}
iCategory
.
BeginInit
();
iCategory
.
EndInit
();
...
...
@@ -49,7 +49,7 @@ namespace Model
ICategory
configCategory
;
if
(!
this
.
allConfig
.
TryGetValue
(
type
,
out
configCategory
))
{
throw
new
KeyNotFoundException
(
string
.
Format
(
"ConfigComponent not found key: {0}"
,
type
.
FullName
)
);
throw
new
KeyNotFoundException
(
$"ConfigComponent not found key:
{
type
.
FullName
}
"
);
}
return
((
ACategory
<
T
>)
configCategory
)[
id
];
}
...
...
@@ -60,7 +60,7 @@ namespace Model
ICategory
configCategory
;
if
(!
this
.
allConfig
.
TryGetValue
(
type
,
out
configCategory
))
{
throw
new
KeyNotFoundException
(
string
.
Format
(
"ConfigComponent not found key: {0}"
,
type
.
FullName
)
);
throw
new
KeyNotFoundException
(
$"ConfigComponent not found key:
{
type
.
FullName
}
"
);
}
return
((
ACategory
<
T
>)
configCategory
).
GetAll
();
}
...
...
CSharp/Game/Model/Component/EventComponent.cs
浏览文件 @
01ee3176
...
...
@@ -36,8 +36,7 @@ namespace Model
object
obj
=
Activator
.
CreateInstance
(
t
);
if
(
obj
==
null
)
{
throw
new
Exception
(
string
.
Format
(
"event not inherit IEvent or IEventAsync interface: {0}"
,
obj
.
GetType
().
FullName
));
throw
new
Exception
(
$"event not inherit IEvent or IEventAsync interface:
{
obj
.
GetType
().
FullName
}
"
);
}
if
(!
this
.
allEvents
.
ContainsKey
(
aEventAttribute
.
Type
))
{
...
...
@@ -62,7 +61,7 @@ namespace Model
AEvent
iEvent
=
obj
as
AEvent
;
if
(
iEvent
==
null
)
{
throw
new
GameException
(
string
.
Format
(
"event type: {0} is not IEvent"
,
type
)
);
throw
new
GameException
(
$"event type:
{
type
}
is not IEvent"
);
}
iEvent
.
Run
();
await
iEvent
.
RunAsync
();
...
...
@@ -89,7 +88,7 @@ namespace Model
AEvent
<
A
>
iEvent
=
obj
as
AEvent
<
A
>;
if
(
iEvent
==
null
)
{
throw
new
GameException
(
string
.
Format
(
"event type: {0} is not IEvent<{1}>"
,
type
,
typeof
(
A
).
Name
)
);
throw
new
GameException
(
$"event type:
{
type
}
is not IEvent<
{
typeof
(
A
).
Name
}
>"
);
}
iEvent
.
Run
(
a
);
await
iEvent
.
RunAsync
(
a
);
...
...
@@ -116,7 +115,7 @@ namespace Model
AEvent
<
A
,
B
>
iEvent
=
obj
as
AEvent
<
A
,
B
>;
if
(
iEvent
==
null
)
{
throw
new
GameException
(
string
.
Format
(
"event type: {0} is not IEvent<{1}, {2}>"
,
type
,
typeof
(
A
).
Name
,
typeof
(
B
).
Name
)
);
throw
new
GameException
(
$"event type:
{
type
}
is not IEvent<
{
typeof
(
A
).
Name
}
,
{
typeof
(
B
).
Name
}
>"
);
}
iEvent
.
Run
(
a
,
b
);
await
iEvent
.
RunAsync
(
a
,
b
);
...
...
@@ -143,8 +142,7 @@ namespace Model
AEvent
<
A
,
B
,
C
>
iEvent
=
obj
as
AEvent
<
A
,
B
,
C
>;
if
(
iEvent
==
null
)
{
throw
new
GameException
(
string
.
Format
(
"event type: {0} is not IEvent<{1}, {2}, {3}>"
,
type
,
typeof
(
A
).
Name
,
typeof
(
B
).
Name
,
typeof
(
C
).
Name
));
throw
new
GameException
(
$"event type:
{
type
}
is not IEvent<
{
typeof
(
A
).
Name
}
,
{
typeof
(
B
).
Name
}
,
{
typeof
(
C
).
Name
}
>"
);
}
iEvent
.
Run
(
a
,
b
,
c
);
await
iEvent
.
RunAsync
(
a
,
b
,
c
);
...
...
@@ -171,8 +169,7 @@ namespace Model
AEvent
<
A
,
B
,
C
,
D
>
iEvent
=
obj
as
AEvent
<
A
,
B
,
C
,
D
>;
if
(
iEvent
==
null
)
{
throw
new
GameException
(
string
.
Format
(
"event type: {0} is not IEvent<{1}, {2}, {3}, {4}>"
,
type
,
typeof
(
A
).
Name
,
typeof
(
B
).
Name
,
typeof
(
C
).
Name
,
typeof
(
D
).
Name
));
throw
new
GameException
(
$"event type:
{
type
}
is not IEvent<
{
typeof
(
A
).
Name
}
,
{
typeof
(
B
).
Name
}
,
{
typeof
(
C
).
Name
}
,
{
typeof
(
D
).
Name
}
>"
);
}
iEvent
.
Run
(
a
,
b
,
c
,
d
);
await
iEvent
.
RunAsync
(
a
,
b
,
c
,
d
);
...
...
@@ -199,8 +196,8 @@ namespace Model
AEvent
<
A
,
B
,
C
,
D
,
E
>
iEvent
=
obj
as
AEvent
<
A
,
B
,
C
,
D
,
E
>;
if
(
iEvent
==
null
)
{
throw
new
GameException
(
string
.
Format
(
"event type: {0} is not IEvent<{1}, {2}, {3}, {4}, {5}>"
,
type
,
typeof
(
A
).
Name
,
typeof
(
B
).
Name
,
typeof
(
C
).
Name
,
typeof
(
D
).
Name
,
typeof
(
E
).
Name
)
);
throw
new
GameException
(
$"event type:
{
type
}
is not IEvent<
{
typeof
(
A
).
Name
}
,
{
typeof
(
B
).
Name
}
,
{
typeof
(
C
).
Name
}
,
{
typeof
(
D
).
Name
}
,
{
typeof
(
E
).
Name
}
>"
);
}
iEvent
.
Run
(
a
,
b
,
c
,
d
,
e
);
await
iEvent
.
RunAsync
(
a
,
b
,
c
,
d
,
e
);
...
...
CSharp/Game/Model/Component/FactoryComponent.cs
浏览文件 @
01ee3176
...
...
@@ -32,7 +32,7 @@ namespace Model
var
iFactory
=
obj
as
IFactory
<
T
>;
if
(
iFactory
==
null
)
{
throw
new
Exception
(
string
.
Format
(
"class: {0} not inherit from IFactory"
,
type
.
Name
)
);
throw
new
Exception
(
$"class:
{
type
.
Name
}
not inherit from IFactory"
);
}
this
.
allConfig
[
attribute
.
Type
]
=
iFactory
;
...
...
CSharp/Game/Model/Component/MessageComponent.cs
浏览文件 @
01ee3176
...
...
@@ -37,14 +37,9 @@ namespace Model
object
obj
=
Activator
.
CreateInstance
(
t
);
IRegister
iRegister
=
obj
as
IRegister
;
if
(
iRegister
!=
null
)
{
iRegister
.
Register
();
}
iRegister
?.
Register
();
throw
new
Exception
(
string
.
Format
(
"message handler not inherit IRegister interface: {0}"
,
obj
.
GetType
().
FullName
));
throw
new
Exception
(
$"message handler not inherit IRegister interface:
{
obj
.
GetType
().
FullName
}
"
);
}
}
...
...
@@ -72,7 +67,7 @@ namespace Model
{
return
await
funcAsync
(
messageBytes
);
}
throw
new
GameException
(
string
.
Format
(
"not found opcode handler: {0}"
,
opcode
)
);
throw
new
GameException
(
$"not found opcode handler:
{
opcode
}
"
);
}
}
}
\ No newline at end of file
CSharp/Game/Model/Component/NetworkComponent.cs
浏览文件 @
01ee3176
...
...
@@ -179,8 +179,7 @@ namespace Model
switch
(
status
)
{
case
RpcResponseStatus
.
Timeout
:
tcs
.
SetException
(
new
Exception
(
string
.
Format
(
"rpc timeout {0} {1}"
,
opcode
,
MongoHelper
.
ToJson
(
request
))));
tcs
.
SetException
(
new
Exception
(
$"rpc timeout
{
opcode
}
{
MongoHelper
.
ToJson
(
request
)}
"
));
return
;
case
RpcResponseStatus
.
Exception
:
BinaryFormatter
formatter
=
new
BinaryFormatter
(
null
,
new
StreamingContext
(
StreamingContextStates
.
All
));
...
...
CSharp/Game/Model/Model.csproj
浏览文件 @
01ee3176
...
...
@@ -9,7 +9,7 @@
<AppDesignerFolder>
Properties
</AppDesignerFolder>
<RootNamespace>
Model
</RootNamespace>
<AssemblyName>
Model
</AssemblyName>
<TargetFrameworkVersion>
v4.
5.2
</TargetFrameworkVersion>
<TargetFrameworkVersion>
v4.
6
</TargetFrameworkVersion>
<FileAlignment>
512
</FileAlignment>
<TargetFrameworkProfile
/>
</PropertyGroup>
...
...
CSharp/Platform/Common/Base/Entity.cs
浏览文件 @
01ee3176
...
...
@@ -34,9 +34,7 @@ namespace Common.Base
if
(
this
.
componentDict
.
ContainsKey
(
component
.
GetComponentType
()))
{
throw
new
Exception
(
string
.
Format
(
"AddComponent, component already exist, id: {0}, component: {1}"
,
this
.
Id
,
typeof
(
K
).
Name
));
throw
new
Exception
(
$"AddComponent, component already exist, id:
{
this
.
Id
}
, component:
{
typeof
(
K
).
Name
}
"
);
}
if
(
this
.
components
==
null
)
...
...
@@ -53,9 +51,7 @@ namespace Common.Base
{
if
(
this
.
componentDict
.
ContainsKey
(
component
.
GetComponentType
()))
{
throw
new
Exception
(
string
.
Format
(
"AddComponent, component already exist, id: {0}, component: {1}"
,
this
.
Id
,
component
.
GetComponentType
().
Name
));
throw
new
Exception
(
$"AddComponent, component already exist, id:
{
this
.
Id
}
, component:
{
component
.
GetComponentType
().
Name
}
"
);
}
if
(
this
.
components
==
null
)
...
...
@@ -71,9 +67,7 @@ namespace Common.Base
Component
<
T
>
component
;
if
(!
this
.
componentDict
.
TryGetValue
(
typeof
(
K
),
out
component
))
{
throw
new
Exception
(
string
.
Format
(
"RemoveComponent, component not exist, id: {0}, component: {1}"
,
this
.
Id
,
typeof
(
K
).
Name
));
throw
new
Exception
(
$"RemoveComponent, component not exist, id:
{
this
.
Id
}
, component:
{
typeof
(
K
).
Name
}
"
);
}
this
.
components
.
Remove
(
component
);
...
...
CSharp/Platform/Common/Common.csproj
浏览文件 @
01ee3176
...
...
@@ -9,7 +9,7 @@
<AppDesignerFolder>
Properties
</AppDesignerFolder>
<RootNamespace>
Common
</RootNamespace>
<AssemblyName>
Common
</AssemblyName>
<TargetFrameworkVersion>
v4.
5.2
</TargetFrameworkVersion>
<TargetFrameworkVersion>
v4.
6
</TargetFrameworkVersion>
<FileAlignment>
512
</FileAlignment>
<TargetFrameworkProfile
/>
</PropertyGroup>
...
...
CSharp/Platform/Common/Helper/LoaderHelper.cs
浏览文件 @
01ee3176
...
...
@@ -10,7 +10,7 @@ namespace Common.Helper
{
if
(!
File
.
Exists
(
path
))
{
throw
new
Exception
(
string
.
Format
(
"not found path, path: {0}"
,
path
)
);
throw
new
Exception
(
$"not found path, path:
{
path
}
"
);
}
byte
[]
buffer
=
File
.
ReadAllBytes
(
path
);
Assembly
assembly
=
Assembly
.
Load
(
buffer
);
...
...
CSharp/Platform/Common/Helper/StringHelper.cs
浏览文件 @
01ee3176
...
...
@@ -23,8 +23,7 @@ namespace Common.Helper
{
if
(
hexString
.
Length
%
2
!=
0
)
{
throw
new
ArgumentException
(
String
.
Format
(
CultureInfo
.
InvariantCulture
,
"The binary key cannot have an odd number of digits: {0}"
,
hexString
));
throw
new
ArgumentException
(
$"The binary key cannot have an odd number of digits:
{
hexString
}
"
);
}
var
hexAsBytes
=
new
byte
[
hexString
.
Length
/
2
];
...
...
CSharp/Platform/TNet/TBuffer.cs
浏览文件 @
01ee3176
...
...
@@ -68,8 +68,7 @@ namespace TNet
{
if
(
this
.
Count
<
buffer
.
Length
||
buffer
.
Length
==
0
)
{
throw
new
Exception
(
string
.
Format
(
"bufferList size < n, bufferList: {0} buffer length: {1}"
,
this
.
Count
,
buffer
.
Length
));
throw
new
Exception
(
$"bufferList size < n, bufferList:
{
this
.
Count
}
buffer length:
{
buffer
.
Length
}
"
);
}
int
alreadyCopyCount
=
0
;
while
(
alreadyCopyCount
<
buffer
.
Length
)
...
...
CSharp/Platform/TNet/TNet.csproj
浏览文件 @
01ee3176
...
...
@@ -9,7 +9,7 @@
<AppDesignerFolder>
Properties
</AppDesignerFolder>
<RootNamespace>
TNet
</RootNamespace>
<AssemblyName>
TNet
</AssemblyName>
<TargetFrameworkVersion>
v4.
5.2
</TargetFrameworkVersion>
<TargetFrameworkVersion>
v4.
6
</TargetFrameworkVersion>
<FileAlignment>
512
</FileAlignment>
<TargetFrameworkProfile
/>
</PropertyGroup>
...
...
CSharp/Platform/TNet/TService.cs
浏览文件 @
01ee3176
...
...
@@ -86,7 +86,7 @@ namespace TNet
{
if
(
this
.
acceptor
==
null
)
{
throw
new
Exception
(
string
.
Format
(
"service construct must use host and port param"
)
);
throw
new
Exception
(
"service construct must use host and port param"
);
}
TSocket
socket
=
new
TSocket
(
this
.
poller
);
await
this
.
acceptor
.
AcceptAsync
(
socket
);
...
...
CSharp/Platform/TNet/TSocket.cs
浏览文件 @
01ee3176
...
...
@@ -126,7 +126,7 @@ namespace TNet
e
.
UserToken
=
null
;
if
(
e
.
SocketError
!=
SocketError
.
Success
)
{
tcs
.
SetException
(
new
Exception
(
string
.
Format
(
"socket error: {0}"
,
e
.
SocketError
)
));
tcs
.
SetException
(
new
Exception
(
$"socket error:
{
e
.
SocketError
}
"
));
return
;
}
tcs
.
SetResult
(
true
);
...
...
@@ -150,7 +150,7 @@ namespace TNet
e
.
UserToken
=
null
;
if
(
e
.
SocketError
!=
SocketError
.
Success
)
{
tcs
.
SetException
(
new
Exception
(
string
.
Format
(
"socket error: {0}"
,
e
.
SocketError
)
));
tcs
.
SetException
(
new
Exception
(
$"socket error:
{
e
.
SocketError
}
"
));
return
;
}
tcs
.
SetResult
(
true
);
...
...
@@ -174,7 +174,7 @@ namespace TNet
e
.
UserToken
=
null
;
if
(
e
.
SocketError
!=
SocketError
.
Success
)
{
tcs
.
SetException
(
new
Exception
(
string
.
Format
(
"socket error: {0}"
,
e
.
SocketError
)
));
tcs
.
SetException
(
new
Exception
(
$"socket error:
{
e
.
SocketError
}
"
));
return
;
}
tcs
.
SetResult
(
e
.
BytesTransferred
);
...
...
@@ -198,7 +198,7 @@ namespace TNet
e
.
UserToken
=
null
;
if
(
e
.
SocketError
!=
SocketError
.
Success
)
{
tcs
.
SetException
(
new
Exception
(
string
.
Format
(
"socket error: {0}"
,
e
.
SocketError
)
));
tcs
.
SetException
(
new
Exception
(
$"socket error:
{
e
.
SocketError
}
"
));
return
;
}
tcs
.
SetResult
(
e
.
BytesTransferred
);
...
...
@@ -221,7 +221,7 @@ namespace TNet
e
.
UserToken
=
null
;
if
(
e
.
SocketError
!=
SocketError
.
Success
)
{
tcs
.
SetException
(
new
Exception
(
string
.
Format
(
"socket error: {0}"
,
e
.
SocketError
)
));
tcs
.
SetException
(
new
Exception
(
$"socket error:
{
e
.
SocketError
}
"
));
return
;
}
tcs
.
SetResult
(
true
);
...
...
CSharp/Platform/UNet/Library.cs
浏览文件 @
01ee3176
...
...
@@ -7,7 +7,7 @@
int
ret
=
NativeMethods
.
ENetInitialize
();
if
(
ret
<
0
)
{
throw
new
UException
(
string
.
Format
(
"Initialization failed, ret: {0}"
,
ret
)
);
throw
new
UException
(
$"Initialization failed, ret:
{
ret
}
"
);
}
}
...
...
CSharp/Platform/UNet/UNet.csproj
浏览文件 @
01ee3176
...
...
@@ -9,7 +9,7 @@
<AppDesignerFolder>
Properties
</AppDesignerFolder>
<RootNamespace>
UNet
</RootNamespace>
<AssemblyName>
UNet
</AssemblyName>
<TargetFrameworkVersion>
v4.
5.2
</TargetFrameworkVersion>
<TargetFrameworkVersion>
v4.
6
</TargetFrameworkVersion>
<FileAlignment>
512
</FileAlignment>
<TargetFrameworkProfile
/>
</PropertyGroup>
...
...
CSharp/Test/ModelTest/ModelTest.csproj
浏览文件 @
01ee3176
...
...
@@ -9,7 +9,7 @@
<AppDesignerFolder>
Properties
</AppDesignerFolder>
<RootNamespace>
ModelTest
</RootNamespace>
<AssemblyName>
ModelTest
</AssemblyName>
<TargetFrameworkVersion>
v4.
5.2
</TargetFrameworkVersion>
<TargetFrameworkVersion>
v4.
6
</TargetFrameworkVersion>
<FileAlignment>
512
</FileAlignment>
<TargetFrameworkProfile
/>
</PropertyGroup>
...
...
CSharp/Test/TNetTest/TNetTest.csproj
浏览文件 @
01ee3176
...
...
@@ -9,7 +9,7 @@
<AppDesignerFolder>
Properties
</AppDesignerFolder>
<RootNamespace>
TNetTest
</RootNamespace>
<AssemblyName>
TNetTest
</AssemblyName>
<TargetFrameworkVersion>
v4.
5.2
</TargetFrameworkVersion>
<TargetFrameworkVersion>
v4.
6
</TargetFrameworkVersion>
<FileAlignment>
512
</FileAlignment>
<TargetFrameworkProfile
/>
</PropertyGroup>
...
...
CSharp/Test/UNetTest/UNetTest.csproj
浏览文件 @
01ee3176
...
...
@@ -9,7 +9,7 @@
<AppDesignerFolder>
Properties
</AppDesignerFolder>
<RootNamespace>
UNetTest
</RootNamespace>
<AssemblyName>
UNetTest
</AssemblyName>
<TargetFrameworkVersion>
v4.
5.2
</TargetFrameworkVersion>
<TargetFrameworkVersion>
v4.
6
</TargetFrameworkVersion>
<FileAlignment>
512
</FileAlignment>
<TargetFrameworkProfile
/>
</PropertyGroup>
...
...
CSharp/ThirdParty/Nuget/Nuget.csproj
浏览文件 @
01ee3176
...
...
@@ -9,7 +9,7 @@
<AppDesignerFolder>
Properties
</AppDesignerFolder>
<RootNamespace>
Nuget
</RootNamespace>
<AssemblyName>
Nuget
</AssemblyName>
<TargetFrameworkVersion>
v4.
5.2
</TargetFrameworkVersion>
<TargetFrameworkVersion>
v4.
6
</TargetFrameworkVersion>
<FileAlignment>
512
</FileAlignment>
<SolutionDir
Condition=
"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'"
>
..\..\
</SolutionDir>
<RestorePackages>
true
</RestorePackages>
...
...
CSharp/ThirdParty/Nuget/app.config
浏览文件 @
01ee3176
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
configuration
>
<
runtime
>
<
assemblyBinding
xmlns
=
"urn:schemas-microsoft-com:asm.v1"
>
<
dependentAssembly
>
<
assemblyIdentity
name
=
"Microsoft.Practices.ServiceLocation"
publicKeyToken
=
"31bf3856ad364e35"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-1.3.0.0"
newVersion
=
"1.3.0.0"
/>
<
assemblyIdentity
name
=
"Microsoft.Practices.ServiceLocation"
publicKeyToken
=
"31bf3856ad364e35"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-1.3.0.0"
newVersion
=
"1.3.0.0"
/>
</
dependentAssembly
>
<
dependentAssembly
>
<
assemblyIdentity
name
=
"Microsoft.Practices.Prism.PubSubEvents"
publicKeyToken
=
"31bf3856ad364e35"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-1.1.0.0"
newVersion
=
"1.1.0.0"
/>
<
assemblyIdentity
name
=
"Microsoft.Practices.Prism.PubSubEvents"
publicKeyToken
=
"31bf3856ad364e35"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-1.1.0.0"
newVersion
=
"1.1.0.0"
/>
</
dependentAssembly
>
<
dependentAssembly
>
<
assemblyIdentity
name
=
"Microsoft.Practices.Prism.SharedInterfaces"
publicKeyToken
=
"31bf3856ad364e35"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-1.1.1.0"
newVersion
=
"1.1.1.0"
/>
<
assemblyIdentity
name
=
"Microsoft.Practices.Prism.SharedInterfaces"
publicKeyToken
=
"31bf3856ad364e35"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-1.1.1.0"
newVersion
=
"1.1.1.0"
/>
</
dependentAssembly
>
</
assemblyBinding
>
</
runtime
>
<
startup
><
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.
5.2"
/></
startup
></
configuration
>
<
startup
><
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.
6"
/></
startup
></
configuration
>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录