Exemplo n.º 1
0
 public MdDataOps(IMdNodeFactory nodeFactory, INetworkDataOps networkOps, MDataInfo mdInfo)
 {
     _mdInfo     = mdInfo;
     _imDStore   = new ImDStore(networkOps);
     Session     = networkOps.Session;
     NodeFactory = nodeFactory;
 }
Exemplo n.º 2
0
 public MdHeadManager(INetworkDataOps dataOps, IMdNodeFactory nodeFactory, string appId, ulong protocol, MdHeadPermissionSettings permissions = null)
 {
     APP_CONTAINER_PATH = $"apps/{appId}";
     _protocol          = protocol;
     _dataOps           = dataOps;
     _nodeFactory       = nodeFactory;
     _permissions       = permissions ?? new MdHeadPermissionSettings();
 }
Exemplo n.º 3
0
        internal async Task InitSession(Func <IImDStore, Snapshotter> snapShotterFactory, bool inMem = true, bool mock = true)
        {
            if (!mock)
            {
                throw new InvalidOperationException("Not testing against live networks.");
            }

            var mockClient = new CredentialAuth(_appId, inMem);
            var session    = (await mockClient.AuthenticateAsync()).Value;

            _networkDataOps = new NetworkDataOps(session);

            var snapshotter = snapShotterFactory == null ? null : snapShotterFactory(GetImdStore());

            _dbFactory       = new StreamDbFactory(_networkDataOps, snapshotter);
            _nodeFactory     = _dbFactory.NodeFactory;
            _dataTreeFactory = new DataTreeFactory(_nodeFactory);
        }
 public StreamCollectionFactory(IMdNodeFactory nodeFactory, DataTreeFactory dataTreeFactory)
 {
     _nodeFactory     = nodeFactory;
     _dataTreeFactory = dataTreeFactory;
 }
Exemplo n.º 5
0
 public DataTreeFactory(IMdNodeFactory nodeFactory)
 => _nodeFactory = nodeFactory;
Exemplo n.º 6
0
 public StreamDbFactory(INetworkDataOps dataOps, Snapshots.Snapshotter snapshotter)
 {
     _dataOps    = dataOps;
     NodeFactory = new MdNodeFactory(dataOps, snapshotter);
     _streamCollectionFactory = new StreamCollectionFactory(NodeFactory, new DataTreeFactory(NodeFactory));
 }