Пример #1
0
		AboutScreenMenuItem(IDocumentViewerContentFactoryProvider documentViewerContentFactoryProvider, IDocumentTabService documentTabService, IAppWindow appWindow, IExtensionService extensionService, IContentTypeRegistryService contentTypeRegistryService) {
			this.documentViewerContentFactoryProvider = documentViewerContentFactoryProvider;
			this.documentTabService = documentTabService;
			this.appWindow = appWindow;
			this.extensionService = extensionService;
			aboutContentType = contentTypeRegistryService.GetContentType(ContentTypes.AboutDnSpy);
		}
Пример #2
0
        public void Setup()
        {
            _view = new AddinViewFake();
            _extensionService = Substitute.For<IExtensionService>();
            _extensionPoint = Substitute.For<IExtensionPoint>();

            _extensionNodes = new List<IExtensionNode>();
            _extensionPoint.Extensions.Returns(_extensionNodes);
            _extensionService.ExtensionPoints.Returns(new []{_extensionPoint});
            _presenter = new AddinsPresenter(_view, _extensionService);
        }
Пример #3
0
        public void CreateService()
        {
            _serviceInterface = _serviceClass = new ExtensionService();

            // Rather than actually starting the service, which would result
            // in finding the extensions actually in use on the current system,
            // we simulate the start using this assemblies dummy extensions.
            _serviceClass.FindExtensionPoints(typeof(TestEngine).Assembly);
            _serviceClass.FindExtensionPoints(typeof(ITestEngine).Assembly);

            _serviceClass.FindExtensionsInAssembly(GetType().Assembly.Location, true);
        }
        public void CreateService()
        {
            _serviceInterface = _serviceClass = new ExtensionService();

            // Rather than actually starting the service, which would result
            // in finding the extensions actually in use on the current system,
            // we simulate the start using this assemblies dummy extensions.
            _serviceClass.FindExtensionPoints(typeof(TestEngine).Assembly);
            _serviceClass.FindExtensionPoints(typeof(CoreEngine).Assembly);
            _serviceClass.FindExtensionPoints(typeof(ITestEngine).Assembly);

            _serviceClass.FindExtensionsInAssembly(new ExtensionAssembly(GetType().Assembly.Location, false));
        }
Пример #5
0
        public ExtensionDialog(IExtensionService extensionService)
        {
            _extensionService = extensionService;

            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }
 public SharpMessagingClient(string identity, IExtensionRegistry extensionRegistry)
 {
     _extensionService = new ExtensionService(extensionRegistry, DeliverMessage);
     _state            = ClientState.ClientToServerHandshake1;
     _connection       = new Connection.Connection(identity, _extensionService, false, _bufferManager)
     {
         ExtensionFrameReceived = OnExtensionFrame,
         MessageFrameReceived   = OnMessageFrame,
         WriteCompleted         = OnWriteCompleted,
         //ReceiveBufferSize = 65535
     };
     _connection.HandshakeReceived += OnServerHandshakeFrame;
     _connection.Disconnected      += OnDisconnected;
 }
 public SharpMessagingClient(string identity, IExtensionRegistry extensionRegistry)
 {
     _extensionService = new ExtensionService(extensionRegistry, DeliverMessage);
     _state = ClientState.ClientToServerHandshake1;
     _connection = new Connection.Connection(identity, _extensionService, false, _bufferManager)
     {
         ExtensionFrameReceived = OnExtensionFrame,
         MessageFrameReceived = OnMessageFrame,
         WriteCompleted = OnWriteCompleted,
         //ReceiveBufferSize = 65535
     };
     _connection.HandshakeReceived += OnServerHandshakeFrame;
     _connection.Disconnected += OnDisconnected;
     _connection.Fault += OnConnectionFault;
 }
Пример #8
0
 public ServerClient(string identity, IExtensionRegistry extensionRegistry, BufferManager bufferManager)
 {
     ServerName        = identity;
     _bufferManager    = bufferManager;
     _extensionService = new ExtensionService(extensionRegistry, DeliverMessage);
     _connection       = new Connection.Connection(ServerName, _extensionService, true, _bufferManager)
     {
         ExtensionFrameReceived = OnExtensionFrame,
         MessageFrameReceived   = OnMessageFrame,
         WriteCompleted         = OnWriteCompleted,
     };
     _connection.HandshakeReceived += OnHandshakeFrame;
     _connection.Disconnected      += HandleRemoteDisconnect;
     _state     = ServerState.WaitingOnInitialHandshake;
     ServerName = "FastSocket v" + Major + "." + Minor;
 }
Пример #9
0
        public ServerClient(string identity, IExtensionRegistry extensionRegistry, BufferManager bufferManager)
        {
            ServerName = identity;
            _bufferManager = bufferManager;
            _extensionService = new ExtensionService(extensionRegistry, DeliverMessage);
            _connection = new Connection.Connection(ServerName, _extensionService, true, _bufferManager)
            {
                ExtensionFrameReceived = OnExtensionFrame,
                MessageFrameReceived = OnMessageFrame,
                WriteCompleted = OnWriteCompleted,

            };
            _connection.HandshakeReceived += OnHandshakeFrame;
            _connection.Disconnected += HandleRemoteDisconnect;
            _state = ServerState.WaitingOnInitialHandshake;
            ServerName = "FastSocket v" + Major + "." + Minor;
        }
