本文整理汇总了C#中NPOI.HSSF.Record.Record.GetType方法的典型用法代码示例。如果您正苦于以下问题:C# Record.GetType方法的具体用法?C# Record.GetType怎么用?C# Record.GetType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NPOI.HSSF.Record.Record
的用法示例。
在下文中一共展示了Record.GetType方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ProcessRecord
public bool ProcessRecord(Record rec)
{
// System.out.println(rec.toString());
Assert.AreEqual(
expectedRecordTypes[recCnt[0]],
rec.GetType().Name,
"Record type"
);
CompareData(rec, "Record " + recCnt + ": ");
recCnt[0]++;
return true;
}
示例2: VisitRecord
public void VisitRecord(Record r)
{
int estimatedSize = r.RecordSize;
byte[] buf = new byte[estimatedSize];
int serializedSize = r.Serialize(0, buf);
if (estimatedSize != serializedSize)
{
throw new AssertionException("serialized size mismatch for record ("
+ r.GetType().Name + ")");
}
_totalSize += estimatedSize;
}
示例3: RecordTreeNode
public RecordTreeNode(Record record)
{
if (record is ObjRecord)
{
ObjRecord or = (ObjRecord)record;
IList subrecs=or.SubRecords;
foreach (SubRecord sr in subrecs)
{
this.Nodes.Add(new SubRecordTreeNode(sr));
}
this.ImageKey = "Folder";
this.SelectedImageKey = "Folder";
}
else if (record is SSTRecord)
{
IEnumerator strings = ((SSTRecord)record).GetStrings();
this.ImageKey = "Folder";
this.SelectedImageKey = "Folder";
while (strings.MoveNext())
{
this.Nodes.Add(new UnicodeStringTreeNode((UnicodeString)strings.Current));
}
}
else if (record is DrawingGroupRecord)
{
this.ImageKey = "Folder";
this.SelectedImageKey = "Folder";
DrawingGroupRecord dgr = (DrawingGroupRecord)record;
for (int i = 0; i < dgr.EscherRecords.Count; i++)
{
this.Nodes.Add(new EscherRecordTreeNode((NPOI.DDF.EscherRecord)dgr.EscherRecords[i]));
}
}
else
{
this.ImageKey = "Binary";
}
if (record is UnknownRecord)
{
this.Text = UnknownRecord.GetBiffName(record.Sid) + "*";
}
else
{
this.Text = record.GetType().Name;
}
this.Record = record;
}