Novell.Directory.Ldap.Asn1.Asn1OctetString.encode C# (CSharp) Method

encode() public method

Call this method to encode the current instance into the specified output stream using the specified encoder object.
public encode ( Asn1Encoder enc, System out_Renamed ) : void
enc Asn1Encoder Encoder object to use when encoding self. /// ///
out_Renamed System
return void
        public override void encode(Asn1Encoder enc, System.IO.Stream out_Renamed)
        {
            enc.encode(this, out_Renamed);
            return ;
        }

Usage Example

Esempio n. 1
0
		/// <summary>  Constructs an extended operation object for synchronizing the schema.
		/// 
		/// </summary>
		/// <param name="serverName">    The distinguished name of the server which will start
		/// the synchronization.
		/// 
		/// </param>
		/// <param name="delay">         The time, in seconds, to delay before the synchronization
		/// should start.
		/// 
		/// </param>
		/// <exception> LdapException A general exception which includes an error message
		/// and an Ldap error code.
		/// </exception>
		public SchemaSyncRequest(System.String serverName, int delay):base(ReplicationConstants.SCHEMA_SYNC_REQ, null)
		{
			
			try
			{
				
				if ((System.Object) serverName == null)
					throw new System.ArgumentException(ExceptionMessages.PARAM_ERROR);
				
				System.IO.MemoryStream encodedData = new System.IO.MemoryStream();
				LBEREncoder encoder = new LBEREncoder();
				
				Asn1OctetString asn1_serverName = new Asn1OctetString(serverName);
				Asn1Integer asn1_delay = new Asn1Integer(delay);
				
				asn1_serverName.encode(encoder, encodedData);
				asn1_delay.encode(encoder, encodedData);
				
				setValue(SupportClass.ToSByteArray(encodedData.ToArray()));
			}
			catch (System.IO.IOException ioe)
			{
				throw new LdapException(ExceptionMessages.ENCODING_ERROR, LdapException.ENCODING_ERROR, (System.String) null);
			}
		}
All Usage Examples Of Novell.Directory.Ldap.Asn1.Asn1OctetString::encode