Пример #10
0
        public ConsoleRunner(ITestEngine engine, ConsoleOptions options, ExtendedTextWriter writer)
        {
            _engine    = engine;
            _options   = options;
            _outWriter = writer;

            _workDirectory = options.WorkDirectory ?? Directory.GetCurrentDirectory();

            if (!Directory.Exists(_workDirectory))
            {
                Directory.CreateDirectory(_workDirectory);
            }

            _resultService    = _engine.Services.GetService <IResultService>();
            _filterService    = _engine.Services.GetService <ITestFilterService>();
            _extensionService = _engine.Services.GetService <IExtensionService>();

            // Enable TeamCityEventListener immediately, before the console is redirected
            _extensionService?.EnableExtension("NUnit.Engine.Listeners.TeamCityEventListener", _options.TeamCity);
        }
Пример #11
0
        public ConsoleRunner(ITestEngine engine, ConsoleOptions options, ExtendedTextWriter writer)
        {
            _engine = engine;
            _options = options;
            _outWriter = writer;

            _workDirectory = options.WorkDirectory;

            if (_workDirectory == null)
                _workDirectory = Environment.CurrentDirectory;
            else if (!Directory.Exists(_workDirectory))
                Directory.CreateDirectory(_workDirectory);

            _resultService = _engine.Services.GetService<IResultService>();
            _filterService = _engine.Services.GetService<ITestFilterService>();
            _extensionService = _engine.Services.GetService<IExtensionService>();

            // Enable TeamCityEventListener immediately, before the console is redirected
            _extensionService.EnableExtension("NUnit.Engine.Listeners.TeamCityEventListener", _options.TeamCity);
        }
Пример #12
0
        public Connection(string identity, IExtensionService extensionRegistry, bool isServer,
            BufferManager bufferManager)
        {
            _identity = identity ?? "FastSocket v" + Major + "" + Minor;
            _readArgs = new SocketAsyncEventArgs();
            _readArgs.Completed += OnReadCompleted;

            _writeArgs = new SocketAsyncEventArgs();
            _writeArgs.Completed += OnWriteCompleted;
            //_writeArgs.SendPacketsFlags = TransmitFileOptions.UseKernelApc;

            _extensionFrameProcessor = new ExtensionFrameProcessor(extensionRegistry.CreateFrame, OnExtension);
            _writerContext = new WriterContext(bufferManager);

            ExtensionFrameReceived = frame => { };
            HandshakeReceived = (o, e) => { };
            MessageFrameReceived = frame => { };
            WriteCompleted = i => { };
            Disconnected = (o, e) => { };
            Fault = (o, e) => { };
        }
Пример #13
0
        public Connection(string identity, IExtensionService extensionRegistry, bool isServer,
                          BufferManager bufferManager)
        {
            _identity            = identity ?? "FastSocket v" + Major + "" + Minor;
            _readArgs            = new SocketAsyncEventArgs();
            _readArgs.Completed += OnReadCompleted;

            _writeArgs            = new SocketAsyncEventArgs();
            _writeArgs.Completed += OnWriteCompleted;
            //_writeArgs.SendPacketsFlags = TransmitFileOptions.UseKernelApc;

            _extensionFrameProcessor = new ExtensionFrameProcessor(extensionRegistry.CreateFrame, OnExtension);
            _writerContext           = new WriterContext(bufferManager);

            ExtensionFrameReceived = frame => { };
            HandshakeReceived      = (o, e) => { };
            MessageFrameReceived   = frame => { };
            WriteCompleted         = i => { };
            Disconnected           = (o, e) => { };
            Fault = (o, e) => { };
        }
Пример #14
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="ExtensionService"></param>
 public ExtensionController(IExtensionService ExtensionService)
 {
     _ExtensionService = ExtensionService;
 }
Пример #15
0
 public AboutScreenDocumentTabContent(IDocumentViewerContentFactoryProvider documentViewerContentFactoryProvider, IAppWindow appWindow, IExtensionService extensionService, IContentType aboutContentType)
 {
     this.documentViewerContentFactoryProvider = documentViewerContentFactoryProvider;
     this.appWindow        = appWindow;
     this.extensionService = extensionService;
     this.aboutContentType = aboutContentType;
 }
Пример #16
0
 AboutScreenMenuItem(IDocumentViewerContentFactoryProvider documentViewerContentFactoryProvider, IDocumentTabService documentTabService, IAppWindow appWindow, IExtensionService extensionService, IContentTypeRegistryService contentTypeRegistryService)
 {
     this.documentViewerContentFactoryProvider = documentViewerContentFactoryProvider;
     this.documentTabService = documentTabService;
     this.appWindow          = appWindow;
     this.extensionService   = extensionService;
     aboutContentType        = contentTypeRegistryService.GetContentType(ContentTypes.AboutDnSpy);
 }
Пример #17
0
 public ExtensionPaneViewModel(IExtensionService extensionService)
 {
     ExtensionService = extensionService;
 }
Пример #18
0
 public void TearDown()
 {
     _presenter = null;
     _view = null;
     _extensionService = null;
 }
 public ImageController(IImageService imageService, IExtensionService extensionService)
 {
     this.imageService     = imageService;
     this.extensionService = extensionService;
 }
Пример #20
0
 public AddinsPresenter(IAddinsView view, IExtensionService extensionService)
 {
     _view             = view;
     _extensionService = extensionService;
 }
Пример #21
0
		public AboutScreenDocumentTabContent(IDocumentViewerContentFactoryProvider documentViewerContentFactoryProvider, IAppWindow appWindow, IExtensionService extensionService, IContentType aboutContentType) {
			this.documentViewerContentFactoryProvider = documentViewerContentFactoryProvider;
			this.appWindow = appWindow;
			this.extensionService = extensionService;
			this.aboutContentType = aboutContentType;
		}
 public void TearDown()
 {
     _presenter        = null;
     _view             = null;
     _extensionService = null;
 }
Пример #23
0
 public AddinsPresenter(IAddinsView view, IExtensionService extensionService)
 {
     _view = view;
     _extensionService = extensionService;
 }