/// <summary> /// Enables service. /// </summary> /// <param name="communicationServiceType"></param> public void ServiceEnable(CommunicationServiceType communicationServiceType) { List<CommunicationServiceType> t1; ServiceSupported(out t1); if (t1.Any(t => t.Equals(communicationServiceType))) { if (!(ServiceIsEnabled(communicationServiceType))) { ServiceTypeList.Add(communicationServiceType); } } }
/// <summary> /// Returns true if the specified ServiceType is registered on the PhoneNumber. /// </summary> /// <param name="communicationServiceType"></param> /// <returns></returns> public bool HasService(CommunicationServiceType communicationServiceType) { return ServiceTypeList.Any(t => t.Equals(communicationServiceType)); }
/// <summary> /// Returns true if the specified ServiceType is registered on the PhoneNumber. /// </summary> /// <param name="communicationServiceType"></param> /// <returns></returns> public virtual bool ServiceIsEnabled(CommunicationServiceType communicationServiceType) { return ServiceTypeList.Any(t => t.Equals(communicationServiceType)); }
/// <summary> /// Disables service. /// </summary> /// <param name="communicationServiceType"></param> protected virtual void ServiceDisable(CommunicationServiceType communicationServiceType) { if (!(ServiceIsEnabled(communicationServiceType))) { ServiceTypeList.Remove(communicationServiceType); } }