Class ProfilePropertyDefinitionCollection
The ProfilePropertyDefinitionCollection class provides Business Layer methods for a collection of property Definitions.
Inheritance
Namespace: DotNetNuke.Entities.Profile
Assembly: DotNetNuke.dll
Syntax
public class ProfilePropertyDefinitionCollection : CollectionBase
Constructors
| Improve this Doc View SourceProfilePropertyDefinitionCollection()
Initializes a new instance of the ProfilePropertyDefinitionCollection class. Constructs a new default collection.
Declaration
public ProfilePropertyDefinitionCollection()
ProfilePropertyDefinitionCollection(ArrayList)
Initializes a new instance of the ProfilePropertyDefinitionCollection class. Constructs a new Collection from an ArrayList of ProfilePropertyDefinition objects.
Declaration
public ProfilePropertyDefinitionCollection(ArrayList definitionsList)
Parameters
Type | Name | Description |
---|---|---|
ArrayList | definitionsList | An ArrayList of ProfilePropertyDefinition objects. |
ProfilePropertyDefinitionCollection(ProfilePropertyDefinitionCollection)
Initializes a new instance of the ProfilePropertyDefinitionCollection class. Constructs a new Collection from a ProfilePropertyDefinitionCollection.
Declaration
public ProfilePropertyDefinitionCollection(ProfilePropertyDefinitionCollection collection)
Parameters
Type | Name | Description |
---|---|---|
ProfilePropertyDefinitionCollection | collection | A ProfilePropertyDefinitionCollection. |
Properties
| Improve this Doc View SourceItem[Int32]
Gets and sets an item in the collection.
Declaration
public ProfilePropertyDefinition this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index to get. |
Property Value
Type | Description |
---|---|
ProfilePropertyDefinition | A ProfilePropertyDefinition object. |
Remarks
This overload returns the item by its index.
Item[String]
Gets an item in the collection.
Declaration
public ProfilePropertyDefinition this[string name] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the Property to get. |
Property Value
Type | Description |
---|---|
ProfilePropertyDefinition | A ProfilePropertyDefinition object. |
Remarks
This overload returns the item by its name.
Methods
| Improve this Doc View SourceAdd(ProfilePropertyDefinition)
Adds a property Definition to the collectio.
Declaration
public int Add(ProfilePropertyDefinition value)
Parameters
Type | Name | Description |
---|---|---|
ProfilePropertyDefinition | value | A ProfilePropertyDefinition object. |
Returns
Type | Description |
---|---|
System.Int32 | The index of the property Definition in the collection. |
AddRange(ArrayList)
Add an ArrayList of ProfilePropertyDefinition objects.
Declaration
public void AddRange(ArrayList definitionsList)
Parameters
Type | Name | Description |
---|---|---|
ArrayList | definitionsList | An ArrayList of ProfilePropertyDefinition objects. |
AddRange(ProfilePropertyDefinitionCollection)
Add an existing ProfilePropertyDefinitionCollection.
Declaration
public void AddRange(ProfilePropertyDefinitionCollection collection)
Parameters
Type | Name | Description |
---|---|---|
ProfilePropertyDefinitionCollection | collection | A ProfilePropertyDefinitionCollection. |
Contains(ProfilePropertyDefinition)
Determines whether the collection contains a property definition.
Declaration
public bool Contains(ProfilePropertyDefinition value)
Parameters
Type | Name | Description |
---|---|---|
ProfilePropertyDefinition | value | A ProfilePropertyDefinition object. |
Returns
Type | Description |
---|---|
System.Boolean | A Boolean True/False. |
GetByCategory(String)
Gets a sub-collection of items in the collection by category.
Declaration
public ProfilePropertyDefinitionCollection GetByCategory(string category)
Parameters
Type | Name | Description |
---|---|---|
System.String | category | The category to get. |
Returns
Type | Description |
---|---|
ProfilePropertyDefinitionCollection | A ProfilePropertyDefinitionCollection object. |
GetById(Int32)
Gets an item in the collection by Id.
Declaration
public ProfilePropertyDefinition GetById(int id)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | id | The id of the Property to get. |
Returns
Type | Description |
---|---|
ProfilePropertyDefinition | A ProfilePropertyDefinition object. |
GetByName(String)
Gets an item in the collection by name.
Declaration
public ProfilePropertyDefinition GetByName(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the Property to get. |
Returns
Type | Description |
---|---|
ProfilePropertyDefinition | A ProfilePropertyDefinition object. |
IndexOf(ProfilePropertyDefinition)
Gets the index of a property Definition.
Declaration
public int IndexOf(ProfilePropertyDefinition value)
Parameters
Type | Name | Description |
---|---|---|
ProfilePropertyDefinition | value | A ProfilePropertyDefinition object. |
Returns
Type | Description |
---|---|
System.Int32 | The index of the property Definition in the collection. |
Insert(Int32, ProfilePropertyDefinition)
Inserts a property Definition into the collectio.
Declaration
public void Insert(int index, ProfilePropertyDefinition value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index to insert the item at. |
ProfilePropertyDefinition | value | A ProfilePropertyDefinition object. |
Remove(ProfilePropertyDefinition)
Removes a property definition from the collection.
Declaration
public void Remove(ProfilePropertyDefinition value)
Parameters
Type | Name | Description |
---|---|---|
ProfilePropertyDefinition | value | The ProfilePropertyDefinition object to remove. |
Sort()
Sorts the collection using the ProfilePropertyDefinitionComparer (ie by ViewOrder).
Declaration
public void Sort()