ObjVerEx Class

Wraps an ObjVer object and vault, and provides convenience methods.

Definition

Namespace: MFiles.VAF.Common
Assembly: MFiles.VAF (in MFiles.VAF.dll) Version: 24.1.706.1
C#
public class ObjVerEx
Inheritance
Object    ObjVerEx

Constructors

ObjVerEx Default constructor which is used in ObjVerEx spoofing.
ObjVerEx(Vault, Lookup) Creates a new ObjVerEx Object from a Lookup.
ObjVerEx(Vault, ObjectVersion) Creates a new ObjVerEx Object from an ObjectVersion.
ObjVerEx(Vault, ObjectVersionAndProperties) Creates a new ObjVerEx Object from an ObjectVersionAndProperties object.
ObjVerEx(Vault, ObjVer) Creates a new ObjVerEx Object from an ObjVer.
ObjVerEx(Vault, ObjectVersion, PropertyValues) Creates a new ObjVerEx Object from an ObjectVersion.
ObjVerEx(Vault, Int32, Int32, Int32) Creates a new ObjVerEx Object.

Properties

ACL Returns this object version's ACL.
CanModify Determines if this version can be modified. Specifically determines if this is the latest version, and is not checked out, or is checked out to this user.
Class Returns the object's class ID.
Exists Determines if the object exists in the vault (not deleted, destroyed, nor unresolvable). Tries to be more efficient and safe than calling IsDeleted and IsDestroyed separately.
History Retrieves the history of this object, with each version wrapped as an ObjVerEx object. Also ensures the order of the object is from newest to oldest. Includes all versions, including the called instance.
ID Returns the ID of this object.
Info Returns the version information associated with this ObjVer.
IsDeleted Indicates whether the object is deleted.
IsDestroyed Indicates whether the object version has been destroyed.
IsEnteringState Determines if the object is entering the current state... IE. it is unique from the previous state.
IsFirstVersion Determines whether this object version is the first of the object.
IsLatestVersion Returns a boolean indicating whether the object is of the latest version.
IsLoaded Indicates whether both the Info (ObjectVersion) and Properties have been loaded in this wrapper.
IsPromoted Indicates whether this object is promoted from external source.
IsRecord Indicates whether this object is a M-Files Record.
IsTemplate Indicates whether this object is an M-Files template.
ObjID Returns the ObjID of this object.
ObjVer Returns the ObjVer of this object.
Permissions Returns this object version's permissions.
PreviousVersion The previous version of this object. Will fetch the properties and info of the previous version, as well.
Properties Returns the properties associated with this ObjVer.
SpecificVersion Returns whether specific version information is available, or if this ObjVerEx refers to the latest. Note: Accessing the Version property will automatically lookup the latest version.
State Returns the object's state. -1 if not set.
Title The title of this object version.
Type Returns the Type of this object.
Vault Returns the vault in which this object resides.
Version Returns the Version of this object.
VersionComment The version comment.
Workflow Returns the object's workflow. -1 if not set.

Methods

