private TimeStampedDataParser(Asn1SequenceParser parser) { this.parser = parser; this.version = DerInteger.GetInstance(parser.ReadObject()); Asn1Object obj = parser.ReadObject().ToAsn1Object(); if (obj is DerIA5String) { this.dataUri = DerIA5String.GetInstance(obj); obj = parser.ReadObject().ToAsn1Object(); } if (//obj is MetaData || obj is Asn1SequenceParser) { this.metaData = MetaData.GetInstance(obj.ToAsn1Object()); obj = parser.ReadObject().ToAsn1Object(); } if (obj is Asn1OctetStringParser) { this.content = (Asn1OctetStringParser)obj; } }
private TimeStampedData(Asn1Sequence seq) { this.version = DerInteger.GetInstance(seq[0]); int index = 1; if (seq[index] is DerIA5String) { this.dataUri = DerIA5String.GetInstance(seq[index++]); } if (seq[index] is MetaData || seq[index] is Asn1Sequence) { this.metaData = MetaData.GetInstance(seq[index++]); } if (seq[index] is Asn1OctetString) { this.content = Asn1OctetString.GetInstance(seq[index++]); } this.temporalEvidence = Evidence.GetInstance(seq[index]); }