MFIdentifier Class

Identification object type, that can be set to string and int. Implicit conversion to integer, explicit to alias string.

Definition

Namespace: MFiles.VAF.Configuration
Assembly: MFiles.VAF.Configuration (in MFiles.VAF.Configuration.dll) Version: 23.12.13247.3
C#
[SerializableAttribute]
public class MFIdentifier
Inheritance
Object    MFIdentifier
Derived

Constructors

MFIdentifier Constructor.
MFIdentifier(Int32) Constructor with known integer ID value.
MFIdentifier(Object) Constructor to unknown any type object.
MFIdentifier(ObjID) Constructor for ObjIDs.
MFIdentifier(String) Constructor with known string value.

Properties

Alias Alias string. Setting this will clear the resolved ID value.
Empty Is this MFIdentifier empty == unset value. Use IsEmpty.
Guid GUID if original string value was valid GUID, else empty string. AsOfNow the Alias will also return valid GUID, this might change in the future.
GUID Alias for the Guid member.
ID ID integer.
IsEmpty Indicates if the identifier is not set, or set to empty.
IsGuid Indicates if the set identifier is valid GUID format.
IsIDAvailable Indicates if there is a valid ID value available (even if it wasn't resolved). Returns true if the id has been resolved, or if the identifier was set with an id or ObjID and the id isn't considered unresolved (-1).
IsObjID Indicates if the identifier is valid ObjID format.
IsObjVer Indicates if the identifier is valid ObjVer format.
IsResolved Indicates if the set identifier is already resolved.
ObjID The ObjID of the item. Only relevant for ValueListItems and ObjIDs.
Resolved Is this identifier is resolved to valid ID. Use IsResolved.
ResolvedType The type which the identifier was resolved as. Null if the identifier is not resolved.
UnresolvedID Value of unresolved ID used as "error-value" (for this structure type).
UnsafeID Returns an ID value if available (even if it wasn't resolved). The ID is available if it has been resolved, or if the identifier was set with an id or ObjID and the id isn't considered unresolved (-1). It is unsafe because it hasn't necessary been resolved (verified to exist) in the current vault.
ValueList The value list related to the resolved id (if relevant)

Methods

_Resolve Internal resolving method.
Equals(MFIdentifier) Equality of two MFIdentifiers. For resolved identifiers, type and ID must match. If either one is unresolved, aliases or original ids must match.
Equals(Object) Equality with any other object.
(Overrides ObjectEquals(Object))
GetHashCode Get Hash Code.
(Overrides ObjectGetHashCode)
GetUnresolvedType  
IsNullOrEmpty Indicates whether specified MFIdentifier is null or empty.
IsNullOrUnresolved Indicates whether specified MFIdentifier is null or empty or not Resolved.
IsObjIDString Indicates if the passed string matches a valid ObjID format.
IsObjVerString Indicates if the passed string matches a valid ObjVer format.
IsValidGuid Indicates whether the passed string is a valid M-Files formatted GUID. {00000000-0000-0000-0000-000000000000}
ParseObjIDString Parses a string into an ObjID object.
Resolve(Vault, Type, Boolean) Update this MFIdentifier to contain resolved ID of the alias, if it is not already resolved. Returns itself to allow command chaining.
Resolve(Vault, Type, Int32, Boolean) Update this MFIdentifier to contain resolved ID of the alias, if it is not already resolved. Returns itself to allow command chaining.
ResolveID Resolves the id of a vault element by reference.
Set Helper function able to set the identifier value to almost any object type. Accepts MFIdentifier, string, int, enum, and other that cast to string. Returns itself to allow command chaining.
SetAsID Indicates whether the MFIdentifier was intially set as an id. Allows serialization to match deserialized values, or to skip resolution.
ShouldSerializeAlias Method deciding should we include Alias into serialization output. Yes when we have an alias.
ShouldSerializeID Method deciding should we include ID into serialization output. Yes only when we dont have an alias.
ToString Returns this instance of Alias value, if not avail, returns string of ID.
(Overrides ObjectToString)

Operators

(MFIdentifier to String) Original value string value can be got by explicit request. Allowing conversion and assignment into string. string s = (string)SomeIdent; If only ID number available, returns it as a string.
(Int32 to MFIdentifier) Implicit conversion of int to Ident, allowing: MFIdentifier x = 109;
(Int64 to MFIdentifier) Implicit conversion of long int to Ident, allowing: MFIdentifier x = 109;
(MFBuiltInDocumentClass to MFIdentifier) Implicit cast from M-Files enum to identifier.
(MFBuiltInObjectClass to MFIdentifier) Implicit cast from M-Files enum to identifier.
(MFBuiltInObjectType to MFIdentifier) Implicit cast from M-Files enum to identifier.
(MFBuiltInPropertyDef to MFIdentifier) Implicit cast from M-Files enum to identifier.
(MFBuiltInUserGroup to MFIdentifier) Implicit cast from M-Files enum to identifier.
(MFBuiltInValueList to MFIdentifier) Implicit cast from M-Files enum to identifier.
(MFBuiltInView to MFIdentifier) Implicit cast from M-Files enum to identifier.
(MFIdentifier to Int32) Implicit conversion to int identifier, allowing direct use in place of int.
(String to MFIdentifier) Implicit conversion of string to MFIdentifier. Allowing: MFIdentifier x = "string";

Fields

BuiltInDocumentClass Built in document class ids.
BuiltInObjectClasses Built in object class ids.
BuiltInObjTypes Built in object type ids.
BuiltInProperties Built in property def ids.
BuiltInUserGroups Built in user group ids.
BuiltInValueLists Built in value list ids.
BuiltInViews Built in view ids.
SetAs Internal information keeping track which type of value was set into this identifier.
type Last used target type.

See Also