3using System.Threading.Tasks;
26 : base(
"Storage/SearchInVault",
27 new KeyValuePair<Type,
Expression>(typeof(Dictionary<string, object>), new
Expression(jsonPattern)),
47 string Type = (string)Parameters[
"PType"]?.AssociatedObjectValue;
48 string ClientId = (string)Parameters[
"PClientId"]?.AssociatedObjectValue;
49 bool Masked = (bool)(Parameters[
"PMasked"]?.AssociatedObjectValue ??
true);
50 int Offset = (int)(
double)(Parameters[
"POffset"]?.AssociatedObjectValue ?? 0.0);
51 int MaxCount = (int)(
double)(Parameters[
"PMaxCount"]?.AssociatedObjectValue ?? 100.0);
52 object[] TagNames = Parameters.ContainsKey(
"PTagName") ? (
object[])Parameters[
"PTagName"].AssociatedObjectValue : Array.Empty<
object>();
53 object[] TagValues = Parameters.ContainsKey(
"PTagValue") ? (
object[])Parameters[
"PTagValue"].AssociatedObjectValue : Array.Empty<
object>();
56 int i, c = TagNames?.Length ?? 0;
57 if ((TagValues?.Length ?? 0) != c)
60 for (i = 0; i < c; i++)
62 if (!(TagNames[i] is
string TagName) ||
string.IsNullOrEmpty(TagName))
65 if (!(TagValues[i] is
string TagValue))
68 Tags.
Add(
new KeyValuePair<string, string>(TagName, TagValue));
79 if (!(ClientId is
null))
84 KeyValuePair<string, string>[] TagsFilter = Tags.
ToArray();
88 foreach (KeyValuePair<string, string> P
in Tags)
95 if (Tag.Name == P.Key)
98 if (P.Value == Tag.Value || P.Value == Tag.MaskedValue)
111 IEnumerable<VaultItem> Items;
113 if (Filters.Count == 1)
125 {
"ResultSet", Result.ToArray() }
A Named dictionary is a dictionary, with a local name and a namespace. Use it to return content that ...
The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repe...
Represents an HTTP request.
Represets a response of an HTTP client request.
Static interface for database persistence. In order to work, a database provider has to be assigned t...
static Task< IEnumerable< object > > Find(string Collection, params string[] SortOrder)
Finds objects in a given collection.
This filter selects objects that conform to all child-filters provided.
Custom filter used to filter objects using an external expression.
This filter selects objects that have a named field equal to a given value.
A chunked list is a linked list of chunks of objects of type T .
void Add(T Item)
Adds an item to the collection.
T[] ToArray()
Returns an array containing all elements of the collection.
Static class managing loading of resources stored as embedded resources or in content files.
static string LoadResourceAsText(string ResourceName)
Loads a text resource from an embedded resource.
Class managing a script expression.
string UserName
User Name.
Abstract base class for agent resources supporting the POST method.
static AccountUser AssertUserAuthenticated(HttpRequest Request)
Makes sure the request is made by an authenticated API user.
const string AgentNamespace
https://waher.se/Schema/BrokerAgent.xsd
Gets information from the Encrypted Vault.
Searches for information in the Encrypted Vault.
SearchInVault()
> Searches for information in the Encrypted Vault.
override async Task POST(HttpRequest Request, HttpResponse Response, Dictionary< string, IElement > Parameters)
Executes the POST method on the resource.
Stores information in the Encrypted Vault.
Contains information about an item in the Vault.
Contains information about a tag in a vault item.