当前位置: 首页>>代码示例>>C#>>正文


C# NodeId类代码示例

本文整理汇总了C#中NodeId的典型用法代码示例。如果您正苦于以下问题:C# NodeId类的具体用法?C# NodeId怎么用?C# NodeId使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


NodeId类属于命名空间,在下文中一共展示了NodeId类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetPeersTask

 public GetPeersTask(DhtEngine engine, NodeId infohash)
 {
     _engine = engine;
     _infoHash = infohash;
     _closestNodes = new SortedList<NodeId, NodeId>(Bucket.MaxCapacity);
     ClosestActiveNodes = new SortedList<NodeId, Node>(Bucket.MaxCapacity*2);
 }
开发者ID:haroldma,项目名称:Universal.Torrent,代码行数:7,代码来源:GetPeersTask.cs

示例2: Initialize

        /// <summary>
        /// Sets the nodes in the control.
        /// </summary>
        public void Initialize(Session session, ExpandedNodeId nodeId)
        {
            if (session == null) throw new ArgumentNullException("session");
            
            Clear();

            if (nodeId == null)
            {
                return;                
            }
            
            m_session = session;
            m_nodeId  = (NodeId)nodeId;

            INode node = m_session.NodeCache.Find(m_nodeId);

            if (node != null && (node.NodeClass & (NodeClass.Variable | NodeClass.Object)) != 0)
            {
                AddReferences(ReferenceTypeIds.HasTypeDefinition, BrowseDirection.Forward);
                AddReferences(ReferenceTypeIds.HasModellingRule,  BrowseDirection.Forward);
            }

            AddAttributes();
            AddProperties();
        }
开发者ID:yuriik83,项目名称:UA-.UWP-Universal-Windows-Platform,代码行数:28,代码来源:AttributeListCtrl.cs

示例3: ResponseMessage

 protected ResponseMessage(NodeId id, BEncodedValue transactionId)
     : base(ResponseType)
 {
     Properties.Add(ReturnValuesKey, new BEncodedDictionary());
     Parameters.Add(IdKey, id.BencodedString());
     TransactionId = transactionId;
 }
开发者ID:mrscylla,项目名称:octotorrent,代码行数:7,代码来源:ResponseMessage.cs

示例4: DataAddress

 public DataAddress(BlockId blockId, int dataId)
 {
     // TODO: Check for overflow?
     long[] blockAddr = blockId.ReferenceAddress;
     blockAddr[1] |= dataId & 0x0FFFF;
     value = new NodeId(blockAddr);
 }
开发者ID:erpframework,项目名称:cloudb,代码行数:7,代码来源:DataAddress.cs

示例5: AnnouncePeer

		public AnnouncePeer(NodeId id, NodeId infoHash, BEncodedNumber port, BEncodedString token)
			: base(id, QueryName, responseCreator)
		{
			Parameters.Add(InfoHashKey, infoHash.BencodedString());
			Parameters.Add(PortKey, port);
			Parameters.Add(TokenKey, token);
		}
开发者ID:rajkosto,项目名称:DayZeroLauncher,代码行数:7,代码来源:AnnouncePeer.cs

示例6: Show

        /// <summary>
        /// Displays the address space with the specified view
        /// </summary>
        public void Show(Session session, NodeId startId)
        {   
            if (session == null) throw new ArgumentNullException("session");
            
            if (m_session != null)
            {
                m_session.SessionClosing -= m_SessionClosing;
            }

            m_session = session;            
            m_session.SessionClosing += m_SessionClosing;
            
            Browser browser  = new Browser(session);

            browser.BrowseDirection = BrowseDirection.Both;
            browser.ContinueUntilDone = true;
            browser.ReferenceTypeId = ReferenceTypeIds.References;

            BrowseCTRL.Initialize(browser, startId);
            
            UpdateNavigationBar();

            Show();
            BringToFront();
        }
开发者ID:OPCFoundation,项目名称:UA-.NET,代码行数:28,代码来源:BrowseDlg.cs

