3using System.Reflection;
4using System.Threading.Tasks;
33 if (typeInfo.IsAssignableFrom(Type))
36 return Grade.NotAtAll;
39 private static readonly TypeInfo typeInfo = typeof(IEnumerable<Role>).GetTypeInfo();
48 if (Value is IEnumerable<Role> Roles)
49 await
Tokenize(Roles,
null, Process);
58 public static async Task
Tokenize(IEnumerable<Role> Roles,
77 return Task.CompletedTask;
85 public async Task<object>
Evaluate(
object Instance)
91 if (Obj.TryGetFieldValue(
"Roles", out
object Obj2) &&
95 return Array.Empty<
Role>();
99 foreach (
object Item
in A)
106 else if (Item is
Role Role2)
115 else if (Instance is IEnumerable<Role> Roles)
Static interface for database persistence. In order to work, a database provider has to be assigned t...
static Task< object > Specialize(GenericObject Object)
Creates a specialized representation of a generic object.
Contains information about a tokenization process.
uint DocumentIndexOffset
Document Index Offset. Used to identify sequences of tokens in a document.
Generic object. Contains a sequence of properties.
A chunked list is a linked list of chunks of objects of type T .
Contains the definition of a contract
async Task Tokenize(object Value, TokenizationProcess Process)
Tokenizes an object.
Tokenizes a set of roles.
Grade Supports(Type Type)
How well the tokenizer can tokenize objects of type Type .
async Task< object > Evaluate(object Instance)
Evaluates the property evaluator, on an object instance.
RolesTokenizer()
Tokenizes a set of roles.
static async Task Tokenize(IEnumerable< Role > Roles, Contract Contract, TokenizationProcess Process)
Tokenizes a set of roles.
Task Prepare(string Definition)
Prepares the evaluator with its definition.
async Task Tokenize(object Value, TokenizationProcess Process)
Tokenizes an object.
Custom external property evaluator.
Interface for full-text-search tokenizers