-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathExtensions.cs
More file actions
23 lines (20 loc) · 715 Bytes
/
Extensions.cs
File metadata and controls
23 lines (20 loc) · 715 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Website: https://www.blazor.zone or https://argozhang.github.io/
namespace BootstrapBlazor.OpcDa;
/// <summary>
/// 扩展方法类
/// </summary>
internal static class Extensions
{
public static Quality ToQuality(this Opc.Da.Quality quality)
{
return quality.QualityBits == Opc.Da.qualityBits.good
? Quality.Good
: Quality.Bad;
}
public static ISubscription ToOpcSubscription(this Opc.Da.ISubscription subscription)
{
return new OpcSubscription(subscription);
}
}