Objective Systems, Inc.  
Home
About ASN.1
Products
Free Software
Open Source
Documents
Services
Resources
Resellers
Customers
Careers
About Us
Contact Us
 

Google


Objective Systems, Inc.

Asn1UTCTime Class Reference

Inheritance diagram for Asn1UTCTime:

Asn1Time Asn18BitCharString Asn1CharString Asn1Type Asn1TypeIF List of all members.

Detailed Description

This is a container class for holding the components of an ASN.1 UTC time string value.


Public Member Functions

 Asn1UTCTime (System.String data, bool useDerRules)
 Asn1UTCTime (System.String data)
 Asn1UTCTime (bool useDerRules)
 Asn1UTCTime ()
override void Clear ()
override System.Int32 CompareTo (System.Object obj)
override void Decode (Asn1BerDecodeBuffer buffer, bool explicitTagging, int implicitLength)
override void Encode (Asn1XerEncoder buffer, System.String elemName, System.String attribute)
override void Encode (Asn1BerOutputStream outs, bool explicitTagging)
override int Encode (Asn1BerEncodeBuffer buffer, bool explicitTagging)
virtual void EncodeXMLData (Asn1XerEncoder buffer)
override void ParseString (System.String data)
override void SetTime (System.DateTime time)

Static Public Attributes

static new readonly Asn1Tag _TAG

Protected Member Functions

internal override bool CompileString ()
internal override void Init ()

Properties

override string Fraction
override int Year


Constructor & Destructor Documentation

Asn1UTCTime  ) 
 

The default constructor creates an empty time string object.

Asn1UTCTime bool  useDerRules  ) 
 

This constructor creates an empty UTCTime string object and allows DER encoding rules to be specified.

Parameters:
useDerRules 'true' if time string should be encoded with DER/PER.

Asn1UTCTime System.String  data  ) 
 

This version of the constructor can be used to set the string mValue member variable to the given time string.

Parameters:
data UTCTime as string

Asn1UTCTime System.String  data,
bool  useDerRules
 

This version of the constructor can be used to set the string mValue member variable to the given time string and specify DER encoding rules be used to construct the string.

Parameters:
data UTCTime as string
useDerRules 'true' if time string should be encoded with DER/PER.


Member Function Documentation

override void Clear  )  [virtual]
 

Clears out time string.

Reimplemented from Asn1Time.

override System.Int32 CompareTo System.Object  obj  )  [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.

Parameters:
obj the Object to be compared.
Returns:
The difference in Ticks with the specified object.

Reimplemented from Asn1Time.

internal override bool CompileString  )  [protected, virtual]
 

Compiles new time string accoring X.680 (clause 42) and ISO 8601.

Returns:
true if successful; otherwise false.

Implements Asn1Time.

override void Decode Asn1BerDecodeBuffer  buffer,
bool  explicitTagging,
int  implicitLength
[virtual]
 

This method decodes an ASN.1 UTCTime value including the UNIVERSAL tag value and length if explicit tagging is specified.

Parameters:
buffer Decode message buffer object
explicitTagging Flag indicating element is explicitly tagged
implicitLength Length of contents if implicit

Reimplemented from Asn1Type.

override void Encode Asn1XerEncoder  buffer,
System.String  elemName,
System.String  attribute
[virtual]
 

This method encodes ASN.1 UTC Time string into xsd:dateTime format with element and attribute name tag according to the XML Encoding as specified in the XML schema standard(asn2xsd).

Parameters:
buffer Encode message buffer object
elemName XML element name used to wrap string
attribute Element attribute value

Reimplemented from Asn1CharString.

override void Encode Asn1BerOutputStream  outs,
bool  explicitTagging
[virtual]
 

This method encodes and writes to the stream an ASN.1 UTC 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

Parameters:
outs BER Output Stream object
explicitTagging Flag indicating explicit tagging should be done
Exceptions:
Asn1Exception Thrown, if operation is failed.

Reimplemented from Asn1Type.

override int Encode Asn1BerEncodeBuffer  buffer,
bool  explicitTagging
[virtual]
 

This method encodes an ASN.1 UTCTime type. The UNIVERSAL tag value and length is also encoded if explicit tagging is specified.

Parameters:
buffer Encode message buffer object
explicitTagging Flag indicating explicit tagging should be done
Returns:
Length in octets of encoded component

Reimplemented from Asn1Type.

virtual void EncodeXMLData Asn1XerEncoder  buffer  )  [virtual]
 

This method encodes ASN.1 UTC Time string into xsd:dateTime format XML dateTime format YYYY-MM-DDTHH:MM:SS[.SSSS][(Z|(+|-)HH:MM)] Asn1 UTCTime format YYYYMMDDHH[MM](Z|(+|-)HH(MM))

Parameters:
buffer Encode message buffer object

internal override void Init  )  [protected, virtual]
 

This method initializes the Asn1UTCTime class member variables.

Reimplemented from Asn1Time.

override void ParseString System.String  data  )  [virtual]
 

This method parses passed UTCTime string.

Parameters:
data The UTCTime string value to be parsed.
Exceptions:
Asn1Exception Thrown, if operation is failed.

Implements Asn1Time.

override void SetTime System.DateTime  time  )  [virtual]
 

This method converts the System.DateTime value to UTCTime string.

Parameters:
time The System.DateTime value.
Exceptions:
Asn1Exception Thrown, if operation is failed.

Reimplemented from Asn1Time.


Member Data Documentation

new readonly Asn1Tag _TAG [static]
 

The _TAG constant describes the universal tag for this data type (UNIVERSAL 23).

Reimplemented from Asn1Type.


Property Documentation

override string Fraction [get, set]
 

Gets the Fraction component of the UTC Time. Which is always Zero(i.e. empty string)

Value: Zero or empty string

Exceptions:
Asn1Exception Always thrown for Sets call.

Reimplemented from Asn1Time.

override int Year [get, set]
 

Gets or Sets the year component of the time value. You may pass 'year' parameter either as two last digits of the year (00 - 99) or as full 4 digits (0 - 9999). Note Gets returns year in full 4 digits format.

Value: Year component (full 4 digits).

Exceptions:
Asn1Exception Thrown, if operation is failed.

Reimplemented from Asn1Time.


Copyright © 1997-2005 Objective Systems,Inc.
All Rights Reserved.
This document may be distributed in any form, electronic
or otherwise, provided that it is distributed in its entirety
and that the copyright and this notice are included.

This file was last modified on 18 Nov 2005.
ASN1C C# Runtime Library, 5.8