/// <summary> /// Возвращает объект настройки для соотв типа синхронизации /// </summary> /// <param name="oItemType">Type of the o item.</param> /// <returns></returns> public syncProviderSetting GetSyncProviderSettingByType(Outlook.OlItemType oItemType) { syncProviderSetting retVal = null; if (CurrentSettings == null) { throw new NullReferenceException("CurrentSetting"); } switch (oItemType) { case Outlook.OlItemType.olAppointmentItem: retVal = CurrentSettings.CurrentSyncAppointentSetting; break; case Outlook.OlItemType.olContactItem: retVal = CurrentSettings.CurrentContactSetting; break; case Outlook.OlItemType.olNoteItem: retVal = null; break; case Outlook.OlItemType.olTaskItem: retVal = CurrentSettings.CurrentTaskSetting; break; } return(retVal); }