/
ISystemDocumentStorageFactory.cs
30 lines (27 loc) · 1.38 KB
/
ISystemDocumentStorageFactory.cs
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
using System;
namespace InfinniPlatform.DocumentStorage
{
/// <summary>
/// Фабрика для получения экземпляров <see cref="ISystemDocumentStorage" /> и <see cref="ISystemDocumentStorage" />.
/// </summary>
public interface ISystemDocumentStorageFactory
{
/// <summary>
/// Возвращает экземпляр <see cref="IDocumentStorage" />.
/// </summary>
/// <param name="documentTypeName">Имя типа документа.</param>
ISystemDocumentStorage GetStorage(string documentTypeName);
/// <summary>
/// Возвращает экземпляр <see cref="IDocumentStorage{TDocument}" />.
/// </summary>
/// <param name="documentType">Тип документа.</param>
/// <param name="documentTypeName">Имя типа документа.</param>
object GetStorage(Type documentType, string documentTypeName = null);
/// <summary>
/// Возвращает экземпляр <see cref="IDocumentStorage{TDocument}" />.
/// </summary>
/// <typeparam name="TDocument">Тип документа.</typeparam>
/// <param name="documentTypeName">Имя типа документа.</param>
ISystemDocumentStorage<TDocument> GetStorage<TDocument>(string documentTypeName = null) where TDocument : Document;
}
}