Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
Thick-Common
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
潘栩锋
Thick-Common
Commits
8778f464
Commit
8778f464
authored
Jun 10, 2020
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加 FObjBase.Reflect
parent
9c59bf6a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
925 additions
and
0 deletions
+925
-0
CallAttribute.cs
Project.FLY.FObjSys/FObjBaseReflect/CallAttribute.cs
+54
-0
FObjBase.Reflect.csproj
Project.FLY.FObjSys/FObjBaseReflect/FObjBase.Reflect.csproj
+66
-0
AssemblyInfo.cs
...ct.FLY.FObjSys/FObjBaseReflect/Properties/AssemblyInfo.cs
+36
-0
Reflect_OBJ_INTERFACE.cs
Project.FLY.FObjSys/FObjBaseReflect/Reflect_OBJ_INTERFACE.cs
+28
-0
Reflect_Proxy.cs
Project.FLY.FObjSys/FObjBaseReflect/Reflect_Proxy.cs
+342
-0
Reflect_SeviceClient.cs
Project.FLY.FObjSys/FObjBaseReflect/Reflect_SeviceClient.cs
+399
-0
No files found.
Project.FLY.FObjSys/FObjBaseReflect/CallAttribute.cs
0 → 100644
View file @
8778f464
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
FObjBase.Reflect
{
/// <summary>
/// 注册 event 返回类型;
/// 客户端,默认使用 Trigger_xxxx(xxxx为event名称),作为触发事件的函数,该函数的参数类型就是EventArgsType;
/// </summary>
public
class
PushAttribute
:
Attribute
{
public
Type
EventArgsType
;
public
string
TriggerName
;
public
PushAttribute
(
Type
eventArgsType
)
{
EventArgsType
=
eventArgsType
;
}
public
PushAttribute
(
Type
eventArgsType
,
string
triggerName
)
{
EventArgsType
=
eventArgsType
;
TriggerName
=
triggerName
;
}
}
/// <summary>
/// 注册远程调用返回类型
/// </summary>
public
class
CallAttribute
:
Attribute
{
public
Type
ReponseType
;
public
CallAttribute
()
{
}
public
CallAttribute
(
Type
reponseType
)
{
ReponseType
=
reponseType
;
}
}
/// <summary>
/// 注册 它的PropertyChanged 事件,且枚举它的子属性,
/// 找到[PropertyPush] 递归 注册下去
/// </summary>
public
class
PropertyPushAttribute
:
Attribute
{
}
}
Project.FLY.FObjSys/FObjBaseReflect/FObjBase.Reflect.csproj
0 → 100644
View file @
8778f464
<?xml version="1.0" encoding="utf-8"?>
<Project
ToolsVersion=
"15.0"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<Import
Project=
"$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props"
Condition=
"Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')"
/>
<PropertyGroup>
<Configuration
Condition=
" '$(Configuration)' == '' "
>
Debug
</Configuration>
<Platform
Condition=
" '$(Platform)' == '' "
>
AnyCPU
</Platform>
<ProjectGuid>
{15F40C32-D546-4B2A-8D80-B3DDBCDAA690}
</ProjectGuid>
<OutputType>
Library
</OutputType>
<AppDesignerFolder>
Properties
</AppDesignerFolder>
<RootNamespace>
FObjBase.Reflect
</RootNamespace>
<AssemblyName>
FObjBase.Reflect
</AssemblyName>
<TargetFrameworkVersion>
v4.6.1
</TargetFrameworkVersion>
<FileAlignment>
512
</FileAlignment>
<Deterministic>
true
</Deterministic>
</PropertyGroup>
<PropertyGroup
Condition=
" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "
>
<DebugSymbols>
true
</DebugSymbols>
<DebugType>
full
</DebugType>
<Optimize>
false
</Optimize>
<OutputPath>
bin\Debug\
</OutputPath>
<DefineConstants>
DEBUG;TRACE
</DefineConstants>
<ErrorReport>
prompt
</ErrorReport>
<WarningLevel>
4
</WarningLevel>
</PropertyGroup>
<PropertyGroup
Condition=
" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "
>
<DebugType>
pdbonly
</DebugType>
<Optimize>
true
</Optimize>
<OutputPath>
bin\Release\
</OutputPath>
<DefineConstants>
TRACE
</DefineConstants>
<ErrorReport>
prompt
</ErrorReport>
<WarningLevel>
4
</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference
Include=
"System"
/>
<Reference
Include=
"System.Core"
/>
<Reference
Include=
"System.Xml.Linq"
/>
<Reference
Include=
"System.Data.DataSetExtensions"
/>
<Reference
Include=
"Microsoft.CSharp"
/>
<Reference
Include=
"System.Data"
/>
<Reference
Include=
"System.Net.Http"
/>
<Reference
Include=
"System.Xml"
/>
</ItemGroup>
<ItemGroup>
<Compile
Include=
"CallAttribute.cs"
/>
<Compile
Include=
"Reflect_OBJ_INTERFACE.cs"
/>
<Compile
Include=
"Properties\AssemblyInfo.cs"
/>
<Compile
Include=
"Reflect_Proxy.cs"
/>
<Compile
Include=
"Reflect_SeviceClient.cs"
/>
</ItemGroup>
<ItemGroup>
<PackageReference
Include=
"Newtonsoft.Json"
>
<Version>
12.0.3
</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference
Include=
"..\FObjSys\FObjBase.csproj"
>
<Project>
{abfe87d4-b692-4ae9-a8c0-1f470b8acbb8}
</Project>
<Name>
FObjBase
</Name>
</ProjectReference>
<ProjectReference
Include=
"..\..\Project.FLY.Misc\MISC\Misc.csproj"
>
<Project>
{5ee61ac6-5269-4f0f-b8fa-4334fe4a678f}
</Project>
<Name>
Misc
</Name>
</ProjectReference>
</ItemGroup>
<Import
Project=
"$(MSBuildToolsPath)\Microsoft.CSharp.targets"
/>
</Project>
\ No newline at end of file
Project.FLY.FObjSys/FObjBaseReflect/Properties/AssemblyInfo.cs
0 → 100644
View file @
8778f464
using
System.Reflection
;
using
System.Runtime.CompilerServices
;
using
System.Runtime.InteropServices
;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("FObjBaseReflect")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("FObjBaseReflect")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("15f40c32-d546-4b2a-8d80-b3ddbcdaa690")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
Project.FLY.FObjSys/FObjBaseReflect/Reflect_OBJ_INTERFACE.cs
0 → 100644
View file @
8778f464
using
Newtonsoft.Json.Linq
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
FObjBase.Reflect
{
public
class
Reflect_OBJ_INTERFACE
{
#
region
Push
public
const
UInt16
PUSH_Event
=
101
;
public
const
UInt16
PUSH_PropertyChanged
=
102
;
#
endregion
#
region
CallFunction
public
const
UInt16
CALL_GetAllProperties
=
100
;
public
const
UInt16
CALL_SetProperty
=
101
;
public
const
UInt16
CALL_MethodInvoke
=
102
;
#
endregion
public
class
ReflectData
{
public
string
name
;
public
JToken
data
;
}
}
}
Project.FLY.FObjSys/FObjBaseReflect/Reflect_Proxy.cs
0 → 100644
View file @
8778f464
This diff is collapsed.
Click to expand it.
Project.FLY.FObjSys/FObjBaseReflect/Reflect_SeviceClient.cs
0 → 100644
View file @
8778f464
This diff is collapsed.
Click to expand it.
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