Beispiel #1
0
 internal static void TransformControls(DirectoryControl[] controls)
 {
     if (controls != null)
     {
         for (int i = 0; i < (int)controls.Length; i++)
         {
             if (!(controls[i].GetType() != typeof(DirectoryControl)) && controls[i].Type == "1.2.840.113556.1.4.1504")
             {
                 byte[]               value                = controls[i].GetValue();
                 object[]             objArray             = BerConverter.Decode("{e}", value);
                 int                  num                  = (int)objArray[0];
                 ADAsqResponseControl aDAsqResponseControl = new ADAsqResponseControl(num, controls[i].IsCritical, value);
                 controls[i] = aDAsqResponseControl;
             }
         }
         return;
     }
     else
     {
         return;
     }
 }
Beispiel #2
0
 private void ProcessAsqResponse(ADSearchResponse response)
 {
     if (!string.IsNullOrEmpty(this._attributeScopedQuery))
     {
         DirectoryControl[] controls = response.Controls;
         int num = 0;
         while (num < (int)controls.Length)
         {
             ADAsqResponseControl aDAsqResponseControl = controls[num] as ADAsqResponseControl;
             if (aDAsqResponseControl == null)
             {
                 num++;
             }
             else
             {
                 if (aDAsqResponseControl.Result == ResultCode.Success)
                 {
                     break;
                 }
                 int            errorCode      = ADStoreAccess.MapResultCodeToErrorCode(aDAsqResponseControl.Result);
                 Win32Exception win32Exception = new Win32Exception(errorCode);
                 object[]       message        = new object[3];
                 message[0] = this._searchRoot;
                 message[1] = this._attributeScopedQuery;
                 message[2] = win32Exception.Message;
                 string str = string.Format(CultureInfo.CurrentCulture, StringResources.AsqResponseError, message);
                 throw ExceptionHelper.GetExceptionFromErrorCode(errorCode, str, null);
             }
         }
         return;
     }
     else
     {
         return;
     }
 }
Beispiel #3
0
		internal static void TransformControls(DirectoryControl[] controls)
		{
			if (controls != null)
			{
				for (int i = 0; i < (int)controls.Length; i++)
				{
					if (!(controls[i].GetType() != typeof(DirectoryControl)) && controls[i].Type == "1.2.840.113556.1.4.1504")
					{
						byte[] value = controls[i].GetValue();
						object[] objArray = BerConverter.Decode("{e}", value);
						int num = (int)objArray[0];
						ADAsqResponseControl aDAsqResponseControl = new ADAsqResponseControl(num, controls[i].IsCritical, value);
						controls[i] = aDAsqResponseControl;
					}
				}
				return;
			}
			else
			{
				return;
			}
		}