示例#1
0
        /// <inheritdoc/>
        public bool UseForVideoRecording(ActivityId videoRecording)
        {
            if (videoRecording == null)
            {
                throw new ArgumentNullException(nameof(videoRecording));
            }

            if (IsAvailable())
            {
                return(AssumeRole(RoleInActivity.Recording(videoRecording)));
            }

            return(false);
        }
示例#2
0
        /// <inheritdoc/>
        public bool StopUsingForAudioRecording(ActivityId audioRecording)
        {
            if (audioRecording == null)
            {
                throw new ArgumentNullException(nameof(audioRecording));
            }

            if (IsAudioRecording(audioRecording))
            {
                MakeAvailable();
                return(true);
            }

            return(false);
        }
示例#3
0
 /// <summary>
 /// Creates a <see cref="RoleInActivity"/> instance indicating a recording role.
 /// during an activity.
 /// </summary>
 /// <param name="activity">
 /// The activity during that the the recording happens.
 /// </param>
 /// <returns>
 /// The <see cref="RoleInActivity"/> instance indicating a recording role.
 /// </returns>
 public static RoleInActivity Recording(ActivityId activity)
 {
     return(new RoleInActivity(DeviceRole.Recording, activity));
 }
示例#4
0
 bool IsAudioRecording(ActivityId audioRecording)
 {
     return(IsInRole(RoleInActivity.Recording(audioRecording)));
 }