public async Task Run(AppointmentsProviderReplaceAppointmentActivatedEventArgs args, Frame frame) { var payload = new ReplaceAppointmentPayload(args.ReplaceAppointmentOperation); int currentApplicationViewId = ApplicationView.GetApplicationViewIdForWindow(CoreApplication.GetCurrentView().CoreWindow); var viewConfig = new MultiViewConfiguration <ReplaceAppointmentPayload>(View, (p) => true); await viewConfig.Show(payload, currentApplicationViewId, frame); }
public async Task Run(AppointmentsProviderShowAppointmentDetailsActivatedEventArgs args, Frame frame) { var payload = new ShowAppointmentDetailsPayload(args.RoamingId, args.LocalId, args.InstanceStartDate); int currentApplicationViewId = ApplicationView.GetApplicationViewIdForWindow(CoreApplication.GetCurrentView().CoreWindow); var viewConfig = new MultiViewConfiguration <ShowAppointmentDetailsPayload>(View, (p) => true); await viewConfig.Show(payload, currentApplicationViewId, frame); }
public ToastConfiguration(string action, MultiViewConfiguration <ToastPayload> view) { if (string.IsNullOrWhiteSpace(action)) { throw new ArgumentException("Action cannot be null, empty, or whitespace", nameof(action)); } Action = action; View = view ?? throw new ArgumentNullException(nameof(view)); }
public CommandLineConfiguration(string command, MultiViewConfiguration <CommandLinePayload> view) { if (command == null) { throw new ArgumentNullException(nameof(command)); } if (command.Trim().Length == 0 && !command.Equals(string.Empty)) { throw new ArgumentException("Path cannot consist of whitespace only"); } Command = command; View = view ?? throw new ArgumentNullException(nameof(view)); }
/// <summary> /// Creates a protocol configuration /// </summary> /// <param name="path">Sets the path for this protocol configuration. Path can also be empty or *. /// A path with a value of * will be used for all other unknown paths</param> /// <param name="view"></param> public ProtocolConfiguration(string path, MultiViewConfiguration <ProtocolPayload> view) { if (path == null) { throw new ArgumentNullException(nameof(path)); } if (path.Trim().Length == 0 && !path.Equals(string.Empty)) { throw new ArgumentException("Path cannot consist of whitespace only"); } Path = path; View = view ?? throw new ArgumentNullException(nameof(view)); }
/// <summary> /// Creates a configuration for the FileOperation /// </summary> /// <param name="fileType">The file type that this configuration is for. /// A file type with a value of * will be used as fallback for unknown file types</param> /// <param name="view"></param> /// <exception cref="ArgumentException">Thrown if: File Type is null, empty or whitespace; File Type is not a valid extension; Processor does not handle the file type.</exception> public FileConfiguration(string fileType, MultiViewConfiguration <FilePayload> view) { if (string.IsNullOrWhiteSpace(fileType)) { throw new ArgumentException("File Type cannot be null, empty, or whitespace"); } if (Path.GetExtension(fileType) != fileType && fileType != "*") { throw new ArgumentException("File Type is not valid"); } FileType = fileType; View = view ?? throw new ArgumentNullException(nameof(view)); }