Microsoft Lync 2010 API is a framework that exposes a collection of interfaces, delegates, and enumerations. The naming convention used by the Lync 2010 API framework gives you a simple method to distinguish one type from another.
The Microsoft.Lync.Model assembly that is installed with the SDK provides the full Lync 2010 API organized into six namespaces. These namespaces group the individual classes and enumerations of the API by feature area. The base namespace is and contains classes encapsulating the basic features of the API. The other five namespaces are:
The feature areas of the classes contained in these namespaces are self-evident.
Class names in the Lync API follow the conventions of .NET development. That is, class names are Pascal cased and are noun or noun phrases. Where a namespace provides derived classes, the derived class is named such the derivation precedes the base class name. For example, the class is derived from the class and exposes methods and properties unique to a user-defined (or "custom") class.
The name of an instance of a Lync 2010 API class obtained as an event argument has three parts. The first part indicates either an entity such as a collection or an event whose state is exposed by the class instance. The second part is a past-tense verb that describes the event resulting in a new state. Finally, event-related class instance name appends "EventArgs" to indicate the class exposes the changed state of the type that raised the event. For example, is an event-specific class that is surfaced by an event raised on the class when a contact has published updated contact information.
Lync 2010 API enumerations are not prefixed and represent allowed property values, method parameter values, entity states and entity types. The enumeration name is formed by combining a noun representing the type and an adjective representing the use of the enumeration. An example of this is the enumeration. This enumeration describes the current state of a conversation type. Individual properties of a conversation are enumerated by ..
Enumerations that let you pass appended types as a single method parameter are appended with "s". For example, an instance of the class exposes the member method. You specify the modalities to be used in the conversation by appending individual enumerator flags of the AutomationModalitiesenumeration. The appendix syntax looks like AutomationModalities MyChosenMode = AutomationModalities.FileTransfer | AutomationModalities.InstantMessage;where MyChosenModeis passed as the first argument of .
Lync 2010 API framework uses the System.EventHandlerdelegate to implement the events that can be raised by a Lync 2010 API class. Event names indicate the class instance whose state changed and the nature of the state change that triggers an event. The event is indicated in the event name by appending an action verb in the past tense. For example, is raised by when a conversation entity has been added to the conversation managers collection of conversations.