CalDavSynchronizer.Ui.Options.ViewModels.Mapping.EventMappingConfigurationViewModel.EventMappingConfigurationViewModel C# (CSharp) Метод

EventMappingConfigurationViewModel() публичный Метод

public EventMappingConfigurationViewModel ( IReadOnlyList availableCategories, ICurrentOptions currentOptions ) : System
availableCategories IReadOnlyList
currentOptions ICurrentOptions
Результат System
    public EventMappingConfigurationViewModel (IReadOnlyList<string> availableCategories, ICurrentOptions currentOptions)
    {
      if (availableCategories == null)
        throw new ArgumentNullException (nameof (availableCategories));
      if (currentOptions == null)
        throw new ArgumentNullException (nameof (currentOptions));

      AvailableCategories = availableCategories;
      _currentOptions = currentOptions;
      SetServerCalendarColorCommand = new DelegateCommand (_ =>
      {
        ComponentContainer.EnsureSynchronizationContext();
        SetServerCalendarColorAsync();
      });
      GetServerCalendarColorCommand = new DelegateCommand (_ =>
      {
        ComponentContainer.EnsureSynchronizationContext();
        GetServerCalendarColorAsync();
      });

      _customPropertyMappingViewModel = new CustomPropertyMappingViewModel();
      Items = new[] {_customPropertyMappingViewModel};
    }