Click or drag to resize

MFIdentifier Class

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

Namespace:  MFiles.VAF.Configuration
Assembly:  MFiles.VAF.Configuration (in MFiles.VAF.Configuration.dll) Version: 2.1.0.1 (2.1.0.1)
Syntax
C#
[SerializableAttribute]
[DataContractAttribute(Namespace = "", Name = "MetadataIdentity")]
[JsonConverterAttribute(typeof(MFIdentifierJsonConverter))]
public class MFIdentifier : IEquatable<MFIdentifier>

The MFIdentifier type exposes the following members.

Constructors
  NameDescription
Public methodMFIdentifier
Constructor.
Public methodMFIdentifier(ObjID)
Constructor for ObjIDs.
Public methodMFIdentifier(Int32)
Constructor with known integer ID value.
Public methodMFIdentifier(Object)
Constructor to unknown any type object.
Public methodMFIdentifier(String)
Constructor with known string value.
Top
Properties
  NameDescription
Public propertyAlias
Alias string. Setting this will clear the resolved ID value.
Public propertyEmpty
Is this MFIdentifier empty == unset value. Use IsEmpty.
Public propertyGuid
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.
Public propertyGUID Obsolete.
Alias for the Guid member.
Public propertyID
ID integer.
Public propertyIsEmpty
Indicates if the identifier is not set, or set to empty.
Public propertyIsGuid
Indicates if the set identifier is valid GUID format.
Public propertyIsIDAvailable
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).
Public propertyIsObjID
Indicates if the identifier is valid ObjID format.
Public propertyIsObjVer
Indicates if the identifier is valid ObjVer format.
Public propertyIsResolved
Indicates if the set identifier is already resolved.
Public propertyObjID
The ObjID of the item. Only relevant for ValueListItems and ObjIDs.
Public propertyResolved
Is this identifier is resolved to valid ID. Use IsResolved.
Public propertyResolvedType
The type which the identifier was resolved as. Null if the identifier is not resolved.
Protected propertyUnresolvedID
Value of unresolved ID used as "error-value" (for this structure type).
Public propertyUnsafeID
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.
Public propertyValueList
The value list related to the resolved id (if relevant)
Top
Methods
  NameDescription
Protected method_Resolve
Internal resolving method.
Public methodEquals(Object)
Equality with any other object.
(Overrides ObjectEquals(Object).)
Public methodEquals(MFIdentifier)
Equality of two MFIdentifiers. For resolved identifiers, type and ID must match. If either one is unresolved, aliases or original ids must match.
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Get Hash Code.
(Overrides ObjectGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic memberIsNullOrEmpty
Indicates whether specified MFIdentifier is null or empty.
Public methodStatic memberIsNullOrUnresolved
Indicates whether specified MFIdentifier is null or empty or not Resolved.
Public methodStatic memberIsObjIDString
Indicates if the passed string matches a valid ObjID format.
Public methodStatic memberIsObjVerString
Indicates if the passed string matches a valid ObjVer format.
Public methodStatic memberIsValidGuid
Indicates whether the passed string is a valid M-Files formatted GUID. {00000000-0000-0000-0000-000000000000}
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodStatic memberParseObjIDString
Parses a string into an ObjID object.
Public methodResolve(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.
Public methodResolve(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.
Public methodStatic memberResolveID
Resolves the id of a vault element by reference.
Public methodSet
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.
Public methodSetAsID
Indicates whether the MFIdentifier was intially set as an id. Allows serialization to match deserialized values, or to skip resolution.
Public methodShouldSerializeAlias
Method deciding should we include Alias into serialization output. Yes when we have an alias.
Public methodShouldSerializeID
Method deciding should we include ID into serialization output. Yes only when we dont have an alias.
Public methodToString
Returns this instance of Alias value, if not avail, returns string of ID.
(Overrides ObjectToString.)
Top
Operators
  NameDescription
Public operatorStatic member(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.
Public operatorStatic member(MFBuiltInDocumentClass to MFIdentifier)
Implicit cast from M-Files enum to identifier.
Public operatorStatic member(MFBuiltInObjectClass to MFIdentifier)
Implicit cast from M-Files enum to identifier.
Public operatorStatic member(MFBuiltInObjectType to MFIdentifier)
Implicit cast from M-Files enum to identifier.
Public operatorStatic member(MFBuiltInPropertyDef to MFIdentifier)
Implicit cast from M-Files enum to identifier.
Public operatorStatic member(MFBuiltInUserGroup to MFIdentifier)
Implicit cast from M-Files enum to identifier.
Public operatorStatic member(MFBuiltInValueList to MFIdentifier)
Implicit cast from M-Files enum to identifier.
Public operatorStatic member(MFBuiltInView to MFIdentifier)
Implicit cast from M-Files enum to identifier.
Public operatorStatic member(Int32 to MFIdentifier)
Implicit conversion of int to Ident, allowing: MFIdentifier x = 109;
Public operatorStatic member(Int64 to MFIdentifier)
Implicit conversion of long int to Ident, allowing: MFIdentifier x = 109;
Public operatorStatic member(String to MFIdentifier)
Implicit conversion of string to MFIdentifier. Allowing: MFIdentifier x = "string";
Public operatorStatic member(MFIdentifier to Int32)
Implicit conversion to int identifier, allowing direct use in place of int.
Top
Fields
  NameDescription
Protected fieldSetAs
Internal information keeping track which type of value was set into this identifier.
Protected fieldtype
Last used target type.
Top
See Also