IUccPresenceContactCardInstance.IsAutomaton Property
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
Gets and sets the property to determine whether the underlying contact is an automaton.
Namespace: Microsoft.Office.Interop.UccApi
Assembly: Microsoft.Office.Interop.UccApi (in microsoft.office.interop.uccapi.dll)
Syntax
'Declaration
Property IsAutomaton As Boolean
bool IsAutomaton { get; set; }
property bool IsAutomaton {
bool get ();
void set (bool value);
}
/** @property */
boolean get_IsAutomaton ()
/** @property */
void set_IsAutomaton (boolean value)
function get IsAutomaton () : boolean
function set IsAutomaton (value : boolean)
Property Value
A value of the VARIANT_BOOL* (bool, for a .NET application) type. This value is TRUE if the contact is an automaton and FALSE if not.
Remarks
An automaton is a contact whose presence is never expected to change. An example of such an automaton is an IM bot interacting with many users. For performance reasons Office Communications Server allows a certain number of subscribers to watch for the bot (or a contact) at any given time. In the situation where the bot is put in the contact list of more users, an application can work around the server-imposed limitation by stopping a subscription to the bot when it gets the relevant presence information. This property is intended to facilitate this process.
Win32 COM/C++ Syntax
HRESULT get_IsAutomaton
(
VARIANT_BOOL* pfFlag
);
HRESULT put_IsAutomaton
(
VARIANT_BOOL pfFlag
);
Note
In a Win32 application, the return value of a method or property is always an HRESULT value indicating the status of the call to the interface member. Any result of the operation is returned as a parameter marked with the [out, retval] attribute. In contrast, in a .NET application the HRESULT value indicating an error condition is returned as a COM exception and the [out, retval] parameter becomes the return value. For the UCC API-defined HRESULT values, see Trace and Handle Errors in Unified Communications Client API.
Example
The following example is a method from a client application class that wraps an instance of IUccPresenceContactCardInstance. The example overrides the base.ToString()
method by returning elements of the wrapped contact card.
/// <summary>
/// This method overrides the base.ToString() method and returns
/// elements of a user's contact card if the contact is not
/// an automaton
/// </summary>
/// <returns>String containing all contact card information</returns>
public override string ToString()
{
string returnValue = string.Empty;
if (this._ContactCard.IsAutomaton == false)
{
StringBuilder sb = new StringBuilder();
sb = this.GetIdentity(sb, this._ContactCard);
sb.Append(System.Environment.NewLine);
sb = this.GetTitle(sb, this._ContactCard);
sb = this.GetPhones(sb, this._ContactCard);
sb = this.GetAddresses(sb, this._ContactCard);
sb = this.GetUrls(sb, this._ContactCard);
sb = this.GetCompany(sb, this._ContactCard);
sb = this.GetDepartment(sb, this._ContactCard);
sb = this.GetOfficeLocation(sb, this._ContactCard);
returnValue = sb.ToString();
}
else
{
returnValue = "Contact is Automaton";
}
return returnValue;
}
Thread Safety
All public static (Shared in Visual Basic) members of this type are thread-safe. Instance members are not guaranteed to be thread-safe.
Platforms
Development Platforms
Windows XP Professional with Service Pack 2 (SP2), Windows Server 2000 with Service Pack 4, Windows Server 2003, Windows Vista Ultimate Edition, Windows Vista Business Edition, Windows Vista Enterprise Edition
Target Platforms
See Also
Reference
IUccPresenceContactCardInstance Interface
IUccPresenceContactCardInstance Members
Microsoft.Office.Interop.UccApi Namespace