Пример #1
0
        protected override void Execute(Sys.Threading.ThreadPool owner)
        {
            bool added = false;

            foreach (string s in STEM.Sys.IO.Directory.STEM_GetFiles(_ExtensionDirectory, "*.dll|*.so|*.a|*.lib", "!.Archive|!TEMP", _Recurse ? System.IO.SearchOption.AllDirectories : System.IO.SearchOption.TopDirectoryOnly, false))
            {
                if (!AssemblyList.Descriptions.Exists(i => i.Filename == s.Substring(_ExtensionDirectory.Length).Trim(System.IO.Path.DirectorySeparatorChar)))
                {
                    try
                    {
                        Sys.IO.FileDescription d = new Sys.IO.FileDescription(_ExtensionDirectory, s.Substring(_ExtensionDirectory.Length).Trim(System.IO.Path.DirectorySeparatorChar), true);

                        if (d.Content.Length > 0)
                        {
                            lock (AssemblyList)
                            {
                                AssemblyList.Descriptions.Add(d);
                                added = true;
                            }
                        }
                    }
                    catch { }
                }
            }

            if (added)
            {
                lock (_RegisteredConnections)
                    foreach (DeliverDelta d in _RegisteredConnections.Values)
                    {
                        d.ExecutionInterval = TimeSpan.FromSeconds(1);
                    }
            }
        }
Пример #2
0
 protected override void Execute(Sys.Threading.ThreadPool owner)
 {
     try
     {
         if (_MessageConnection._ReceiveResponse != null)
         {
             _MessageConnection._ReceiveResponse(_MessageConnection, _Original, _Response);
         }
         else
         {
             _Original.ReceiveResponse(_Response);
         }
     }
     catch (Exception ex)
     {
         STEM.Sys.EventLog.WriteEntry(System.Reflection.Assembly.GetEntryAssembly().GetName().Name + ".MessageConnection.ResponseHandlerThread", ex.ToString(), STEM.Sys.EventLog.EventLogEntryType.Error);
     }
 }
Пример #3
0
        protected override void Execute(Sys.Threading.ThreadPool owner)
        {
            foreach (string s in STEM.Sys.IO.Directory.STEM_GetFiles(_ExtensionDirectory, "*.dll|*.so|*.a|*.lib", "!.Archive|!TEMP", _Recurse ? System.IO.SearchOption.AllDirectories : System.IO.SearchOption.TopDirectoryOnly, false))
            {
                if (!AssemblyList.Descriptions.Exists(i => i.Filename == s.Substring(_ExtensionDirectory.Length).Trim(System.IO.Path.DirectorySeparatorChar)))
                {
                    try
                    {
                        Sys.IO.FileDescription d = new Sys.IO.FileDescription(_ExtensionDirectory, s.Substring(_ExtensionDirectory.Length).Trim(System.IO.Path.DirectorySeparatorChar), true);

                        if (d.Content.Length > 0)
                        {
                            lock (AssemblyList)
                                AssemblyList.Descriptions.Add(d);
                        }
                    }
                    catch { }
                }
            }
        }