toStringWithObject method

  1. @override
String? toStringWithObject(
  1. Object value
)
override
Convert instance to string. The value.

Implementation

@override
String? toStringWithObject(Object value) {
  TaskDelegationState taskDelegationState = value as TaskDelegationState;

  switch (taskDelegationState) {
    case TaskDelegationState.NoDelegation:
      return NoMatch;
    case TaskDelegationState.Unknown:
      return OwnNew;
    case TaskDelegationState.Accepted:
      return Owned;
    case TaskDelegationState.Declined:
      return Accepted;
    default:
      EwsUtilities.Assert(
          false,
          "TaskDelegationStatePropertyDefinition.ToString",
          "Invalid TaskDelegationState value.");
      return null; // To keep the compiler happy
  }
}