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


C# IDefinition.GetNumericalForm方法代码示例

本文整理汇总了C#中IDefinition.GetNumericalForm方法的典型用法代码示例。如果您正苦于以下问题:C# IDefinition.GetNumericalForm方法的具体用法?C# IDefinition.GetNumericalForm怎么用?C# IDefinition.GetNumericalForm使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IDefinition的用法示例。


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

示例1: GetTable

 internal override void GetTable(IDefinition def)
 {
     IList<Variable> list = new List<Variable>();
     int rows = Messenger.Walk(VersionCode, Agent, GetCommunity, new ObjectIdentifier(def.GetNumericalForm()), list, Timeout, WalkMode.WithinSubtree);
     
     // How many rows are there?
     if (rows > 0)
     {
         FormTable newTable = new FormTable(def);
         newTable.SetRows(rows);
         newTable.PopulateGrid(list);
         newTable.Show();
     }
     else
     {
         foreach (Variable t in list)
         {
             Logger.Info(t.ToString());
         }
     }
 }
开发者ID:moljac,项目名称:MonoMobile.SharpSNMP,代码行数:21,代码来源:NormalAgentProfile.cs

示例2: Walk

        public override void Walk(IDefinition definition)
        {
            IList<Variable> list = new List<Variable>();
            if (VersionCode == VersionCode.V1)
            {
                Messenger.Walk(
                    VersionCode, 
                    Agent, 
                    GetCommunity,
                    new ObjectIdentifier(definition.GetNumericalForm()),
                    list,
                    Timeout,
                    WalkMode.WithinSubtree);
            }
            else
            {
                Messenger.BulkWalk(
                    VersionCode,
                    Agent, 
                    GetCommunity,
                    new ObjectIdentifier(definition.GetNumericalForm()), 
                    list, 
                    Timeout,
                    10,
                    WalkMode.WithinSubtree, 
                    null, 
                    null);
            }

            foreach (Variable v in list)
            {
                Logger.Info(v.ToString(Objects));
            }
        }
开发者ID:moljac,项目名称:MonoMobile.SharpSNMP,代码行数:34,代码来源:NormalAgentProfile.cs

示例3: Walk

        public override void Walk(IDefinition definition)
        {
            if (string.IsNullOrEmpty(UserName))
            {
                Logger.Info("User name need to be specified for v3.");
                return;
            }

            Discovery discovery = Messenger.NextDiscovery;
            ReportMessage report = discovery.GetResponse(Timeout, Agent);
            IList<Variable> list = new List<Variable>();
            Messenger.BulkWalk(
                VersionCode.V3,
                Agent, 
                new OctetString(UserName),
                new ObjectIdentifier(definition.GetNumericalForm()),
                list,
                Timeout, 
                10,
                WalkMode.WithinSubtree, 
                _privacy, 
                report);

            foreach (Variable v in list)
            {
                Logger.Info(v.ToString(Objects));
            }
        }
开发者ID:moljac,项目名称:MonoMobile.SharpSNMP,代码行数:28,代码来源:SecureAgentProfile.cs

示例4: GetTable

        internal override void GetTable(IDefinition def)
        {
            Discovery discovery = Messenger.NextDiscovery;
            ReportMessage report = discovery.GetResponse(Timeout, Agent);
            IList<Variable> list = new List<Variable>();
            int rows = Messenger.BulkWalk(
                VersionCode.V3,
                Agent, 
                new OctetString(UserName),
                new ObjectIdentifier(def.GetNumericalForm()), 
                list, 
                Timeout, 
                10,
                WalkMode.WithinSubtree, 
                _privacy, 
                report);

            // How many rows are there?
            if (rows > 0)
            {
                FormTable newTable = new FormTable(def);
                newTable.SetRows(rows);
                newTable.PopulateGrid(list);
                newTable.Show();
            }
            else
            {
                foreach (Variable t in list)
                {
                    Logger.Info(t.ToString());
                }
            }
        }
开发者ID:moljac,项目名称:MonoMobile.SharpSNMP,代码行数:33,代码来源:SecureAgentProfile.cs


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