當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。