--- source_files: - DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Graph/Properties/AssemblyInfo.cs - DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.Graph/Properties/Annotations.cs generated_at: "2026-04-16T11:14:19.143964+00:00" model: "zai-org/GLM-5-FP8" schema_version: 1 sha256: "530eff79443974f8" --- # Documentation: DTS.Viewer.Graph Properties ## 1. Purpose The `DTS.Viewer.Graph` module defines a component within the larger "DTS Viewer" application, ostensibly responsible for graph-related functionality. The provided source files serve administrative and tooling roles: `AssemblyInfo.cs` establishes the assembly's identity, version, and metadata, while `Annotations.cs` provides a comprehensive set of code analysis attributes (sourced from JetBrains) to enhance static analysis, null-checking, and IDE support within the project. ## 2. Public Interface ### Assembly Metadata (`AssemblyInfo.cs`) This file configures the assembly-level attributes for `DTS.Viewer.Graph.dll`. * **`AssemblyTitle`**: Set to `"Graph"`. * **`AssemblyProduct`**: Set to `"Graph"`. * **`AssemblyCopyright`**: Set to `"Copyright © 2017"`. * **`ComVisible`**: Set to `false`, making types invisible to COM components. * **`Guid`**: `61261c58-c32e-4dea-a87a-d7f956f28b4d` (COM TypeLib ID). * **`AssemblyVersion`**: `"1.0.0.0"`. * **`AssemblyFileVersion`**: `"1.0.0.0"`. ### Code Annotations (`Annotations.cs`) This file defines the namespace `DTS.Viewer.Graph.Annotations`, containing numerous attributes and enums used for static code analysis. These types do not affect runtime behavior but instruct the IDE (ReSharper/Rider) on code contracts and usage. **Nullability and Contracts:** * `CanBeNullAttribute`: Indicates a value may be `null`. * `NotNullAttribute`: Indicates a value should never be `null`. * `ItemNotNullAttribute` / `ItemCanBeNullAttribute`: Applied to collections or `Task`/`Lazy` to indicate the nullability of contained items. * `ContractAnnotationAttribute`: Describes method input/output dependencies (e.g., `null => null`). * `PureAttribute`: Indicates a method has no side effects. * `MustUseReturnValueAttribute`: Indicates a method's return value must be utilized. **Code Usage and Reflection:** * `UsedImplicitlyAttribute`: Marks symbols used via reflection or external libraries to suppress "unused" warnings. * `MeansImplicitUseAttribute`: Applied to other attributes to indicate that targets should be considered "used". * `PublicAPIAttribute`: Marks API that should not be removed as it is public-facing. * `ImplicitUseKindFlags` (Enum): Flags defining how a symbol is used (`Access`, `Assign`, `InstantiatedWithFixedConstructorSignature`, etc.). * `ImplicitUseTargetFlags` (Enum): Flags defining target scope (`Itself`, `Members`, `WithMembers`). **String and Formatting:** * `StringFormatMethodAttribute`: Marks a method as a string format method (like `string.Format`). * `RegexPatternAttribute`: Indicates a parameter is a regex pattern. * `LocalizationRequiredAttribute`: Indicates if a string should be localized. **Assertion and Control Flow:** * `AssertionMethodAttribute`: Marks a method as an assertion (halts control flow on failure). * `AssertionConditionAttribute`: Marks a parameter as the condition for an assertion. * `AssertionConditionType` (Enum): Defines assertion types (`IS_TRUE`, `IS_FALSE`, `IS_NULL`, `IS_NOT_NULL`). * `TerminatesProgramAttribute`: **[Obsolete]** Use `ContractAnnotation("=> halt")` instead. **Collections and LINQ:** * `CollectionAccessAttribute`: Describes how a method affects a collection. * `CollectionAccessType` (Enum): Flags for `None`, `Read`, `ModifyExistingContent`, `UpdatedContent`. * `InstantHandleAttribute`: Indicates a delegate/enumerable parameter is handled during the method execution. * `LinqTunnelAttribute`: Marks a method as a pure LINQ method with postponed enumeration. * `NoEnumerationAttribute`: Indicates an `IEnumerable` parameter is not enumerated. **ASP.NET MVC and Razor Specifics:** * `AspMvcActionAttribute`, `AspMvcControllerAttribute`, `AspMvcAreaAttribute`, `AspMvcViewAttribute`: Hints for MVC parameters. * `AspMvc*LocationFormatAttribute`: Various attributes for specifying view location formats (e.g., `AspMvcAreaViewLocationFormatAttribute`). * `RazorSectionAttribute`, `RazorImportNamespaceAttribute`, `RazorDirectiveAttribute`: Hints for Razor syntax. **XAML Specifics:** * `XamlItemsControlAttribute`: Marks a type as an ItemsControl for XAML analysis. * `XamlItemBindingOfItemsControlAttribute`: Hints at DataContext binding types. **Miscellaneous:** * `NotifyPropertyChangedInvocatorAttribute`: Marks a method as a property change notifier. * `SourceTemplateAttribute`: Marks an extension method as a source template for code completion. * `MacroAttribute`: Defines macros for source templates. * `NoReorderAttribute`: Prevents member reordering in the IDE. ## 3. Invariants * **COM Visibility:** The assembly is configured with `ComVisible(false)`, guaranteeing that types are not exposed to COM by default. * **Versioning:** The assembly version is strictly defined as `1.0.0.0` in the source; automatic versioning (e.g., using wildcards) is commented out. * **Namespace Consistency:** All annotation attributes reside strictly within the `DTS.Viewer.Graph.Annotations` namespace. * **Attribute Usage:** The attributes in `Annotations.cs` are strictly for metadata; they contain no runtime logic (constructors only set properties). ## 4. Dependencies * **Internal Dependencies:** * `System`: Used by `Annotations.cs` for the base `Attribute` type and `Type`, `FlagsAttribute`, etc. * `System.Reflection`: Used by `AssemblyInfo.cs`. * `System.Runtime.CompilerServices`: Used by `AssemblyInfo.cs`. * `System.Runtime.InteropServices`: Used by `AssemblyInfo.cs` for `ComVisible` and `Guid`. * **External Consumers:** * The `DTS.Viewer.Graph` assembly is likely consumed by other modules in the "DTS Viewer" solution (inferred from the `Modules` directory structure). * The `Annotations.cs` types are consumed by the C# compiler and static analysis tools (IDEs like ReSharper or Rider). ## 5. Gotchas * **Third-Party Code Inclusion:** The `Annotations.cs` file is explicitly licensed under the MIT License and copyrighted by JetBrains (2016). It is a standard boilerplate file often included in projects for ReSharper compatibility. Developers should not modify the logic here, but may update the file if a newer version of the JetBrains annotations is required. * **Obsolete Attribute:** The `TerminatesProgramAttribute` is marked `[Obsolete]` in the source. New code should use `[ContractAnnotation("=> halt")]` instead. * **Empty Description:** The `AssemblyDescription` attribute in `AssemblyInfo.cs` is currently an empty string, which may result in sparse metadata for the compiled DLL. * **Static Analysis Dependency:** The attributes in `Annotations.cs` have no effect if the code is analyzed by tools that do not recognize them (e.g., standard Visual Studio without ReSharper). However, they do not cause runtime errors.