示例7: Initialize

        /// <summary>
        /// Initializes the calculation stream.
        /// </summary>
        /// <param name="aggregateId">The aggregate function to apply.</param>
        /// <param name="startTime">The start time.</param>
        /// <param name="endTime">The end time.</param>
        /// <param name="processingInterval">The processing interval.</param>
        /// <param name="stepped">Whether to use stepped interpolation.</param>
        /// <param name="configuration">The aggregate configuration.</param>
        protected void Initialize(
            NodeId aggregateId,
            DateTime startTime,
            DateTime endTime,
            double processingInterval,
            bool stepped,
            AggregateConfiguration configuration)
        {
            AggregateId = aggregateId;
            StartTime = startTime;
            EndTime = endTime;
            ProcessingInterval = processingInterval;
            Stepped = stepped;
            Configuration = configuration;
            TimeFlowsBackward = (endTime < startTime);

            if (processingInterval == 0)
            {
                if (endTime == DateTime.MinValue || startTime == DateTime.MinValue)
                {
                    throw new ArgumentException("Non-zero processingInterval required.", "processingInterval");
                }

                ProcessingInterval = Math.Abs((endTime - startTime).TotalMilliseconds);
            }

            m_values = new LinkedList<DataValue>();
        }
开发者ID:OPCFoundation,项目名称:UA-.NETStandardLibrary,代码行数:37,代码来源:AggregateCalculator.cs

示例8: CreateItems

 private List<DiagnosticListViewItem> CreateItems(Session session)
 {
   List<DiagnosticListViewItem> items = new List<DiagnosticListViewItem>();
   NodeId serverNode = new NodeId(Objects.Server);
   items.Add(new DiagnosticListViewItem(serverNode, "ServerDiagnostics.EnabledFlag", 0, false, true));
   items.Add(new DiagnosticListViewItem(serverNode, "ServerDiagnostics.ServerDiagnosticsSummary", 0, true, true));
   items.Add(new DiagnosticListViewItem(serverNode, "ServerDiagnostics.ServerDiagnosticsSummary.CumulatedSessionCount", 1, false, true));
   items.Add(new DiagnosticListViewItem(serverNode, "ServerDiagnostics.ServerDiagnosticsSummary.CumulatedSubscriptionCount", 1, false, true));
   items.Add(new DiagnosticListViewItem(serverNode, "ServerDiagnostics.ServerDiagnosticsSummary.CurrentSessionCount", 1, false, true));
   items.Add(new DiagnosticListViewItem(serverNode, "ServerDiagnostics.ServerDiagnosticsSummary.CurrentSubscriptionCount", 1, false, true));
   items.Add(new DiagnosticListViewItem(serverNode, "ServerDiagnostics.ServerDiagnosticsSummary.PublishingRateCount", 1, false, true));
   items.Add(new DiagnosticListViewItem(serverNode, "ServerDiagnostics.ServerDiagnosticsSummary.RejectedRequestsCount", 1, false, true));
   items.Add(new DiagnosticListViewItem(serverNode, "ServerDiagnostics.ServerDiagnosticsSummary.RejectedSessionCount", 1, false, true));
   items.Add(new DiagnosticListViewItem(serverNode, "ServerDiagnostics.ServerDiagnosticsSummary.SamplingRateCount", 1, false, true));
   items.Add(new DiagnosticListViewItem(serverNode, "ServerDiagnostics.ServerDiagnosticsSummary.SecurityRejectedRequestsCount", 1, false, true));
   items.Add(new DiagnosticListViewItem(serverNode, "ServerDiagnostics.ServerDiagnosticsSummary.SecurityRejectedSessionCount", 1, false, true));
   items.Add(new DiagnosticListViewItem(serverNode, "ServerDiagnostics.ServerDiagnosticsSummary.ServerViewCount", 1, false, true));
   items.Add(new DiagnosticListViewItem(serverNode, "ServerDiagnostics.ServerDiagnosticsSummary.SessionAbortCount", 1, false, true));
   items.Add(new DiagnosticListViewItem(serverNode, "ServerDiagnostics.ServerDiagnosticsSummary.SessionTimeoutCount", 1, false, true));
   items.Add(new DiagnosticListViewItem(serverNode, "ServerDiagnostics.SamplingRateDiagnosticsArray", 0, true, true));
   items.Add(new DiagnosticListViewItem(serverNode, "ServerDiagnostics.SubscriptionDiagnosticsArray", 0, true, true));
   items.Add(new DiagnosticListViewItem(serverNode,"ServerDiagnostics.SessionDiagnosticsSummary", 0, false, false));
   items.Add(new DiagnosticListViewItem(serverNode, "ServerDiagnostics.SessionDiagnosticsSummary.SessionDiagnosticsArray", 1, true, true));
   items.Add(new DiagnosticListViewItem(serverNode, "ServerDiagnostics.SessionDiagnosticsSummary.SessionSecurityDiagnosticsArray", 1, true, true));
                                               
   return items;                               
 }                                             
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:27,代码来源:ServerDiagnosticsDlg.cs

