Improved comments in various places; disabled all classes in the 'Services' namespace, including the type listers; added scheduler class which will act sort of like the cron daemon on unix machines; defined a time source interface so I can manually advance time instead of waiting in the unit tests; created two time sources, a generic one for all platforms and a windows specific one that will notice when the system time is adjusted
git-svn-id: file:///srv/devel/repo-conversion/nusu@143 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
parent
10d6533b50
commit
2426868cce
29 changed files with 690 additions and 31 deletions
|
@ -26,6 +26,8 @@ using System.Reflection;
|
|||
|
||||
using NUnit.Framework;
|
||||
|
||||
#if ENABLE_SERVICEMANAGER
|
||||
|
||||
namespace Nuclex.Support.Services {
|
||||
|
||||
/// <summary>Unit Test for the cached app domain type lister</summary>
|
||||
|
@ -70,4 +72,6 @@ namespace Nuclex.Support.Services {
|
|||
|
||||
} // namespace Nuclex.Support.Services
|
||||
|
||||
#endif // ENABLE_SERVICEMANAGER
|
||||
|
||||
#endif // UNITTEST
|
||||
|
|
|
@ -22,6 +22,8 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
#if ENABLE_SERVICEMANAGER
|
||||
|
||||
namespace Nuclex.Support.Services {
|
||||
|
||||
#if !XBOX360
|
||||
|
@ -57,3 +59,5 @@ namespace Nuclex.Support.Services {
|
|||
#endif // !XBOX360
|
||||
|
||||
} // namespace Nuclex.Support.Services
|
||||
|
||||
#endif // ENABLE_SERVICEMANAGER
|
||||
|
|
|
@ -26,6 +26,8 @@ using System.Reflection;
|
|||
|
||||
using NUnit.Framework;
|
||||
|
||||
#if ENABLE_SERVICEMANAGER
|
||||
|
||||
namespace Nuclex.Support.Services {
|
||||
|
||||
/// <summary>Unit Test for the predefined type lister</summary>
|
||||
|
@ -100,4 +102,6 @@ namespace Nuclex.Support.Services {
|
|||
|
||||
} // namespace Nuclex.Support.Services
|
||||
|
||||
#endif // ENABLE_SERVICEMANAGER
|
||||
|
||||
#endif // UNITTEST
|
||||
|
|
|
@ -22,6 +22,8 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
#if ENABLE_SERVICEMANAGER
|
||||
|
||||
namespace Nuclex.Support.Services {
|
||||
|
||||
/// <summary>Type lister that returns a predefined list of types</summary>
|
||||
|
@ -58,3 +60,5 @@ namespace Nuclex.Support.Services {
|
|||
}
|
||||
|
||||
} // namespace Nuclex.Support.Services
|
||||
|
||||
#endif // ENABLE_SERVICEMANAGER
|
||||
|
|
|
@ -24,6 +24,8 @@ using System.Reflection;
|
|||
|
||||
using Nuclex.Support.Plugins;
|
||||
|
||||
#if ENABLE_SERVICEMANAGER
|
||||
|
||||
namespace Nuclex.Support.Services {
|
||||
|
||||
/// <summary>
|
||||
|
@ -40,3 +42,5 @@ namespace Nuclex.Support.Services {
|
|||
}
|
||||
|
||||
} // namespace Nuclex.Support.Services
|
||||
|
||||
#endif // ENABLE_SERVICEMANAGER
|
||||
|
|
|
@ -23,6 +23,8 @@ using System.Collections.Generic;
|
|||
|
||||
using Nuclex.Support.Plugins;
|
||||
|
||||
#if ENABLE_SERVICEMANAGER
|
||||
|
||||
namespace Nuclex.Support.Services {
|
||||
|
||||
/// <summary>Modes in which services can be instantiated</summary>
|
||||
|
@ -43,3 +45,5 @@ namespace Nuclex.Support.Services {
|
|||
}
|
||||
|
||||
} // namespace Nuclex.Support.Services
|
||||
|
||||
#endif // ENABLE_SERVICEMANAGER
|
||||
|
|
|
@ -26,6 +26,8 @@ using System.Reflection;
|
|||
|
||||
using NUnit.Framework;
|
||||
|
||||
#if ENABLE_SERVICEMANAGER
|
||||
|
||||
namespace Nuclex.Support.Services {
|
||||
|
||||
/// <summary>Unit Test for the cached assembly type lister</summary>
|
||||
|
@ -135,4 +137,7 @@ namespace Nuclex.Support.Services {
|
|||
|
||||
} // namespace Nuclex.Support.Services
|
||||
|
||||
#endif // ENABLE_SERVICEMANAGER
|
||||
|
||||
#endif // UNITTEST
|
||||
|
||||
|
|
|
@ -22,6 +22,8 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
#if ENABLE_SERVICEMANAGER
|
||||
|
||||
namespace Nuclex.Support.Services {
|
||||
|
||||
/// <summary>Lists all types in a changing set of assemblies</summary>
|
||||
|
@ -160,3 +162,5 @@ namespace Nuclex.Support.Services {
|
|||
}
|
||||
|
||||
} // namespace Nuclex.Support.Services
|
||||
|
||||
#endif // ENABLE_SERVICEMANAGER
|
||||
|
|
|
@ -23,6 +23,8 @@ using System.Collections.Generic;
|
|||
|
||||
using Nuclex.Support.Tracking;
|
||||
|
||||
#if ENABLE_SERVICEMANAGER
|
||||
|
||||
namespace Nuclex.Support.Services.ProgressTracking {
|
||||
|
||||
/// <summary>Allows application-wide tracking of progress</summary>
|
||||
|
@ -86,3 +88,5 @@ namespace Nuclex.Support.Services.ProgressTracking {
|
|||
}
|
||||
|
||||
} // namespace Nuclex.Support.DependencyInjection.ProgressTracking
|
||||
|
||||
#endif // ENABLE_SERVICEMANAGER
|
||||
|
|
|
@ -23,6 +23,8 @@ using System.Collections.Generic;
|
|||
|
||||
using Nuclex.Support.Tracking;
|
||||
|
||||
#if ENABLE_SERVICEMANAGER
|
||||
|
||||
namespace Nuclex.Support.Services.ProgressTracking {
|
||||
|
||||
/// <summary>Reports the progress of tracked background processes</summary>
|
||||
|
@ -52,3 +54,5 @@ namespace Nuclex.Support.Services.ProgressTracking {
|
|||
}
|
||||
|
||||
} // namespace Nuclex.Support.DependencyInjection.ProgressTracking
|
||||
|
||||
#endif // ENABLE_SERVICEMANAGER
|
||||
|
|
|
@ -23,6 +23,8 @@ using System.Collections.Generic;
|
|||
|
||||
using Nuclex.Support.Tracking;
|
||||
|
||||
#if ENABLE_SERVICEMANAGER
|
||||
|
||||
namespace Nuclex.Support.Services.ProgressTracking {
|
||||
|
||||
/// <summary>Process whose progress is being tracked</summary>
|
||||
|
@ -47,3 +49,5 @@ namespace Nuclex.Support.Services.ProgressTracking {
|
|||
}
|
||||
|
||||
} // namespace Nuclex.Support.DependencyInjection.ProgressTracking
|
||||
|
||||
#endif // ENABLE_SERVICEMANAGER
|
||||
|
|
|
@ -23,10 +23,10 @@ using System.Collections.Generic;
|
|||
|
||||
using Nuclex.Support.Tracking;
|
||||
|
||||
namespace Nuclex.Support.Services.ProgressTracking {
|
||||
|
||||
#if ENABLE_SERVICEMANAGER
|
||||
|
||||
namespace Nuclex.Support.Services.ProgressTracking {
|
||||
|
||||
/// <summary>Tracks the progress of running background processes</summary>
|
||||
public class ProgressTrackingComponent :
|
||||
IProgressCollectingService,
|
||||
|
@ -73,6 +73,6 @@ namespace Nuclex.Support.Services.ProgressTracking {
|
|||
|
||||
}
|
||||
|
||||
#endif // ENABLE_SERVICEMANAGER
|
||||
|
||||
} // namespace Nuclex.Support.Services.ProgressTracking
|
||||
|
||||
#endif // ENABLE_SERVICEMANAGER
|
||||
|
|
|
@ -26,6 +26,8 @@ using System.Reflection;
|
|||
|
||||
using NUnit.Framework;
|
||||
|
||||
#if ENABLE_SERVICEMANAGER
|
||||
|
||||
namespace Nuclex.Support.Services {
|
||||
|
||||
/// <summary>Unit Test for the cached assembly repository type lister</summary>
|
||||
|
@ -60,4 +62,6 @@ namespace Nuclex.Support.Services {
|
|||
|
||||
} // namespace Nuclex.Support.Services
|
||||
|
||||
#endif // ENABLE_SERVICEMANAGER
|
||||
|
||||
#endif // UNITTEST
|
||||
|
|
|
@ -24,6 +24,8 @@ using System.Reflection;
|
|||
|
||||
using Nuclex.Support.Plugins;
|
||||
|
||||
#if ENABLE_SERVICEMANAGER
|
||||
|
||||
namespace Nuclex.Support.Services {
|
||||
|
||||
/// <summary>
|
||||
|
@ -70,3 +72,5 @@ namespace Nuclex.Support.Services {
|
|||
}
|
||||
|
||||
} // namespace Nuclex.Support.Services
|
||||
|
||||
#endif // ENABLE_SERVICEMANAGER
|
||||
|
|
|
@ -22,10 +22,10 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Nuclex.Support.Services {
|
||||
|
||||
#if ENABLE_SERVICEMANAGER
|
||||
|
||||
namespace Nuclex.Support.Services {
|
||||
|
||||
partial class ServiceManager {
|
||||
|
||||
#region class Analyzer
|
||||
|
@ -48,6 +48,6 @@ namespace Nuclex.Support.Services {
|
|||
|
||||
}
|
||||
|
||||
#endif // ENABLE_SERVICEMANAGER
|
||||
|
||||
} // namespace Nuclex.Support.Services
|
||||
|
||||
#endif // ENABLE_SERVICEMANAGER
|
||||
|
|
|
@ -22,10 +22,10 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Nuclex.Support.Services {
|
||||
|
||||
#if ENABLE_SERVICEMANAGER
|
||||
|
||||
namespace Nuclex.Support.Services {
|
||||
|
||||
partial class ServiceManager {
|
||||
|
||||
#region class ForContext
|
||||
|
@ -111,6 +111,6 @@ namespace Nuclex.Support.Services {
|
|||
|
||||
}
|
||||
|
||||
#endif // ENABLE_SERVICEMANAGER
|
||||
|
||||
} // namespace Nuclex.Support.Services
|
||||
|
||||
#endif // ENABLE_SERVICEMANAGER
|
||||
|
|
|
@ -18,19 +18,19 @@ License along with this library
|
|||
*/
|
||||
#endregion
|
||||
|
||||
#if UNITTEST
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
using Nuclex.Support.Plugins;
|
||||
|
||||
#if UNITTEST
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace Nuclex.Support.Services {
|
||||
|
||||
#if ENABLE_SERVICEMANAGER
|
||||
|
||||
namespace Nuclex.Support.Services {
|
||||
|
||||
/// <summary>Unit Test for the service manager class</summary>
|
||||
[TestFixture]
|
||||
public class ServiceManagerTest {
|
||||
|
@ -192,8 +192,8 @@ namespace Nuclex.Support.Services {
|
|||
|
||||
}
|
||||
|
||||
#endif // ENABLE_SERVICEMANAGER
|
||||
|
||||
} // namespace Nuclex.Support.Services
|
||||
|
||||
#endif // ENABLE_SERVICEMANAGER
|
||||
|
||||
#endif // UNITTEST
|
||||
|
|
|
@ -26,10 +26,10 @@ using System.Threading;
|
|||
|
||||
using Nuclex.Support.Plugins;
|
||||
|
||||
namespace Nuclex.Support.Services {
|
||||
|
||||
#if ENABLE_SERVICEMANAGER
|
||||
|
||||
namespace Nuclex.Support.Services {
|
||||
|
||||
// Allow Dependency on Container
|
||||
// public Foo(IServiceProvider serviceProvider)
|
||||
// public Foo(IserviceLocator serviceLocator)
|
||||
|
@ -84,7 +84,7 @@ namespace Nuclex.Support.Services {
|
|||
/// </remarks>
|
||||
public partial class ServiceManager : IServiceProvider {
|
||||
|
||||
#region class Contract
|
||||
#region class Contract
|
||||
|
||||
/// <summary>Stores the settings for an individual contract</summary>
|
||||
private class Contract {
|
||||
|
@ -321,6 +321,6 @@ namespace Nuclex.Support.Services {
|
|||
|
||||
}
|
||||
|
||||
#endif // ENABLE_SERVICEMANAGER
|
||||
|
||||
} // namespace Nuclex.Support.Services
|
||||
|
||||
#endif // ENABLE_SERVICEMANAGER
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue