public void Test_Initialize() { using (DdeContext context = new DdeContext()) { context.Initialize(); } }
public void Test_Ctor_Overload_2() { using (DdeContext context = new DdeContext()) { DdeClient client = new DdeClient(ServiceName, TopicName, context); } }
public void Test_Ctor_Overload_2() { using (DdeContext context = new DdeContext()) { DdeServer server = new TestServer(ServiceName); } }
public void Test_IsInitialized_Variation_1() { using (DdeContext context = new DdeContext()) { Assert.IsFalse(context.IsInitialized); } }
public TestServer(string service, DdeContext context) : base(service, context) { _Timer.Elapsed += new ElapsedEventHandler(this.OnTimerElapsed); _Timer.Interval = 1000; _Timer.SynchronizingObject = base.Context; }
public void Test_IsInitialized_Variation_2() { using (DdeContext context = new DdeContext()) { context.Initialize(); Assert.IsTrue(context.IsInitialized); } }
public void Test_Initialize_After_Dispose() { using (DdeContext context = new DdeContext()) { context.Dispose(); context.Initialize(); } }
internal static DdeContext GetDefault() { lock (_InstanceLock) { if (_Instance == null) { _Instance = new DdeContext(); } return _Instance; } }
internal static DdeContext GetDefault(ISynchronizeInvoke synchronizingObject) { if (synchronizingObject != null) { lock (_Instances) { DdeContext context = _Instances[synchronizingObject]; if (context == null) { if (synchronizingObject is DdeContext) { context = synchronizingObject as DdeContext; } else { context = new DdeContext(synchronizingObject); } _Instances.Add(synchronizingObject, context); } return context; } } return GetDefault(); }
public void Test_AddTransactionFilter_After_Dispose() { using (DdeContext context = new DdeContext()) { IDdeTransactionFilter filter = new TransactionFilter(); context.Dispose(); context.AddTransactionFilter(filter); } }
public AsyncResult(DdeContext context) { _Context = context; }
public void Test_Dispose() { using (DdeContext context = new DdeContext()) { } }
public void Test_Ctor_Overload_2() { DdeContext context = new DdeContext(new DdeContext()); }
public void Test_Unregister() { using (DdeContext context = new DdeContext()) { EventListener listener = new EventListener(); context.Unregister += listener.OnEvent; context.Initialize(); using (DdeServer server = new TestServer(ServiceName)) { server.Register(); server.Unregister(); } Assert.IsTrue(listener.Received.WaitOne(Timeout, false)); } }
public void Test_TransactionFilter() { using (DdeContext context = new DdeContext()) { TransactionFilter filter = new TransactionFilter(); context.AddTransactionFilter(filter); context.Initialize(); using (DdeServer server = new TestServer(ServiceName)) { server.Register(); } Assert.IsTrue(filter.Received.WaitOne(Timeout, false)); } }
public void Test_RemoveTransactionFilter() { using (DdeContext context = new DdeContext()) { TransactionFilter filter = new TransactionFilter(); context.AddTransactionFilter(filter); context.RemoveTransactionFilter(filter); } }
public TracingServer(string service, DdeContext context) : base(service, context) { }
/// <summary> /// This initializes a new instance of the <c>DdeServer</c> class that can register the specified service name and uses the specified /// context. /// </summary> /// <param name="service"> /// The service name that this instance can register. /// </param> /// <param name="context"> /// The context to use for execution. /// </param> /// <exception cref="ArgumentException"> /// This is thown when service exceeds 255 characters.. /// </exception> /// <exception cref="ArgumentNullException"> /// This is thrown when service is a null reference. /// </exception> public DdeServer(string service, DdeContext context) { Service = service; Context = context; }
/// <summary> /// This initializes a new instance of the <c>DdeClient</c> class that can connect to a server that supports the specified service name and /// topic name pair and uses the specified context. /// </summary> /// <param name="service"> /// A service name supported by a server application. /// </param> /// <param name="topic"> /// A topic name support by a server application. /// </param> /// <param name="context"> /// The context to use for execution. /// </param> /// <exception cref="ArgumentException"> /// This is thown when servic or topic exceeds 255 characters. /// </exception> /// <exception cref="ArgumentNullException"> /// This is thrown when service or topic is a null reference. /// </exception> public DdeClient(string service, string topic, DdeContext context) { Service = service; Topic = topic; Context = context; }