Exemplo n.º 1
0
        public DdemlClient(string service, string topic, DdemlContext context)
        {
            if (service == null)
            {
                throw new ArgumentNullException("service");
            }
            if (service.Length > Ddeml.MAX_STRING_SIZE)
            {
                throw new ArgumentException(Resources.StringParameterInvalidMessage, "service");
            }
            if (topic == null)
            {
                throw new ArgumentNullException("topic");
            }
            if (topic.Length > Ddeml.MAX_STRING_SIZE)
            {
                throw new ArgumentException(Resources.StringParameterInvalidMessage, "topic");
            }
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }

            _Service = service;
            _Topic = topic;
            _Context = context;
        }
Exemplo n.º 2
0
 internal static DdemlContext GetDefault()
 {
     lock (_Instances)
     {
         DdemlContext context = _Instances[Ddeml.GetCurrentThreadId()];
         if (context == null)
         {
             context = new DdemlContext();
             _Instances.Add(Ddeml.GetCurrentThreadId(), context);
         }
         return context;
     }
 }
Exemplo n.º 3
0
 public MyDdemlServer(string service, DdemlContext context, DdeServer parent)
     : base(service, context)
 {
     _Parent = parent;
 }
Exemplo n.º 4
0
 internal static DdemlContext GetDefault()
 {
     lock (_Instances)
     {
         DdemlContext context = _Instances[Ddeml.GetCurrentThreadId()];
         if (context == null)
         {
             context = new DdemlContext();
             _Instances.Add(Ddeml.GetCurrentThreadId(), context);
         }
         return context;
     }
 }