The DTS.Common module serves as a shared utility library providing application-wide configuration and static analysis annotations. It contains auto-generated application settings for tile asset locations and integrates JetBrains ReSharper annotations (MIT licensed) to enhance IDE static analysis capabilities including nullability checking, contract annotations, and framework-specific hints for ASP.NET MVC, Razor, and XAML development.
2. Public Interface
Settings (DTS.Common.Properties)
Class:internal sealed partial class Settings : ApplicationSettingsBase
Member
Signature
Description
Default
public static Settings Default { get; }
Static singleton property providing thread-safe access to application settings via ApplicationSettingsBase.Synchronized.
TilesLocation
public string TilesLocation { get; }
Application-scoped setting returning the path to tile assets. Default value: "Assets\\Tiles\\".
Annotation Attributes (DTS.Common.Annotations)
The module exposes numerous attribute classes for static analysis. Key categories include:
Settings Singleton: The Settings.Default property always returns a synchronized, thread-safe singleton instance via ApplicationSettingsBase.Synchronized().
TilesLocation Format: The TilesLocation setting is an application-scoped string with a default value of "Assets\\Tiles\\" (trailing backslash included).
Assembly Version: The assembly version is fixed at 1.0.0.0 for both AssemblyVersion and AssemblyFileVersion.
COM Visibility: All types in this assembly have ComVisible(false) by default.
Annotations Namespace: All annotation attributes reside in DTS.Common.Annotations namespace and are designed for compile-time static analysis only; they have no runtime behavior.
Settings Designer: Settings.Designer.cs is auto-generated; manual changes will be lost upon regeneration.
4. Dependencies
This Module Depends On:
System.Reflection - For assembly metadata attributes
System.Runtime.CompilerServices - For compiler-generated attributes and CompilerGeneratedAttribute
System.Runtime.InteropServices - For ComVisible and Guid attributes
System.Configuration.ApplicationSettingsBase - Base class for settings management
System.CodeDom.Compiler - For GeneratedCodeAttribute
System.Diagnostics - For DebuggerNonUserCodeAttribute
What Depends On This Module:
Unclear from source alone - The source files do not show consumers of this module. The TilesLocation setting suggests tile-based UI components may depend on this configuration.
5. Gotchas
Auto-Generated Settings File: Settings.Designer.cs contains a warning header indicating it is tool-generated. Modifications will be lost if the code is regenerated by Visual Studio's SettingsSingleFileGenerator.
JetBrains Annotations License: The Annotations.cs file is MIT-licensed from JetBrains (copyright 2016). While permissive, the license header must be preserved in copies.
Obsolete Attribute: TerminatesProgramAttribute is marked [Obsolete("Use [ContractAnnotation('=> halt')] instead")]. New code should use ContractAnnotationAttribute.
Internal Settings Visibility: The Settings class is marked internal sealed, limiting access to within the assembly. External assemblies cannot directly access these settings.
Hardcoded Tiles Path: The TilesLocation default value "Assets\\Tiles\\" uses Windows-style path separators. Cross-platform compatibility is unclear from source alone.
Empty Assembly Description: AssemblyDescription is empty in AssemblyInfo.cs, which may affect documentation generation tools.