IADsPropertyValue

The IADsPropertyValue interface is used to represent a value of an IADsPropertyEntry object in a predefined data type.

The IADsPropertyEntry::Values property contains an array of IADsPropertyValue objects. Each of the objects contains a single value of the IADsPropertyEntry object. For more information and a code example on creating entirely 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, call IADs::GetInfo or IADs::GetInfoEx explicitly 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 of the property value object.

Properties

Details

Clear()

Clears the current values of the property value object.

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.Interop.Adsi;
using Softerra.Adaxes.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. Data types are specified in the ADSTYPEENUM enumeration.

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

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