IADsPropertyValue

The IADsPropertyValue interface represents a value of a property entry.

The IADsPropertyEntry::Values property contains an array of IADsPropertyValue objects. For more information and a code sample on creating new property entries and values, see IADsPropertyList::PutPropertyItem.

When obtaining values in a format not provided by one of the properties of this interface, use the IADsPropertyValue2 interface.

Before calling the methods of this interface, explicitly call IADs::GetInfo or IADs::GetInfoEx to load the assigned values of the object into the cache, if the cache was not initialized. After modifying the properties of this interface, call IADs::SetInfo to save the changes to the directory.

Inheritance: IDispatch

Methods

  • Method

  • Description

  • Clear()

  • Clears the current values.

Properties

Details

Clear()

Clears the current values.

void Clear()

Examples

PowerShell
[Reflection.Assembly]::LoadWithPartialName("Softerra.Adaxes.Adsi")

# Connect to the Adaxes service.
$ns = New-Object "Softerra.Adaxes.Adsi.AdmNamespace"
$service = $ns.GetServiceDirectly("localhost")

# Bind to object.
$userPath = "Adaxes://CN=John Smith,CN=Users,DC=domain,DC=com"
$user = $service.OpenObject($userPath, $null, $null, 0)
$user.GetInfo()

$propertyEntry = $user.GetPropertyItem("description", "ADSTYPE_CASE_IGNORE_STRING")

foreach ($propertyValue in $propertyEntry.Values)
{
    Write-Host "Property Value: $propertyValue"

    $propertyValue.Clear()
    Write-Host "Property Value: $propertyValue"
}
C#
using System;
using Softerra.Adaxes.Adsi;
using Softerra.Adaxes.Interop.Adsi;
using Softerra.Adaxes.Interop.Adsi.Cache;
using Softerra.Adaxes.Interop.Adsi.PersistentObjects;

class Program
{
    static void Main(string[] args)
    {
        // Connect to the Adaxes service.
        AdmNamespace ns = new AdmNamespace();
        IAdmService service = ns.GetServiceDirectly("localhost");

        // Bind to object.
        const string userPath = "Adaxes://CN=John Smith,CN=Users,DC=domain,DC=com";
        IADs user = (IADs)service.OpenObject(userPath, null, null, 0);
        user.GetInfo();

        IADsPropertyList propertyList = (IADsPropertyList)user;
        IADsPropertyEntry propertyEntry =
            (IADsPropertyEntry)propertyList.GetPropertyItem("description",
            ADSTYPEENUM.ADSTYPE_CASE_IGNORE_STRING);

        foreach (IADsPropertyValue propertyValue in (Array)propertyEntry.Values)
        {
            Console.WriteLine("Property Value: {0}", propertyValue);

            propertyValue.Clear();
            Console.WriteLine("Property Value: {0}", propertyValue);
        }
    }
}

ADsType

Gets or sets the data type of the property.

Remarks

The data type determines which property of IADsPropertyValue should contain the actual value. For example, if ADsType is set to ADSTYPE_CASE_IGNORE_STRING, then the actual value will be in the CaseIgnoreString property.


Boolean

Gets or sets a boolean value.

  • Type:
  • int
  • Access:
  • Read/Write

CaseExactString

Gets or sets the value of a case-sensitive string.

  • Type:
  • string
  • Access:
  • Read/Write

CaseIgnoreString

Gets or sets the value of a case-insensitive string.

  • Type:
  • string
  • Access:
  • Read/Write

DNString

Gets or sets an object's distinguished name (DN).

  • Type:
  • string
  • Access:
  • Read/Write

Integer

Gets or sets an integer value.

  • Type:
  • int
  • Access:
  • Read/Write

LargeInteger

Gets or sets a large-integer value. Large integers are represented by the IADsLargeInteger interface.

  • Type:
  • Object
  • Access:
  • Read/Write

NumericString

Gets or sets the value of a string consisting of numeric characters.

  • Type:
  • string
  • Access:
  • Read/Write

OctetString

Gets or sets the value of a string of eight-bit characters.

  • Type:
  • Object
  • Access:
  • Read/Write

PrintableString

Gets or sets the value of a printable string.

  • Type:
  • string
  • Access:
  • Read/Write

SecurityDescriptor

Gets or sets a security descriptor. Security descriptors are represented by the IADsSecurityDescriptor interface.

  • Type:
  • Object
  • Access:
  • Read/Write

UTCTime

Gets or sets a Coordinated Universal Time value.

  • Type:
  • DateTime
  • Access:
  • Read/Write

Requirements

Minimum required version: 2009.1

See also