11 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |||
|---|---|---|---|---|---|---|---|
|
2026-04-17T15:39:54.133449+00:00 | zai-org/GLM-5-FP8 | 1 | adc61af3e00cb084 |
Documentation: DTS.CommonCore Properties
1. Purpose
This module provides assembly-level configuration and design-time annotations for the DTS.CommonCore library. It consists of three components: standard .NET assembly metadata (AssemblyInfo.cs), application settings with a tile location path (Settings.Designer.cs), and a comprehensive set of JetBrains ReSharper/Rider annotations (Annotations.cs) that enable enhanced static analysis, nullability checking, and code inspection hints throughout the codebase. The annotations are third-party code licensed from JetBrains under the MIT license.
2. Public Interface
AssemblyInfo.cs
No public types. Contains assembly-level attributes:
AssemblyTitle: "Common"AssemblyCompany: "Microsoft"AssemblyCopyright: "Copyright © Microsoft 2016"AssemblyVersion: "1.0.0.0"AssemblyFileVersion: "1.0.0.0"ComVisible:falseGuid: "d16201c7-478c-4b92-ba6e-a0d39fd5f081"
Settings.Designer.cs
Namespace: DTS.Common.Properties
Settings Class
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
Auto-generated settings class providing application-scoped configuration access.
| Member | Signature | Description |
|---|---|---|
Default |
public static Settings Default { get; } |
Thread-safe singleton instance via Synchronized() |
TilesLocation |
public string TilesLocation { get; } |
Application-scoped setting with default value "Assets\\Tiles\\" |
Annotations.cs
Namespace: DTS.Common.Annotations
The following attribute classes are defined (all public sealed unless noted):
Nullability Attributes
| Attribute | Targets | Purpose |
|---|---|---|
CanBeNullAttribute |
Method, Parameter, Property, Delegate, Field, Event, Class, Interface, GenericParameter | Indicates value may be null |
NotNullAttribute |
Same as above | Indicates value is never null |
ItemNotNullAttribute |
Method, Parameter, Property, Delegate, Field | Collection items/Task.Result/Lazy.Value are never null |
ItemCanBeNullAttribute |
Same as above | Collection items/Task.Result/Lazy.Value may be null |
ImplicitNotNullAttribute |
Class, Struct, Interface, Assembly | Implicitly applies [NotNull]/[ItemNotNull] to scope |
String/Format Attributes
| Attribute | Constructor | Purpose |
|---|---|---|
StringFormatMethodAttribute |
(string formatParameterName) |
Marks method as string format builder; FormatParameterName property identifies format parameter |
ValueProviderAttribute |
(string name) |
Parameter expects values from specified type fields; Name property |
Property Change Notification
| Attribute | Constructor | Purpose |
|---|---|---|
NotifyPropertyChangedInvocatorAttribute |
() or (string parameterName) |
Marks INPC notification methods; optional ParameterName property |
Contract Annotations
| Attribute | Constructor | Purpose |
|---|---|---|
ContractAnnotationAttribute |
(string contract) or (string contract, bool forceFullStates) |
Describes input/output dependencies; Contract and ForceFullStates properties |
Usage Attributes
| Attribute | Constructor | Properties |
|---|---|---|
UsedImplicitlyAttribute |
Multiple overloads | UseKindFlags, TargetFlags |
MeansImplicitUseAttribute |
Multiple overloads | UseKindFlags, TargetFlags |
PublicAPIAttribute |
() or (string comment) |
Comment property |
Enums
[Flags] public enum ImplicitUseKindFlags
Values: Default (1|2|4), Access (1), Assign (2), InstantiatedWithFixedConstructorSignature (4), InstantiatedNoFixedConstructorSignature (8)
[Flags] public enum ImplicitUseTargetFlags
Values: Default (1), Itself (1), Members (2), WithMembers (3)
Method Behavior Attributes
| Attribute | Purpose |
|---|---|
InstantHandleAttribute |
Parameter is handled/delegate executed during method execution |
PureAttribute |
Method makes no observable state changes |
MustUseReturnValueAttribute |
Return value must be used; optional Justification property |
ProvidesContextAttribute |
Member provides context value that should be used |
Collection Access
| Attribute | Constructor | Property |
|---|---|---|
CollectionAccessAttribute |
(CollectionAccessType) |
CollectionAccessType |
[Flags] public enum CollectionAccessType
Values: None (0), Read (1), ModifyExistingContent (2), UpdatedContent (6)
Assertion Attributes
| Attribute | Constructor | Property |
|---|---|---|
AssertionMethodAttribute |
Default | Marks assertion method |
AssertionConditionAttribute |
(AssertionConditionType) |
ConditionType |
public enum AssertionConditionType
Values: IS_TRUE (0), IS_FALSE (1), IS_NULL (2), IS_NOT_NULL (3)
ASP.NET MVC Attributes
AspMvcActionAttribute- Parameter is MVC action; optionalAnonymousPropertyAspMvcAreaAttribute- Parameter is MVC areaAspMvcControllerAttribute- Parameter is MVC controllerAspMvcMasterAttribute- Parameter is MVC masterAspMvcModelTypeAttribute- Parameter is MVC model typeAspMvcPartialViewAttribute- Parameter is MVC partial viewAspMvcViewAttribute- Parameter is MVC viewAspMvcViewComponentAttribute- Parameter is view component nameAspMvcViewComponentViewAttribute- Parameter is view component viewAspMvcActionSelectorAttribute- Parameter is action name in attributeAspMvcDisplayTemplateAttribute,AspMvcEditorTemplateAttribute,AspMvcTemplateAttribute- Template parametersAspMvcSuppressViewErrorAttribute- Disables MVC view inspections- Location format attributes (assembly-level, multiple allowed):
AspMvcAreaMasterLocationFormatAttribute,AspMvcAreaPartialViewLocationFormatAttribute,AspMvcAreaViewLocationFormatAttribute,AspMvcMasterLocationFormatAttribute,AspMvcPartialViewLocationFormatAttribute,AspMvcViewLocationFormatAttribute
Razor Attributes
RazorSectionAttribute- Parameter/method is Razor sectionRazorImportNamespaceAttribute(assembly-level) -NamepropertyRazorInjectionAttribute(assembly-level) -Type,FieldNamepropertiesRazorDirectiveAttribute(assembly-level) -DirectivepropertyRazorHelperCommonAttribute,RazorLayoutAttribute,RazorWriteLiteralMethodAttribute,RazorWriteMethodAttribute,RazorWriteMethodParameterAttribute
XAML Attributes
XamlItemsControlAttribute- Class hasItemsSourcepropertyXamlItemBindingOfItemsControlAttribute- Property isBindingBasefor ItemsControl item
Source Template Attributes
| Attribute | Purpose | Properties |
|---|---|---|
SourceTemplateAttribute |
Extension method expands as template | None |
MacroAttribute |
Macro for template parameter | Expression, Editable, Target |
Other Attributes
LocalizationRequiredAttribute-Requiredproperty indicates localization neededCannotApplyEqualityOperatorAttribute- UseEquals()instead of==/!=BaseTypeRequiredAttribute-[BaseTypeRequired(typeof(Attribute))]on attribute classes;BaseTypepropertyPathReferenceAttribute- Parameter is file/folder path; optionalBasePathLinqTunnelAttribute- Pure LINQ method with postponed enumerationNoEnumerationAttribute- IEnumerable parameter not enumeratedRegexPatternAttribute- Parameter is regex patternNoReorder- Prevents member reorderingTerminatesProgramAttribute- Obsolete: Use[ContractAnnotation("=> halt")]instead
ASP.NET Web Forms Attributes
AspChildControlTypeAttribute-TagName,ControlTypepropertiesAspDataFieldAttribute,AspDataFieldsAttribute,AspMethodPropertyAttributeAspRequiredAttributeAttribute-AttributepropertyAspTypePropertyAttribute-CreateConstructorReferencesproperty
HTML Attributes
HtmlElementAttributesAttribute- OptionalNamepropertyHtmlAttributeValueAttribute-Nameproperty (required)
3. Invariants
- Settings.Singleton Pattern: The
Settings.Defaultproperty always returns a synchronized singleton instance; it is never null. - Settings.TilesLocation: Always returns a non-null string; default value is
"Assets\\Tiles\\". This is an application-scoped setting (read-only at runtime). - Annotations License: The
Annotations.csfile is MIT-licensed from JetBrains (2016). The license header must be preserved. - Annotations Design-Time Only: All attributes in
Annotations.cshave no runtime behavior; they are consumed by static analysis tools (ReSharper/Rider). - Settings Auto-Generated:
Settings.Designer.csis tool-generated; manual changes will be lost on regeneration.
4. Dependencies
This module depends on:
System.Reflection(AssemblyInfo.cs)System.Runtime.CompilerServices(AssemblyInfo.cs, Settings.Designer.cs, Annotations.cs)System.Runtime.InteropServices(AssemblyInfo.cs)System.Configuration.ApplicationSettingsBase(Settings.Designer.cs)System(Annotations.cs - forAttribute,Type,FlagsAttribute, etc.)
What depends on this module:
Cannot be determined from source alone. The DTS.Common.Annotations namespace attributes are intended to be used throughout the solution for static analysis hints. The TilesLocation setting suggests tile-based functionality elsewhere in the system.
5. Gotchas
-
Settings.Designer.cs is auto-generated: The file header explicitly warns that changes will be lost if the code is regenerated. Modify settings through the Visual Studio settings designer or the
.settingsfile, not directly. -
Annotations.cs is third-party code: This file is from JetBrains (copyright 2016). Updates to ReSharper/Rider may include newer versions of these annotations. Consider whether to update this file when upgrading IDE tooling.
-
TerminatesProgramAttribute is obsolete: The
TerminatesProgramAttributeclass is marked[Obsolete("Use [ContractAnnotation('=> halt')] instead")]. New code should useContractAnnotationAttributeinstead. -
Namespace mismatch: The assembly title is "Common" but the root namespace appears to be
DTS.Common(fromSettings.Designer.cs) andDTS.Common.Annotations(fromAnnotations.cs). The project folder isDTS.CommonCore. This inconsistency could cause confusion when locating types. -
TilesLocation path format: The default value uses Windows-style path separators (
\\). Cross-platform compatibility is unclear from source alone.