Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
VIZ.Framework
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘龙飞
VIZ.Framework
Commits
9a45852d
Commit
9a45852d
authored
Mar 22, 2023
by
liulongfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
扩展更新
parent
12108025
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
2 deletions
+46
-2
VIZ.Framework.Core/Core/Message/MessageManager.cs
+2
-2
VIZ.Framework.Core/Core/Xml/XmlExpand.cs
+43
-0
VIZ.Framework.Core/VIZ.Framework.Core.csproj
+1
-0
No files found.
VIZ.Framework.Core/Core/Message/MessageManager.cs
View file @
9a45852d
...
...
@@ -85,9 +85,9 @@ namespace VIZ.Framework.Core
if
(
message
==
null
)
return
;
for
each
(
IMessageInfo
i
in
this
.
list
)
for
(
int
i
=
0
;
i
<
this
.
list
.
Count
;
i
++
)
{
MessageInfo
<
T
>
info
=
i
as
MessageInfo
<
T
>;
MessageInfo
<
T
>
info
=
this
.
list
[
i
]
as
MessageInfo
<
T
>;
if
(
info
==
null
)
continue
;
...
...
VIZ.Framework.Core/Core/Xml/XmlExpand.cs
0 → 100644
View file @
9a45852d
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Xml.Linq
;
namespace
VIZ.Framework.Core
{
/// <summary>
/// XML扩展
/// </summary>
public
static
class
XmlExpand
{
/// <summary>
/// 当值不为空时设置Attribute
/// </summary>
/// <param name="element">元素</param>
/// <param name="name">字段名称</param>
/// <param name="value">字段值</param>
public
static
void
SetAttributeValueIfValueNotNull
(
this
XElement
element
,
XName
name
,
object
value
)
{
if
(
value
==
null
)
return
;
element
.
SetAttributeValue
(
name
,
value
);
}
/// <summary>
/// 当值不为空时设置Attribute
/// </summary>
/// <param name="element">元素</param>
/// <param name="name">字段名称</param>
/// <param name="value">字段值</param>
public
static
void
SetAttributeValueIfValueNotNull
(
this
XElement
element
,
XName
name
,
string
value
)
{
if
(
string
.
IsNullOrWhiteSpace
(
value
))
return
;
element
.
SetAttributeValue
(
name
,
value
);
}
}
}
VIZ.Framework.Core/VIZ.Framework.Core.csproj
View file @
9a45852d
...
...
@@ -159,6 +159,7 @@
<Compile Include="Core\VIZ\Engine\VizEngineModel.cs" />
<Compile Include="Core\VIZ\Engine\VizEngineModelCommandExpand.cs" />
<Compile Include="Core\Win32\Win32Helper.cs" />
<Compile Include="Core\Xml\XmlExpand.cs" />
<Compile Include="Expand\GPIO\Core\USB2GPIO.cs" />
<Compile Include="Expand\GPIO\Core\USBDevice.cs" />
<Compile Include="Expand\GPIO\Core\USBDeviceStruct.cs" />
...
...
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