Ejemplo n.º 1
0
    public static MappingConfigurationBase CoreceMappingConfiguration (OlItemType? outlookFolderType, MappingConfigurationBase mappingConfiguration)
    {
      switch (outlookFolderType)
      {
        case OlItemType.olAppointmentItem:
          if (mappingConfiguration == null || mappingConfiguration.GetType() != typeof (EventMappingConfiguration))
            return new EventMappingConfiguration();
          break;
        case OlItemType.olContactItem:
          if (mappingConfiguration == null || mappingConfiguration.GetType() != typeof (ContactMappingConfiguration))
            return new ContactMappingConfiguration();
          break;
      }

      return mappingConfiguration;
    }
    private MappingConfigurationBase CoreceMappingConfiguration (MappingConfigurationBase mappingConfiguration)
    {
      switch (_folderType)
      {
        case OlItemType.olAppointmentItem:
          if (mappingConfiguration == null || mappingConfiguration.GetType() != typeof (EventMappingConfiguration))
            return new EventMappingConfiguration();
          break;
      }

      return mappingConfiguration;
    }