/// <summary> /// Initializes a new instance of the <see cref="OpenCommand" /> class. /// </summary> /// <param name="manager">The manager.</param> /// <param name="source">The source.</param> public OpenCommand(MediaCommandManager manager, Uri source) : base(manager, MediaCommandType.Open) { Source = source; }
/// <summary> /// Initializes a new instance of the <see cref="CloseCommand"/> class. /// </summary> /// <param name="manager">The media element.</param> public CloseCommand(MediaCommandManager manager) : base(manager, MediaCommandType.Close) { // placeholder }
/// <summary> /// Initializes a new instance of the <see cref="StopCommand" /> class. /// </summary> /// <param name="manager">The media element.</param> public StopCommand(MediaCommandManager manager) : base(manager, MediaCommandType.Stop) { }
/// <summary> /// Initializes a new instance of the <see cref="SeekCommand" /> class. /// </summary> /// <param name="manager">The media element.</param> /// <param name="targetPosition">The target position.</param> public SeekCommand(MediaCommandManager manager, TimeSpan targetPosition) : base(manager, MediaCommandType.Seek) { TargetPosition = targetPosition; }
/// <summary> /// Initializes a new instance of the <see cref="MediaCommand" /> class. /// </summary> /// <param name="manager">The command manager.</param> /// <param name="commandType">Type of the command.</param> protected MediaCommand(MediaCommandManager manager, MediaCommandType commandType) { Manager = manager; CommandType = commandType; Promise = new Task(Execute); }