Add method

void Add(
  1. PropertyDefinitionBase propertyDefinition,
  2. SortDirection sortDirection
)
Adds the specified property definition / sort direction pair to the collection. The property definition. The sort direction.

Implementation

void Add(
    PropertyDefinitionBase propertyDefinition, SortDirection sortDirection) {
  if (this.Contains(propertyDefinition)) {
    throw new ServiceLocalException(
        "PropertyAlreadyExistsInOrderByCollection(${propertyDefinition.GetPrintableName()})");
  }

  this._propDefSortOrderPairList.add(
      new MapEntry<PropertyDefinitionBase, SortDirection>(
          propertyDefinition, sortDirection));
}