本文整理汇总了C#中ILocalNode类的典型用法代码示例。如果您正苦于以下问题:C# ILocalNode类的具体用法?C# ILocalNode怎么用?C# ILocalNode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ILocalNode类属于命名空间,在下文中一共展示了ILocalNode类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Copy
/// <summary>
/// Returns a copy of the node
/// </summary>
/// <param name="source">The source.</param>
/// <returns>A copy of the source node</returns>
public static Node Copy(ILocalNode source)
{
if (source == null)
{
return null;
}
switch (source.NodeClass)
{
case NodeClass.Object: return new ObjectNode(source);
case NodeClass.Variable: return new VariableNode(source);
case NodeClass.ObjectType: return new ObjectTypeNode(source);
case NodeClass.VariableType: return new VariableTypeNode(source);
case NodeClass.DataType: return new DataTypeNode(source);
case NodeClass.ReferenceType: return new ReferenceTypeNode(source);
case NodeClass.Method: return new MethodNode(source);
case NodeClass.View: return new ViewNode(source);
}
if (source is IObject) return new ObjectNode(source);
if (source is IVariable) return new VariableNode(source);
if (source is IObjectType) return new ObjectTypeNode(source);
if (source is IVariableType) return new VariableTypeNode(source);
if (source is IDataType) return new DataTypeNode(source);
if (source is IReferenceType) return new ReferenceTypeNode(source);
if (source is IMethod) return new MethodNode(source);
if (source is IView) return new ViewNode(source);
return new Node(source);
}
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:35,代码来源:Node.cs
示例2: DefaultObjectLookup
public DefaultObjectLookup(
ILocalNode localNode,
IObjectStorage objectStorage,
IClientLookup clientLookup,
IMessageConstructor messageConstructor,
IMessageSideChannel messageSideChannel)
{
this.m_LocalNode = localNode;
this.m_ObjectStorage = objectStorage;
this.m_ClientLookup = clientLookup;
this.m_MessageConstructor = messageConstructor;
this.m_MessageSideChannel = messageSideChannel;
}
开发者ID:hach-que,项目名称:Dx,代码行数:13,代码来源:DefaultObjectLookup.cs
示例3: SetPropertyMessageHandler
public SetPropertyMessageHandler(
ILocalNode localNode,
IObjectStorage objectStorage,
IObjectWithTypeSerializer objectWithTypeSerializer,
IMessageConstructor messageConstructor,
IClientLookup clientLookup)
{
this.m_LocalNode = localNode;
this.m_ObjectStorage = objectStorage;
this.m_ObjectWithTypeSerializer = objectWithTypeSerializer;
this.m_MessageConstructor = messageConstructor;
this.m_ClientLookup = clientLookup;
}
开发者ID:hach-que,项目名称:Dx,代码行数:13,代码来源:SetPropertyMessageHandler.cs
示例4: Node
/// <summary>
/// Creates a node from another node (copies attributes - not references).
/// </summary>
/// <param name="source">The source.</param>
public Node(ILocalNode source)
{
Initialize();
if (source != null)
{
this.NodeId = source.NodeId;
this.NodeClass = source.NodeClass;
this.BrowseName = source.BrowseName;
this.DisplayName = source.DisplayName;
this.Description = source.Description;
this.WriteMask = (uint)source.WriteMask;
this.UserWriteMask = (uint)source.UserWriteMask;
}
}
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:19,代码来源:Node.cs
示例5: Apply
public static void Apply(object result, ILocalNode localNode)
{
if (result != null)
{
if (result is ITransparent)
(result as ITransparent).Node = localNode;
else if (result.GetType().IsArray)
{
if (typeof(ITransparent).IsAssignableFrom(result.GetType().GetElementType()))
{
foreach (var elem in (IEnumerable)result)
{
if (elem != null)
(elem as ITransparent).Node = localNode;
}
}
else if (!result.GetType().GetElementType().IsValueType && result.GetType() != typeof(string))
throw new InvalidOperationException("Unable to assign local node to result data for " + result.GetType().GetElementType().FullName);
}
else if (!result.GetType().IsValueType && result.GetType() != typeof(string))
throw new InvalidOperationException("Unable to assign local node to result data for " + result.GetType().FullName);
}
}
开发者ID:hach-que,项目名称:Dx,代码行数:23,代码来源:GraphWalker.cs
示例6: GetTargetNode
private ILocalNode GetTargetNode(
ILocalNode source,
NodeId referenceTypeId,
bool isInverse,
bool includeSubtypes,
QualifiedName browseName)
{
return null;
}
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:9,代码来源:DiagnosticsNodeManager.cs
示例7: VariableNode
/// <summary>
/// Creates a node from another node (copies attributes - not references).
/// </summary>
/// <param name="source">The source.</param>
public VariableNode(ILocalNode source) : base(source)
{
this.NodeClass = NodeClass.Variable;
IVariable variable = source as IVariable;
if (variable != null)
{
this.DataType = variable.DataType;
this.ValueRank = variable.ValueRank;
this.AccessLevel = variable.AccessLevel;
this.UserAccessLevel = variable.UserAccessLevel;
this.MinimumSamplingInterval = variable.MinimumSamplingInterval;
this.Historizing = variable.Historizing;
object value = variable.Value;
if (value == null)
{
value = TypeInfo.GetDefaultValue(variable.DataType, variable.ValueRank);
}
this.Value = new Variant(value);
if (variable.ArrayDimensions != null)
{
this.ArrayDimensions = new UInt32Collection(variable.ArrayDimensions);
}
}
}
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:34,代码来源:Node.cs
示例8: ObjectNode
/// <summary>
/// Creates a node from another node (copies attributes - not references).
/// </summary>
/// <param name="source">The source.</param>
public ObjectNode(ILocalNode source) : base(source)
{
this.NodeClass = NodeClass.Object;
IObject node = source as IObject;
if (node != null)
{
this.EventNotifier = node.EventNotifier;
}
}
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:15,代码来源:Node.cs
示例9: GetSynchronisationStore
public SynchronisationStore GetSynchronisationStore(ILocalNode node, string name)
{
if (this.m_SyncStore == null)
this.m_SyncStore = new Distributed<PreprocessedSyncTest_SynchronisedStore>(node, name);
return this.m_SyncStore;
}
开发者ID:hach-que,项目名称:Dx,代码行数:6,代码来源:PreprocessedSynchronisedStore.cs
示例10: ReadEURange
/// <summary>
/// Reads the EU Range for a variable.
/// </summary>
private ServiceResult ReadEURange(OperationContext context, ILocalNode node, out Range range)
{
range = null;
IVariable target = GetTargetNode(node, ReferenceTypes.HasProperty, false, true, BrowseNames.EURange) as IVariable;
if (target == null)
{
return StatusCodes.BadNodeIdUnknown;
}
range = target.Value as Range;
if (range == null)
{
return StatusCodes.BadTypeMismatch;
}
return ServiceResult.Good;
}
开发者ID:OPCFoundation,项目名称:UA-.NETStandardLibrary,代码行数:23,代码来源:CoreNodeManager.cs
示例11: UnreferenceSharedNode
public ILocalNode UnreferenceSharedNode(
ILocalNode source,
NodeId referenceTypeId,
bool isInverse,
QualifiedName browseName)
{
return null;
}
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:8,代码来源:DiagnosticsNodeManager.cs
示例12: ObjectTypeNode
/// <summary>
/// Creates a node from another node (copies attributes - not references).
/// </summary>
/// <param name="source">The source.</param>
public ObjectTypeNode(ILocalNode source) : base(source)
{
this.NodeClass = NodeClass.ObjectType;
IObjectType node = source as IObjectType;
if (node != null)
{
this.IsAbstract = node.IsAbstract;
}
}
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:15,代码来源:Node.cs
示例13: ViewNode
/// <summary>
/// Creates a node from another node (copies attributes - not references).
/// </summary>
/// <param name="source">The source.</param>
public ViewNode(ILocalNode source) : base(source)
{
this.NodeClass = NodeClass.View;
IView node = source as IView;
if (node != null)
{
this.EventNotifier = node.EventNotifier;
this.ContainsNoLoops = node.ContainsNoLoops;
}
}
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:16,代码来源:Node.cs
示例14: DataTypeNode
/// <summary>
/// Creates a node from another node (copies attributes - not references).
/// </summary>
/// <param name="source">The source.</param>
public DataTypeNode(ILocalNode source) : base(source)
{
this.NodeClass = NodeClass.DataType;
IDataType node = source as IDataType;
if (node != null)
{
this.IsAbstract = node.IsAbstract;
}
}
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:15,代码来源:Node.cs
示例15: MethodNode
/// <summary>
/// Creates a node from another node (copies attributes - not references).
/// </summary>
/// <param name="source">The source.</param>
public MethodNode(ILocalNode source) : base(source)
{
this.NodeClass = NodeClass.Method;
IMethod node = source as IMethod;
if (node != null)
{
this.Executable = node.Executable;
this.UserExecutable = node.UserExecutable;
}
}
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:16,代码来源:Node.cs
示例16: ReferenceTypeNode
/// <summary>
/// Creates a node from another node (copies attributes - not references).
/// </summary>
/// <param name="source">The source.</param>
public ReferenceTypeNode(ILocalNode source) : base(source)
{
this.NodeClass = NodeClass.ReferenceType;
IReferenceType node = source as IReferenceType;
if (node != null)
{
this.IsAbstract = node.IsAbstract;
this.InverseName = node.InverseName;
this.Symmetric = node.Symmetric;
}
}
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:17,代码来源:Node.cs
示例17: VariableTypeNode
/// <summary>
/// Creates a node from another node (copies attributes - not references).
/// </summary>
/// <param name="source">The source.</param>
public VariableTypeNode(ILocalNode source) : base(source)
{
this.NodeClass = NodeClass.VariableType;
IVariableType node = source as IVariableType;
if (node != null)
{
this.IsAbstract = node.IsAbstract;
this.Value = new Variant(node.Value);
this.DataType = node.DataType;
this.ValueRank = node.ValueRank;
if (node.ArrayDimensions != null)
{
this.ArrayDimensions = new UInt32Collection(node.ArrayDimensions);
}
}
}
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:23,代码来源:Node.cs
示例18: AttachNode
public void AttachNode(ILocalNode node)
{
}
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:3,代码来源:DiagnosticsNodeManager.cs
示例19: UpdateAttributes
/// <summary>
/// Updates the attributes of the node.
/// </summary>
protected virtual void UpdateAttributes(ILocalNode source)
{
if (QualifiedName.IsNull(m_browseName))
{
m_browseName = source.BrowseName;
}
m_displayName = source.DisplayName;
m_description = source.Description;
m_writeMask = source.WriteMask;
m_userWriteMask = source.UserWriteMask;
}
开发者ID:OPCFoundation,项目名称:UA-.NETStandardLibrary,代码行数:15,代码来源:NodeSource.cs
示例20: ReplaceNode
public void ReplaceNode(ILocalNode existingNode, ILocalNode newNode)
{
}
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:3,代码来源:DiagnosticsNodeManager.cs
注:本文中的ILocalNode类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论