AddLookup(MFIdentifier, MFIdentifier) Adds a lookup item to the specified property in the PropertyValue collection. Adding the property to the object if it doesn't already exist.
AddLookup(Object, Object) Adds a lookup item to the specified property in the PropertyValue collection. Adding the property to the object if it doesn't already exist.
AddLookup(MFIdentifier, ObjVer, Boolean) Adds a lookup to the passed PropertyValue. Creating it if it doesn't already exist.
AddLookup(Object, ObjVer, Boolean) Adds a lookup to the passed PropertyValue. Creating it if it doesn't already exist.
AssertCheckedOut Asserts that the object is checked out. Throws an exception if it isn't.
CanCurrentUserDelete Indicates whether the passed user can delete this object version.
CanCurrentUserEdit Indicates whether the passed user can edit this object version.
CanCurrentUserRead Indicates whether the passed user can see the object.
CheckIn Checks in the object.
CheckOut Checks out the object.
Delete Deletes the underlying M-Files object.
Destroy Destroys the underlying M-Files object.
EndRequireCheckedOut Checks in the object if it was previously checked out by StartRequireCheckedOut().
EnsureAllLoaded Loads or reloads the Info (ObjectVersion) and Properties of multiple ObjVerExs with a single server call.
EnsureLoaded Fetches the object data and properties from server if they are not fetched yet.
Equals(Object) Overrides generic equals function.
(Overrides ObjectEquals(Object))
Equals(ObjVerEx) Overrides type specific equals function.
Equals(ObjVerEx, Boolean) Compares to the other ObjVerEx with the option of leaving the version information out of the comparison.
ExpandPlaceholders Expands a placeholder template text with this object as the context.
ExpandPlaceholderText Returns a string with M-Files placeholders replaced with values. Supports ReferenceTree Syntax.
ExpandReferenceTree Returns a list of ObjVerEx from M-Files placeholders referencing Real Objects. Supports: id number and {alias} referencing.
ExpandReferenceTreesAsLookup Returns a ObjVerEx from an M-Files placeholder. Supports: id number and {alias} referencing.
ForceUndoCheckout Forces the undo CheckOut operation.
GetAllDirectReferences(MFIdentifier) Gets all the direct references found in the given lookup-based property.
GetAllDirectReferences(Object) Gets all the direct references found in the given lookup-based property.
GetDirectReference(MFIdentifier) Returns the first non-deleted and non-destroyed object reference found in the given lookup based property.
GetDirectReference(Object) Returns the first non-deleted and non-destroyed object reference found in the given lookup based property.
GetDirectReferences(MFIdentifier, Boolean, Boolean) Gets all the direct references found in the given lookup-based property.
GetDirectReferences(Object, Boolean, Boolean) Gets all the direct references found in the given lookup-based property.
GetHashCode Overrides hash code method for efficient use in HashSets.
(Overrides ObjectGetHashCode)
GetIndirectReferences Returns a set of objects that reference this one.
GetLookupID(MFIdentifier) Returns the lookup id of a Lookup propertyValue in the PropertyValue collection.
GetLookupID(Object) Returns the lookup id of a Lookup propertyValue in the PropertyValue collection.
GetLookups(MFIdentifier) Returns the property's value as a lookups collection.
GetLookups(Object) Returns the property's value as a lookups collection.
GetLookupsFromProperty(MFIdentifier) Gets all the object lookups from a lookup based property.
GetLookupsFromProperty(Object) Gets all the object lookups from a lookup based property.
GetProperty(MFIdentifier) Returns the specified object property if found.
GetProperty(Object) Returns the specified object property if found.
GetPropertyText(ReferenceTreeMFDynamicIdentifier) Returns the text representation of the property value.
GetPropertyText(MFIdentifier) Returns the text representation of the property value.
GetPropertyText(Object) Returns the text representation of the property value.
HasClass(MFIdentifier) Checks if the passed class reference matches this object.
HasClass(Object) Checks if the passed class reference matches this object.
HasLookup(MFIdentifier, MFIdentifier) Determines if the referenced item is present in the referenced property.
HasLookup(Object, Object) Determines if the referenced item is present in the referenced property.
HasMatchingValues(PropertyValues, MFIdentifier) Indicates whether the specified properties in the passed PropertyValue collection have values that match in this object. If any of the property values cannot be resolved for either object there is never a match. When comparing lookups, versions in a lookup and the order of the lookups are meaningful.
HasMatchingValues(PropertyValues, Object) Indicates whether the specified properties in the passed PropertyValue collection have values that match in this object. If any of the property values cannot be resolved for either object there is never a match. When comparing lookups, versions in a lookup and the order of the lookups are meaningful.
HasProperty(MFIdentifier) Checks whether an object has a specific property.
HasProperty(Object) Checks whether an object has a specific property.
HasPropertyFlag(MFIdentifier, Boolean) Checks whether an object has a specific boolean property and it is true.
HasPropertyFlag(Object, Boolean) Checks whether an object has a specific boolean property and it is true.
HasValue(MFIdentifier) Checks whether an object has a specific property and it's value is not null.
HasValue(Object) Checks whether an object has a specific property and it's value is not null.
IsType(MFIdentifier) Checks if the passed object type reference matches this object.
IsType(Object) Checks if the passed object type reference matches this object.
Latest(Vault, ObjID) Returns an ObjVerEx object pointing to the latest version of the M-Files object.
Latest(Vault, Guid) Returns an ObjVerEx object pointing to the latest version of the M-Files object.
LoadFullHistory Loads the objects full history enusuring each version has its properties and history loaded and is properly previous-version chained.
MFilesURL Generates an M-Files URL via the given params.
Parse Loads an ObjVerEx object based on a ObjID or ObjVer string representation
Refresh Updates the ObjVerEx to the latest version on the server.
RefreshAll Efficiently refreshes multiple objVerExs at one time.
Relationships Returns related object references.
RelationshipsAsLookups Returns related object references as Lookups.
RemoveLookup(MFIdentifier, MFIdentifier) Removes a lookup item from the specified property in the PropertyValue collection.
RemoveLookup(Object, Object) Removes a lookup item from the specified property in the PropertyValue collection.
RemoveProperty(MFIdentifier) Removes the specified PropertyValue from the PropertyValue collection.
RemoveProperty(Object) Removes the specified PropertyValue from the PropertyValue collection.
ReplaceFiles Replaces the object's existing files with the ones passed. Does not change the objects single file value.
Rollback Rolls back the object to a previous version, adding optional comment.
SaveProperties Saves all properties as they currently are set, or the ones passed.
SaveProperty(PropertyValue) Saves the specific property immediately.
SaveProperty(MFIdentifier, MFDataType, Object) Saves the specific property immediately.
SaveProperty(Object, MFDataType, Object) Saves the specific property immediately.
SetCreatedBy Updates the created by property for the object. (Assumes the object is checked out)
SetLookup(MFIdentifier, MFIdentifier) Sets the passed lookup item as the only value of specified property in the PropertyValue collection.
SetLookup(Object, Object) Sets the passed lookup item as the only value of specified property in the PropertyValue collection.
SetModifiedBy Updates the last modified by property for the object. (Assumes the object is checked out)
SetProperty(PropertyValue) Adds or updates the specified PropertyValue in the PropertyValue collection.
SetProperty(MFIdentifier, MFDataType, Object) Adds or updates the specified PropertyValue in the PropertyValue collection.
SetProperty(Object, MFDataType, Object) Adds or updates the specified PropertyValue in the PropertyValue collection.
SetWorkflowState(MFIdentifier, MFIdentifier) Sets workflow and state values for the object.
SetWorkflowState(Object, Object) Sets workflow and state values for the object.
SetWorkflowStateTransition(MFIdentifier, String) Sets the workflow state transition for the object. Requires that the object already has a workflow.
SetWorkflowStateTransition(Object, String) Sets the workflow state transition for the object. Requires that the object already has a workflow.
StartRequireCheckedOut Checks out the object if it isn't already. Should be paired with the EndRequireCheckedOut() call when an operation requiring the object to be checked out is complete. The return value of this method should be the first parameter of EndRequireCheckedOut().
ToLookup Returns a Lookup representation of this ObjVerEx.
ToString Returns a string representation of the object version.
(Overrides ObjectToString)
ToString(Boolean) Returns a string representation of the object version.
TryGetProperty(MFIdentifier, PropertyValue) Attempts to retrieve the specified PropertyValue in the PropertyValue collection.
TryGetProperty(Object, PropertyValue) Attempts to retrieve the specified PropertyValue in the PropertyValue collection.
TryParse Tries to loads an ObjVerEx object based on a ObjID or ObjVer string representation

See Also