本文整理汇总了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());
}
}
}
示例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));
}
}
示例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));
}
}
示例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());
}
}
}