Ejemplo n.º 1
0
        protected ServiceBase(IServiceProvider serviceProvider, Stream stream, IEnumerable <JsonConverter>?jsonConverters = null)
        {
            InstanceId = Interlocked.Add(ref s_instanceId, 1);

            TestData         = (RemoteHostTestData?)serviceProvider.GetService(typeof(RemoteHostTestData));
            WorkspaceManager = TestData?.WorkspaceManager ?? RemoteWorkspaceManager.Default;

            Logger = (TraceSource)serviceProvider.GetService(typeof(TraceSource));
            Log(TraceEventType.Information, "Service instance created");

            // invoke all calls incoming over the stream on this service instance:
            EndPoint = new RemoteEndPoint(stream, Logger, incomingCallTarget: this, jsonConverters);
        }
Ejemplo n.º 2
0
        protected ServiceBase(IServiceProvider serviceProvider, Stream stream, IEnumerable <JsonConverter>?jsonConverters = null)
        {
            InstanceId = Interlocked.Add(ref s_instanceId, 1);

            TestData = (RemoteHostTestData?)serviceProvider.GetService(typeof(RemoteHostTestData));

            // in unit test, service provider will return asset storage, otherwise, use the default one
            AssetStorage = TestData?.AssetStorage ?? AssetStorage.Default;

            _workspaceManager = TestData?.WorkspaceManager ?? s_defaultWorkspaceManager;

            Logger = (TraceSource)serviceProvider.GetService(typeof(TraceSource));
            Log(TraceEventType.Information, "Service instance created");

            // invoke all calls incoming over the stream on this service instance:
            EndPoint = new RemoteEndPoint(stream, Logger, incomingCallTarget: this, jsonConverters);
        }
Ejemplo n.º 3
0
 public RemoteHostTestData(AssetStorage assetStorage, RemoteWorkspaceManager workspaceManager, bool isInProc)
 {
     AssetStorage     = assetStorage;
     WorkspaceManager = workspaceManager;
     IsInProc         = isInProc;
 }
Ejemplo n.º 4
0
 public RemoteHostTestData(RemoteWorkspaceManager workspaceManager, bool isInProc)
 {
     WorkspaceManager = workspaceManager;
     IsInProc         = isInProc;
 }