MFUtils Class

Provides some common utility methods for M-Files operations.

Definition

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

Properties

BuiltInProperties Built in property def ids.

Methods

AddUniqueT(IListT, T) Collection Extension to Ensure items added to a collection are unique
AddUniqueT(IListT, IEnumerableT) Collection Extension to Ensure items added to a collection are unique
AddWeekDays Adds number of requested week days to current day and returns it.
ClearTransactionVariable Removes a key from the named value storage.
ConvertToLocalVault Converts the vault object to locally used and possibly stored vault object. This method allows the implementations to improve the performance by using in-process vault.
GetFirstWorkflowState Gets the first workflow state defined by a workflow.
GetLoadableTypes Get all loadable types from an assembly.
GetStateActionSetPropertyValue Retrieves the Property value of a State action for specific property if it exists. Returns null if property or action set properties not found.
GetStateAdmin Retrieves the StateAdmin object for a state.
GetTransactionVariables Gets all values from a specific named value storage namespace.
GetWorkflowIDByState Finds a state's workflow.
GetWorkflowIDByTransition Finds a transition's workflow.
IsAlreadyCheckedOutError Checks if the Exception is an 'Already checked out' error.
IsAtleast Return true if this version is at least the given separate version number.
IsFileNotFoundError Checks if the Exception is an 'The system cannot find the file specified.' error.
IsInvalidComObjectError  
IsLikelyTransientError  
IsLockConflictError  
IsMFilesAccessDeniedError Checks if the COMException is an 'Object Locked' error.
IsMFilesAlreadyExistsError Checks if the Exception is a M-Files 'already exists' error.
IsMFilesError  
IsMFilesNotFoundError Checks if the exception is a 'not found' error.
IsMFilesObjectLockedError Checks if the COMException is an 'Object Locked' error.
IsObjIDString Indicates if the passed string matches a valid ObjID format.
IsObjVerString Indicates if the passed string matches a valid ObjVer format.
IsRemoteProcedureCallFailedError Determines if this error is a Remote procedure call failed error..
IsRpcServerUnavailableError Determines if this error is a RPC Server Unavailable error.
IsSessionWithServerNoLongerValidError Determines if this error is a "The current session with M-Files Server is no longer valid" error.
IsValidEmail Email Address Validator.
IsValidGuid Indicates whether the passed string is a valid M-Files formatted GUID. {00000000-0000-0000-0000-000000000000}
IsValidLicenseStatus Return true if given license status is for valid license.
ObjIDString Converts an ObjID into human readable, and code-parseable string.
ObjVerString Converts an ObjVer into human readable, and code-parseable string.
ParseObjIDString Parses a string into an ObjID object.
ParseObjVerString Parses a string into an ObjVer object.
RemoveWhitespace Removes all white spaces from the given string.
SetTransactionVariable Sets a value to the named value storage.
ToAliasArray Helper used for parsing the semantic aliases string into an string array of aliases.
ToLookups Collection Extension to convert a List of ObjVerEx to a Lookups collection.
ToStrings Converts a IEnumerable of string into a Strings collection.
TryGetPropertyValueFromComObj Attempts to resolve the value from the properties a COM object using the property name. This prevents errors in some com objects that may not have a value set for the property. - These properties will throw an "Unspecified error. (0x80004005)" when attempting to - access the value if no value is present.
TryGetTransactionVariable Gets a specific value from the named value storage.

Fields

CurrentUser Constant -100, current user.
CurrentUserAndUsersForWhomTheCurrentUserIsASubstitute Constant -103, current user and users for whom the current user is a substitute
DefaultClassPropertyDefs List of properties included automatically as associated property defs in all classes.

See Also