6.2 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||
|---|---|---|---|---|---|---|
|
2026-04-16T13:52:16.308869+00:00 | zai-org/GLM-5-FP8 | 1 | 530eff79443974f8 |
Module Documentation: DTS.Viewer.Graph Properties
1. Purpose
This module component provides assembly-level configuration and static analysis support for the DTS.Viewer.Graph assembly. AssemblyInfo.cs establishes the assembly's identity, version (1.0.0.0), and COM visibility settings. Annotations.cs defines a comprehensive suite of custom attributes (sourced from JetBrains) used to enhance code inspection, nullability analysis, and framework-specific validations (ASP.NET MVC, Razor, XAML) within the codebase, enabling deeper static analysis without requiring external dependencies.
2. Public Interface
Assembly Metadata (AssemblyInfo.cs)
These attributes configure the compiled assembly DTS.Viewer.Graph.dll.
AssemblyTitle: Set to"Graph".AssemblyProduct: Set to"Graph".AssemblyVersion: Set to"1.0.0.0".AssemblyFileVersion: Set to"1.0.0.0".Guid: Set to"61261c58-c32e-4dea-a87a-d7f956f28b4d".ComVisible: Set tofalse.
Code Annotations (Annotations.cs)
The following attributes are defined in the DTS.Viewer.Graph.Annotations namespace. They are intended for use by static analysis tools (e.g., ReSharper, Rider) and the compiler.
Nullability & Contracts:
CanBeNullAttribute: Indicates a value might benull.NotNullAttribute: Indicates a value should never benull.ItemNotNullAttribute: Indicates collection items orTask.Resultare notnull.ItemCanBeNullAttribute: Indicates collection items orTask.Resultmight benull.ContractAnnotationAttribute: Defines method input/output contracts (e.g.,null => halt).PureAttribute: Marks a method as having no observable side effects.
Usage & Visibility:
PublicAPIAttribute: Marks a type/member as part of the public API, preventing "unused" warnings.UsedImplicitlyAttribute: Indicates a symbol is used via reflection or external means.MeansImplicitUseAttribute: Applied to other attributes to indicate that targets should be considered "used".BaseTypeRequiredAttribute: Enforces that a type marked with a specific attribute must inherit from a specific base type.
Method Behavior:
StringFormatMethodAttribute: Marks a method parameter as a format string (e.g., forstring.Formatvalidation).NotifyPropertyChangedInvocatorAttribute: Marks a method as raising thePropertyChangedevent.InstantHandleAttribute: Indicates a delegate parameter is executed during the method call.MustUseReturnValueAttribute: Warns if the method's return value is ignored.CollectionAccessAttribute: Describes how a method modifies a collection (Read, Modify, Update).AssertionMethodAttribute/AssertionConditionAttribute: Marks methods that halt execution based on conditions (e.g., assertion methods).
Framework Specific (ASP.NET, Razor, XAML):
AspMvcActionAttribute,AspMvcControllerAttribute,AspMvcViewAttribute: Assist in resolving MVC references.RazorSectionAttribute,RazorImportNamespaceAttribute: Assist in Razor view analysis.XamlItemsControlAttribute,XamlItemBindingOfItemsControlAttribute: Assist in XAMLDataContextresolution.
Miscellaneous:
SourceTemplateAttribute: Marks an extension method as a source template for code completion.MacroAttribute: Defines macros for source template parameters.NoReorderAttribute: Prevents code cleanup tools from reordering members.
3. Invariants
- COM Visibility: The assembly is explicitly configured with
ComVisible(false), ensuring types are not exposed to COM by default. - Version Consistency: The
AssemblyVersionandAssemblyFileVersionare both strictly defined as1.0.0.0. - Attribute Usage: All annotation attributes are strictly constrained by
AttributeUsageattributes. For example,PureAttributecan only targetMethods, whileCanBeNullAttributecan target methods, parameters, properties, delegates, fields, events, classes, interfaces, and generic parameters. - Licensing: The
Annotations.csfile is explicitly licensed under the MIT License (Copyright 2016 JetBrains), requiring the license notice to be preserved in copies.
4. Dependencies
- System Dependencies:
System.ReflectionSystem.Runtime.CompilerServicesSystem.Runtime.InteropServicesSystem
- Tooling Dependencies: The annotations in
Annotations.csare designed to be consumed by JetBrains static analysis tools (ReSharper, Rider). They have no runtime impact on the application logic itself. - Consumers: This module is a foundational block for the
DTS.Viewer.Graphproject. Other projects referencingDTS.Viewer.Graphmay utilize these annotations if exposed publicly, though they are primarily for internal analysis.
5. Gotchas
- Obsolete Assertion Attribute: The
TerminatesProgramAttributeis marked[Obsolete("Use [ContractAnnotation('=> halt')] instead")]. Developers should avoid using this attribute in new code and preferContractAnnotationAttribute. - Hardcoded Version: The version
1.0.0.0is hardcoded inAssemblyInfo.cs. If this project uses CI/CD pipelines that typically auto-increment versions or use MSBuild properties (e.g.,1.0.*), this file overrides that behavior, potentially requiring manual updates for new releases. - Duplicate Annotations: The
Annotations.csfile is a standard "copy-paste" of JetBrains annotations. If other modules in the solution (e.g.,DTS.Viewer.Core) also include this file, there may be duplicate attribute definitions if namespaces are not carefully managed or if theglobalnamespace is used, though here they are safely scoped toDTS.Viewer.Graph.Annotations. - Empty Description: The
AssemblyDescriptionattribute is an empty string, offering no metadata regarding the specific functionality of the Graph module.