Class BindingCollection
- Namespace
- CMS.DataEngine
- Assembly
- CMS.DataEngine.dll
Info collection of object bindings
public class BindingCollection : InfoObjectCollection, IDataContainer, ISimpleDataContainer, IVirtualHierarchicalObject, IHierarchicalObject, IInfoObjectCollection<BaseInfo>, IInfoObjectCollection, IVirtualTypedCollection, ICMSQueryable<BaseInfo>, ICMSQueryable, INamedEnumerable<BaseInfo>, INamedEnumerable, IIndexable<BaseInfo>, INameIndexable<BaseInfo>, INameIndexable, IIndexable
- Inheritance
-
objectBindingCollection
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
BindingCollection(string)
Constructor
public BindingCollection(string objectType)
Parameters
objectType
stringObject type
Methods
Add(params BaseInfo[])
Adds new object to the collection.
public override void Add(params BaseInfo[] objects)
Parameters
objects
BaseInfo[]Objects to add
Add(params int[])
Adds given bindings to the collection. Supported only for collections with parent defined. Returns newly created binding objects.
public virtual List<BaseInfo> Add(params int[] bindingIds)
Parameters
bindingIds
int[]Binding IDs to add
Returns
- List<BaseInfo>
Add(params string[])
Adds given bindings to the collection. Supported only for collections with parent defined, and target object having code name column. Returns newly created binding objects.
public virtual List<BaseInfo> Add(params string[] bindingCodeNames)
Parameters
bindingCodeNames
string[]Binding code names to add
Returns
- List<BaseInfo>
AddBinding(string, int)
Adds a new binding
protected virtual BaseInfo AddBinding(string bindingColumn, int bindingId)
Parameters
bindingColumn
stringBinding column
bindingId
intBinding ID
Returns
Clone()
Creates the clone of the collection.
public override IInfoObjectCollection<BaseInfo> Clone()
Returns
GetBindingColumn(out string)
Gets the binding column and object type
protected virtual string GetBindingColumn(out string targetObjectType)
Parameters
targetObjectType
stringReturns target object type
Returns
- string
GetTargetObjectId(BaseInfo)
Gets the target object ID for this collection
protected virtual int GetTargetObjectId(BaseInfo infoObj)
Parameters
infoObj
BaseInfoObject to process
Returns
- int
Remove(params BaseInfo[])
Adds new object to the collection.
public override void Remove(params BaseInfo[] objects)
Parameters
objects
BaseInfo[]Objects to add
Remove(params int[])
Removes given bindings from the collection. Supported only for collections with parent defined. Returns removed binding objects.
public virtual List<BaseInfo> Remove(params int[] bindingIds)
Parameters
bindingIds
int[]Binding IDs to remove
Returns
- List<BaseInfo>
Remove(params string[])
Removes given bindings from the collection. Supported only for collections with parent defined, and target object having code name column. Returns removed binding objects.
public virtual List<BaseInfo> Remove(params string[] bindingCodeNames)
Parameters
bindingCodeNames
string[]Binding code names to remove
Returns
- List<BaseInfo>
RemoveBinding(string, int)
Removes the binding
protected virtual BaseInfo RemoveBinding(string bindingColumn, int bindingId)
Parameters
bindingColumn
stringBinding column
bindingId
intBinding ID