예제 #1
0
        public SortRequestControl(string attributeName, string matchingRule, bool reverseOrder) : base("1.2.840.113556.1.4.473", null, true, true)
        {
            SortKey key = new SortKey(attributeName, matchingRule, reverseOrder);

            _keys    = new SortKey[1];
            _keys[0] = key;
        }
        public SortRequestControl(string attributeName, string matchingRule, bool reverseOrder) : base("1.2.840.113556.1.4.473", null, true, true)
        {
            this.keys = new SortKey[0];
            SortKey key = new SortKey(attributeName, matchingRule, reverseOrder);

            this.keys = new SortKey[] { key };
        }
예제 #3
0
		public SortRequestControl(SortKey[] sortKeys) : base("1.2.840.113556.1.4.473", null, true, true)
		{
			this.keys = new SortKey[0];
			if (sortKeys != null)
			{
				int num = 0;
				while (num < (int)sortKeys.Length)
				{
					if (sortKeys[num] != null)
					{
						num++;
					}
					else
					{
						throw new ArgumentException(Res.GetString("NullValueArray"), "sortKeys");
					}
				}
				this.keys = new SortKey[(int)sortKeys.Length];
				for (int i = 0; i < (int)sortKeys.Length; i++)
				{
					this.keys[i] = new SortKey(sortKeys[i].AttributeName, sortKeys[i].MatchingRule, sortKeys[i].ReverseOrder);
				}
				return;
			}
			else
			{
				throw new ArgumentNullException("sortKeys");
			}
		}
예제 #4
0
        public SortKeyInterop(SortKey sortKey)
        {
            if (sortKey == null)
            {
                throw new ArgumentNullException(nameof(sortKey));
            }

            AttributeName = sortKey.AttributeName;
            MatchingRule  = sortKey.MatchingRule;
            ReverseOrder  = sortKey.ReverseOrder;
        }
예제 #5
0
        public SortRequestControl(params SortKey[] sortKeys) : base("1.2.840.113556.1.4.473", null, true, true)
        {
            if (sortKeys == null)
                throw new ArgumentNullException("sortKeys");

            for (int i = 0; i < sortKeys.Length; i++)
            {
                if (sortKeys[i] == null)
                    throw new ArgumentException(Res.GetString(Res.NullValueArray), "sortKeys");
            }

            _keys = new SortKey[sortKeys.Length];
            for (int i = 0; i < sortKeys.Length; i++)
            {
                _keys[i] = new SortKey(sortKeys[i].AttributeName, sortKeys[i].MatchingRule, sortKeys[i].ReverseOrder);
            }
        }
예제 #6
0
 public SortRequestControl(string attributeName, string matchingRule, bool reverseOrder) : base("1.2.840.113556.1.4.473", null, true, true)
 {
     SortKey key = new SortKey(attributeName, matchingRule, reverseOrder);
     _keys = new SortKey[1];
     _keys[0] = key;
 }