public UpdateStatsResponseValue_element(
     LDAPOID statID,
     Asn1OctetString statValue)
 {
     this.statID = statID;
     this.statValue = statValue;
 }
 public ExtendedRequest(
     LDAPOID requestName,
     Asn1OctetString requestValue)
 {
     this.requestName  = requestName;
     this.requestValue = requestValue;
 }
 public ExtendedRequest(
     LDAPOID requestName,
     Asn1OctetString requestValue)
 {
     this.requestName = requestName;
     this.requestValue = requestValue;
 }
Exemple #4
0
 public SearchHintsRequestValue_element(
     LDAPOID hintId,
     Asn1OctetString hintValue)
 {
     this.hintId    = hintId;
     this.hintValue = hintValue;
 }
 public SearchHintsRequestValue_element(
     LDAPOID hintId,
     Asn1OctetString hintValue)
 {
     this.hintId = hintId;
     this.hintValue = hintValue;
 }
 public UpdateStatsResponseValue_element(
     LDAPOID statID,
     Asn1OctetString statValue)
 {
     this.statID    = statID;
     this.statValue = statValue;
 }
 public Control(
     LDAPOID controlType,
     Asn1Boolean criticality,
     Asn1OctetString controlValue)
 {
     this.controlType = controlType;
     this.criticality = criticality;
     this.controlValue = controlValue;
 }
Exemple #8
0
 public Control(
     LDAPOID controlType,
     Asn1Boolean criticality,
     Asn1OctetString controlValue)
 {
     this.controlType  = controlType;
     this.criticality  = criticality;
     this.controlValue = controlValue;
 }
Exemple #9
0
 public ExtendedResponse(
     LDAPResult_resultCode resultCode,
     LDAPDN matchedDN,
     LDAPString errorMessage,
     Referral referral,
     LDAPOID responseName,
     Asn1OctetString response)
 {
     this.resultCode   = resultCode;
     this.matchedDN    = matchedDN;
     this.errorMessage = errorMessage;
     this.referral     = referral;
     this.responseName = responseName;
     this.response     = response;
 }
 public ExtendedResponse(
     LDAPResult_resultCode resultCode,
     LDAPDN matchedDN,
     LDAPString errorMessage,
     Referral referral,
     LDAPOID responseName,
     Asn1OctetString response)
 {
     this.resultCode = resultCode;
     this.matchedDN = matchedDN;
     this.errorMessage = errorMessage;
     this.referral = referral;
     this.responseName = responseName;
     this.response = response;
 }
Exemple #11
0
        /// <summary>
        /// Decodes the object by BER.
        /// </summary>
        /// <param name="buffer">A buffer that contains a BER encoding result.</param>
        /// <param name="explicitTag">Indicates whether the tags should be encoded explicitly. In our Test Suites, it will always be true.</param>
        /// <returns>The number of the bytes consumed in the buffer to decode this object.</returns>
        /// <exception cref="Asn1ConstraintsNotSatisfied">
        /// Thrown when the constraints are not satisfied after decoding.
        /// </exception>
        /// <exception cref="Asn1DecodingUnexpectedData">
        /// Thrown when the data in the buffer can not be properly decoded.
        /// </exception>
        /// <remarks>Override this method in a user-defined class only if the procedure is not applicable in some special scenarios.</remarks>
        public override int BerDecode(IAsn1DecodingBuffer buffer, bool explicitTag = true)
        {
            int returnVal = 0, lengthAfterUniTag = 0, tagLength = 0;

            if (explicitTag)
            {
                //Decode the top most tag and universal class tag
                Asn1Tag topTag;
                returnVal += TagBerDecode(buffer, out topTag);
            }

            returnVal += LengthBerDecode(buffer, out lengthAfterUniTag);
            Asn1Tag valueTag;

            //Decode data
            valueTag = new Asn1Tag(Asn1TagType.Universal, 10)
            {
                EncodingWay = EncodingWay.Primitive
            };
            if (IsTagMatch(buffer, valueTag, out tagLength))
            {
                resultCode = new LDAPResult_resultCode();
                returnVal += resultCode.BerDecode(buffer, true);
            }

            valueTag = new Asn1Tag(Asn1TagType.Universal, 4)
            {
                EncodingWay = EncodingWay.Primitive
            };
            if (IsTagMatch(buffer, valueTag, out tagLength))
            {
                matchedDN  = new LDAPDN();
                returnVal += matchedDN.BerDecode(buffer, true);
            }

            // decode errorMessage
            valueTag = new Asn1Tag(Asn1TagType.Universal, 4)
            {
                EncodingWay = EncodingWay.Primitive
            };
            if (IsTagMatch(buffer, valueTag, out tagLength))
            {
                errorMessage = new LDAPString();
                returnVal   += errorMessage.BerDecode(buffer, true);
            }

            // decode referral
            valueTag = new Asn1Tag(Asn1TagType.Context, 3)
            {
                EncodingWay = EncodingWay.Constructed
            };
            if (IsTagMatch(buffer, valueTag, out tagLength))
            {
                referral   = new Referral();
                returnVal += referral.BerDecode(buffer, false);
            }

            // decode responseName
            valueTag = new Asn1Tag(Asn1TagType.Context, 10)
            {
                EncodingWay = EncodingWay.Primitive
            };
            if (IsTagMatch(buffer, valueTag, out tagLength, true))
            {
                responseName = new LDAPOID();
                returnVal   += responseName.BerDecode(buffer, false);
            }

            // decode response
            valueTag = new Asn1Tag(Asn1TagType.Context, 11)
            {
                EncodingWay = EncodingWay.Primitive
            };
            if (IsTagMatch(buffer, valueTag, out tagLength, true))
            {
                response   = new Asn1OctetString();
                returnVal += response.BerDecode(buffer, false);
            }

            return(returnVal);
        }
Exemple #12
0
 /// <summary>
 /// This constructor allows primitive data to be passed for all
 /// primitive elements.  It will create new object wrappers for
 /// the primitive data and set other elements to references to
 /// the given objects
 /// </summary>
 public SearchHints_element(LDAPOID hintId_, byte[] hintValue_)
 {
     hintId    = hintId_;
     hintValue = new Asn1OctetString(hintValue_);
 }
Exemple #13
0
 /// <summary>
 /// This constructor sets all elements to references to the
 /// given objects
 /// </summary>
 public SearchHints_element(LDAPOID hintId_, Asn1OctetString hintValue_)
 {
     hintId    = hintId_;
     hintValue = hintValue_;
 }
Exemple #14
0
 /// <summary>
 /// This constructor allows primitive data to be passed for all
 /// primitive elements.  It will create new object wrappers for
 /// the primitive data and set other elements to references to
 /// the given objects
 /// </summary>
 public UpdateStats_element(LDAPOID statID_, byte[] statValue_)
 {
     statID    = statID_;
     statValue = new Asn1OctetString(statValue_);
 }
Exemple #15
0
 /// <summary>
 /// This constructor sets all elements to references to the
 /// given objects
 /// </summary>
 public UpdateStats_element(LDAPOID statID_, Asn1OctetString statValue_)
 {
     statID    = statID_;
     statValue = statValue_;
 }