Class MacroFieldContainer
- Namespace
- CMS.MacroEngine
- Assembly
- CMS.MacroEngine.dll
Container for field extensions of an arbitrary object used by MacroEngine.
public class MacroFieldContainer : MacroExtensionContainer<MacroFieldContainer, MacroField>
- Inheritance
-
objectMacroFieldContainer
- Inherited Members
- Extension Methods
Methods
GetField(string)
Returns a field of given name (return null if specified field does not exist).
public MacroField GetField(string name)
Parameters
name
stringField name
Returns
GetFieldForObject(object, string)
Returns macro field object of given name if registered for specified object. It loops through all MacroFieldContainer extensions of given object type. Returns null if there is no such Extension for given object.
public static MacroField GetFieldForObject(object obj, string name)
Parameters
obj
objectObject to check
name
stringName of the field
Returns
GetFieldsForObject(object)
Returns list of macro field extension registered for specified object. Returns null if there is no such extension for given object.
public static IEnumerable<MacroField> GetFieldsForObject(object obj)
Parameters
obj
objectObject to check
Returns
- IEnumerable<MacroField>
RegisterExtensions()
Registers all the fields.
protected override void RegisterExtensions()
RegisterField(MacroField)
Registers the given field.
public void RegisterField(MacroField field)
Parameters
field
MacroFieldField to register
RegisterFields()
Registers all the fields.
protected virtual void RegisterFields()