Class ServiceObject
- Namespace
- Microsoft.Exchange.WebServices.Data
- Assembly
- Microsoft.Exchange.WebServices.dll
Represents the base abstract class for all item and folder types.
public abstract class ServiceObject
- Inheritance
-
ServiceObject
- Derived
- Inherited Members
Properties
IsDirty
Gets a value indicating whether the object has been modified and should be saved.
public bool IsDirty { get; }
Property Value
IsNew
Indicates whether this object is a real store item, or if it's a local object that has yet to be saved.
public virtual bool IsNew { get; }
Property Value
this[PropertyDefinitionBase]
Gets the value of specified property in this instance.
public object this[PropertyDefinitionBase propertyDefinition] { get; }
Parameters
propertyDefinition
PropertyDefinitionBaseDefinition of the property to get.
Property Value
Exceptions
- ServiceVersionException
Raised if this property requires a later version of Exchange.
- PropertyException
Raised if this property hasn't been assigned or loaded. Raised for set if property cannot be updated or deleted.
Schema
Gets the schema associated with this type of object.
public ServiceObjectSchema Schema { get; }
Property Value
Service
Gets the ExchangeService the object is bound to.
public ExchangeService Service { get; }
Property Value
Methods
GetLoadedPropertyDefinitions()
Gets the collection of loaded property definitions.
public Collection<PropertyDefinitionBase> GetLoadedPropertyDefinitions()
Returns
- Collection<PropertyDefinitionBase>
Collection of property definitions.
Load()
Loads the first class properties. Calling this method results in a call to EWS.
public void Load()
Load(PropertySet)
Loads the specified set of properties. Calling this method results in a call to EWS.
public void Load(PropertySet propertySet)
Parameters
propertySet
PropertySetThe properties to load.
TryGetProperty(PropertyDefinitionBase, out object)
Try to get the value of a specified property in this instance.
public bool TryGetProperty(PropertyDefinitionBase propertyDefinition, out object propertyValue)
Parameters
propertyDefinition
PropertyDefinitionBaseThe property definition.
propertyValue
objectThe property value.
Returns
- bool
True if property retrieved, false otherwise.
TryGetProperty<T>(PropertyDefinitionBase, out T)
Try to get the value of a specified property in this instance.
public bool TryGetProperty<T>(PropertyDefinitionBase propertyDefinition, out T propertyValue)
Parameters
propertyDefinition
PropertyDefinitionBaseThe property definition.
propertyValue
TThe property value.
Returns
- bool
True if property retrieved, false otherwise.
Type Parameters
T
Type of expected property value.