Disco.Services.UserFlagExtensions.OnEditComments C# (CSharp) Method

OnEditComments() public static method

public static OnEditComments ( this fa, string Comments ) : void
fa this
Comments string
return void
        public static void OnEditComments(this UserFlagAssignment fa, string Comments)
        {
            if (!fa.CanEditComments())
                throw new InvalidOperationException("Editing comments for user flags is denied");

            fa.Comments = string.IsNullOrWhiteSpace(Comments) ? null : Comments.Trim();
        }
        #endregion