-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIObjectRepository.cs
More file actions
42 lines (41 loc) · 2.24 KB
/
Copy pathIObjectRepository.cs
File metadata and controls
42 lines (41 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using dotSpace.Interfaces.Space;
using System.Collections.Generic;
using System;
namespace dotSpace.Interfaces.Network
{
/// <summary>
/// Defines the methods that allow operations on multiple object spaces.
/// These methods are used for supporting networked object spaces.
/// </summary>
public interface IObjectRepository : IObjectRepositorySimple
{
/// <summary>
/// Adds a new Space to the repository, identified by the specified parameter.
/// </summary>
void AddSpace(string identifier, IObjectSpace objectspace);
/// <summary>
/// Retrieves and removes the first obejct of type T from the target Space, matching the specified condition. The operation will block if no elements match.
/// </summary>
T Get<T>(string target, Func<T, bool> condition);
/// <summary>
/// Retrieves and removes the first object from the target Space, matching the specified condition. The operation is non-blocking. The operation will return null if no elements match.
/// </summary>
T GetP<T>(string target, Func<T, bool> condition);
/// <summary>
/// Retrieves and removes all objects from the target Space matching the specified pattern. The operation is non-blocking. The operation will return an empty set if no elements match.
/// </summary>
IEnumerable<T> GetAll<T>(string target, Func<T, bool> condition);
/// <summary>
/// Retrieves the first object from the target Space, matching the specified condition. The operation will block if no elements match.
/// </summary>
T Query<T>(string target, Func<T, bool> condition);
/// <summary>
/// Retrieves the first object from the target Space, matching the specified condition. The operation is non-blocking. The operation will return null if no elements match.
/// </summary>
T QueryP<T>(string target, Func<T, bool> condition);
/// <summary>
/// Retrieves all objects from the target Space matching the specified pattern. The operation is non-blocking. The operation will return an empty set if no elements match.
/// </summary>
IEnumerable<T> QueryAll<T>(string target, Func<T, bool> condition);
}
}