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


C# Record.GetType方法代码示例

本文整理汇总了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;
 }
开发者ID:JnS-Software-LLC,项目名称:npoi,代码行数:12,代码来源:TestEventRecordFactory.cs

示例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;
            }
开发者ID:89sos98,项目名称:npoi,代码行数:13,代码来源:TestSheet.cs

示例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;
        }
开发者ID:hanwangkun,项目名称:npoi,代码行数:52,代码来源:RecordTreeNode.cs


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