PropertyBag class

Represents a property bag keyed on PropertyDefinition objects.

Constructors

PropertyBag(ServiceObject owner)
Initializes a new instance of PropertyBag.

Properties

hashCode int
The hash code for this object.
no setterinherited
IsDirty bool
True if the bag has pending changes, false otherwise.
no setter
Owner ServiceObject?
Gets the owner of this bag.
no setter
Properties Map<PropertyDefinition, Object>
Gets a dictionary holding the bag's properties.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

Changed() → void
Sets the isDirty flag to true and triggers dispatch of the change event to the owner of the property bag. Changed must be called whenever an operation that changes the state of this property bag is performed (e.g. adding or removing a property).
Clear() → void
Clears the bag.
ClearChangeLog() → void
Clears the bag's change log.
Contains(PropertyDefinition propertyDefinition) bool
Determines whether the property bag contains a specific property.
DeleteProperty(PropertyDefinition propertyDefinition) → void
Deletes the property from the bag.
GetIsUpdateCallNecessary() bool
Determines whether an EWS UpdateItem/UpdateFolder call is necessary to save the changes that occurred in the bag.
GetPropertyValueOrException(PropertyDefinition propertyDefinition, OutParam<ServiceLocalException> serviceExceptionOutParam) Object?
Gets the property value.
InitComplexProperty(ComplexProperty complexProperty) → void
Initializes a ComplexProperty instance. When a property is inserted into the bag, it needs to be initialized in order for changes that occur on that property to be properly detected and dispatched.
IsPropertyLoaded(PropertyDefinition propertyDefinition) bool
Determines whether specified property is loaded. This also includes properties that were requested when the property bag was loaded but were not returned by the server. In this case, the property value will be null.
IsPropertyUpdated(PropertyDefinition propertyDefinition) bool
Determines whether the specified property has been updated.
LoadFromXml(EwsServiceXmlReader reader, bool clear, PropertySet? requestedPropertySet, bool onlySummaryPropertiesRequested) Future<void>
Loads properties from XML and inserts them in the bag.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
PropertyChanged(ComplexProperty complexProperty) → void
Handles a change event for the specified property.
toString() String
A string representation of this object.
inherited
TryGetProperty(PropertyDefinition propertyDefinition, OutParam<Object> propertyValueOutParam) bool
Tries to get a property value based on a property definition.
TryGetPropertyTypeGeneric<T>(PropertyDefinition propertyDefinition, OutParam<T> propertyValue) bool
Tries to get a property value based on a property definition.
TryGetValue(PropertyDefinition propertyDefinition, OutParam<Object> propertyValueOutParam) bool
Tries to retrieve the value of the specified property.
Validate() → void
Validate property bag instance.
ValidatePropertyValue(PropertyDefinition propertyDefinition) → void
Validates the property value.
WriteDeleteUpdateToXml(EwsServiceXmlWriter writer, PropertyDefinition propertyDefinition, Object? propertyValue) → void
Writes an EWS DeleteUpdate opeartion for the specified property.
WriteToXml(EwsServiceXmlWriter writer) → void
Writes the bag's properties to XML.
WriteToXmlForUpdate(EwsServiceXmlWriter writer) → void
Writes the EWS update operations corresponding to the changes that occurred in the bag to XML.

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](PropertyDefinition propertyDefinition) Object?
Gets or sets the value of a property.
operator []=(PropertyDefinition propertyDefinition, Object? value) → void

Static Methods

AddToChangeList(PropertyDefinition propertyDefinition, List<PropertyDefinition> changeList) → void
Adds the specified property to the specified change list if it is not already present.
GetPropertyUpdateItemName(ServiceObject serviceObject) String
Gets the name of the property update item.