ASN1C C# Runtime Library
7.2
|
Public Member Functions | |
Asn1AbstractTime (short typeCode, bool useDerRules) | |
Asn1AbstractTime (System.String data, short typeCode, bool useDerRules) | |
virtual void | Clear () |
virtual int | CompareTo (System.Object other) |
override void | Decode (Asn1PerDecodeBuffer buffer) |
override void | DecodeXML (System.String buffer, System.String attrs) |
override void | Encode (Asn1PerEncodeBuffer buffer) |
virtual void | Encode (Asn1BerOutputStream outs, bool explicitTagging, Asn1Tag tag) |
override void | Encode (Asn1PerOutputStream outs) |
override void | Encode (Asn1XmlEncoder buffer, System.String elemName, System.String nsPrefix) |
void | EncodeXER (Asn1XmlEncoder buffer, String elemName, String nsPrefix) |
virtual void | EncodeXMLData (Asn1XmlXerEncoder buffer) |
override bool | Equals (System.Object value) |
virtual int | GetDiff () |
override int | GetHashCode () |
virtual System.DateTime | GetTime () |
abstract void | ParseString (System.String data) |
virtual void | ParseXmlString (System.String data) |
virtual void | SetDiff (int dhour, int dminute) |
virtual void | SetDiff (int inMinutes) |
virtual void | SetTime (System.DateTime time) |
Public Member Functions inherited from Asn18BitCharString | |
virtual void | Decode (Asn1PerDecodeBuffer buffer, Asn1CharSet charSet) |
virtual void | Decode (Asn1PerDecodeBuffer buffer, Asn1CharSet charSet, long lower, long upper) |
override void | Decode (Asn1OerDecodeBuffer buffer) |
void | Decode (Asn1OerDecodeBuffer buffer, int length) |
virtual void | Encode (Asn1PerEncodeBuffer buffer, Asn1CharSet charSet) |
virtual void | Encode (Asn1PerEncodeBuffer buffer, Asn1CharSet charSet, long lower, long upper) |
virtual void | Encode (Asn1PerOutputStream outs, Asn1CharSet charSet) |
virtual void | Encode (Asn1PerOutputStream outs, Asn1CharSet charSet, long lower, long upper) |
override void | Encode (Asn1OerEncodeBuffer buffer) |
virtual void | Encode (Asn1OerEncodeBuffer buffer, bool withLength) |
Public Member Functions inherited from Asn1CharString | |
virtual void | Decode (Asn1JsonDecodeBuffer buffer) |
void | DecodeByteToChar (Asn1OerDecodeBuffer buffer, int length) |
virtual void | DecodeXER (System.String buffer, System.String attrs) |
override void | DecodeXML (System.String buffer, System.String attrs) |
override void | Encode (Asn1XerEncoder buffer, System.String elemName) |
override void | Encode (Asn1XmlEncoder buffer, System.String elemName, System.String nsPrefix) |
virtual void | Encode (Asn1JsonOutputStream outs) |
bool | Equals (System.String value) |
override bool | Equals (System.Object value) |
override int | GetHashCode () |
override System.String | ToString () |
bool | validate (Asn1CharSet charSet) |
Public Member Functions inherited from Asn1Type | |
void | _SetKey (byte[] rtkey) |
virtual void | Decode (Asn1BerDecodeBuffer buffer, bool explicitTagging, int implicitLength) |
virtual void | Decode (Asn1BerDecodeBuffer buffer) |
virtual void | Decode (System.Object reader, System.String xmlURI) |
virtual void | Decode (System.Object reader, System.IO.Stream byteStream) |
virtual void | Decode (Asn1MderDecodeBuffer buffer) |
virtual void | DecodeXML (String buffer, String attrs) |
virtual int | Encode (Asn1BerEncodeBuffer buffer, bool explicitTagging) |
virtual int | Encode (Asn1BerEncodeBuffer buffer) |
virtual void | Encode (Asn1XerEncoder buffer) |
virtual void | Encode (Asn1XmlEncoder buffer) |
virtual void | Encode (Asn1MderOutputStream buffer) |
virtual void | Encode (Asn1MderOutputStream buffer, bool useCachedLength) |
virtual void | Encode (Asn1BerOutputStream outs, bool explicitTagging) |
virtual void | Encode (Asn1CerOutputStream outs, bool explicitTagging) |
void | EncodeAsOpenType (Asn1OerEncodeBuffer buffer) |
virtual void | EncodeAttribute (Asn1XmlEncoder buffer, System.String attrName) |
virtual bool | Equals (Asn1Type obj) |
String | GetNonParameterizedTypeName () |
virtual void | Indent (System.IO.TextWriter outs, int level) |
virtual bool | IsOpenType () |
virtual bool | MatchTypeName (System.String typeName) |
virtual void | Pdiag (System.String s) |
virtual void | Print (System.IO.TextWriter outs, System.String varName, int level) |
virtual void | Print (System.String varName) |
void | SetNonParameterizedTypeName (String value) |
virtual void | SetOpenType () |
Static Public Member Functions | |
static void | PutInteger (System.Text.StringBuilder data, int width, int value) |
Static Public Member Functions inherited from Asn1Type | |
static void | _SetKey2 (byte[] rtkey) |
static Asn1Type | Decode (Asn1BerDecodeBuffer buffer, Asn1OpenTypeField openTypeField, bool explicitTag, int implicitLength) |
static Asn1Type | Decode (Asn1OerDecodeBuffer buffer, Asn1OpenTypeField openTypeField) |
static Asn1Type | Decode (Asn1PerDecodeBuffer buffer, Asn1OpenTypeField openTypeField) |
static System.String | GetTypeName (short typeCode) |
Public Attributes | |
const int | Apr = 4 |
const int | April = 4 |
const int | Aug = 8 |
const int | August = 8 |
const int | Dec = 12 |
const int | December = 12 |
const int | Feb = 2 |
const int | February = 2 |
const int | Jan = 1 |
const int | January = 1 |
const int | Jul = 7 |
const int | July = 7 |
const int | Jun = 6 |
const int | June = 6 |
const int | Mar = 3 |
const int | March = 3 |
const int | May = 5 |
const int | Nov = 11 |
const int | November = 11 |
const int | Oct = 10 |
const int | October = 10 |
const int | Sep = 9 |
const int | September = 9 |
Public Attributes inherited from Asn18BitCharString | |
const int | BITSPERCHAR_A = 8 |
const int | BITSPERCHAR_U = 7 |
Public Attributes inherited from Asn1CharString | |
System.String | mValue |
Public Attributes inherited from Asn1Type | |
const short | BIT_STRING = 3 |
const short | BMPString = 30 |
const short | BOOLEAN = 1 |
const short | DATE = 31 |
const short | ENUMERATED = 10 |
const short | EOC = 0 |
const short | EXTERNAL = 8 |
const short | GeneralString = 27 |
const short | GeneralTime = 24 |
const short | GraphicString = 25 |
const short | IA5String = 22 |
const short | INTEGER = 2 |
const short | NULL = 5 |
const short | NumericString = 18 |
const short | OBJECT_IDENTIFIER = 6 |
const short | ObjectDescriptor = 7 |
const short | OCTET_STRING = 4 |
const short | OpenType = 99 |
const short | PrintableString = 19 |
const short | REAL = 9 |
const short | RELATIVE_OID_IRI = 36 |
const short | RelativeOID = 13 |
const short | SEQUENCE = 16 |
const short | SET = 17 |
const short | T61String = TeletexString |
const short | TeletexString = 20 |
const short | TIME = 14 |
const short | UniversalString = 28 |
const short | UTCTime = 23 |
const short | UTF8String = 12 |
const short | VideotexString = 21 |
const short | VisibleString = 26 |
Properties | |
virtual | bool [set] |
virtual int | Day [get, set] |
virtual int | DiffHour [get, set] |
virtual int | DiffMinute [get] |
virtual string | Fraction [get, set] |
virtual int | Hour [get, set] |
virtual int | Minute [get, set] |
virtual int | Month [get, set] |
virtual int | Second [get, set] |
virtual bool | UTC [get, set] |
virtual int | Year [get, set] |
Properties inherited from Asn1CharString | |
override int | Length [get] |
Properties inherited from Asn1Type | |
virtual String | AsnTypeName [get] |
virtual int | Length [get] |
Additional Inherited Members | |
Static Public Attributes inherited from Asn1Type | |
static readonly Asn1Tag | _TAG |
Static Protected Member Functions inherited from Asn1CharString | |
static int | Encode (Asn1BerEncodeBuffer buffer, String val, bool explicitTagging, Asn1Tag tag) |
This is a base class for holding the components of an ASN.1 generalized and universal times string value.
Asn1AbstractTime | ( | short | typeCode, |
bool | useDerRules | ||
) |
This constructor creates an empty time string object.
typeCode | Integer constant from Asn1Type class (Asn1Type.GeneralTime or Asn1Type.UTCTime ). |
useDerRules | 'true' if time string should be encoded with DER/PER. |
Asn1AbstractTime | ( | System.String | data, |
short | typeCode, | ||
bool | useDerRules | ||
) |
This constructor creates a time string from String value.
data | String representation of time value |
typeCode | Integer constant from Asn1Type class (Asn1Type.GeneralTime or Asn1Type.UTCTime ). |
useDerRules | 'true' if time string should be encoded with DER/PER. |
|
virtual |
This method clears time string. Note that the action of this method may differentiate for different inherited Asn1Time classes.
Reimplemented in Asn1UTCTime.
|
virtual |
This method compares this object with Asn1Time class instance or with System.DateTime instance. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. Note that the action of this method may differentiate for different inherited Asn1Time classes.
other | the Object to be compared. |
Reimplemented in Asn1UTCTime, and Asn1GeneralizedTime.
References IntHolder.mValue.
|
virtual |
This method is the base implementation of the standard Packed Encoding Rules (PER) Decode method. It throws an exception because it should never be invoked by compiler generated code.
buffer | PER Encode message buffer object |
Reimplemented from Asn18BitCharString.
override void DecodeXML | ( | System.String | buffer, |
System.String | attrs | ||
) |
This method decodes ASN.1 Time type, using the XML schema encoding rules(asn2xsd).
buffer | String containing data to be decoded |
attrs | Attributes string from element tag |
|
virtual |
This method is the base implementation of the standard Packed Encoding Rules (PER) encode method. It throws an exception because it should never be invoked by compiler generated code.
buffer | PER Encode message buffer object |
Reimplemented from Asn18BitCharString.
References Asn1BerOutputStream.EncodeCharString(), and IntHolder.mValue.
|
virtual |
This method encodes and writes to the stream an ASN.1 time string value including the UNIVERSAL tag value and length if explicit tagging is specified. This overloaded version uses the Basic Encoding Rules (BER).
Throws, Exception thrown by C# System.IO.Stream for I/O error
outs | BER Output Stream object |
explicitTagging | Flag indicating explicit tagging should be done |
tag | Universal tag to apply |
Asn1Exception | Thrown, if operation is failed. |
|
virtual |
This method encodes and writes to stream an ASN.1 time string value using the standard Packed Encoding Rules (PER) encode method.
Also throws any exception thrown by the Asn1PerOutputStream.
outs | PER Output Stream object |
Asn1Exception | Thrown, if operation is failed. |
Reimplemented from Asn18BitCharString.
|
virtual |
This method encodes ASN.1 time into xsd:dateTime format with element and namespace prefix tag according to the XML Encoding as specified in the XML schema standard(asn2xsd). This is for use with Obj-Sys XML encoding rules.
buffer | Encode message buffer object |
elemName | XML element name used to wrap string |
nsPrefix | XML element namespace value |
Reimplemented from Asn1Type.
References Asn1XmlEncoder.EncodeEndElement(), and Asn1XmlEncoder.EncodeStartElement().
void EncodeXER | ( | Asn1XmlEncoder | buffer, |
String | elemName, | ||
String | nsPrefix | ||
) |
This method encodes this ASN.1 time according to XER encoding rules. It is used by generated code when compiling for extended-XER.
buffer | Encode message buffer object |
<param name="elemName> XML element name used to wrap string
<param name="nsPrefix> Element namespace prefix value
References Asn1XmlXerEncoder.EncodeData(), Asn1XmlEncoder.EncodeEndElement(), and Asn1XmlEncoder.EncodeStartElement().
|
virtual |
This method encodes this ASN.1 time string into xsd:dateTime format.
XML dateTime format is YYYY-MM-DDTHH:MM:SS[.SSSS][(Z|(+|-) HH:MM)]
buffer | String buffer to hold the converted xml time string |
Asn1Exception | any exception exist in Asn.1 Generalized Time string |
References Asn1XmlXerEncoder.Copy().
override bool Equals | ( | System.Object | value | ) |
This method compares this object with Asn1Time class instance or with Calendar instance. Note that the action of this method may differentiate for different inherited Asn1Time classes.
value | The Object to compare with the current Object. Object should be instance of Asn1Time or System.DateTime. |
true
if the specified Object is equal to the current Object; otherwise, false
.
|
virtual |
This method returns the difference between the time zone of the object and Coordinated Universal Time (UTC), in minutes. The UTC time is the sum of the local time and positive or negative time difference. Note that the return value may differentiate for different inherited Asn1Time classes.
Asn1Exception | Thrown, if operation is failed. |
override int GetHashCode | ( | ) |
Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
|
virtual |
This method converts the time string to the System.DateTime value. If time represented as UTC time plus or minus difference time, then the result System.DateTime will ignore zone offset, as it doesn't support it. Note that the return value may differentiate for different inherited Asn1Time classes.
|
pure virtual |
This method parses passed time string. Note that the action of this method may differentiate for different inherited Asn1Time classes.
data | String representation of Time to be parsed. |
Asn1Exception | Thrown, if operation is failed. |
Implemented in Asn1UTCTime, and Asn1GeneralizedTime.
|
virtual |
This method parses the given time string value. String must be in XML schema dateTime format. It will throw and exception if the string is not in the valid time format.
data | The time string value to be parsed. |
Asn1Exception | Thrown, if operation is failed. |
References IntHolder.mValue.
|
static |
Puts integer in string buffer
data | destination buffer |
width | number of digits in integer value |
value | integer value to be added |
|
virtual |
This method sets the hour and minute components of the difference between the time zone of the object and Coordinated Universal Time (UTC). The UTC time is the sum of the local time and positive or negative time difference. Note that the action of this method may differentiate for different inherited Asn1Time classes.
dhour | The negative or positive hour component of the difference between the time zone of the object and UTC time (-12..+12). |
dminute | The negative or positive minute component of the difference between the time zone of the object and UTC time (-59..+59). |
Asn1Exception | Thrown, if operation is failed. |
|
virtual |
This method sets the difference between the time zone of the object and Coordinated Universal Time (UTC), in minutes. The UTC time is the sum of the local time and positive or negative time difference. Note that the action of this method may differentiate for different inherited Asn1Time classes.
inMinutes | The negative or positive difference, in minutes, between the time zone of the object and UTC time (-12*60..+12*60). |
Asn1Exception | Thrown, if operation is failed. |
|
virtual |
This method converts the System.DateTime value to time string. Note that the action of this method may differentiate for different inherited Asn1Time classes.
time | The System.DateTime time value. |
Asn1Exception | Thrown, if operation is failed. |
Reimplemented in Asn1UTCTime.
const int Apr = 4 |
Constant to represent April month
const int April = 4 |
Constant to represent April month
const int Aug = 8 |
Constant to represent August month
const int August = 8 |
Constant to represent August month
const int Dec = 12 |
Constant to represent December month
const int December = 12 |
Constant to represent December month
const int Feb = 2 |
Constant to represent February month
const int February = 2 |
Constant to represent February month
const int Jan = 1 |
Constant to represent January month
const int January = 1 |
Constant to represent January month
const int Jul = 7 |
Constant to represent July month
const int July = 7 |
Constant to represent July month
const int Jun = 6 |
Constant to represent June month
const int June = 6 |
Constant to represent June month
const int Mar = 3 |
Constant to represent March month
const int March = 3 |
Constant to represent March month
const int May = 5 |
Constant to represent May month
const int Nov = 11 |
Constant to represent November month
const int November = 11 |
Constant to represent November month
const int Oct = 10 |
Constant to represent October month
const int October = 10 |
Constant to represent October month
const int Sep = 9 |
Constant to represent September month
const int September = 9 |
Constant to represent September month
|
set |
Sets the 'use DER' flag which enforces the DER rules when time strings are constructed or parsed.
Value:
true
for DER rule; otherwise false
|
getset |
Gets or Sets the day of month number component of the time value. The number of the first day in month is 1, the number of the last day may be in interval from 28 to 31. Note that the behaviour value may differentiate for different inherited Asn1Time classes.
Value:
Day of month component (1..31)
Asn1Exception | Thrown, if operation is failed. |
|
getset |
Gets or Sets the hour component of the difference between the time zone of the object and Coordinated Universal Time (UTC). The UTC time is the sum of the local time and positive or negative time difference. Note that the behaviour value may differentiate for different inherited Asn1Time classes.
Value:
The negative or positive hour component of the difference between the time zone of the object and UTC time (-12..+12)
Asn1Exception | Thrown, if operation is failed. |
|
get |
Gets or Sets the minute component of the difference between the time zone of the object and Coordinated Universal Time (UTC). The UTC time is the sum of the local time and positive or negative time difference. Note that the behaviour value may differentiate for different inherited Asn1Time classes.
Value:
The negative or positive minute component of the difference between the time zone of the object and UTC time (-59..+59)
Asn1Exception | Thrown, if operation is failed. |
|
getset |
Gets or Sets the second's decimal fraction component of the time value. Second's decimal fraction is represented by one digit from 0 to 9. Note that the behaviour value may differentiate for different inherited Asn1Time classes.
Value:
Second's decimal fraction component (0..9)
Asn1Exception | Thrown, if operation is failed. |
|
getset |
Gets or Sets the hour component of the time value. As the ISO 8601 is based on the 24-hour timekeeping system, two digits represent hours from 00 to 23. Note that the behaviour value may differentiate for different inherited Asn1Time classes.
Value:
Hour component (0..23)
Asn1Exception | Thrown, if operation is failed. |
|
getset |
Gets or Sets the minute component of the time value. Minutes are represented by two digits from 00 to 59. Note that the behaviour value may differentiate for different inherited Asn1Time classes.
Value:
Minute component (0..59)
Asn1Exception | Thrown, if operation is failed. |
|
getset |
Gets or Sets the month number component of the time value. The number of January is 1, February - 2, December - 12. You may use enumerating values for months decoding: Asn1Time.January, Asn1Time.February, etc. Also you can use short aliases for months: Asn1Time.Jan, Asn1Time.Feb, etc. Note that the behaviour value may differentiate for different inherited Asn1Time classes.
Value:
Month component (1..12)
Asn1Exception | Thrown, if operation is failed. |
|
getset |
Gets or Sets the second component of the time value. Seconds are represented by two digits from 00 to 59. Note that the behaviour value may differentiate for different inherited Asn1Time classes.
Value:
Second component (0..59)
Asn1Exception | Thrown, if operation is failed. |
|
getset |
Gets or Sets the UTC flag state. If the UTC flag is true, then the time is an UTC time and symbol 'Z' is added at the end of time string. Otherwise, it is a local time.
Value:
UTC flag state.
Asn1Exception | Thrown, if operation is failed. |
|
getset |
Gets or Sets the year component of the time value. Note that the behaviour value may differentiate for different inherited Asn1Time classes.
Value:
Year component (full 4 digits).
Asn1Exception | Thrown, if operation is failed. |