forked from MonoGame/MonoGame
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContentRule.cs
More file actions
23 lines (20 loc) · 956 Bytes
/
ContentRule.cs
File metadata and controls
23 lines (20 loc) · 956 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// MonoGame - Copyright (C) MonoGame Foundation, Inc
// This file is subject to the terms and conditions defined in
// file 'LICENSE.txt', which is part of this source code package.
namespace MonoGame.Framework.Content.Pipeline.Builder;
/// <summary>
/// A rule by which <see cref="ContentCollection"/> includes or excludes the files.
/// </summary>
public abstract class ContentRule
{
/// <summary>
/// A pattern passed from <see cref="ContentCollection"/> for using in <see cref="IsMatch"/> method.
/// </summary>
public string Pattern { get; init; } = "";
/// <summary>
/// Used in <see cref="ContentCollection"/> to check if the passed filePath matches the current <see cref="Pattern"/>.
/// </summary>
/// <param name="filePath">Relative path to the content file.</param>
/// <returns>Returns a boolean indicating if the rule has matched the file.</returns>
public abstract bool IsMatch(string filePath);
}