public WhenDisposingBuffer() { var guid = Guid.NewGuid(); var bufferName = String.Format(@"Local\HRVSTR_{0}", guid); buffer = new SharedMemoryBuffer(bufferName, 1024) { Timeout = TimeSpan.FromMilliseconds(250) }; }
public WhenWrittingData() { var guid = Guid.NewGuid(); var bufferName = String.Format(@"Local\HRVSTR_{0}", guid); buffer = new SharedMemoryBuffer(bufferName, 1024) { Timeout = TimeSpan.FromMilliseconds(250) }; syncEvent1 = new ManualResetEvent(false); syncEvent2 = new ManualResetEvent(false); }
public override void ActivateOptions() { base.ActivateOptions(); switch (BufferType) { case "SharedMemoryBuffer": MessageBuffer = new SharedMemoryBuffer(Binding, OutputDebugString.BufferSize); MessageWriter = new OutputDebugStringWriter(MutexName, MessageBuffer); break; case "NamedPipeBuffer": MessageBuffer = new NamedPipeClientBuffer(".", Binding); MessageWriter = new PipeMessageWriter(MutexName, MessageBuffer); break; default: throw new NotSupportedException(String.Format(Localization.BufferTypeNotSupported, BufferType)); } }