示例9: GetAttributeValue

        /// <summary cref="IFilterTarget.GetAttributeValue" />
        public virtual object GetAttributeValue(
            FilterContext        context,
            NodeId               typeDefinitionId,
            IList<QualifiedName> relativePath,
            uint                 attributeId,
            NumericRange         indexRange)
        {
            if (context == null) throw new ArgumentNullException("context");
            
            // read the attribute value.
            DataValue dataValue = ReadAttributeValue(
                context,
                typeDefinitionId,
                relativePath,
                attributeId,
                indexRange);

            if (StatusCode.IsBad(dataValue.StatusCode))
            {
                return dataValue.StatusCode;
            }
                        
            // return the value.
            return dataValue.Value;
        }
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:26,代码来源:BaseEvent.cs

示例10: Show

        /// <summary>
        /// Displays the dialog.
        /// </summary>
        public void Show(Session session, NodeId objectId, NodeId methodId)
        {
            if (session == null)  throw new ArgumentNullException("session");
            if (methodId == null) throw new ArgumentNullException("methodId");
            
            if (m_session != null)
            {
                m_session.SessionClosing -= m_SessionClosing;
            }

            m_session = session;
            m_session.SessionClosing += m_SessionClosing;
        
            m_objectId = objectId;            
            m_methodId = methodId;

            InputArgumentsCTRL.Update(session, methodId, true);     
            OutputArgumentsCTRL.Update(session, methodId, false);
            
            Node target = session.NodeCache.Find(objectId) as Node;
            Node method = session.NodeCache.Find(methodId) as Node;

            if (target != null && method != null)
            {
                Text = String.Format("Call {0}.{1}", target, method);
            }

            Show();
            BringToFront();
        }
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:33,代码来源:CallMethodDlg.cs

示例11: IsInView

 /// <summary cref="IFilterTarget.IsInView" />
 public bool IsInView(
     FilterContext context, 
     NodeId        viewId)
 {
     // events instances are not in any view.
     return false;
 }
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:8,代码来源:BaseEvent.cs

示例12: GetPeersTask

 public GetPeersTask(DhtEngine engine, NodeId infohash)
 {
     this.engine = engine;
     this.infoHash = infohash;
     this.closestNodes = new SortedList<NodeId, NodeId>(Bucket.MaxCapacity);
     this.queriedNodes = new SortedList<NodeId, Node>(Bucket.MaxCapacity * 2);
 }
开发者ID:senditu,项目名称:simpletorrent,代码行数:7,代码来源:GetPeersTask.cs

示例13: NodeIdCompareToTestMethod

 public void NodeIdCompareToTestMethod()
 {
     NodeId _property = new NodeId(VariableTypes.PropertyType);
       Assert.AreNotSame(_property, VariableTypeIds.PropertyType);
       int _res = _property.CompareTo(VariableTypeIds.PropertyType);
       Assert.AreEqual<int>(0, _res);
 }
开发者ID:yuriik83,项目名称:OPC-UA-OOI,代码行数:7,代码来源:NodeIdUnitTest.cs

示例14: SessionDiagnosticsDlg

    public SessionDiagnosticsDlg(Session session, NodeId sessionNodeId)
    {
      InitializeComponent();

      List<DiagnosticListViewItem> list = CreateItems(session, sessionNodeId);
      serverDiagnosticCtrl1.LoadItems(session, list);
    }
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:7,代码来源:SessionDiagnosticsDlg.cs

示例15: IsTypeOf

 /// <summary cref="IFilterTarget.IsTypeOf" />
 public bool IsTypeOf(
     FilterContext context, 
     NodeId        typeDefinitionId)
 {
     if (context == null) throw new ArgumentNullException("context");
     
     return context.TypeTree.IsTypeOf(TypeDefinitionId, typeDefinitionId);
 }
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:9,代码来源:BaseEvent.cs


注:本文中的NodeId类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。