public override TaskConfiguration Editor(dynamic shapeFactory, IUpdateModel updater) {
            var settings = _orchardServices.WorkContext.CurrentSite.As<CloudMediaSettingsPart>();
            var viewModel = new EncodeViewModel() {
                EncodingPresets = settings.WamsEncodingPresets,
                SelectedEncodingPreset = settings.WamsEncodingPresets.Any() ? settings.WamsEncodingPresets.ToArray()[settings.DefaultWamsEncodingPresetIndex] : null
            };

            if (updater != null) {
                updater.TryUpdateModel(viewModel, Prefix, null, null);
            }

            return new TaskConfiguration(this) {
                Settings = viewModel,
                EditorShape = shapeFactory.TaskSettingsEditor(TemplateName: TaskName, Model: viewModel, Prefix: Prefix)
            };
        }
        public override dynamic Deserialize(XElement settingsXml) {
            var viewModel = new EncodeViewModel();

            if (settingsXml != null) {
                viewModel.SelectedEncodingPreset = settingsXml.Attr<string>("SelectedEncodingPreset");
            }

            return viewModel;
        }