This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | public class WcfService<T> : IDisposable where T : class | |
| { | |
| private readonly object _lockObject = new object(); | |
| private bool _disposed; | |
| private ChannelFactory<T> _factory; | |
| private T _channel; | |
| internal WcfService() | |
| { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | /// <summary> | |
| /// Tests that OpenConnection creates the proper MQQueueManager and accesses the | |
| /// queue with the right set of options. | |
| /// </summary> | |
| [TestMethod] | |
| public void Test_OpenConnection_GoesThrough() | |
| { | |
| const string host = "some random host"; | |
| const string channel = "some random channel"; | |
| const string manager = "some random manager"; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | /// <summary> | |
| /// Opens this queue. Supports listening and writing options, if setup | |
| /// for listening it will do browse and not really reads from the queue | |
| /// as messages arrive to the queue. | |
| /// </summary> | |
| /// <param name="reading">True if we want to read from this queue, false otherwise.</param> | |
| /// <param name="writing">True if we want to write to this queue, false otherwise.</param> | |
| /// <returns>The Observable where all the messages read from this queue will appear.</returns> | |
| public IObservable<IServiceMessage> OpenConnection(bool reading = true, bool writing = false) | |
| { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | private static byte[] CreateByteArray(int size, byte b) | |
| { | |
| var array = new byte[size]; | |
| for (var i = 0; i < array.Length; i++) | |
| { | |
| array[i] = b; | |
| } | |
| return array; | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | public static void PauseRecording() | |
| { | |
| #if !DO_NOT_FIND_WEBRECORD | |
| if (!_recording) return; | |
| Mouse.Click(_pauseButton); | |
| _pauseButton.WaitForControlReady(); | |
| #endif | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | public static class CodedUIExtensions | |
| { | |
| #if !DO_NOT_FIND_WEBRECORD | |
| private static bool _recording; | |
| private static WinButton _recordButton; | |
| private static WinButton _pauseButton; | |
| #endif | |
| public static BrowserWindow Launch(bool pauseRecording = false) | |
| { | 
NewerOlder