Show / Hide Table of Contents

    Interface IWorkSet<T>

    Work set interface

    Inherited Members
    IWorkSet.Name
    IWorkSet.Clear()
    IWorkSet.Submit()
    IWorkSet.Type
    IWorkSet.DbLayer
    IDisposable.Dispose()
    Namespace: XData
    Assembly: XData.WorkSet.docfx.dll
    Syntax
    public interface IWorkSet<out T> : IWorkSet, IDisposable where T : class, IDataObject, new()
    Type Parameters
    Name Description
    T

    Data object type

    Remarks

    Used to create/modify complex objects

    Hint: UnitOfWork template

    Methods

    | Improve this Doc View Source

    Child<TRet>(Func<T, Boolean>, String)

    Find depended work set

    Declaration
    IWorkSet<TRet> Child<TRet>(Func<T, bool> predicate, string alias = null)
        where TRet : class, IDataObject, new()
    Parameters
    Type Name Description
    Func<T, Boolean> predicate

    Predicate to find parent object

    String alias

    (optional) Child repository alias

    Returns
    Type Description
    IWorkSet<TRet>

    Found work set

    Type Parameters
    Name Description
    TRet

    Depended object type

    | Improve this Doc View Source

    Child<TRet>(Func<T, Int32, Boolean>, Func<T, IComparable>[], String)

    Find depended work set (using order index)

    Declaration
    IWorkSet<TRet> Child<TRet>(Func<T, int, bool> predicate, Func<T, IComparable>[] order, string alias = null)
        where TRet : class, IDataObject, new()
    Parameters
    Type Name Description
    Func<T, Int32, Boolean> predicate

    Predicate to find parent object

    Func<T, IComparable>[] order

    Order statements

    String alias

    (optional) Child repository alias

    Returns
    Type Description
    IWorkSet<TRet>

    Found work set

    Type Parameters
    Name Description
    TRet

    Depended object type

    | Improve this Doc View Source

    Child<TRet>(String)

    Find depended work set

    Declaration
    IWorkSet<TRet> Child<TRet>(string alias = null)
        where TRet : class, IDataObject, new()
    Parameters
    Type Name Description
    String alias

    (optional) Child repository alias

    Returns
    Type Description
    IWorkSet<TRet>

    Found work set

    Type Parameters
    Name Description
    TRet

    Depended object type

    | Improve this Doc View Source

    Child<TRet, TKey>(Func<T, Int32, Boolean>, Func<T, TKey>, String)

    Find depended work set (using order index)

    Declaration
    IWorkSet<TRet> Child<TRet, TKey>(Func<T, int, bool> predicate, Func<T, TKey> order, string alias = null)
        where TRet : class, IDataObject, new()
        where TKey : IComparable
    Parameters
    Type Name Description
    Func<T, Int32, Boolean> predicate

    Predicate to find parent object

    Func<T, TKey> order

    Order statements

    String alias

    (optional) Child repository alias

    Returns
    Type Description
    IWorkSet<TRet>

    Found work set

    Type Parameters
    Name Description
    TRet

    Depended object type

    TKey

    Order key type

    | Improve this Doc View Source

    Get(Func<T, Boolean>, WorkState)

    Get single data object by predicate

    Declaration
    T Get(Func<T, bool> predicate = null, WorkState state = WorkState.Active)
    Parameters
    Type Name Description
    Func<T, Boolean> predicate

    Predicate to find specific object

    WorkState state

    Work set state

    Returns
    Type Description
    T

    Data object

    | Improve this Doc View Source

    Get(Func<T, Int32, Boolean>, Func<T, IComparable>[], WorkState)

    Get single data object by predicate (using order index)

    Declaration
    T Get(Func<T, int, bool> predicate, Func<T, IComparable>[] order, WorkState state = WorkState.Active)
    Parameters
    Type Name Description
    Func<T, Int32, Boolean> predicate

    Predicate to find specific object

    Func<T, IComparable>[] order

    Order statements

    WorkState state

    Work set state

    Returns
    Type Description
    T

    Data object

    | Improve this Doc View Source

    Get<TKey>(Func<T, Int32, Boolean>, Func<T, TKey>, WorkState)

    Get single data object by predicate (using order index)

    Declaration
    T Get<TKey>(Func<T, int, bool> predicate, Func<T, TKey> order, WorkState state = WorkState.Active)
        where TKey : IComparable
    Parameters
    Type Name Description
    Func<T, Int32, Boolean> predicate

    Predicate to find specific object

    Func<T, TKey> order

    Order statement

    WorkState state

    Work set state

    Returns
    Type Description
    T

    Data object

    Type Parameters
    Name Description
    TKey

    Order key type

    | Improve this Doc View Source

    GetKey()

    Get single data object key

    Declaration
    Guid? GetKey()
    Returns
    Type Description
    Nullable<Guid>

    Data object key

    | Improve this Doc View Source

    GetKey(Func<T, Boolean>, WorkState)

    Get single data object key by predicate

    Declaration
    Guid? GetKey(Func<T, bool> predicate, WorkState state = WorkState.Active)
    Parameters
    Type Name Description
    Func<T, Boolean> predicate

    Predicate to find specific object

    WorkState state

    Work set state

    Returns
    Type Description
    Nullable<Guid>

    Data object key

    | Improve this Doc View Source

    GetKey(Func<T, Int32, Boolean>, Func<T, IComparable>[], WorkState)

    Get single data object key by predicate (using order index)

    Declaration
    Guid? GetKey(Func<T, int, bool> predicate, Func<T, IComparable>[] order, WorkState state = WorkState.Active)
    Parameters
    Type Name Description
    Func<T, Int32, Boolean> predicate

    Predicate to find specific object

    Func<T, IComparable>[] order

    Order statements

    WorkState state

    Work set state

    Returns
    Type Description
    Nullable<Guid>

    Data object key

    | Improve this Doc View Source

    GetKey(WorkState)

    Get single data object key

    Declaration
    Guid? GetKey(WorkState state)
    Parameters
    Type Name Description
    WorkState state

    Work set state

    Returns
    Type Description
    Nullable<Guid>

    Data object key

    | Improve this Doc View Source

    GetKey<TKey>(Func<T, Int32, Boolean>, Func<T, TKey>, WorkState)

    Get single data object key by predicate (using order index)

    Declaration
    Guid? GetKey<TKey>(Func<T, int, bool> predicate, Func<T, TKey> order, WorkState state = WorkState.Active)
        where TKey : IComparable
    Parameters
    Type Name Description
    Func<T, Int32, Boolean> predicate

    Predicate to find specific object

    Func<T, TKey> order

    Order statement

    WorkState state

    Work set state

    Returns
    Type Description
    Nullable<Guid>

    Data object key

    Type Parameters
    Name Description
    TKey

    Order key type

    | Improve this Doc View Source

    Lock(Func<T, Boolean>)

    Try to obtain lock on data object

    Declaration
    bool Lock(Func<T, bool> predicate = null)
    Parameters
    Type Name Description
    Func<T, Boolean> predicate

    Predicate to find specific object

    Returns
    Type Description
    Boolean

    Lock success flag

    | Improve this Doc View Source

    Lock(Func<T, Int32, Boolean>, Func<T, IComparable>[])

    Try to obtain lock on data object by predicate (using order index)

    Declaration
    bool Lock(Func<T, int, bool> predicate, Func<T, IComparable>[] order)
    Parameters
    Type Name Description
    Func<T, Int32, Boolean> predicate

    Predicate to find specific object

    Func<T, IComparable>[] order

    Order statements

    Returns
    Type Description
    Boolean

    Lock success flag

    | Improve this Doc View Source

    Lock<TKey>(Func<T, Int32, Boolean>, Func<T, TKey>)

    Try to obtain lock on data object by predicate (using order index)

    Declaration
    bool Lock<TKey>(Func<T, int, bool> predicate, Func<T, TKey> order)
        where TKey : IComparable
    Parameters
    Type Name Description
    Func<T, Int32, Boolean> predicate

    Predicate to find specific object

    Func<T, TKey> order

    Order statement

    Returns
    Type Description
    Boolean

    Lock success flag

    Type Parameters
    Name Description
    TKey

    Order key type

    | Improve this Doc View Source

    New(Action<T>[])

    Add object to work set collection

    Declaration
    T New(params Action<T>[] init)
    Parameters
    Type Name Description
    Action<T>[] init

    Object creator

    Returns
    Type Description
    T

    Added object

    | Improve this Doc View Source

    Select(WorkState)

    Retrieve all objects by work set

    Declaration
    IEnumerable<T> Select(WorkState state = WorkState.Active)
    Parameters
    Type Name Description
    WorkState state

    Work set state

    Returns
    Type Description
    IEnumerable<T>

    Data object sequence

    | Improve this Doc View Source

    Select<TRet>(Func<T, TRet>, WorkState)

    Retrieve all objects by work set and apply selector logic to convert data

    Declaration
    IEnumerable<TRet> Select<TRet>(Func<T, TRet> selector, WorkState state = WorkState.Active)
    Parameters
    Type Name Description
    Func<T, TRet> selector

    Selector convert routine

    WorkState state

    Work set state

    Returns
    Type Description
    IEnumerable<TRet>

    Result object sequence

    Type Parameters
    Name Description
    TRet
    | Improve this Doc View Source

    SelectKeys(WorkState)

    Retrieve all keys by work set

    Declaration
    IEnumerable<Guid> SelectKeys(WorkState state = WorkState.Active)
    Parameters
    Type Name Description
    WorkState state

    Work set state

    Returns
    Type Description
    IEnumerable<Guid>

    Keys sequence

    Extension Methods

    SerializationExtensions.ToXml<T>(T)
    CollectionsExtensions.SetValue<TKey, T>(TKey, T)
    CollectionsExtensions.AsEnum<T>(T)
    DataObjectQueryableExtensions.CompareVariable(Object, FilterOperation, String)
    Processing.Do<T>(T, Action<IProcess<T>>[])
    TypeExtensions.TryConvert<T, TResult>(T, Func<T, TResult>)
    TypeExtensions.TryConvert<T, TResult>(T, Func<T, TResult>, TResult)
    TypeExtensions.ChangeType<T>(Object)
    TypeExtensions.ChangeType(Object, Type)
    TypeExtensions.InvokeMethod<TRet>(Object, Type[], Expression<Func<TRet>>, BindingFlags)
    TypeExtensions.InvokeMethod(Object, Type[], Expression<Action>, BindingFlags)
    TypeExtensions.InvokeMethod<TRet>(Object, Expression<Func<TRet>>, BindingFlags)
    TypeExtensions.InvokeMethod(Object, Expression<Action>, BindingFlags)
    SqlBlockExtensions.SetExpression<TTag, TResult>(TTag, Expression<Func<IBlockQueryAdapter, TResult>>)
    QueryDescriptionExtensions.SetExpression<TTag, TResult>(TTag, Expression<Func<IQueryStructureAdapter, TResult>>)

    See Also

    Name
    Clear()
    Submit()
    Lock<TKey>(Func<T, Int32, Boolean>, Func<T, TKey>)
    Get(Func<T, Int32, Boolean>, Func<T, IComparable>[], WorkState)
    Select(WorkState)
    Child<TRet>(String)
    Child<TRet>(Func<T, Boolean>, String)
    Child<TRet>(Func<T, Int32, Boolean>, Func<T, IComparable>[], String)
    Child<TRet, TKey>(Func<T, Int32, Boolean>, Func<T, TKey>, String)
    New(Action<T>[])
    GetKey()
    SelectKeys(WorkState)
    Work
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX