пятница, 30 октября 2015 г.

Element21

public abstract class Element21<TKey, TItem, TList> : Element1<TKey>,
        IElement21<TKey,TItem>,
        IHaveUri
        where TItem : class, IElement1<TKey>, IHaveKey<TKey> , IHaveInit
        where TList : IContainer<TKey, TItem>
        //where TList : ICollection<TItem>

Отличается от Element2 тем. что сериализация происходит в Builder, а не в Init() как в Element2

public static T Build2<T, TKey, TItem>(XDocument xdoc, string root) 
            where T : class
            where TItem : class, IHaveKey<TKey>
        {}

среда, 28 октября 2015 г.

TradeStorage

public abstract class Storage<TKey, TItem> : Element1<TKey>, IHaveUri
        where TItem : IElement1<TKey>, IHaveKey<TKey>, IHaveInit
        //where TList : Containers5.Container<TList, TItem, TKey> //where TList : ICollection<TItem>

public class TradeStorage : GS.Storages.Storage<string, ITradeStorage>, ITradeStorage //, IHaveQueue

Elements2, 3 Implementations

Element1:
public interface IElement1<TKey> : Containers5.IHaveKey<TKey>

abstract public class Element1<TKey> : Containers5.IHaveKey<TKey>, IHaveInit, IElement1<TKey>

----------------------------------------------------------------------------------------------------------------
Element2: Element1 + Collecttion
public interface IElement2<TKey, TItem> : IElement1<TKey>

public abstract class Element2<TKey, TItem, TList> : Element1<TKey> , IElement2<TKey,TItem>, IHaveUri
        where TItem : class, IElement1<TKey>, IHaveKey<TKey>, IHaveInit
        where TList : IContainer<TKey, TItem>

public class Portfolio : Element2<string, IStrategy, Containers5.ListContainer<string, IStrategy>> , IPortfolio

public class Portfolios : Element2<string, IPortfolio, Containers5.ListContainer<string, IPortfolio>> , IPortfolios

public class Dde2 : Element2<string, TopicItem, Containers5.DictionaryContainer<string, TopicItem>>, IDde

public class Test : Element2<string, TestItem , Containers5.DictionaryContainer<string, TestItem>>

public class Works : Element2<string, IWorkBase, DictionaryContainer<string, IWorkBase>>, IWorks

public class WorkTasks : Element2<string, IWorkTask3, Containers5.DictionaryContainer<string, IWorkTask3>>

-----------------------------------------------------------------------------------------------------------------
Element3: Element3 = Element1 + Queue + Work

public interface IElement3<TKey, in TQueueInput> : 
        IElement1<TKey>,
        IHaveQueue3<TQueueInput>,
        IHaveWork<TQueueInput>  { }

public abstract class Element3<TKey,  TEventArgs> : Element1<TKey>, IElement3<TKey,TEventArgs>
        where TEventArgs : IEventArgs

public class Tickers3 : Element3<string,IEventArgs>, ITickers //, IHaveQueue<string>

public abstract class TradeBaseRepository35<TContext, TKey, TValueExt, TValueInt, TValueIntOut> :
                         Element3<string, IEventArgs>,
                         ITradeBaseRepository3<TKey, TValueExt, TValueIntOut>, INeedDataBaseName
        where TValueExt : class, IHaveKey<TKey> //, IHaveId<TId>
        where TValueInt : class, IHaveKey<TKey>, TValueIntOut //, IHaveId<TId>
        where TValueIntOut : class, IHaveKey<TKey> //, IHaveId<TId>
        where TContext : IDisposable

public abstract class Context : Element3<string, IEventArgs>, IContext

public class ConsoleWriter : Element3<string,IEventArgs>

public class BarRand : Element3<string, IEventArgs>

-----------------------------------------------------------------------------------------------------------------------
Element32: Element3 + Collection
public interface IElement32<TKey, TItem> : IElement1<TKey>
    {
        IEnumerable<TItem> Items { get; }
        TItem Register(TItem item);
        TItem GetByKey(TKey key);
    }

public abstract class Element32<TKey, TEventArgs, TList, TItem> : Element3<TKey, TEventArgs> , IElement2<TKey, TItem>, IHaveUri
        where TItem : class, IElement1<TKey>, IHaveKey<TKey> //, IHaveInit
        // where TItem : class, IHaveKey<TKey> // , IHaveInit
        where TList : IContainer<TKey, TItem>
        where TEventArgs : IEventArgs
        //where TList : ICollection<TItem>

public class EventHub3 : Element32<string,  IEventArgs, DictionaryContainer<string, EventHubItem3>, EventHubItem3>

воскресенье, 18 октября 2015 г.