TryGetValue method

bool TryGetValue(
  1. PropertyDefinitionBase propertyDefinition,
  2. OutParam<SortDirection> sortDirectionOutParam
)
Tries to get the value for a property definition in the collection. The property definition. The sort direction.

Implementation

bool TryGetValue(PropertyDefinitionBase propertyDefinition,
    OutParam<SortDirection> sortDirectionOutParam) {
  for (MapEntry<PropertyDefinitionBase, SortDirection> pair
      in this._propDefSortOrderPairList) {
    if (pair.value == propertyDefinition) {
      sortDirectionOutParam.param = pair.value;
      return true;
    }
  }

  sortDirectionOutParam.param =
      SortDirection.Ascending; // out parameter has to be set to some value.
  return false;
}