Class Work
Work set helper class
Inherited Members
Namespace: XData
Assembly: XData.WorkSet.docfx.dll
Syntax
public static class Work
Methods
| Improve this Doc View SourceAdd<T>(T, Expression<Func<T, IWorkSet>>[])
Create work set based on single object
Declaration
public static IWorkSet<T> Add<T>(T data, params Expression<Func<T, IWorkSet>>[] workSets)
where T : class, IDataObject, new()
Parameters
Type | Name | Description |
---|---|---|
T | data | Data object |
Expression<Func<T, IWorkSet>>[] | workSets | Depended objects/collections initializers |
Returns
Type | Description |
---|---|
IWorkSet<T> | Work set |
Type Parameters
Name | Description |
---|---|
T | Data object type |
See Also
Add<T>(ICollection<T>, Expression<Func<T, IWorkSet>>[])
Create work set based on collection
Declaration
public static IWorkSet<T> Add<T>(ICollection<T> data, params Expression<Func<T, IWorkSet>>[] workSets)
where T : class, IDataObject, new()
Parameters
Type | Name | Description |
---|---|---|
ICollection<T> | data | Data object collection |
Expression<Func<T, IWorkSet>>[] | workSets | Depended objects/collections initializers |
Returns
Type | Description |
---|---|
IWorkSet<T> | Work set |
Type Parameters
Name | Description |
---|---|
T | Data object type |
See Also
Apply<TRoot>(TRoot, Expression<Func<IWorkScope<TRoot>>>)
Apply single data object (optionally with some childs) to work set
Declaration
public static void Apply<TRoot>(TRoot obj, Expression<Func<IWorkScope<TRoot>>> structure)
where TRoot : class, IDataObject, new()
Parameters
Type | Name | Description |
---|---|---|
TRoot | obj | Detached data object to apply |
Expression<Func<IWorkScope<TRoot>>> | structure | Childs data description |
Type Parameters
Name | Description |
---|---|
TRoot | Root object type |
Empty<T, TRet>(String, ISecuritySession, Expression<Func<TRet, IWorkSet>>[])
Empty single depended object initializer
Declaration
public static Expression<Func<T, IWorkSet>> Empty<T, TRet>(string alias = null, ISecuritySession security = null, params Expression<Func<TRet, IWorkSet>>[] workSets)
where T : class, IDataObject, new()
where TRet : class, IDataObject, new()
Parameters
Type | Name | Description |
---|---|---|
String | alias | (optional) Child repository alias |
ISecuritySession | security | (optional) Security session |
Expression<Func<TRet, IWorkSet>>[] | workSets | Depended objects/collections initializers |
Returns
Type | Description |
---|---|
Expression<Func<T, IWorkSet>> |
|
Type Parameters
Name | Description |
---|---|
T | Parent data object type |
TRet | Depended data object type |
See Also
| Improve this Doc View SourceExport<TRoot>(Guid, Guid, Expression<Func<IWorkScope<TRoot>>>)
Export single data object (optionally with some childs) by key
Declaration
public static TRoot Export<TRoot>(Guid layer, Guid key, Expression<Func<IWorkScope<TRoot>>> structure)
where TRoot : class, IDataObject, new()
Parameters
Type | Name | Description |
---|---|---|
Guid | layer | Data set layer |
Guid | key | Work set key |
Expression<Func<IWorkScope<TRoot>>> | structure | Structure description |
Returns
Type | Description |
---|---|
TRoot | Data object |
Type Parameters
Name | Description |
---|---|
TRoot | Root object type |
Fill<T, TRet>(String, ISecuritySession, Expression<Func<TRet, IWorkSet>>[])
Existed depended collection initializer
Declaration
public static Expression<Func<T, IWorkSet>> Fill<T, TRet>(string alias = null, ISecuritySession security = null, params Expression<Func<TRet, IWorkSet>>[] workSets)
where T : class, IDataObject, new()
where TRet : class, IDataObject, new()
Parameters
Type | Name | Description |
---|---|---|
String | alias | (optional) Child repository alias |
ISecuritySession | security | (optional) Security session |
Expression<Func<TRet, IWorkSet>>[] | workSets | Depended objects/collections initializers |
Returns
Type | Description |
---|---|
Expression<Func<T, IWorkSet>> |
|
Type Parameters
Name | Description |
---|---|
T | Parent data object type |
TRet | Depended data object type |
See Also
| Improve this Doc View SourceGetWorkSet<T>(Guid)
Returns a cached work set
Declaration
public static IWorkSet<T> GetWorkSet<T>(Guid layer)
where T : class, IDataObject, new()
Parameters
Type | Name | Description |
---|---|---|
Guid | layer | Data scope layer |
Returns
Type | Description |
---|---|
IWorkSet<T> | Work set |
Type Parameters
Name | Description |
---|---|
T | Data object type |
Root<T>(Expression<Func<T, Guid>>, Expression<Func<T, Guid>>)
Root structure describer for work set export/apply
Declaration
public static IWorkScope<T> Root<T>(Expression<Func<T, Guid>> layerProperty, Expression<Func<T, Guid>> keyProperty)
Parameters
Type | Name | Description |
---|---|---|
Expression<Func<T, Guid>> | layerProperty | Data scope layer property |
Expression<Func<T, Guid>> | keyProperty | Work set key property |
Returns
Type | Description |
---|---|
IWorkScope<T> | Structure describer |
Type Parameters
Name | Description |
---|---|
T | Root type |