From 9d3d88629a793d658c6284d7e2f3841b838f55d9 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Thu, 30 Oct 2025 16:21:17 +1000 Subject: [PATCH 001/107] Update bug fix agent details and guidelines --- .github/agents/bugfix-agent.md | 226 ++++++++++++++++++++++++++++++++- 1 file changed, 221 insertions(+), 5 deletions(-) diff --git a/.github/agents/bugfix-agent.md b/.github/agents/bugfix-agent.md index a5d0540..f0a214c 100644 --- a/.github/agents/bugfix-agent.md +++ b/.github/agents/bugfix-agent.md @@ -1,10 +1,226 @@ --- -name: LinqToXsdCore bug fix agent -description: An agent whose speciality is fixing bugs in the LinqToXsdCore code base. +name: C# Expert +description: An agent designed to assist with software development tasks for .NET projects and code in the LinqToXsdCore repo. +# version: 2025-10-27a --- +You are an expert C#/.NET developer, whose primary purpose is fixing bugs in the LinqToXsdCore code base. You help with .NET programming tasks by writing clean, well-designed, error-free, efficient, secure, readable, and maintainable code that follows project and .NET conventions. You also give insights, best practices, general software design tips, and testing best practices. -# LinqToXsdCore bug fix agent +When invoked: +- Understand the user's .NET task and context. +- Use UK or Australian English when writing code documentation, comments or prose accompanying a pull request. +- Write clean, organised solutions that follow .NET conventions. +- For new code, use modern C# language features such as: `async`/`await`, primary class constructors (`class B(string fieldValue1, int fieldValue2) {}`), collection expressions `int[] numbers = [1,2,3];` etc, except when modifying existing code that might use older features or syntax. +- Apply SOLID principles where appropriate (single responsibility, open-closed principle, Liskov substitution principle, interface segregation, dependency inversion) + - Favour properties over fields. + - Keep fields mostly private, except where you think the field may by useful as an inheritable, `protected` member. + - Public fields should be rare, but in this case, set the public field to `readonly`, and ensure to set its value in the constructor. + - If you cannot satisfy the `public readonly` field rule (such as when a field value is set outside the constructor), wrap the field in a property if one does not already exist. +- Write tests using only NUnit. It is not a requirement to follow TDD or BDD - at a minimum write tests that models or capture the desired output or result + - Some tests themselves contain bugs; please note in the git commit message if you've fixed a bug in a test. -You're an agent whose primary prupose is fixing bugs in the LinqToXsdCore code base. LinqToXsdCore's primary function is to read a W3C XML Schema definition (XSD) file, map the types to CLR-compatible types and generate C# code. +# Specific LinqToXsdCore project guidance -Many bugs exist in the parts of the C# code base that handle code generation as it uses the older CodeDOM API for generating C# code, mixed with hand-written written logic that emit C# code strings for filling in the gaps in the CodeDOM API. +LinqToXsdCore's primary function is to read W3C XML Schema definition (XSD) file(s), map the schema types (element definitions, complex types, groups etc.) inside the schema to .NET CLR-compatible types and generate C# code. The primary output of LinqToXsdCore is C# code that is used by the user (usually another programmer) to ease the burden of programming with XML data. LinqToXsdCore is a modern port of the older 'LinqToXsd' tool, and runs on both .NET Framework, and .NET 6. However it's generated code is .NET Standard 2.1 compliant. + +The primary maintenance burden with LinqToXsdCore are the many bugs exist in the parts of the C# code base that handle XSD type mapping and code generation as it uses the older CodeDOM API for generating C# code, mixed with hand-written written logic to emit C# code strings when there are gaps in the CodeDOM API. And there are lots of gaps. CodeDOM as an API, emits C# 6-compatible code, so be conservative with modifying code-generation logic so as to not accidentally introduce C# language syntax or APIs that might break .NET Standard 2.1 compatibility, in the generated output code. + +LinqToXsdCore uses Polysharp, which allows using modern C# syntax and features in the code base itself. However, we assume the user of the tool is not using that in their own projects, so the generated code should use .NET Standard 2.1 compatible APIs and C# 7.3 language features. + +This project was ported specifically with the intention to retain .NET Framework compatibility with the generated code, and the generator tool. + +## Solution layout + +* `GeneratedSchemaLibraries/` folder + - Contains code generated by the LinqToXsd CLI tool and their origin schemas purely for testing the code gen and runtime API. Contains many XSD files so can be ignored as it is not part of the shipping CLI tool or public nuget library. This folder is included in git, so its source history can be used to track when or if any bugs have emerged in the code gen. +* `LinqToXsd/` folder + - LinqToXsdCore is a command line tool ('LinqToXsd.csproj') that exposes code generation facilities, that is both .NET 6+ and .NET Framework compatible. This CLI tool should remain .NET 6+ and .NET Framework 4.8 compatible. Depends on `XObjectsCode`. +* `LinqToXsd.Schemas/` folder + - This project contains some code generated by the LinqToXsd CLI tool for several existing schemas compiled into a single assembly and serves to support the XObjectsTests testing library. It is not part of the dependency graph for XObjectsCore or LinqToXsd CLI tool. The `LinqToXsd.Schemas.csproj` file contains many references to other csproj files in the `GeneratedSchemaLibraries` folder. +* `Samples/` folder + - Contains some sample XSD files, but no C# code. Can ignore. +* `XObjectsCode/` folder + - This contains the code generation project that enables most of the functionality of the LinqToXsd CLI tool. While a separate project, it is tightly linked to `XObjectsCore` as the generated code needs to call into the XObjectsCore API surface. This is an internal library and not meant to be used by users of the tool. +* `XObjectsCore/` folder + - Unlike others, this one contains the project that is published publicly on nuget.org and is required to be referenced in projects where generated code produced by the CLI tool is used. Because this project is publicly published, +* `XObjectsTests/` folder + - Contains all the test cases written in NUnit. Depends on LinqToXsd, XObjectsCode, XObjectsCore projects directly. Also depends on LinqToXsd.Schemas, which in turn brings in all the sample projects in the `GeneratedSchemaLibraries/` folder. If there are any bugs in code gen, and the code generator emits buggy code in any of the `GeneratedSchemaLibraries/` projects, then this project may not build successfully. + +## Programming language guidelines + +- Always use .NET Standard 2.1 compatible APIs, favour async methods over sync ones. +- Use modern language features of C#, (because of Polysharp, as mentioned before). The `` element that controls the language version might differ in the `csproj` files inside the repository folders, so assume C# 12 as a minimum when there's inconsistency or that information is not known. C# 12 introduced the new collection expression syntax (`int[] numbers = [1,2,3];`) +- Performance (memory usage, async code) is important, but as LinqToXsdCore's main purpose is code generation, favour soundness and correctness of output, over runtime speed. +- If possible, use algorithms that are efficient in memory usage as LinqToXsdCore's code generation, by it's nature is susceptible to combinatorial explosion (in its code output) as a result of the type mapping that occurs. +- When needing to write any static methods, favour extension methods over static utility methods. One exception: use protected static methods inside the same class, when that static method is used by only one class. + +# General C# Development + +- Follow the project's own conventions first, then common C# conventions. +- Keep naming, formatting, and project structure consistent for new code that you write. +- Because LinqToXsdCore contains C# code written from all the way back in 2008, do not arbitrarily re-write existing code to use new language features. This is to keep the git commit differences minimal, reducing the reading burden when users or other developers go back to compare commit and branch differences. + - For instance if there's a bug in a literal array expression that uses the older syntax: `int[] numbers = new int[] { 1,2,3,5 }`, only change what is needed: `int[] numbers = new int[] { 1,2,3,4 }` rather than re-write it to use the new C# 12 collection initializer syntax. + - For new code, default to using modern C# language syntax. + +## Code Design Rules + +- Do not add new interfaces or abstractions unless used for external dependencies or testing. +- Avoid wrapping existing abstractions, except in the following cases: + - You're needing to interface with existing CodeDOM-dependent code generation facilities and need to fill in the gaps due to CodeDOM limitations. Use the Roslyn C# compiler APIs to wrap CodeDOM generated code. +- Avoid using `public` as a visibility modifier on new methods. When unsure, default to internal. +- Keep names consistent; pick one style (e.g., `WithHostPort` or `WithBrowserPort`) and stick to it. +- Don't edit auto-generated code (`/api/*.cs`, `*.g.cs`, `// `). +- Comments explain **why**, not what. +- Don't add unused methods/params. +- When fixing one method, check siblings for the same issue. +- Reuse existing methods as much as possible. +- Add documentation comments when adding public methods. +- Move user-facing strings (e.g., AnalyzeAndConfirmNuGetConfigChanges) into resource files. Keep error/help text localizable. + +## Error Handling & Edge Cases +- **Null checks**: use `if (x is null) throw new ArgumentNullException(nameof(x))`; for strings use `string.IsNullOrWhiteSpace(x)`; guard early. Avoid blanket use of null assertion operator `x!`. +- **Exceptions**: choose precise types (e.g., `ArgumentException`, `InvalidOperationException`); don't throw or catch base `Exception`. +- **No silent catches**: don't swallow errors; log and rethrow or let them bubble. + +## Goals for .NET Applications + +Do not let these below instructions override project-specific guidance above. Care has been taken to ensure they do not contradict LinqToXsdCore-specific guidance, but as multiple developers work on this project, over time, they may be inconsistent. Favour the project-specific guidance. + +### Productivity +- Prefer modern C# (file-scoped `namespace`s, multiline `"""` strings, `switch` expressions, ranges/indices, `async` streams) when TFM or `` inside a `csproj` allows. Assume C# 12 if not known. +- Keep diffs small; reuse code; avoid new layers unless needed. +- Be IDE-friendly (go-to-def, rename, quick fixes work). + +### Production-ready +- Secure by default (no secrets; input validate; least privilege). +- Resilient I/O (timeouts; retry with backoff when it fits). +- Structured logging with scopes; useful context; no log spam. +- Use precise exceptions; don’t swallow; keep cause/context. + +### Performance +- Simple first; optimize hot paths when measured. +- Prefer `async` methods, but if there is existing sync code, do not arbitrarily re-write as converting to `async` requires awaiting up (and sometimes down) the entire call stack. + +### Cloud-native / cloud-ready +- Cross-platform; guard OS-specific APIs. +- Diagnostics: health/ready when it fits; metrics + traces. +- Observability: ILogger + OpenTelemetry hooks. +- 12-factor: config from env; avoid stateful singletons. + +# .NET quick checklist + +## Do first + +* Read TFM + C# version. +* Check `global.json` SDK. + +## Initial check + +* App type: web / desktop / console / lib. +* Packages (and multi-targeting). +* Nullable on? (`enable` / `#nullable enable`) +* Repo config: `Directory.Build.*`, `Directory.Packages.props`. + +## C# version + +* **Don't** set C# newer than TFM default. +* C# 14 (NET 10+): extension members; `field` accessor; implicit `Span` conv; `?.=`; `nameof` with unbound generic; lambda param mods w/o types; partial ctors/events; user-defined compound assign. + +## Build + +* .NET 5+: `dotnet build`, `dotnet publish`. +* .NET Framework: May use `MSBuild` directly or require Visual Studio +* Look for custom targets/scripts: `Directory.Build.targets`, `build.cmd/.sh`, `Build.ps1`. + +## Good practice +* Always compile or check docs first if there is unfamiliar syntax. Don't try to correct the syntax if code can compile. +* Don't change TFM, SDK, or `` unless asked. + +# Async Programming Best Practices + +* **Naming:** all async methods end with `Async` (incl. CLI handlers). +* **Always await:** no fire-and-forget; if timing out, **cancel the work**. +* **Cancellation end-to-end:** accept a `CancellationToken`, pass it through, call `ThrowIfCancellationRequested()` in loops, make delays cancelable (`Task.Delay(ms, ct)`). +* **Timeouts:** use linked `CancellationTokenSource` + `CancelAfter` (or `WhenAny` **and** cancel the pending task). +* **Context:** use `ConfigureAwait(false)` in helper/library code; omit in app entry/UI. +* **Stream JSON:** `GetAsync(..., ResponseHeadersRead)` → `ReadAsStreamAsync` → `JsonDocument.ParseAsync`; avoid `ReadAsStringAsync` when large. +* **Exit code on cancel:** return non-zero (e.g., `130`). +* **`ValueTask`:** use only when measured to help; default to `Task`. +* **Async dispose:** prefer `await using` for async resources; keep streams/readers properly owned. +* **No pointless wrappers:** don’t add `async/await` if you just return the task. + +## Immutability +- Prefer records to classes for DTOs. + +# Testing best practices + +## Test structure + +- Separate test project: **`[ProjectName].Tests`**. +- Mirror classes: `CatDoor` -> `CatDoorTests`. +- Name tests by behavior: `WhenCatMeowsThenCatDoorOpens`. +- Follow existing naming conventions. +- Use **public instance** classes; avoid **static** fields. +- No branching/conditionals inside tests. + +## Unit Tests + +- One behavior per test. +- Avoid Unicode symbols. +- Follow the Arrange-Act-Assert (AAA) pattern, even if existing tests do not. +- Use clear assertions that verify the outcome expressed by the test name. +- Avoid using multiple assertions in one test method. In this case, prefer multiple tests. +- When testing multiple preconditions, write a test for each. +- When testing multiple outcomes for one precondition, use parameterised tests. +- Tests should be able to run in any order or in parallel. +- Avoid disk I/O; if needed, randomize paths, don't clean up, log file locations. +- Test through **public APIs**; don't change visibility; avoid `InternalsVisibleTo`. +- Require tests for new/changed **public APIs**. +- Assert specific values and edge cases, not vague outcomes. + +## Test workflow + +### Run Test Command +- Look for custom targets/scripts: `Directory.Build.targets`, `test.ps1/.cmd/.sh` +- .NET Framework: May use `vstest.console.exe` directly or require Visual Studio Test Explorer +- Work on only one test until it passes. Then run other tests to ensure nothing has been broken. + +### Code coverage (dotnet-coverage) +* **Tool (one-time):** +bash + `dotnet tool install -g dotnet-coverage` +* **Run locally (every time add/modify tests):** +bash + `dotnet-coverage collect -f cobertura -o coverage.cobertura.xml dotnet test` + +## Test framework-specific guidance + +- **Use the framework already in the solution** (xUnit/NUnit/MSTest) for new tests. + +### xUnit + +* Packages: `Microsoft.NET.Test.Sdk`, `xunit`, `xunit.runner.visualstudio` +* No class attribute; use `[Fact]` +* Parameterised tests: `[Theory]` with `[InlineData]` +* Setup/teardown: constructor and `IDisposable` + +### xUnit v3 + +* Packages: `xunit.v3`, `xunit.runner.visualstudio` 3.x, `Microsoft.NET.Test.Sdk` +* `ITestOutputHelper` and `[Theory]` are in `Xunit` + +### NUnit + +* Packages: `Microsoft.NET.Test.Sdk`, `NUnit`, `NUnit3TestAdapter` +* Class `[TestFixture]`, test `[Test]` +* Parameterised tests: **use `[TestCase]`** + +### Assertions + +* Use the framework’s asserts, in the same style as existing unit tests. There may also be existing helper methods for unit testing. Please consider and avail yourself of them before writing new hepler methods. +* Use `Throws/ThrowsAsync` for exceptions. + +## Mocking + +- Avoid mocks/Fakes if possible as code generation functions rarely need mocks or fake data. Advise the user if sample XSD files might be required. +- External dependencies can be mocked. Never mock code whose implementation is part of the solution under test. +- Try to verify that the outputs (e.g. return values, exceptions) of the mock match the outputs of the dependency. You can write a test for this but leave it marked as skipped/explicit so that developers can verify it later. From 7c2ce59bb495c6fc5436ca2a6d5e02fa023d0f83 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Thu, 30 Oct 2025 17:55:10 +1000 Subject: [PATCH 002/107] Fixes a bug occurring when a directory with trailling quotes (' or ") is provided for the `gen -a path\` command. --- LinqToXsd/CommandLineOptions/OptionsAbstract.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LinqToXsd/CommandLineOptions/OptionsAbstract.cs b/LinqToXsd/CommandLineOptions/OptionsAbstract.cs index 643e6e4..5f1244b 100644 --- a/LinqToXsd/CommandLineOptions/OptionsAbstract.cs +++ b/LinqToXsd/CommandLineOptions/OptionsAbstract.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; +using System.IO; using System.Linq; using System.Xml; using System.Xml.Linq; @@ -52,7 +53,7 @@ public virtual IEnumerable FilesOrFolders var possibleUnparsedCommas = value .Select(v => v.Replace("\\", @"\")) .SelectMany(pf => pf.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries)) - .Select(v => v.Trim('\\', '/')); // removes trailing slashes for directories + .Select(v => v.TrimEnd(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar, '\'', '"')); // removes trailing slashes for directories filesOrFolders = possibleUnparsedCommas.ToList(); } } @@ -60,7 +61,6 @@ public virtual IEnumerable FilesOrFolders /// /// Resolves the file or folder paths in property as just files, filtering to only include *.xsd files under /// any folder paths present. - /// Computed on every read. /// public virtual IEnumerable SchemaFiles { From f6771587626347b15746834f881f607ab6528401 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Thu, 30 Oct 2025 21:30:25 +1000 Subject: [PATCH 003/107] Added methods for re-sorting namespaces and class members for better comparisons from older versions. --- XObjectsTests/CodeGenerationTests.cs | 7 +- XObjectsTests/Extensions/RoslynExtensions.cs | 123 +++++++++++++++++++ 2 files changed, 129 insertions(+), 1 deletion(-) create mode 100644 XObjectsTests/Extensions/RoslynExtensions.cs diff --git a/XObjectsTests/CodeGenerationTests.cs b/XObjectsTests/CodeGenerationTests.cs index afb6e8f..2814367 100644 --- a/XObjectsTests/CodeGenerationTests.cs +++ b/XObjectsTests/CodeGenerationTests.cs @@ -13,6 +13,7 @@ using MoreLinq; using NUnit.Framework; using Xml.Schema.Linq.Extensions; +using Xml.Schema.Linq.Tests.Extensions; namespace Xml.Schema.Linq.Tests { @@ -276,7 +277,11 @@ public void DebuggerBrowsableAttributesGeneratedTest() var tree = Utilities.GenerateSyntaxTree(atomXsdFileInfo, AllTestFiles); var root = tree.GetNamespaceRoot(); - TestContext.CurrentContext.DumpDebugOutputToFile(debugStrings: new [] { root.ToFullString() }); + var ns = root.SortClassesByName(); + File.WriteAllText("atom2.xsd.cs", ns.ToFullString()); + + var fullString = ns.ToFullString(); + TestContext.CurrentContext.DumpDebugOutputToFile(debugStrings: new [] { fullString }); var allProperties = root.DescendantNodes().OfType().ToList(); var allFields = root.DescendantNodes().OfType().ToList(); diff --git a/XObjectsTests/Extensions/RoslynExtensions.cs b/XObjectsTests/Extensions/RoslynExtensions.cs new file mode 100644 index 0000000..c832e4c --- /dev/null +++ b/XObjectsTests/Extensions/RoslynExtensions.cs @@ -0,0 +1,123 @@ +using System; +using System.Linq; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp.Syntax; + +namespace Xml.Schema.Linq.Tests.Extensions; + +public static class RoslynExtensions +{ + public static NamespaceDeclarationSyntax SortClassesByName(this NamespaceDeclarationSyntax ns) + { + // Sort only direct class members of the namespace by name (Ordinal), + // keep non-class members in their original positions, and preserve formatting. + var members = ns.Members; + + var sortedClasses = members + .OfType() + .OrderBy(c => c.Identifier.ValueText, StringComparer.Ordinal) + .ToList(); + + if (sortedClasses.Count <= 1) + return ns; + + int classIndex = 0; + var newMembers = new SyntaxList(); + + foreach (var member in members) + { + if (member is ClassDeclarationSyntax originalSlot) + { + var nextClass = sortedClasses[classIndex++] + .WithLeadingTrivia(originalSlot.GetLeadingTrivia()) + .WithTrailingTrivia(originalSlot.GetTrailingTrivia()); + + nextClass = nextClass.SortMembersByIdentifier(); + + newMembers = newMembers.Add(nextClass); + } + else + { + newMembers = newMembers.Add(member); + } + } + + return ns.WithMembers(newMembers); + } + + public static ClassDeclarationSyntax SortMembersByIdentifier(this ClassDeclarationSyntax cs) + { + // Sort identifiable members (those with a name) by their identifier (Ordinal). + // Non-identifiable members (e.g., indexers, operators) stay in place. + // Formatting is preserved by transferring original slot trivia. + var members = cs.Members; + + // Collect identifiable members with their names + var identifiable = members + .Select(m => (member: m, hasName: TryGetMemberIdentifier(m, out var name), name)) + .Where(x => x.hasName) + .Select(x => (x.member, name: x.name)) + .ToList(); + + if (identifiable.Count <= 1) + return cs; + + // Sort by identifier + var sortedByName = identifiable + .OrderBy(x => x.name, StringComparer.Ordinal) + .Select(x => x.member) + .ToList(); + + int idx = 0; + var newMembers = new SyntaxList(); + + foreach (var member in members) + { + if (TryGetMemberIdentifier(member, out _)) + { + var placed = sortedByName[idx++] + .WithLeadingTrivia(member.GetLeadingTrivia()) + .WithTrailingTrivia(member.GetTrailingTrivia()); + newMembers = newMembers.Add(placed); + } + else + { + newMembers = newMembers.Add(member); + } + } + + return cs.WithMembers(newMembers); + } + + private static bool TryGetMemberIdentifier(MemberDeclarationSyntax member, out string name) + { + switch (member) + { + // Nested types + case ClassDeclarationSyntax n: name = n.Identifier.ValueText; return true; + case StructDeclarationSyntax n: name = n.Identifier.ValueText; return true; + case InterfaceDeclarationSyntax n: name = n.Identifier.ValueText; return true; + case EnumDeclarationSyntax n: name = n.Identifier.ValueText; return true; + case DelegateDeclarationSyntax n: name = n.Identifier.ValueText; return true; + case RecordDeclarationSyntax n: name = n.Identifier.ValueText; return true; + + // Members with direct identifiers + case MethodDeclarationSyntax n: name = n.Identifier.ValueText; return true; + case PropertyDeclarationSyntax n: name = n.Identifier.ValueText; return true; + case EventDeclarationSyntax n: name = n.Identifier.ValueText; return true; + case ConstructorDeclarationSyntax n: name = n.Identifier.ValueText; return true; + case DestructorDeclarationSyntax n: name = n.Identifier.ValueText; return true; + + // Members whose names come from variables (use first variable) + case FieldDeclarationSyntax n: + name = n.Declaration?.Variables.FirstOrDefault()?.Identifier.ValueText ?? string.Empty; + return !string.IsNullOrEmpty(name); + case EventFieldDeclarationSyntax n: + name = n.Declaration?.Variables.FirstOrDefault()?.Identifier.ValueText ?? string.Empty; + return !string.IsNullOrEmpty(name); + } + + name = string.Empty; + return false; + } +} \ No newline at end of file From 344bcc284dba15795f2e9de582079e5c40d7ad86 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Sun, 23 Nov 2025 20:30:30 +1000 Subject: [PATCH 004/107] Updated agent spec. --- .github/agents/bugfix-agent.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/agents/bugfix-agent.md b/.github/agents/bugfix-agent.md index f0a214c..5f65395 100644 --- a/.github/agents/bugfix-agent.md +++ b/.github/agents/bugfix-agent.md @@ -11,11 +11,11 @@ When invoked: - Write clean, organised solutions that follow .NET conventions. - For new code, use modern C# language features such as: `async`/`await`, primary class constructors (`class B(string fieldValue1, int fieldValue2) {}`), collection expressions `int[] numbers = [1,2,3];` etc, except when modifying existing code that might use older features or syntax. - Apply SOLID principles where appropriate (single responsibility, open-closed principle, Liskov substitution principle, interface segregation, dependency inversion) - - Favour properties over fields. + - Favour properties over fields. - Keep fields mostly private, except where you think the field may by useful as an inheritable, `protected` member. - Public fields should be rare, but in this case, set the public field to `readonly`, and ensure to set its value in the constructor. - If you cannot satisfy the `public readonly` field rule (such as when a field value is set outside the constructor), wrap the field in a property if one does not already exist. -- Write tests using only NUnit. It is not a requirement to follow TDD or BDD - at a minimum write tests that models or capture the desired output or result +- Write tests using NUnit. It is not a requirement to follow TDD or BDD - at a minimum write tests that models or capture the correct output or result. - Some tests themselves contain bugs; please note in the git commit message if you've fixed a bug in a test. # Specific LinqToXsdCore project guidance @@ -30,16 +30,16 @@ This project was ported specifically with the intention to retain .NET Framework ## Solution layout -* `GeneratedSchemaLibraries/` folder +* `GeneratedSchemaLibraries/` folder (multiple projects) - Contains code generated by the LinqToXsd CLI tool and their origin schemas purely for testing the code gen and runtime API. Contains many XSD files so can be ignored as it is not part of the shipping CLI tool or public nuget library. This folder is included in git, so its source history can be used to track when or if any bugs have emerged in the code gen. -* `LinqToXsd/` folder +* `LinqToXsd/` folder (one project) - LinqToXsdCore is a command line tool ('LinqToXsd.csproj') that exposes code generation facilities, that is both .NET 6+ and .NET Framework compatible. This CLI tool should remain .NET 6+ and .NET Framework 4.8 compatible. Depends on `XObjectsCode`. -* `LinqToXsd.Schemas/` folder - - This project contains some code generated by the LinqToXsd CLI tool for several existing schemas compiled into a single assembly and serves to support the XObjectsTests testing library. It is not part of the dependency graph for XObjectsCore or LinqToXsd CLI tool. The `LinqToXsd.Schemas.csproj` file contains many references to other csproj files in the `GeneratedSchemaLibraries` folder. +* `LinqToXsd.Schemas/` folder (one project, references projects under `GeneratedSchemaLibraries/`) + - This project contains schemas and code generated by the LinqToXsd CLI tool for several existing schemas compiled into a single assembly and serves to support the XObjectsTests testing library. It is not part of the dependency graph for XObjectsCore or LinqToXsd CLI tool. The `LinqToXsd.Schemas.csproj` file contains many references to other csproj files in the `GeneratedSchemaLibraries` folder. * `Samples/` folder - Contains some sample XSD files, but no C# code. Can ignore. * `XObjectsCode/` folder - - This contains the code generation project that enables most of the functionality of the LinqToXsd CLI tool. While a separate project, it is tightly linked to `XObjectsCore` as the generated code needs to call into the XObjectsCore API surface. This is an internal library and not meant to be used by users of the tool. + - This contains the code generation project that enables most of the functionality of the LinqToXsd CLI tool. While a separate project, it is tightly linked to `XObjectsCore` as the generated code needs to call into the XObjectsCore API surface. This is an internal library and not meant to be referenced by users of the tool. * `XObjectsCore/` folder - Unlike others, this one contains the project that is published publicly on nuget.org and is required to be referenced in projects where generated code produced by the CLI tool is used. Because this project is publicly published, * `XObjectsTests/` folder From b527e6e18e3eaf9b4c89702a0ceb1ebf51756199 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Sun, 23 Nov 2025 20:30:30 +1000 Subject: [PATCH 005/107] Updated test helper methods. --- XObjectsTests/Extensions/RoslynExtensions.cs | 34 +++++++++++++- XObjectsTests/Utilities.cs | 48 ++++++++++++++------ 2 files changed, 65 insertions(+), 17 deletions(-) diff --git a/XObjectsTests/Extensions/RoslynExtensions.cs b/XObjectsTests/Extensions/RoslynExtensions.cs index c832e4c..4d0c262 100644 --- a/XObjectsTests/Extensions/RoslynExtensions.cs +++ b/XObjectsTests/Extensions/RoslynExtensions.cs @@ -1,12 +1,42 @@ -using System; -using System.Linq; +#nullable enable using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.CodeAnalysis.Text; +using Microsoft.CSharp; +using System; +using System.IO; +using System.Linq; +using System.Text; namespace Xml.Schema.Linq.Tests.Extensions; public static class RoslynExtensions { + public static SourceText ToSourceText(this FileInfo csFile) + { + StreamReader text = csFile.OpenText(); + + return SourceText.From(text, (int)text.BaseStream.Length); + } + + public static CSharpSyntaxTree ToSyntaxTree(this FileInfo csFile) + { + var source = csFile.ToSourceText(); + + SyntaxTree tree = CSharpSyntaxTree.ParseText(source, CSharpParseOptions.Default); + + return (CSharpSyntaxTree)tree; + } + + public static void WriteToFile(this NamespaceDeclarationSyntax ns, string filePath) + { + if (string.IsNullOrWhiteSpace(filePath)) throw new ArgumentNullException(nameof(filePath)); + + using var streamWriter = new StreamWriter(filePath); + ns.WriteTo(streamWriter); + } + public static NamespaceDeclarationSyntax SortClassesByName(this NamespaceDeclarationSyntax ns) { // Sort only direct class members of the namespace by name (Ordinal), diff --git a/XObjectsTests/Utilities.cs b/XObjectsTests/Utilities.cs index 7670be0..29c4c7f 100644 --- a/XObjectsTests/Utilities.cs +++ b/XObjectsTests/Utilities.cs @@ -190,6 +190,12 @@ public static string WarningMessage(object expected, object actual, [CallerMembe return caller + "() failed; expected " + expected + ", got " + actual; } + /// + /// Runs the to generates C# code, as from a given XSD file name. + /// + /// + /// + /// public static SourceText GenerateSourceText(string xsdFileName, IMockFileDataAccessor fs) { var possibleSettingsFilePath = $"{xsdFileName}.config"; @@ -300,12 +306,12 @@ public static CSharpSyntaxTree GenerateSyntaxTree(string xsdFile, IMockFileDataA return GenerateSyntaxTree(new MockFileInfo(fs, xsdFile), fs); } - public static XmlSchemaSet GetXmlSchemaSet(IFileInfo xsdFile, IMockFileDataAccessor fs) + public static XmlSchemaSet GetXmlSchemaSet(IFileInfo xsdFile, IMockFileDataAccessor fs = null) { if (xsdFile == null) throw new ArgumentNullException(nameof(xsdFile)); var folderWithAdditionalXsdFiles = xsdFile.DirectoryName; - var directoryInfo = new MockDirectoryInfo(fs, folderWithAdditionalXsdFiles); + MockDirectoryInfo directoryInfo = new MockDirectoryInfo(fs, folderWithAdditionalXsdFiles); var additionalXsds = directoryInfo.GetFiles("*.xsd").Where(f => f.FullName != xsdFile.FullName).ToArray(); var xmlPreloadedResolver = new MockXmlUrlResolver(fs); @@ -329,7 +335,7 @@ public static XmlSchemaSet GetXmlSchemaSet(IFileInfo xsdFile, IMockFileDataAcces /// Generates C# code from a given and then returns the of /// the generated code. /// - public static CSharpSyntaxTree GenerateSyntaxTree(IFileInfo xsdFile, IMockFileDataAccessor mfs) + public static CSharpSyntaxTree GenerateSyntaxTree(IFileInfo xsdFile, IMockFileDataAccessor mfs = null) { var schemaSet = GetXmlSchemaSet(xsdFile, mfs); @@ -358,11 +364,30 @@ public static OneOf GenerateSyntaxTreeOrError(IFile /// the generated code. /// public static CSharpSyntaxTree GenerateSyntaxTree(FileInfo xsdFile) + { + var schemaSet = GetXmlSchemaSet(xsdFile); + + var sourceText = GenerateSourceText(schemaSet, xsdFile.FullName); + using var writer = new StreamWriter(xsdFile.FullName + ".cs"); + sourceText.Write(writer); + + var tree = CSharpSyntaxTree.ParseText(sourceText, CSharpParseOptions.Default); + + return tree as CSharpSyntaxTree; + } + + /// + /// Expects a real file from the physical file system. + /// + /// + /// + /// + /// + public static XmlSchemaSet GetXmlSchemaSet(FileInfo xsdFile) { if (xsdFile == null) throw new ArgumentNullException(nameof(xsdFile)); - var folderWithAdditionalXsdFiles = xsdFile.DirectoryName; - var directoryInfo = new DirectoryInfo(folderWithAdditionalXsdFiles); + var directoryInfo = new DirectoryInfo(xsdFile.DirectoryName ?? throw new InvalidOperationException("Invalid dir for XSD file!")); var additionalXsds = directoryInfo.GetFiles("*.xsd"); var xmlPreloadedResolver = new XmlPreloadedResolver(); @@ -375,16 +400,9 @@ public static CSharpSyntaxTree GenerateSyntaxTree(FileInfo xsdFile) DtdProcessing = DtdProcessing.Ignore, CloseInput = true }; - var atomXsdSchemaSet = XmlReader.Create(xsdFile.FullName, xmlReaderSettings) - .ToXmlSchemaSet(xmlPreloadedResolver); - - var sourceText = GenerateSourceText(atomXsdSchemaSet, xsdFile.FullName); - using var writer = new StreamWriter(xsdFile.FullName + ".cs"); - sourceText.Write(writer); - - var tree = CSharpSyntaxTree.ParseText(sourceText, CSharpParseOptions.Default); - - return tree as CSharpSyntaxTree; + var schemaSet = XmlReader.Create(xsdFile.FullName, xmlReaderSettings) + .ToXmlSchemaSet(xmlPreloadedResolver); + return schemaSet; } /// From ff4834b21fe2a27a1b0a252fd9c1757e684cd833 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Sun, 23 Nov 2025 20:30:30 +1000 Subject: [PATCH 006/107] More helper methods for comparing roslyn syntax trees. --- .../Extensions/ComparisonExtensions.cs | 18 ++ XObjectsTests/Extensions/RoslynExtensions.cs | 189 +++++++++++++++++- XObjectsTests/XObjectsTests.csproj | 2 + 3 files changed, 204 insertions(+), 5 deletions(-) create mode 100644 XObjectsTests/Extensions/ComparisonExtensions.cs diff --git a/XObjectsTests/Extensions/ComparisonExtensions.cs b/XObjectsTests/Extensions/ComparisonExtensions.cs new file mode 100644 index 0000000..543571f --- /dev/null +++ b/XObjectsTests/Extensions/ComparisonExtensions.cs @@ -0,0 +1,18 @@ +using System.Collections.Generic; +using System.Linq; +using ObjectsComparer; + +namespace Xml.Schema.Linq.Tests.Extensions; + +public static class ComparisonExtensions +{ + public static List CompareObjects(this IEnumerable one, IEnumerable others) + { + var c = new Comparer(new ComparisonSettings() { + EmptyAndNullEnumerablesEqual = true, + RecursiveComparison = true, + }); + + return c.CalculateDifferences(one, others).ToList(); + } +} \ No newline at end of file diff --git a/XObjectsTests/Extensions/RoslynExtensions.cs b/XObjectsTests/Extensions/RoslynExtensions.cs index 4d0c262..26619bf 100644 --- a/XObjectsTests/Extensions/RoslynExtensions.cs +++ b/XObjectsTests/Extensions/RoslynExtensions.cs @@ -3,16 +3,195 @@ using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Text; -using Microsoft.CSharp; using System; +using System.Collections.Generic; using System.IO; using System.Linq; -using System.Text; + +using NameAndMemberTuple = (string name, Microsoft.CodeAnalysis.CSharp.Syntax.MemberDeclarationSyntax member); +using AttributeNameAndCount = System.Collections.Generic.List<(string attributeName, int count)>; namespace Xml.Schema.Linq.Tests.Extensions; public static class RoslynExtensions { + public static List<(string name, AttributeNameAndCount?)> ExtractAllClassMembersWithAttributeCounts(this NamespaceDeclarationSyntax root) + { + var list = root.ExtractAllMembersWithAttributes(); + + return list.ConvertAll(nm => { + + List<(NameSyntax attributeName, int count)> attListAndCount = (from a in nm.member.AttributeLists + from attrSyntax in a.Attributes + let name = attrSyntax.Name + let count = a.Attributes.Count(m => m.Name.Equals(name)) + select (attributeName: name, count: count)).ToList(); + + return (nm.name, default(AttributeNameAndCount)); + }); + } + + public static List ExtractAllMembersWithAttributes(this NamespaceDeclarationSyntax root) + { + var query = from m in root.Members + let @class = m as ClassDeclarationSyntax + let classMembersWithAttributes = @class.ExtractAllMembersWithAttributes() + from classMembers in classMembersWithAttributes + orderby classMembers.name + select classMembers; + + return query.ToList(); + } + + public static List ExtractAllMembersWithAttributes(this ClassDeclarationSyntax cs) + { + var list = new List(); + foreach (MemberDeclarationSyntax member in cs.Members) { + if (member.AttributeLists.Any()) { + string id = null!; + if (member is FieldDeclarationSyntax f) { + var ids = f.Declaration.Variables.Select(v => v.Identifier); + id = ids.First().ValueText + $"{cs.Identifier.ValueText}_Field"; + } else if (member is PropertyDeclarationSyntax p) { + id = p.Identifier.ValueText + $"{cs.Identifier.ValueText}_Property"; + } + else { + throw new NotSupportedException(); + } + + list.Add((id, member)); + } + } + + return list; + } + + /// + /// Performs the following steps to clean a namespace for comparison. 1) sort all types and their members by name. 2) remove all doc comments + /// + /// + /// + public static NamespaceDeclarationSyntax CleanForComparison(this NamespaceDeclarationSyntax ns) + { + ns = ns.SortTypesByName(); + ns = ns.StripOfDocComments(); + ns = ns.NormalizeWhitespace(); + + // var cu = ns.SyntaxTree.GetCompilationUnitRoot(); + // var container = cu.GetText().Container; + // var ws = Workspace.GetWorkspaceRegistration(container); + + return ns; + } + + /// + /// Remove doc comments from each type defined in the namespace. + /// + /// + /// + public static NamespaceDeclarationSyntax StripOfDocComments(this NamespaceDeclarationSyntax ns) + { + // strip all /// triple slash doc comments from types (classes, structs etc) and return the updated namespace + var members = ns.Members; + if (members.Count == 0) + return ns; + + var newMembers = new SyntaxList(); + foreach (var member in members) + { + MemberDeclarationSyntax updated = member; + + switch (member) + { + case TypeDeclarationSyntax typeDecl: + updated = StripLeadingTripleSlashDocComments(typeDecl); + updated = typeDecl.StripOfDocComments(); + break; + + case DelegateDeclarationSyntax delegateDecl: + updated = StripLeadingTripleSlashDocComments(delegateDecl); + break; + + default: + // Leave non-type members (e.g., namespaces) untouched + break; + } + + newMembers = newMembers.Add(updated); + } + + return ns.WithMembers(newMembers); + } + + /// + /// Remove doc comments from each member defined in the class. + /// + /// + /// + public static TypeDeclarationSyntax StripOfDocComments(this TypeDeclarationSyntax ns) + { + // strip all /// triple slash doc comments from members (fields, properties, methods, constructors) and return the updated type syntax + var members = ns.Members; + if (members.Count == 0) + return ns; + + var newMembers = new SyntaxList(); + foreach (var member in members) + { + // Remove leading triple-slash docs on the member itself + var updated = StripLeadingTripleSlashDocComments(member); + + // If the member is a nested type, also strip docs from its inner members (recursive) + if (updated is TypeDeclarationSyntax nestedType) + { + updated = nestedType.StripOfDocComments(); + } + + newMembers = newMembers.Add(updated); + } + + return ns.WithMembers(newMembers); + } + + private static SyntaxTriviaList StripTripleSlashDocComments(SyntaxTriviaList trivia) + { + if (trivia.Count == 0) + return trivia; + + var list = new List(trivia.Count); + + for (int i = 0; i < trivia.Count; i++) + { + var t = trivia[i]; + + if (t.IsKind(SyntaxKind.SingleLineDocumentationCommentTrivia)) + { + // Remove indentation immediately preceding the doc comment if it's the start of a line + if (list.Count > 0 && + list[^1].IsKind(SyntaxKind.WhitespaceTrivia) && + (list.Count == 1 || list[^2].IsKind(SyntaxKind.EndOfLineTrivia))) + { + list.RemoveAt(list.Count - 1); + } + + // Also skip the newline that follows the doc comment line (if present) + if (i + 1 < trivia.Count && trivia[i + 1].IsKind(SyntaxKind.EndOfLineTrivia)) + i++; + + continue; // Drop the doc comment trivia + } + + list.Add(t); + } + + return SyntaxFactory.TriviaList(list); + } + + private static T StripLeadingTripleSlashDocComments(T node) where T : SyntaxNode + { + return node.WithLeadingTrivia(StripTripleSlashDocComments(node.GetLeadingTrivia())); + } + public static SourceText ToSourceText(this FileInfo csFile) { StreamReader text = csFile.OpenText(); @@ -37,14 +216,14 @@ public static void WriteToFile(this NamespaceDeclarationSyntax ns, string filePa ns.WriteTo(streamWriter); } - public static NamespaceDeclarationSyntax SortClassesByName(this NamespaceDeclarationSyntax ns) + public static NamespaceDeclarationSyntax SortTypesByName(this NamespaceDeclarationSyntax ns) { // Sort only direct class members of the namespace by name (Ordinal), // keep non-class members in their original positions, and preserve formatting. var members = ns.Members; var sortedClasses = members - .OfType() + .OfType() .OrderBy(c => c.Identifier.ValueText, StringComparer.Ordinal) .ToList(); @@ -75,7 +254,7 @@ public static NamespaceDeclarationSyntax SortClassesByName(this NamespaceDeclara return ns.WithMembers(newMembers); } - public static ClassDeclarationSyntax SortMembersByIdentifier(this ClassDeclarationSyntax cs) + public static TypeDeclarationSyntax SortMembersByIdentifier(this TypeDeclarationSyntax cs) { // Sort identifiable members (those with a name) by their identifier (Ordinal). // Non-identifiable members (e.g., indexers, operators) stay in place. diff --git a/XObjectsTests/XObjectsTests.csproj b/XObjectsTests/XObjectsTests.csproj index ebc6ee8..6996157 100644 --- a/XObjectsTests/XObjectsTests.csproj +++ b/XObjectsTests/XObjectsTests.csproj @@ -10,6 +10,7 @@ + @@ -19,6 +20,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive + all From 75094882c5a70e380d9ba3dd2292e51d116ed9d2 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Sun, 23 Nov 2025 20:30:30 +1000 Subject: [PATCH 007/107] Added more helper methods for comparing C# source syntax trees. --- XObjectsTests/Extensions/RoslynExtensions.cs | 68 ++++++++++++++++--- .../Extensions/RoslynFieldSyntaxExtensions.cs | 15 ++++ .../Extensions/RoslynSyntaxTreeExtensions.cs | 59 ++++++++++++++++ 3 files changed, 133 insertions(+), 9 deletions(-) create mode 100644 XObjectsTests/Extensions/RoslynFieldSyntaxExtensions.cs create mode 100644 XObjectsTests/Extensions/RoslynSyntaxTreeExtensions.cs diff --git a/XObjectsTests/Extensions/RoslynExtensions.cs b/XObjectsTests/Extensions/RoslynExtensions.cs index 26619bf..1c254c0 100644 --- a/XObjectsTests/Extensions/RoslynExtensions.cs +++ b/XObjectsTests/Extensions/RoslynExtensions.cs @@ -5,32 +5,52 @@ using Microsoft.CodeAnalysis.Text; using System; using System.Collections.Generic; +using System.Diagnostics; using System.IO; using System.Linq; - +using Xml.Schema.Linq.Extensions; using NameAndMemberTuple = (string name, Microsoft.CodeAnalysis.CSharp.Syntax.MemberDeclarationSyntax member); -using AttributeNameAndCount = System.Collections.Generic.List<(string attributeName, int count)>; +using AttributeNameAndCountList = System.Collections.Generic.List<(string attributeName, int count)>; +// using AttributeNameAndCountList = System.Collections.Generic.List<(string attributeName, int count)>; namespace Xml.Schema.Linq.Tests.Extensions; public static class RoslynExtensions { - public static List<(string name, AttributeNameAndCount?)> ExtractAllClassMembersWithAttributeCounts(this NamespaceDeclarationSyntax root) + public static List<(string name, string)> ExtractAllClassMembersWithAttributeCounts(this NamespaceDeclarationSyntax root) { var list = root.ExtractAllMembersWithAttributes(); return list.ConvertAll(nm => { - - List<(NameSyntax attributeName, int count)> attListAndCount = (from a in nm.member.AttributeLists + var attListAndCount = (from a in nm.member.AttributeLists from attrSyntax in a.Attributes - let name = attrSyntax.Name + let name = (attrSyntax.Name as IdentifierNameSyntax) let count = a.Attributes.Count(m => m.Name.Equals(name)) - select (attributeName: name, count: count)).ToList(); + orderby name.Identifier.ValueText + select (attributeName: name.Identifier.ValueText, count: count)).ToList(); - return (nm.name, default(AttributeNameAndCount)); + // return (nm.name, attListAndCount); + return (nm.name, $"{attListAndCount.ToDelimitedString(tuple => $"{tuple.attributeName}:{tuple.count}")}"); }); } + public static List<(string name, string)> ExtractAllClassFieldsWithAttributeCounts(this NamespaceDeclarationSyntax root) + { + var list = root.ExtractAllMembersWithAttributes(); + + return list.Where(m => m.member is FieldDeclarationSyntax).Select(nm => { + var attListAndCount = (from a in nm.member.AttributeLists + from attrSyntax in a.Attributes + let name = (attrSyntax.Name as IdentifierNameSyntax) + let count = a.Attributes.Count(m => m.Name.Equals(name)) + orderby name.Identifier.ValueText + select (attributeName: name.Identifier.ValueText, count: count)).ToList(); + + // return (nm.name, attListAndCount); + return (nm.name, $"{attListAndCount.ToDelimitedString(tuple => $"{tuple.attributeName}:{tuple.count}")}"); + }).ToList(); + } + public static List ExtractAllMembersWithAttributes(this NamespaceDeclarationSyntax root) { var query = from m in root.Members @@ -56,7 +76,7 @@ public static List ExtractAllMembersWithAttributes(this Clas id = p.Identifier.ValueText + $"{cs.Identifier.ValueText}_Property"; } else { - throw new NotSupportedException(); + Debugger.Break(); } list.Add((id, member)); @@ -66,8 +86,38 @@ public static List ExtractAllMembersWithAttributes(this Clas return list; } + public static List ExtractAllFieldsWithAttributes(this ClassDeclarationSyntax cs) + { + var list = new List(); + foreach (MemberDeclarationSyntax member in cs.Members) { + if (member.AttributeLists.Any()) { + if (member is not FieldDeclarationSyntax f) continue; + var ids = f.Declaration.Variables.Select(v => v.Identifier); + var id = ids.First().ValueText + $"_{cs.Identifier.ValueText}_Field"; + list.Add((id, member)); + } + } + + return list; + } + + public static List ExtractAllPropertiesWithAttributes(this ClassDeclarationSyntax cs) + { + var list = new List(); + foreach (MemberDeclarationSyntax member in cs.Members) { + if (member.AttributeLists.Any()) { + if (member is not PropertyDeclarationSyntax p) continue; + var id = p.Identifier.ValueText + $"_{cs.Identifier.ValueText}_Property"; + list.Add((id, member)); + } + } + + return list; + } + /// /// Performs the following steps to clean a namespace for comparison. 1) sort all types and their members by name. 2) remove all doc comments + /// 3) normalise whitespace. /// /// /// diff --git a/XObjectsTests/Extensions/RoslynFieldSyntaxExtensions.cs b/XObjectsTests/Extensions/RoslynFieldSyntaxExtensions.cs new file mode 100644 index 0000000..3d1ab48 --- /dev/null +++ b/XObjectsTests/Extensions/RoslynFieldSyntaxExtensions.cs @@ -0,0 +1,15 @@ +#nullable enable +using System.Linq; +using Microsoft.CodeAnalysis.CSharp.Syntax; + +namespace Xml.Schema.Linq.Tests.Extensions; + +public static class RoslynFieldSyntaxExtensions +{ + public static string? PossibleIdentifier(this FieldDeclarationSyntax f) + { + var possibleId = f.Declaration.Variables.Select(v => v.Identifier).FirstOrDefault(); + + return possibleId.ValueText; + } +} \ No newline at end of file diff --git a/XObjectsTests/Extensions/RoslynSyntaxTreeExtensions.cs b/XObjectsTests/Extensions/RoslynSyntaxTreeExtensions.cs new file mode 100644 index 0000000..382b318 --- /dev/null +++ b/XObjectsTests/Extensions/RoslynSyntaxTreeExtensions.cs @@ -0,0 +1,59 @@ +using System.Collections.Generic; +using System.Linq; +using Microsoft.CodeAnalysis.CSharp.Syntax; + +namespace Xml.Schema.Linq.Tests.Extensions; + +public static class RoslynSyntaxTreeExtensions +{ + public static List GetAllPropertyDescendantAttributes(this NamespaceDeclarationSyntax root) + { + var allProperties = root.DescendantNodes().OfType().ToList(); + + var allPropertiesWithAttrs = (from p in allProperties + where p.AttributeLists.Select(al => al.Attributes).Any() + select p).ToList(); + + var allPropsAttributes = allPropertiesWithAttrs + .SelectMany(p => p.AttributeLists.SelectMany(al => al.Attributes)).ToList(); + + return allPropsAttributes; + } + + public static List GetAllPropertyDescendantsWithAttrs(this NamespaceDeclarationSyntax root) + { + var allProperties = root.DescendantNodes().OfType().ToList(); + + var allPropertiesWithAttrs = (from p in allProperties + where p.AttributeLists.Select(al => al.Attributes).Any() + orderby p.Identifier.ValueText + select p).ToList(); + + return allPropertiesWithAttrs; + } + + public static List GetAllFieldDescendantAttributes(this NamespaceDeclarationSyntax root) + { + var allFields = root.DescendantNodes().OfType().ToList(); + + var allFieldsWithAttrs = (from field in allFields + where field.AttributeLists.Select(al => al.Attributes).Any() + select field).ToList(); + + var allFieldAttributes = allFieldsWithAttrs + .SelectMany(f => f.AttributeLists.SelectMany(al => al.Attributes)).ToList(); + + return allFieldAttributes; + } + + public static List GetAllFieldDescendantsWithAttrs(this NamespaceDeclarationSyntax root) + { + var allFields = root.DescendantNodes().OfType().ToList(); + + var allFieldsWithAttrs = (from field in allFields + where field.AttributeLists.Select(al => al.Attributes).Any() + select field).ToList(); + + return allFieldsWithAttrs; + } +} \ No newline at end of file From 8cb8009347667583f1203089d763a62220d811c0 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Sun, 23 Nov 2025 20:30:30 +1000 Subject: [PATCH 008/107] Simplified; trying to figure out why field attributes count are different.... --- XObjectsTests/CodeGenerationTests.cs | 42 ++++++++++++++++------------ 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/XObjectsTests/CodeGenerationTests.cs b/XObjectsTests/CodeGenerationTests.cs index 2814367..c589dfd 100644 --- a/XObjectsTests/CodeGenerationTests.cs +++ b/XObjectsTests/CodeGenerationTests.cs @@ -277,31 +277,37 @@ public void DebuggerBrowsableAttributesGeneratedTest() var tree = Utilities.GenerateSyntaxTree(atomXsdFileInfo, AllTestFiles); var root = tree.GetNamespaceRoot(); - var ns = root.SortClassesByName(); - File.WriteAllText("atom2.xsd.cs", ns.ToFullString()); + var ns1 = root.ExtractAllClassFieldsWithAttributeCounts(); - var fullString = ns.ToFullString(); - TestContext.CurrentContext.DumpDebugOutputToFile(debugStrings: new [] { fullString }); + // var ns1 = root.CleanForComparison(); + // ns1.WriteToFile("atom2.xsd.cs"); + + var tree2 = new FileInfo("..\\..\\..\\..\\GeneratedSchemaLibraries\\Atom\\atom.xsd.cs").ToSyntaxTree(); + var ns2 = tree2.GetNamespaceRoot(); + var ns2List = ns2.ExtractAllClassFieldsWithAttributeCounts(); + + var comparisons = ns1.CompareObjects(ns2List); - var allProperties = root.DescendantNodes().OfType().ToList(); - var allFields = root.DescendantNodes().OfType().ToList(); + Assert.IsEmpty(comparisons); + + // var ns2 = tree2.GetNamespaceRoot(); + // ns2 = ns2.CleanForComparison(); + // ns2.WriteToFile("atom-sorted.xsd.cs"); + + var fullString = root.ToFullString(); + TestContext.CurrentContext.DumpDebugOutputToFile(debugStrings: new [] { fullString }); - var allFieldsWithAttrs = (from field in allFields - where field.AttributeLists.Select(al => al.Attributes).Any() - select field).ToList(); + var allProperties = root.GetAllPropertyDescendantAttributes(); + var allFields = root.GetAllFieldDescendantAttributes(); - var allPropertiesWithAttrs = (from p in allProperties - where p.AttributeLists.Select(al => al.Attributes).Any() - select p).ToList(); + var allFields2 = ns2.GetAllFieldDescendantAttributes(); - var allPropsAttributes = allPropertiesWithAttrs - .SelectMany(p => p.AttributeLists.SelectMany(al => al.Attributes)).ToList(); + var compareFields = allFields.CompareObjects(allFields2); - var allFieldAttributes = allFieldsWithAttrs - .SelectMany(f => f.AttributeLists.SelectMany(al => al.Attributes)).ToList(); + Assert.IsEmpty(compareFields); - var allPropAttributeNames = allPropsAttributes.Select(a => ((IdentifierNameSyntax) a.Name).Identifier.Text).ToList(); - var allFieldAttributeNames = allFieldAttributes.Select(a => ((IdentifierNameSyntax) a.Name).Identifier.Text).ToList(); + var allPropAttributeNames = allProperties.Select(a => ((IdentifierNameSyntax) a.Name).Identifier.Text).ToList(); + var allFieldAttributeNames = allFields.Select(a => ((IdentifierNameSyntax) a.Name).Identifier.Text).ToList(); Assert.IsNotEmpty(allPropAttributeNames); Assert.IsNotEmpty(allFieldAttributeNames); From 09fb2f8654478f5ab4c023483ae345c6fe754886 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Sun, 23 Nov 2025 20:30:30 +1000 Subject: [PATCH 009/107] Ugh so mcuh work to verify this regression... --- XObjectsTests/CodeGenerationTests.cs | 91 ++++++++++----- .../Extensions/RoslynClassReportExtensions.cs | 108 ++++++++++++++++++ XObjectsTests/Extensions/RoslynExtensions.cs | 2 + .../Extensions/RoslynSyntaxTreeExtensions.cs | 12 +- 4 files changed, 176 insertions(+), 37 deletions(-) create mode 100644 XObjectsTests/Extensions/RoslynClassReportExtensions.cs diff --git a/XObjectsTests/CodeGenerationTests.cs b/XObjectsTests/CodeGenerationTests.cs index c589dfd..cc1f3e5 100644 --- a/XObjectsTests/CodeGenerationTests.cs +++ b/XObjectsTests/CodeGenerationTests.cs @@ -275,36 +275,13 @@ public void DebuggerBrowsableAttributesGeneratedTest() var atomXsdFileInfo = new MockFileInfo(AllTestFiles, AtomXsdFilePath); var tree = Utilities.GenerateSyntaxTree(atomXsdFileInfo, AllTestFiles); - var root = tree.GetNamespaceRoot(); - - var ns1 = root.ExtractAllClassFieldsWithAttributeCounts(); - - // var ns1 = root.CleanForComparison(); - // ns1.WriteToFile("atom2.xsd.cs"); - - var tree2 = new FileInfo("..\\..\\..\\..\\GeneratedSchemaLibraries\\Atom\\atom.xsd.cs").ToSyntaxTree(); - var ns2 = tree2.GetNamespaceRoot(); - var ns2List = ns2.ExtractAllClassFieldsWithAttributeCounts(); + var ns = tree.GetNamespaceRoot(); - var comparisons = ns1.CompareObjects(ns2List); - - Assert.IsEmpty(comparisons); - - // var ns2 = tree2.GetNamespaceRoot(); - // ns2 = ns2.CleanForComparison(); - // ns2.WriteToFile("atom-sorted.xsd.cs"); - - var fullString = root.ToFullString(); + var fullString = ns.ToFullString(); TestContext.CurrentContext.DumpDebugOutputToFile(debugStrings: new [] { fullString }); - var allProperties = root.GetAllPropertyDescendantAttributes(); - var allFields = root.GetAllFieldDescendantAttributes(); - - var allFields2 = ns2.GetAllFieldDescendantAttributes(); - - var compareFields = allFields.CompareObjects(allFields2); - - Assert.IsEmpty(compareFields); + var allProperties = ns.GetAllPropertyDescendantAttributes(); + var allFields = ns.GetAllFieldDescendantAttributes(); var allPropAttributeNames = allProperties.Select(a => ((IdentifierNameSyntax) a.Name).Identifier.Text).ToList(); var allFieldAttributeNames = allFields.Select(a => ((IdentifierNameSyntax) a.Name).Identifier.Text).ToList(); @@ -327,5 +304,65 @@ public void DebuggerBrowsableAttributesGeneratedTest() Assert.IsTrue(allNamesAreTheSame); } + + [Test] + public void CompareGeneratedAttributesCurrentAndSavedCSharpSourceCode() + { + var atomXsdFileInfo = new MockFileInfo(AllTestFiles, AtomXsdFilePath); + + var tree1 = Utilities.GenerateSyntaxTree(atomXsdFileInfo, AllTestFiles); + var ns1 = tree1.GetNamespaceRoot(); + + var tree2 = new FileInfo("..\\..\\..\\..\\GeneratedSchemaLibraries\\Atom\\atom.xsd.cs").ToSyntaxTree(); + var ns2 = tree2.GetNamespaceRoot(); + + Assert.IsEmpty(ns1.CompareProperties(ns2)); + Assert.IsEmpty(ns1.CompareFields(ns2)); + + var allProperties1 = ns1.GetAllPropertyDescendantAttributes(); + + var allFields1 = ns1.GetAllFieldDescendantAttributes(); + var allFields2 = ns2.GetAllFieldDescendantAttributes(); + + var compareFields = allFields1.CompareObjects(allFields2); + + Assert.IsEmpty(compareFields); + } + + [Test] + public void CompareFieldSummariesForEntireNamespaces() + { + var atomXsdFileInfo = new MockFileInfo(AllTestFiles, AtomXsdFilePath); + + var tree1 = Utilities.GenerateSyntaxTree(atomXsdFileInfo, AllTestFiles); + var ns1 = tree1.GetNamespaceRoot(); + + var tree2 = new FileInfo("..\\..\\..\\..\\GeneratedSchemaLibraries\\Atom\\atom.xsd.cs").ToSyntaxTree(); + var ns2 = tree2.GetNamespaceRoot(); + + Assert.IsEmpty(ns1.CompareProperties(ns2)); + Assert.IsEmpty(ns1.CompareFields(ns2)); + + var allFieldAttrs1 = ns1.GetAllFieldDescendantAttributes(); + var allFieldAttrs2 = ns2.GetAllFieldDescendantAttributes(); + + var attrsAndFields = allFieldAttrs1.Select(a => + ( + Attr: a, + FieldName: ((a.Parent as AttributeListSyntax)?.Parent as FieldDeclarationSyntax)?.Declaration.Variables.Select(v => v.Identifier.ValueText).Single() + ) + ).ToList(); + + var grouped = (from af in attrsAndFields + group af by af.FieldName into afGroup + orderby afGroup.Key + select afGroup).ToList(); + + + + var compareFields = allFieldAttrs1.CompareObjects(allFieldAttrs2); + + Assert.IsEmpty(compareFields); + } } } \ No newline at end of file diff --git a/XObjectsTests/Extensions/RoslynClassReportExtensions.cs b/XObjectsTests/Extensions/RoslynClassReportExtensions.cs new file mode 100644 index 0000000..ada3cb5 --- /dev/null +++ b/XObjectsTests/Extensions/RoslynClassReportExtensions.cs @@ -0,0 +1,108 @@ +using System.Collections.Generic; +using System.Linq; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using MoreLinq; +using ObjectsComparer; + +namespace Xml.Schema.Linq.Tests.Extensions; + +using PropOrField = OneOf.OneOf; +using SummaryOfClassMembers = IOrderedEnumerable DistinctAttrs)>>; + +public static class RoslynClassReportExtensions +{ + public static List CompareProperties(this NamespaceDeclarationSyntax ns1, + NamespaceDeclarationSyntax ns2) + { + var classes1 = ns1.Members.OfType().ToList(); + var classes2 = ns2.Members.OfType().ToList(); + + var classesList1 = classes1.Select(c => c.Identifier.ValueText).OrderBy(a => a).ToString(); + var classesList2 = classes2.Select(c => c.Identifier.ValueText).OrderBy(a => a).ToString(); + + var compareClassLists = classesList1.CompareObjects(classesList2); + if (compareClassLists.Any()) { + return compareClassLists; + } + + var propsPerClass1 = classes1.GetSummaryOfProperties().ToComparisonString(); + var propsPerClass2 = classes2.GetSummaryOfProperties().ToComparisonString(); + + var compareNamespaces = propsPerClass1.CompareObjects(propsPerClass2); + return compareNamespaces; + } + + public static List CompareFields(this NamespaceDeclarationSyntax ns1, + NamespaceDeclarationSyntax ns2) + { + var classes1 = ns1.Members.OfType().ToList(); + var classes2 = ns2.Members.OfType().ToList(); + + var classesList1 = classes1.Select(c => c.Identifier.ValueText).OrderBy(a => a).ToString(); + var classesList2 = classes2.Select(c => c.Identifier.ValueText).OrderBy(a => a).ToString(); + + var compareClassLists = classesList1.CompareObjects(classesList2); + if (compareClassLists.Any()) { + return compareClassLists; + } + + var propsPerClass1 = classes1.GetSummaryOfFields().ToComparisonString(); + var propsPerClass2 = classes2.GetSummaryOfFields().ToComparisonString(); + + var compareNamespaces = propsPerClass1.CompareObjects(propsPerClass2); + return compareNamespaces; + } + + public static SummaryOfClassMembers GetSummaryOfProperties(this IEnumerable types) + { + IOrderedEnumerable DistincAttrs)>> query = + from c in types + from p in c.Members.OfType() + let propSummary = ( + PropName: p.Identifier.ValueText, + // DistinctAttrs: p.AttributeLists.SelectMany(a => a.Attributes.Select(attrSyn => attrSyn.Name).Distinct()).Distinct().ToList() + DistincAttrs: (from atl in p.AttributeLists + from aast in atl.Attributes + let nameStr = aast.Name as IdentifierNameSyntax + select nameStr?.Identifier.ValueText).ToList() + ) + where propSummary.DistincAttrs.Any() + group propSummary by c.Identifier.ValueText + into propGroup + orderby propGroup.Key + select propGroup; + + return query; + } + + public static SummaryOfClassMembers GetSummaryOfFields(this IEnumerable types) + { + IOrderedEnumerable DistincAttrs)>> query = + from c in types + from p in c.Members.OfType() + let propSummary = ( + PropName: p.Declaration.Variables.Single().Identifier.ValueText, + // DistinctAttrs: p.AttributeLists.SelectMany(a => a.Attributes.Select(attrSyn => attrSyn.Name).Distinct()).Distinct().ToList() + DistincAttrs: (from atl in p.AttributeLists + from aast in atl.Attributes + let nameStr = aast.Name as IdentifierNameSyntax + select nameStr?.Identifier.ValueText).ToList() + ) + where propSummary.DistincAttrs.Any() + group propSummary by c.Identifier.ValueText + into propGroup + orderby propGroup.Key + select propGroup; + + return query; + } + + public static List ToComparisonString(this SummaryOfClassMembers t) + { + var query = from g in t + from c in g + select $"Class = {g.Key}, Property = {c.MemberName}, Attrs = {c.DistinctAttrs.ToDelimitedString(",")}"; + + return query.ToList(); + } +} \ No newline at end of file diff --git a/XObjectsTests/Extensions/RoslynExtensions.cs b/XObjectsTests/Extensions/RoslynExtensions.cs index 1c254c0..f67ac48 100644 --- a/XObjectsTests/Extensions/RoslynExtensions.cs +++ b/XObjectsTests/Extensions/RoslynExtensions.cs @@ -6,6 +6,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.IO; using System.Linq; using Xml.Schema.Linq.Extensions; @@ -121,6 +122,7 @@ public static List ExtractAllPropertiesWithAttributes(this C /// /// /// + [SuppressMessage("ReSharper", "UnusedMember.Global")] public static NamespaceDeclarationSyntax CleanForComparison(this NamespaceDeclarationSyntax ns) { ns = ns.SortTypesByName(); diff --git a/XObjectsTests/Extensions/RoslynSyntaxTreeExtensions.cs b/XObjectsTests/Extensions/RoslynSyntaxTreeExtensions.cs index 382b318..a2b0006 100644 --- a/XObjectsTests/Extensions/RoslynSyntaxTreeExtensions.cs +++ b/XObjectsTests/Extensions/RoslynSyntaxTreeExtensions.cs @@ -8,11 +8,7 @@ public static class RoslynSyntaxTreeExtensions { public static List GetAllPropertyDescendantAttributes(this NamespaceDeclarationSyntax root) { - var allProperties = root.DescendantNodes().OfType().ToList(); - - var allPropertiesWithAttrs = (from p in allProperties - where p.AttributeLists.Select(al => al.Attributes).Any() - select p).ToList(); + var allPropertiesWithAttrs = root.GetAllPropertyDescendantsWithAttrs(); var allPropsAttributes = allPropertiesWithAttrs .SelectMany(p => p.AttributeLists.SelectMany(al => al.Attributes)).ToList(); @@ -34,11 +30,7 @@ orderby p.Identifier.ValueText public static List GetAllFieldDescendantAttributes(this NamespaceDeclarationSyntax root) { - var allFields = root.DescendantNodes().OfType().ToList(); - - var allFieldsWithAttrs = (from field in allFields - where field.AttributeLists.Select(al => al.Attributes).Any() - select field).ToList(); + var allFieldsWithAttrs = root.GetAllFieldDescendantsWithAttrs(); var allFieldAttributes = allFieldsWithAttrs .SelectMany(f => f.AttributeLists.SelectMany(al => al.Attributes)).ToList(); From 6efb2d39be223b6c3b351a1af4673eb995b677b9 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Sun, 23 Nov 2025 20:30:30 +1000 Subject: [PATCH 010/107] Found the difference; a sealed class within textType: public sealed class TypeEnumValidator is no longer being generated! --- XObjectsTests/CodeGenerationTests.cs | 90 ++++++++++++++++++++++++---- 1 file changed, 80 insertions(+), 10 deletions(-) diff --git a/XObjectsTests/CodeGenerationTests.cs b/XObjectsTests/CodeGenerationTests.cs index cc1f3e5..a429d62 100644 --- a/XObjectsTests/CodeGenerationTests.cs +++ b/XObjectsTests/CodeGenerationTests.cs @@ -336,9 +336,22 @@ public void CompareFieldSummariesForEntireNamespaces() var tree1 = Utilities.GenerateSyntaxTree(atomXsdFileInfo, AllTestFiles); var ns1 = tree1.GetNamespaceRoot(); + ns1 = ns1.CleanForComparison(); - var tree2 = new FileInfo("..\\..\\..\\..\\GeneratedSchemaLibraries\\Atom\\atom.xsd.cs").ToSyntaxTree(); + var existingAtomCode = "..\\..\\..\\..\\GeneratedSchemaLibraries\\Atom\\atom.xsd.cs"; + + var tree2 = new FileInfo(existingAtomCode).ToSyntaxTree(); var ns2 = tree2.GetNamespaceRoot(); + ns2 = ns2.CleanForComparison(); + + { + var directoryName = Path.GetDirectoryName(existingAtomCode); + var fileName = Path.GetFileNameWithoutExtension(existingAtomCode); + // save the new one for comparison + var filePath = Path.Combine(directoryName, fileName + "2.csx"); + ns1.WriteToFile(filePath); + ns2.WriteToFile(existingAtomCode); + } Assert.IsEmpty(ns1.CompareProperties(ns2)); Assert.IsEmpty(ns1.CompareFields(ns2)); @@ -346,23 +359,80 @@ public void CompareFieldSummariesForEntireNamespaces() var allFieldAttrs1 = ns1.GetAllFieldDescendantAttributes(); var allFieldAttrs2 = ns2.GetAllFieldDescendantAttributes(); - var attrsAndFields = allFieldAttrs1.Select(a => - ( - Attr: a, - FieldName: ((a.Parent as AttributeListSyntax)?.Parent as FieldDeclarationSyntax)?.Declaration.Variables.Select(v => v.Identifier.ValueText).Single() - ) - ).ToList(); + var attrsAndFields1 = SummariseFields(allFieldAttrs1); + + var attrsAndFields2 = SummariseFields(allFieldAttrs2); - var grouped = (from af in attrsAndFields + var grouped1 = (from af in attrsAndFields1 + group af by af.FieldName into afGroup + orderby afGroup.Key + select afGroup).ToList(); + + var grouped2 = (from af in attrsAndFields2 group af by af.FieldName into afGroup orderby afGroup.Key select afGroup).ToList(); - + var counts1 = grouped1.Select(g => new { g.Key, Count = g.Count() }).ToList(); + var counts2 = grouped2.Select(g => new { g.Key, Count = g.Count() }).ToList(); + + var regrouped1 = from af in grouped1.Where(g => g.Key == "DebuggerBrowsable") + .SelectMany(g => g) + group af by af.FieldName into faf + select faf; + + var regrouped2 = from af in grouped1.Where(g => g.Key == "DebuggerBrowsable") + .SelectMany(g => g) + group af by af.FieldName into faf + select faf; + + var compareCounts = counts1.CompareObjects(counts2); + Assert.IsEmpty(compareCounts); - var compareFields = allFieldAttrs1.CompareObjects(allFieldAttrs2); + var compareFields = grouped1.CompareObjects(grouped2); Assert.IsEmpty(compareFields); + + return; + + static List<(string Attr, string FieldName)> SummariseFields(List attrs) + { + return attrs.Select(a => + ( + Attr: a.Name.ToFullString(), + FieldName: ((a.Parent as AttributeListSyntax)?.Parent as FieldDeclarationSyntax)?.Declaration.Variables.Select(v => v.Identifier.ValueText).Single() + ) + ).OrderByDescending(e => e.FieldName) + .ToList(); + } + } + + [Test] + public void ValidatorSubTypesExist() + { + var atomXsdFileInfo = new MockFileInfo(AllTestFiles, AtomXsdFilePath); + + var tree1 = Utilities.GenerateSyntaxTree(atomXsdFileInfo, AllTestFiles); + var ns1 = tree1.GetNamespaceRoot(); + ns1 = ns1.CleanForComparison(); + + var existingAtomCode = "..\\..\\..\\..\\GeneratedSchemaLibraries\\Atom\\atom.xsd.cs"; + + { + var directoryName = Path.GetDirectoryName(existingAtomCode); + var fileName = Path.GetFileNameWithoutExtension(existingAtomCode); + var filePath = Path.Combine(directoryName, fileName + "2.cs"); + // ns1.WriteToFile(filePath); + } + + var tree2 = new FileInfo(existingAtomCode).ToSyntaxTree(); + var ns2 = tree2.GetNamespaceRoot(); + ns2 = ns2.CleanForComparison(); + + Assert.IsEmpty(ns1.CompareProperties(ns2)); + Assert.IsEmpty(ns1.CompareFields(ns2)); + + } } } \ No newline at end of file From 2d3497dff485638919247186618e6984fc0e66a9 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Sun, 23 Nov 2025 20:30:31 +1000 Subject: [PATCH 011/107] Updated test. --- XObjectsTests/CodeGenerationTests.cs | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/XObjectsTests/CodeGenerationTests.cs b/XObjectsTests/CodeGenerationTests.cs index a429d62..a71de2b 100644 --- a/XObjectsTests/CodeGenerationTests.cs +++ b/XObjectsTests/CodeGenerationTests.cs @@ -417,22 +417,28 @@ public void ValidatorSubTypesExist() ns1 = ns1.CleanForComparison(); var existingAtomCode = "..\\..\\..\\..\\GeneratedSchemaLibraries\\Atom\\atom.xsd.cs"; - - { - var directoryName = Path.GetDirectoryName(existingAtomCode); - var fileName = Path.GetFileNameWithoutExtension(existingAtomCode); - var filePath = Path.Combine(directoryName, fileName + "2.cs"); - // ns1.WriteToFile(filePath); - } var tree2 = new FileInfo(existingAtomCode).ToSyntaxTree(); var ns2 = tree2.GetNamespaceRoot(); ns2 = ns2.CleanForComparison(); - - Assert.IsEmpty(ns1.CompareProperties(ns2)); - Assert.IsEmpty(ns1.CompareFields(ns2)); - + var types1 = ns1.Members.OfType().ToList(); + var subtypes1 = (from t1 in types1 + from tt1 in t1.Members.OfType() + select tt1).ToList(); + + var types2 = ns2.Members.OfType().ToList(); + var subtypes2 = (from t2 in types2 + from tt2 in t2.Members.OfType() + select tt2).ToList(); + + Assert.AreEqual(types1.Count, types2.Count); + + Assert.IsNotEmpty(subtypes1); + Assert.IsNotNull(subtypes1.SingleOrDefault()); + + Assert.IsNotEmpty(subtypes2); + Assert.IsNotNull(subtypes2.SingleOrDefault()); } } } \ No newline at end of file From 440f2c8e075c93ad24da8e19037bc7f289ec8495 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Sun, 23 Nov 2025 20:30:31 +1000 Subject: [PATCH 012/107] Disabled DebugAssertion GUI when running tests in VS. --- XObjectsTests/App.config | 6 ++++++ XObjectsTests/XObjectsTests.csproj | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 XObjectsTests/App.config diff --git a/XObjectsTests/App.config b/XObjectsTests/App.config new file mode 100644 index 0000000..d62f212 --- /dev/null +++ b/XObjectsTests/App.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/XObjectsTests/XObjectsTests.csproj b/XObjectsTests/XObjectsTests.csproj index 6996157..c1f9316 100644 --- a/XObjectsTests/XObjectsTests.csproj +++ b/XObjectsTests/XObjectsTests.csproj @@ -56,4 +56,10 @@ + + + PreserveNewest + + + \ No newline at end of file From d67deef07b32325589c6a08c667034f542eee4dc Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Sun, 23 Nov 2025 20:30:31 +1000 Subject: [PATCH 013/107] Renamed for github copilot instructions. --- ...ugfix-agent.md => copilot-instructions.md} | 84 ++++++++++--------- LinqToXsdCore.sln | 1 + 2 files changed, 45 insertions(+), 40 deletions(-) rename .github/agents/{bugfix-agent.md => copilot-instructions.md} (70%) diff --git a/.github/agents/bugfix-agent.md b/.github/agents/copilot-instructions.md similarity index 70% rename from .github/agents/bugfix-agent.md rename to .github/agents/copilot-instructions.md index 5f65395..28aaf99 100644 --- a/.github/agents/bugfix-agent.md +++ b/.github/agents/copilot-instructions.md @@ -5,74 +5,78 @@ description: An agent designed to assist with software development tasks for .NE --- You are an expert C#/.NET developer, whose primary purpose is fixing bugs in the LinqToXsdCore code base. You help with .NET programming tasks by writing clean, well-designed, error-free, efficient, secure, readable, and maintainable code that follows project and .NET conventions. You also give insights, best practices, general software design tips, and testing best practices. -When invoked: +General guidelines to follow: - Understand the user's .NET task and context. - Use UK or Australian English when writing code documentation, comments or prose accompanying a pull request. - Write clean, organised solutions that follow .NET conventions. -- For new code, use modern C# language features such as: `async`/`await`, primary class constructors (`class B(string fieldValue1, int fieldValue2) {}`), collection expressions `int[] numbers = [1,2,3];` etc, except when modifying existing code that might use older features or syntax. -- Apply SOLID principles where appropriate (single responsibility, open-closed principle, Liskov substitution principle, interface segregation, dependency inversion) - - Favour properties over fields. - - Keep fields mostly private, except where you think the field may by useful as an inheritable, `protected` member. - - Public fields should be rare, but in this case, set the public field to `readonly`, and ensure to set its value in the constructor. - - If you cannot satisfy the `public readonly` field rule (such as when a field value is set outside the constructor), wrap the field in a property if one does not already exist. -- Write tests using NUnit. It is not a requirement to follow TDD or BDD - at a minimum write tests that models or capture the correct output or result. +- Do not arbitrarily re-write existing code. +- Write tests using the NUnit API. At a minimum write tests that models or capture the correct output or result, and that the result reflects the user's feature or bug fix request. - Some tests themselves contain bugs; please note in the git commit message if you've fixed a bug in a test. # Specific LinqToXsdCore project guidance -LinqToXsdCore's primary function is to read W3C XML Schema definition (XSD) file(s), map the schema types (element definitions, complex types, groups etc.) inside the schema to .NET CLR-compatible types and generate C# code. The primary output of LinqToXsdCore is C# code that is used by the user (usually another programmer) to ease the burden of programming with XML data. LinqToXsdCore is a modern port of the older 'LinqToXsd' tool, and runs on both .NET Framework, and .NET 6. However it's generated code is .NET Standard 2.1 compliant. +LinqToXsdCore's primary function is to read W3C XML Schema definition (XSD) file(s), map the schema types (element definitions, complex types, groups etc.) inside the schema to .NET CLR-compatible types and generate C# code. The primary output of LinqToXsdCore is C# code that is used by the user (always another programmer) to ease the burden of programming with XML data. LinqToXsdCore is a modern port of the older 'LinqToXsd' tool from 2008, and runs on both .NET Framework, and .NET 6. However it's generated code is .NET Standard 2.1 compliant. The primary maintenance burden with LinqToXsdCore are the many bugs exist in the parts of the C# code base that handle XSD type mapping and code generation as it uses the older CodeDOM API for generating C# code, mixed with hand-written written logic to emit C# code strings when there are gaps in the CodeDOM API. And there are lots of gaps. CodeDOM as an API, emits C# 6-compatible code, so be conservative with modifying code-generation logic so as to not accidentally introduce C# language syntax or APIs that might break .NET Standard 2.1 compatibility, in the generated output code. -LinqToXsdCore uses Polysharp, which allows using modern C# syntax and features in the code base itself. However, we assume the user of the tool is not using that in their own projects, so the generated code should use .NET Standard 2.1 compatible APIs and C# 7.3 language features. +The LinqToXsdCore projects use Polysharp, which allows using modern C# syntax and features in the code base itself. However, we assume the user of the tool is not using that in their own projects, so the generated code should use .NET Standard 2.1 compatible APIs and C# 7.3 language features. -This project was ported specifically with the intention to retain .NET Framework compatibility with the generated code, and the generator tool. +This project was ported specifically with the intention to retain .NET Framework compatibility with the generated code, and the generator tool, so C# 7.3 in the generated code is for .NET Framework compatibility. ## Solution layout -* `GeneratedSchemaLibraries/` folder (multiple projects) - - Contains code generated by the LinqToXsd CLI tool and their origin schemas purely for testing the code gen and runtime API. Contains many XSD files so can be ignored as it is not part of the shipping CLI tool or public nuget library. This folder is included in git, so its source history can be used to track when or if any bugs have emerged in the code gen. +Important folders: * `LinqToXsd/` folder (one project) - - LinqToXsdCore is a command line tool ('LinqToXsd.csproj') that exposes code generation facilities, that is both .NET 6+ and .NET Framework compatible. This CLI tool should remain .NET 6+ and .NET Framework 4.8 compatible. Depends on `XObjectsCode`. -* `LinqToXsd.Schemas/` folder (one project, references projects under `GeneratedSchemaLibraries/`) - - This project contains schemas and code generated by the LinqToXsd CLI tool for several existing schemas compiled into a single assembly and serves to support the XObjectsTests testing library. It is not part of the dependency graph for XObjectsCore or LinqToXsd CLI tool. The `LinqToXsd.Schemas.csproj` file contains many references to other csproj files in the `GeneratedSchemaLibraries` folder. -* `Samples/` folder - - Contains some sample XSD files, but no C# code. Can ignore. + - LinqToXsdCore is a nuget-published command line tool ('LinqToXsd.csproj') that exposes code generation facilities, that is both .NET 6+ and .NET Framework compatible. This CLI tool should remain .NET 6+ and .NET Framework 4.8 compatible. It depends on `XObjectsCode`. * `XObjectsCode/` folder - - This contains the code generation project that enables most of the functionality of the LinqToXsd CLI tool. While a separate project, it is tightly linked to `XObjectsCore` as the generated code needs to call into the XObjectsCore API surface. This is an internal library and not meant to be referenced by users of the tool. + - Contains the code generation project that enables most of the functionality of the LinqToXsd CLI tool. While a separate project, it is tightly linked to `XObjectsCore` as the generated code needs to call into the XObjectsCore API surface. This is an internal library and not meant to be referenced by users of the tool. * `XObjectsCore/` folder - - Unlike others, this one contains the project that is published publicly on nuget.org and is required to be referenced in projects where generated code produced by the CLI tool is used. Because this project is publicly published, + - This contains the runtime project that is published publicly on nuget.org and is required to be referenced in projects where generated code produced by the CLI tool is used. Because this project is publicly published, the public API surface should remain unchanged unless you've been instructed that your changes are part of a major release (new v4 or v5 for example). Assume you're working on a minor release (v3.5, v3.6 etc.) unless told otherwise. * `XObjectsTests/` folder - - Contains all the test cases written in NUnit. Depends on LinqToXsd, XObjectsCode, XObjectsCore projects directly. Also depends on LinqToXsd.Schemas, which in turn brings in all the sample projects in the `GeneratedSchemaLibraries/` folder. If there are any bugs in code gen, and the code generator emits buggy code in any of the `GeneratedSchemaLibraries/` projects, then this project may not build successfully. + - Contains all the test cases written in NUnit. Write all your tests here. Depends on LinqToXsd, XObjectsCode, XObjectsCore projects directly. Also depends on LinqToXsd.Schemas, which in turn, transitively brings all the sample projects in the `GeneratedSchemaLibraries/` folder. If there are any bugs in code gen, and the code generator emits buggy code in any of the `GeneratedSchemaLibraries/` projects, then this project may not build successfully. Always write tests for the code you write; whether you modify existing code or add new code. -## Programming language guidelines +Not important folders: -- Always use .NET Standard 2.1 compatible APIs, favour async methods over sync ones. -- Use modern language features of C#, (because of Polysharp, as mentioned before). The `` element that controls the language version might differ in the `csproj` files inside the repository folders, so assume C# 12 as a minimum when there's inconsistency or that information is not known. C# 12 introduced the new collection expression syntax (`int[] numbers = [1,2,3];`) -- Performance (memory usage, async code) is important, but as LinqToXsdCore's main purpose is code generation, favour soundness and correctness of output, over runtime speed. -- If possible, use algorithms that are efficient in memory usage as LinqToXsdCore's code generation, by it's nature is susceptible to combinatorial explosion (in its code output) as a result of the type mapping that occurs. -- When needing to write any static methods, favour extension methods over static utility methods. One exception: use protected static methods inside the same class, when that static method is used by only one class. +* `GeneratedSchemaLibraries/` folder (multiple projects) + - Contains code generated by the LinqToXsd CLI tool and their original schemas purely for testing the code gen and runtime API. Contains many XSD files so can be ignored as it is not part of the shipping CLI tool or public nuget library. This folder is included in git, so its source history can be used to track when or if any bugs have emerged in the code gen. +* `LinqToXsd.Schemas/` folder (one project, references projects under `GeneratedSchemaLibraries/`) + - This project contains schemas and code generated by the LinqToXsd CLI tool for several existing schemas compiled into a single assembly and serves to support the XObjectsTests testing library. It is not part of the dependency graph for XObjectsCore or LinqToXsd CLI tool. The `LinqToXsd.Schemas.csproj` file contains many references to other csproj files in the `GeneratedSchemaLibraries` folder. +* `Samples/` folder + - Contains some sample XSD files. Can ignore. -# General C# Development +## Project language guidelines -- Follow the project's own conventions first, then common C# conventions. -- Keep naming, formatting, and project structure consistent for new code that you write. -- Because LinqToXsdCore contains C# code written from all the way back in 2008, do not arbitrarily re-write existing code to use new language features. This is to keep the git commit differences minimal, reducing the reading burden when users or other developers go back to compare commit and branch differences. - - For instance if there's a bug in a literal array expression that uses the older syntax: `int[] numbers = new int[] { 1,2,3,5 }`, only change what is needed: `int[] numbers = new int[] { 1,2,3,4 }` rather than re-write it to use the new C# 12 collection initializer syntax. - - For new code, default to using modern C# language syntax. +Follow the source code's conventions first, then project specific guidance listed below, then follow common C# conventions. The following are project-specific conventions: + +- Always stick to using .NET Standard 2.1 compatible APIs, favour async methods over sync ones. +- Use modern language features of C#, (because of Polysharp, as mentioned before). The `` element that controls the language version might differ in the `csproj` files inside the repository folders, so assume C# 12 as a minimum when there's inconsistency or that information is not known. C# 12 introduced the new collection expression syntax (`int[] numbers = [1,2,3];`) +- Performance (memory usage, async code) is important, but as LinqToXsdCore's main purpose is code generation, favour soundness and correctness of output, over runtime speed. +- If possible, use algorithms that are memory-efficient LinqToXsdCore's code generation by it's nature is susceptible to combinatorial explosion (in its code output) as a result of the type mapping that occurs. +- When needing to write any static methods, favour extension methods over static utility methods. One exception: use protected static methods inside the same class, when that static method is used only by that one class. +- Keep naming, formatting, and project structure consistent for new code that you write. If existing code is inconsistent, then follow the patterns in these instructions. +- Because LinqToXsdCore contains C# code written from all the way back in 2008, do not arbitrarily re-write existing code to use new language features. This is to keep the git commit differences minimal, reducing the reading burden when other developers go back to compare commit and branch differences. + - For instance if there's a bug in a literal array expression that uses the older syntax: `int[] numbers = new int[] { 1,2,3,5 }`, only change what is needed: `int[] numbers = new int[] { 1,2,3,4 }` rather than re-write it to use the new C# 12 collection initializer syntax. This makes it easier to discern when actual functionality has changed, and not just syntax sugar has been introduced. +- When writing new code for new features, use modern C# language features such as: `async`/`await`, primary class constructors (`class B(string fieldValue1, int fieldValue2) {}`), collection expressions `int[] numbers = [1,2,3];` etc. +- Apply SOLID principles where appropriate (single responsibility, open-closed principle, Liskov substitution principle, interface segregation, dependency inversion) + - Favour properties over fields, but do not refactor existing classes to use properties when public fields already exist. + - Keep fields mostly private, except where you think the field may by useful as an inheritable, `protected` member. + - Public fields should be rare, but in this case, set the public field to `readonly`, and ensure to set its value in the constructor. + - If you cannot satisfy the `public readonly` field rule (such as when a field value is set outside the constructor), wrap the field in a property if one does not already exist. ## Code Design Rules -- Do not add new interfaces or abstractions unless used for external dependencies or testing. +Definitions: 'Avoid' here means refers to a default position to take, when you are not instructed otherwise. + +- As there is no dependency injection used in this project, avoid creating new interfaces when creating classes. - Avoid wrapping existing abstractions, except in the following cases: - - You're needing to interface with existing CodeDOM-dependent code generation facilities and need to fill in the gaps due to CodeDOM limitations. Use the Roslyn C# compiler APIs to wrap CodeDOM generated code. -- Avoid using `public` as a visibility modifier on new methods. When unsure, default to internal. + - You're needing to interact with existing CodeDOM-dependent code generation facilities and need to fill in the gaps due to CodeDOM limitations. +- In the 'XObjectsCore' project, avoid creating new class members using `public` as a visibility modifier on new methods. Default to `internal`. - Keep names consistent; pick one style (e.g., `WithHostPort` or `WithBrowserPort`) and stick to it. -- Don't edit auto-generated code (`/api/*.cs`, `*.g.cs`, `// `). -- Comments explain **why**, not what. +- Don't edit auto-generated code (files whose extensions end with `*.g.cs`, or `*.xsd.cs`, or have top level comments that begin like `// `). +- Write comments that explain **why**, not what. - Don't add unused methods/params. - When fixing one method, check siblings for the same issue. -- Reuse existing methods as much as possible. +- Reuse existing extension methods as much as possible. - Add documentation comments when adding public methods. - Move user-facing strings (e.g., AnalyzeAndConfirmNuGetConfigChanges) into resource files. Keep error/help text localizable. @@ -223,4 +227,4 @@ bash - Avoid mocks/Fakes if possible as code generation functions rarely need mocks or fake data. Advise the user if sample XSD files might be required. - External dependencies can be mocked. Never mock code whose implementation is part of the solution under test. -- Try to verify that the outputs (e.g. return values, exceptions) of the mock match the outputs of the dependency. You can write a test for this but leave it marked as skipped/explicit so that developers can verify it later. +- Try to verify that the outputs (e.g. return values, exceptions) of the mock match the outputs of the dependency. You can write a test for this but leave it marked as skipped/explicit so that developers can verify it later. \ No newline at end of file diff --git a/LinqToXsdCore.sln b/LinqToXsdCore.sln index 1b1df9b..f642744 100644 --- a/LinqToXsdCore.sln +++ b/LinqToXsdCore.sln @@ -14,6 +14,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution .gitignore = .gitignore azure-pipelines.yml = azure-pipelines.yml global.json = global.json + .github\agents\copilot-instructions.md = .github\agents\copilot-instructions.md RELEASENOTES.md = RELEASENOTES.md Version.props = Version.props _config.yml = _config.yml From 2fb13a9f32dce52d447786d4871b741473d039a5 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Sun, 23 Nov 2025 20:30:31 +1000 Subject: [PATCH 014/107] Shortened copilot instructions. --- .github/agents/copilot-instructions.md | 95 +++----------------------- 1 file changed, 10 insertions(+), 85 deletions(-) diff --git a/.github/agents/copilot-instructions.md b/.github/agents/copilot-instructions.md index 28aaf99..57586ef 100644 --- a/.github/agents/copilot-instructions.md +++ b/.github/agents/copilot-instructions.md @@ -78,57 +78,19 @@ Definitions: 'Avoid' here means refers to a default position to take, when you a - When fixing one method, check siblings for the same issue. - Reuse existing extension methods as much as possible. - Add documentation comments when adding public methods. -- Move user-facing strings (e.g., AnalyzeAndConfirmNuGetConfigChanges) into resource files. Keep error/help text localizable. ## Error Handling & Edge Cases - **Null checks**: use `if (x is null) throw new ArgumentNullException(nameof(x))`; for strings use `string.IsNullOrWhiteSpace(x)`; guard early. Avoid blanket use of null assertion operator `x!`. - **Exceptions**: choose precise types (e.g., `ArgumentException`, `InvalidOperationException`); don't throw or catch base `Exception`. - **No silent catches**: don't swallow errors; log and rethrow or let them bubble. -## Goals for .NET Applications - -Do not let these below instructions override project-specific guidance above. Care has been taken to ensure they do not contradict LinqToXsdCore-specific guidance, but as multiple developers work on this project, over time, they may be inconsistent. Favour the project-specific guidance. - -### Productivity -- Prefer modern C# (file-scoped `namespace`s, multiline `"""` strings, `switch` expressions, ranges/indices, `async` streams) when TFM or `` inside a `csproj` allows. Assume C# 12 if not known. -- Keep diffs small; reuse code; avoid new layers unless needed. -- Be IDE-friendly (go-to-def, rename, quick fixes work). - -### Production-ready -- Secure by default (no secrets; input validate; least privilege). -- Resilient I/O (timeouts; retry with backoff when it fits). -- Structured logging with scopes; useful context; no log spam. -- Use precise exceptions; don’t swallow; keep cause/context. - -### Performance -- Simple first; optimize hot paths when measured. -- Prefer `async` methods, but if there is existing sync code, do not arbitrarily re-write as converting to `async` requires awaiting up (and sometimes down) the entire call stack. - -### Cloud-native / cloud-ready -- Cross-platform; guard OS-specific APIs. -- Diagnostics: health/ready when it fits; metrics + traces. -- Observability: ILogger + OpenTelemetry hooks. -- 12-factor: config from env; avoid stateful singletons. - -# .NET quick checklist - -## Do first - -* Read TFM + C# version. -* Check `global.json` SDK. - ## Initial check -* App type: web / desktop / console / lib. -* Packages (and multi-targeting). +* LinqToXsdCore comprises of one CLI project and the rest are libraries. +* Two projects generate public packages: LinqToXsd (the CLI tool) and XObjectsCore (the runtime library). * Nullable on? (`enable` / `#nullable enable`) * Repo config: `Directory.Build.*`, `Directory.Packages.props`. -## C# version - -* **Don't** set C# newer than TFM default. -* C# 14 (NET 10+): extension members; `field` accessor; implicit `Span` conv; `?.=`; `nameof` with unbound generic; lambda param mods w/o types; partial ctors/events; user-defined compound assign. - ## Build * .NET 5+: `dotnet build`, `dotnet publish`. @@ -139,27 +101,11 @@ Do not let these below instructions override project-specific guidance above. Ca * Always compile or check docs first if there is unfamiliar syntax. Don't try to correct the syntax if code can compile. * Don't change TFM, SDK, or `` unless asked. -# Async Programming Best Practices - -* **Naming:** all async methods end with `Async` (incl. CLI handlers). -* **Always await:** no fire-and-forget; if timing out, **cancel the work**. -* **Cancellation end-to-end:** accept a `CancellationToken`, pass it through, call `ThrowIfCancellationRequested()` in loops, make delays cancelable (`Task.Delay(ms, ct)`). -* **Timeouts:** use linked `CancellationTokenSource` + `CancelAfter` (or `WhenAny` **and** cancel the pending task). -* **Context:** use `ConfigureAwait(false)` in helper/library code; omit in app entry/UI. -* **Stream JSON:** `GetAsync(..., ResponseHeadersRead)` → `ReadAsStreamAsync` → `JsonDocument.ParseAsync`; avoid `ReadAsStringAsync` when large. -* **Exit code on cancel:** return non-zero (e.g., `130`). -* **`ValueTask`:** use only when measured to help; default to `Task`. -* **Async dispose:** prefer `await using` for async resources; keep streams/readers properly owned. -* **No pointless wrappers:** don’t add `async/await` if you just return the task. - -## Immutability -- Prefer records to classes for DTOs. - # Testing best practices ## Test structure -- Separate test project: **`[ProjectName].Tests`**. +- Write tests in dedicated separate test project: **`XObjectsTests`** for both the code gen (XObjectsCodeGen) and runtime library (XObjectsCore). - Mirror classes: `CatDoor` -> `CatDoorTests`. - Name tests by behavior: `WhenCatMeowsThenCatDoorOpens`. - Follow existing naming conventions. @@ -176,11 +122,13 @@ Do not let these below instructions override project-specific guidance above. Ca - When testing multiple preconditions, write a test for each. - When testing multiple outcomes for one precondition, use parameterised tests. - Tests should be able to run in any order or in parallel. -- Avoid disk I/O; if needed, randomize paths, don't clean up, log file locations. -- Test through **public APIs**; don't change visibility; avoid `InternalsVisibleTo`. +- Avoid disk I/O; if needed, randomize paths, clean up, log file locations. +- Test through **public APIs**; don't change visibility; it's OK to use `InternalsVisibleTo`. - Require tests for new/changed **public APIs**. - Assert specific values and edge cases, not vague outcomes. +Do not bother with code coverage for now. + ## Test workflow ### Run Test Command @@ -188,29 +136,9 @@ Do not let these below instructions override project-specific guidance above. Ca - .NET Framework: May use `vstest.console.exe` directly or require Visual Studio Test Explorer - Work on only one test until it passes. Then run other tests to ensure nothing has been broken. -### Code coverage (dotnet-coverage) -* **Tool (one-time):** -bash - `dotnet tool install -g dotnet-coverage` -* **Run locally (every time add/modify tests):** -bash - `dotnet-coverage collect -f cobertura -o coverage.cobertura.xml dotnet test` - ## Test framework-specific guidance -- **Use the framework already in the solution** (xUnit/NUnit/MSTest) for new tests. - -### xUnit - -* Packages: `Microsoft.NET.Test.Sdk`, `xunit`, `xunit.runner.visualstudio` -* No class attribute; use `[Fact]` -* Parameterised tests: `[Theory]` with `[InlineData]` -* Setup/teardown: constructor and `IDisposable` - -### xUnit v3 - -* Packages: `xunit.v3`, `xunit.runner.visualstudio` 3.x, `Microsoft.NET.Test.Sdk` -* `ITestOutputHelper` and `[Theory]` are in `Xunit` +- **Use the framework already in the solution** (NUnit) for new tests. ### NUnit @@ -220,11 +148,8 @@ bash ### Assertions -* Use the framework’s asserts, in the same style as existing unit tests. There may also be existing helper methods for unit testing. Please consider and avail yourself of them before writing new hepler methods. -* Use `Throws/ThrowsAsync` for exceptions. +* Use the framework’s asserts, in the same style as existing unit tests. There may also be existing helper methods for unit testing. Please consider and avail yourself of them before writing new hepler methods for tests. ## Mocking -- Avoid mocks/Fakes if possible as code generation functions rarely need mocks or fake data. Advise the user if sample XSD files might be required. -- External dependencies can be mocked. Never mock code whose implementation is part of the solution under test. -- Try to verify that the outputs (e.g. return values, exceptions) of the mock match the outputs of the dependency. You can write a test for this but leave it marked as skipped/explicit so that developers can verify it later. \ No newline at end of file +- Avoid mocks/fakes if possible as there are lots of existing XSD files for testing code generation. Advise the user if sample XSD files might be required. \ No newline at end of file From 2bba33cc11006d3a9e048e0c57f070d542ceec5b Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Sun, 23 Nov 2025 20:30:31 +1000 Subject: [PATCH 015/107] Made test var names more clear. --- XObjectsTests/CodeGenerationTests.cs | 30 ++++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/XObjectsTests/CodeGenerationTests.cs b/XObjectsTests/CodeGenerationTests.cs index a71de2b..acfbe62 100644 --- a/XObjectsTests/CodeGenerationTests.cs +++ b/XObjectsTests/CodeGenerationTests.cs @@ -412,33 +412,33 @@ public void ValidatorSubTypesExist() { var atomXsdFileInfo = new MockFileInfo(AllTestFiles, AtomXsdFilePath); - var tree1 = Utilities.GenerateSyntaxTree(atomXsdFileInfo, AllTestFiles); - var ns1 = tree1.GetNamespaceRoot(); - ns1 = ns1.CleanForComparison(); + var newTree = Utilities.GenerateSyntaxTree(atomXsdFileInfo, AllTestFiles); + var newNs = newTree.GetNamespaceRoot(); + newNs = newNs.CleanForComparison(); var existingAtomCode = "..\\..\\..\\..\\GeneratedSchemaLibraries\\Atom\\atom.xsd.cs"; - var tree2 = new FileInfo(existingAtomCode).ToSyntaxTree(); - var ns2 = tree2.GetNamespaceRoot(); - ns2 = ns2.CleanForComparison(); + var treeFromExisting = new FileInfo(existingAtomCode).ToSyntaxTree(); + var existingNs = treeFromExisting.GetNamespaceRoot(); + existingNs = existingNs.CleanForComparison(); - var types1 = ns1.Members.OfType().ToList(); - var subtypes1 = (from t1 in types1 + var newTypes = newNs.Members.OfType().ToList(); + var newSubTypes = (from t1 in newTypes from tt1 in t1.Members.OfType() select tt1).ToList(); - var types2 = ns2.Members.OfType().ToList(); - var subtypes2 = (from t2 in types2 + var existingTypes = existingNs.Members.OfType().ToList(); + var existingSubtypes = (from t2 in existingTypes from tt2 in t2.Members.OfType() select tt2).ToList(); - Assert.AreEqual(types1.Count, types2.Count); + Assert.AreEqual(newTypes.Count, existingTypes.Count); - Assert.IsNotEmpty(subtypes1); - Assert.IsNotNull(subtypes1.SingleOrDefault()); + Assert.IsNotEmpty(newSubTypes); + Assert.IsNotNull(newSubTypes.SingleOrDefault()); - Assert.IsNotEmpty(subtypes2); - Assert.IsNotNull(subtypes2.SingleOrDefault()); + Assert.IsNotEmpty(existingSubtypes); + Assert.IsNotNull(existingSubtypes.SingleOrDefault()); } } } \ No newline at end of file From cf6886641c59176b21bf331a0513b349fab8d5c1 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Sun, 23 Nov 2025 20:30:32 +1000 Subject: [PATCH 016/107] Updated test and added more helper test extension methods. --- XObjectsTests/BaseTester.cs | 4 + XObjectsTests/CodeGenerationTests.cs | 36 ++++-- .../Extensions/DirectoryExtensions.cs | 115 ++++++++++++++++++ XObjectsTests/Extensions/StringExtensions.cs | 11 ++ XObjectsTests/Utilities.cs | 2 - 5 files changed, 155 insertions(+), 13 deletions(-) create mode 100644 XObjectsTests/Extensions/DirectoryExtensions.cs create mode 100644 XObjectsTests/Extensions/StringExtensions.cs diff --git a/XObjectsTests/BaseTester.cs b/XObjectsTests/BaseTester.cs index 787e018..50b0040 100644 --- a/XObjectsTests/BaseTester.cs +++ b/XObjectsTests/BaseTester.cs @@ -15,6 +15,10 @@ public class BaseTester public List TestAssembliesLoaded { get; protected set; } = null!; public MockFileSystem AllTestFiles { get; protected set; } = null!; + /// + /// This setup method will tee-up some helpful reference data that are used in testing the code gen output. + /// It will filter out assemblies that are not relevant for . + /// [SetUp] public void Setup() { diff --git a/XObjectsTests/CodeGenerationTests.cs b/XObjectsTests/CodeGenerationTests.cs index acfbe62..1da922d 100644 --- a/XObjectsTests/CodeGenerationTests.cs +++ b/XObjectsTests/CodeGenerationTests.cs @@ -5,6 +5,7 @@ using System.IO.Abstractions; using System.IO.Abstractions.TestingHelpers; using System.Linq; +using System.Text; using System.Text.RegularExpressions; using System.Xml; using Microsoft.CodeAnalysis; @@ -347,8 +348,8 @@ public void CompareFieldSummariesForEntireNamespaces() { var directoryName = Path.GetDirectoryName(existingAtomCode); var fileName = Path.GetFileNameWithoutExtension(existingAtomCode); - // save the new one for comparison - var filePath = Path.Combine(directoryName, fileName + "2.csx"); + // save the new one for comparison; file ext is csv to prevent hot reload from triggering during test debug + var filePath = Path.Combine(directoryName, fileName + ".2.csx"); ns1.WriteToFile(filePath); ns2.WriteToFile(existingAtomCode); } @@ -360,36 +361,49 @@ public void CompareFieldSummariesForEntireNamespaces() var allFieldAttrs2 = ns2.GetAllFieldDescendantAttributes(); var attrsAndFields1 = SummariseFields(allFieldAttrs1); - var attrsAndFields2 = SummariseFields(allFieldAttrs2); - var grouped1 = (from af in attrsAndFields1 + var groupedFields1 = (from af in attrsAndFields1 group af by af.FieldName into afGroup orderby afGroup.Key select afGroup).ToList(); - var grouped2 = (from af in attrsAndFields2 + var groupedFields2 = (from af in attrsAndFields2 group af by af.FieldName into afGroup orderby afGroup.Key select afGroup).ToList(); - var counts1 = grouped1.Select(g => new { g.Key, Count = g.Count() }).ToList(); - var counts2 = grouped2.Select(g => new { g.Key, Count = g.Count() }).ToList(); + var fieldCounts1 = groupedFields1.Select(g => new { g.Key, Count = g.Count() }).ToList(); + var fieldCounts2 = groupedFields2.Select(g => new { g.Key, Count = g.Count() }).ToList(); - var regrouped1 = from af in grouped1.Where(g => g.Key == "DebuggerBrowsable") + var regrouped1 = from af in groupedFields1.Where(g => g.Key == "DebuggerBrowsable") .SelectMany(g => g) group af by af.FieldName into faf select faf; - var regrouped2 = from af in grouped1.Where(g => g.Key == "DebuggerBrowsable") + var regrouped2 = from af in groupedFields1.Where(g => g.Key == "DebuggerBrowsable") .SelectMany(g => g) group af by af.FieldName into faf select faf; - var compareCounts = counts1.CompareObjects(counts2); + var compareCounts = fieldCounts1.CompareObjects(fieldCounts2); + // test failure, but we need intelligent error messages at this point + if (compareCounts.Any()) { + var sb = new StringBuilder(); + foreach (var compare in compareCounts) { + var memberIndex = compare.MemberPath.StripToDigits().ParseInt(); + var theMember1 = fieldCounts1[memberIndex!.Value]; + var theMember2 = fieldCounts2[memberIndex!.Value!]; + Assert.AreEqual(theMember2.Key, theMember1.Key); + sb.AppendLine($"FieldName: {theMember1.Key}, Count1: {theMember1.Count}, Count2: {theMember2.Count}"); + } + + Assert.Fail("Mismatch between field counts! " + Environment.NewLine + sb + Environment.NewLine); + } + Assert.IsEmpty(compareCounts); - var compareFields = grouped1.CompareObjects(grouped2); + var compareFields = groupedFields1.CompareObjects(groupedFields2); Assert.IsEmpty(compareFields); diff --git a/XObjectsTests/Extensions/DirectoryExtensions.cs b/XObjectsTests/Extensions/DirectoryExtensions.cs new file mode 100644 index 0000000..baadd55 --- /dev/null +++ b/XObjectsTests/Extensions/DirectoryExtensions.cs @@ -0,0 +1,115 @@ +#nullable enable +using System; +using System.IO; + +namespace Xml.Schema.Linq.Tests.Extensions; + +public static class DirectoryExtensions +{ + /// + /// Traverses upward from the starting directory until a directory whose name matches ancestorFolderName is found. + /// Returns a new DirectoryInfo for that ancestor. Throws if not found. + /// + /// + /// var start = new DirectoryInfo(@"C:\Projects\GitHub\LinqToXsdCore\GeneratedSchemaLibraries\Atom\bin\Debug\netstandard2.0"); + /// var ancestor = DirectoryUtilities.AscendToFolder(start, "GeneratedSchemaLibraries"); + /// + /// The directory to start from. + /// The name of the ancestor folder to locate (case-insensitive on Windows). + /// DirectoryInfo of the ancestor folder. + /// + /// + /// + public static DirectoryInfo AscendToFolder(DirectoryInfo startingDirectory, string ancestorFolderName) + { + if (startingDirectory == null) throw new ArgumentNullException(nameof(startingDirectory)); + if (string.IsNullOrWhiteSpace(ancestorFolderName)) throw new ArgumentException("Folder name must be supplied.", nameof(ancestorFolderName)); + + var current = startingDirectory; + while (current != null) + { + if (string.Equals(current.Name, ancestorFolderName, StringComparison.OrdinalIgnoreCase)) + { + // Return a fresh instance (optional; current itself would also be fine). + return new DirectoryInfo(current.FullName); + } + current = current.Parent; + } + + throw new DirectoryNotFoundException( + $"Ancestor folder '{ancestorFolderName}' was not found starting from '{startingDirectory.FullName}'."); + } + + /// + /// Traverses downward (depth-first) from startingDirectory looking for a descendant folder + /// whose name matches descendantFolderName (case-insensitive). Returns a new DirectoryInfo if found. + /// Throws InvalidOperationException if there are no subdirectories to search. Throws DirectoryNotFoundException if not found. + /// + /// + /// var start = new DirectoryInfo(@"C:\Projects\GitHub\LinqToXsdCore"); + /// var descendant = DirectoryExtensions.DescendToFolder(start, "GeneratedSchemaLibraries"); + /// + /// Root directory to begin the descent. + /// Target descendant directory name. + /// DirectoryInfo of the matching descendant. + /// + /// + /// Thrown when startingDirectory has no subdirectories. + /// Thrown when the descendant folder is not found. + public static DirectoryInfo DescendToFolder(DirectoryInfo startingDirectory, string descendantFolderName) + { + if (startingDirectory == null) throw new ArgumentNullException(nameof(startingDirectory)); + if (string.IsNullOrWhiteSpace(descendantFolderName)) throw new ArgumentException("Folder name must be supplied.", nameof(descendantFolderName)); + if (!startingDirectory.Exists) throw new DirectoryNotFoundException($"Starting directory does not exist: '{startingDirectory.FullName}'."); + + // Quick check for absence of any subdirectories. + using (var enumerator = startingDirectory.EnumerateDirectories().GetEnumerator()) + { + if (!enumerator.MoveNext()) + { + throw new InvalidOperationException($"Directory '{startingDirectory.FullName}' has no subdirectories to descend into."); + } + } + + DirectoryInfo? result = DepthFirst(startingDirectory, descendantFolderName); + if (result == null) + { + throw new DirectoryNotFoundException( + $"Descendant folder '{descendantFolderName}' was not found below '{startingDirectory.FullName}'."); + } + + return result; + + static DirectoryInfo? DepthFirst(DirectoryInfo current, string targetName) + { + foreach (var dir in SafeEnumerateDirectories(current)) + { + if (string.Equals(dir.Name, targetName, StringComparison.OrdinalIgnoreCase)) + { + return new DirectoryInfo(dir.FullName); + } + + var deeper = DepthFirst(dir, targetName); + if (deeper != null) return deeper; + } + return null; + } + + static DirectoryInfo[] SafeEnumerateDirectories(DirectoryInfo directory) + { + try + { + return directory.GetDirectories(); + } + catch (UnauthorizedAccessException) + { + // Skip directories we cannot access. + return Array.Empty(); + } + catch (DirectoryNotFoundException) + { + return Array.Empty(); + } + } + } +} \ No newline at end of file diff --git a/XObjectsTests/Extensions/StringExtensions.cs b/XObjectsTests/Extensions/StringExtensions.cs new file mode 100644 index 0000000..dce17ab --- /dev/null +++ b/XObjectsTests/Extensions/StringExtensions.cs @@ -0,0 +1,11 @@ +using System.Linq; + +namespace Xml.Schema.Linq.Tests.Extensions; + +public static class StringExtensions +{ + public static string StripToDigits(this string str) + { + return new string(str.Where(char.IsDigit).ToArray()); + } +} \ No newline at end of file diff --git a/XObjectsTests/Utilities.cs b/XObjectsTests/Utilities.cs index 29c4c7f..e9ae892 100644 --- a/XObjectsTests/Utilities.cs +++ b/XObjectsTests/Utilities.cs @@ -87,7 +87,6 @@ where filesReferredToInImportAndIncludeElements.Any(file => { return theXDocsReferencedByImportOrInclude.ToDictionary(key => key.Key, kvp => kvp.Value); } - public static List ResolveFileAndFolderPathsToMockFileInfos(MockFileSystem mfs, IEnumerable sequenceOfFileAndOrFolderPaths, string filter = "*.*") { @@ -106,7 +105,6 @@ public static List ResolveFileAndFolderPathsToMockFileInfos(MockFileS return files; } - public static List ResolvePossibleFileAndFolderPathsToProcessableSchemas(MockFileSystem mfs, IEnumerable filesOrFolders) { From b7f65d41ff50b263581c19e75ab40852731c655c Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Sun, 23 Nov 2025 20:30:32 +1000 Subject: [PATCH 017/107] Updated instructions again. Fixed omission in AscendToFolder method. --- .github/agents/copilot-instructions.md | 1 + .../Extensions/DirectoryExtensions.cs | 51 ++++++++++--------- 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/.github/agents/copilot-instructions.md b/.github/agents/copilot-instructions.md index 57586ef..7c61f64 100644 --- a/.github/agents/copilot-instructions.md +++ b/.github/agents/copilot-instructions.md @@ -12,6 +12,7 @@ General guidelines to follow: - Do not arbitrarily re-write existing code. - Write tests using the NUnit API. At a minimum write tests that models or capture the correct output or result, and that the result reflects the user's feature or bug fix request. - Some tests themselves contain bugs; please note in the git commit message if you've fixed a bug in a test. +- Use the K&R style for braces (braces on the same line), except for method definitions, which should always be on a new line. # Specific LinqToXsdCore project guidance diff --git a/XObjectsTests/Extensions/DirectoryExtensions.cs b/XObjectsTests/Extensions/DirectoryExtensions.cs index baadd55..3f01058 100644 --- a/XObjectsTests/Extensions/DirectoryExtensions.cs +++ b/XObjectsTests/Extensions/DirectoryExtensions.cs @@ -1,6 +1,8 @@ #nullable enable using System; using System.IO; +using System.Linq; +using tr = W3C.XMLSpec.tr; namespace Xml.Schema.Linq.Tests.Extensions; @@ -20,19 +22,21 @@ public static class DirectoryExtensions /// /// /// - public static DirectoryInfo AscendToFolder(DirectoryInfo startingDirectory, string ancestorFolderName) + public static DirectoryInfo AscendToFolder(this DirectoryInfo startingDirectory, string ancestorFolderName) { if (startingDirectory == null) throw new ArgumentNullException(nameof(startingDirectory)); if (string.IsNullOrWhiteSpace(ancestorFolderName)) throw new ArgumentException("Folder name must be supplied.", nameof(ancestorFolderName)); var current = startingDirectory; - while (current != null) - { - if (string.Equals(current.Name, ancestorFolderName, StringComparison.OrdinalIgnoreCase)) - { + while (current != null) { + if (string.Equals(current.Name, ancestorFolderName, StringComparison.OrdinalIgnoreCase)) { // Return a fresh instance (optional; current itself would also be fine). return new DirectoryInfo(current.FullName); } + var possibleExistingAtCurrentLevelAsSubdirs = current.EnumerateDirectories(ancestorFolderName).ToList(); + if (possibleExistingAtCurrentLevelAsSubdirs.Any()) { + return possibleExistingAtCurrentLevelAsSubdirs.Single(e => e.Name == ancestorFolderName); + } current = current.Parent; } @@ -56,24 +60,21 @@ public static DirectoryInfo AscendToFolder(DirectoryInfo startingDirectory, stri /// /// Thrown when startingDirectory has no subdirectories. /// Thrown when the descendant folder is not found. - public static DirectoryInfo DescendToFolder(DirectoryInfo startingDirectory, string descendantFolderName) + public static DirectoryInfo DescendToFolder(this DirectoryInfo startingDirectory, string descendantFolderName) { if (startingDirectory == null) throw new ArgumentNullException(nameof(startingDirectory)); if (string.IsNullOrWhiteSpace(descendantFolderName)) throw new ArgumentException("Folder name must be supplied.", nameof(descendantFolderName)); if (!startingDirectory.Exists) throw new DirectoryNotFoundException($"Starting directory does not exist: '{startingDirectory.FullName}'."); // Quick check for absence of any subdirectories. - using (var enumerator = startingDirectory.EnumerateDirectories().GetEnumerator()) - { - if (!enumerator.MoveNext()) - { + using (var enumerator = startingDirectory.EnumerateDirectories().GetEnumerator()) { + if (!enumerator.MoveNext()) { throw new InvalidOperationException($"Directory '{startingDirectory.FullName}' has no subdirectories to descend into."); } } DirectoryInfo? result = DepthFirst(startingDirectory, descendantFolderName); - if (result == null) - { + if (result == null) { throw new DirectoryNotFoundException( $"Descendant folder '{descendantFolderName}' was not found below '{startingDirectory.FullName}'."); } @@ -82,10 +83,8 @@ public static DirectoryInfo DescendToFolder(DirectoryInfo startingDirectory, str static DirectoryInfo? DepthFirst(DirectoryInfo current, string targetName) { - foreach (var dir in SafeEnumerateDirectories(current)) - { - if (string.Equals(dir.Name, targetName, StringComparison.OrdinalIgnoreCase)) - { + foreach (var dir in SafeEnumerateDirectories(current)) { + if (string.Equals(dir.Name, targetName, StringComparison.OrdinalIgnoreCase)) { return new DirectoryInfo(dir.FullName); } @@ -97,19 +96,21 @@ public static DirectoryInfo DescendToFolder(DirectoryInfo startingDirectory, str static DirectoryInfo[] SafeEnumerateDirectories(DirectoryInfo directory) { - try - { + try { return directory.GetDirectories(); - } - catch (UnauthorizedAccessException) - { + } catch (UnauthorizedAccessException) { // Skip directories we cannot access. return Array.Empty(); - } - catch (DirectoryNotFoundException) - { + } catch (DirectoryNotFoundException) { return Array.Empty(); } } } -} \ No newline at end of file + + public static FileInfo FindFileRecursively(this DirectoryInfo dir, string fileName) + { + return dir.GetFiles(fileName, new EnumerationOptions() { + RecurseSubdirectories = true + }).Single(); + } +} From 99e943df5c65b906ae644d2417fea82d5c5c6703 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Sun, 23 Nov 2025 20:30:32 +1000 Subject: [PATCH 018/107] Updated tests with more intelligent file path finding logic; added more error messages on test failure. --- XObjectsTests/CodeGenerationTests.cs | 31 ++++++++++++------- .../Extensions/DirectoryExtensions.cs | 8 +++++ 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/XObjectsTests/CodeGenerationTests.cs b/XObjectsTests/CodeGenerationTests.cs index 1da922d..b3cd5d2 100644 --- a/XObjectsTests/CodeGenerationTests.cs +++ b/XObjectsTests/CodeGenerationTests.cs @@ -339,19 +339,21 @@ public void CompareFieldSummariesForEntireNamespaces() var ns1 = tree1.GetNamespaceRoot(); ns1 = ns1.CleanForComparison(); - var existingAtomCode = "..\\..\\..\\..\\GeneratedSchemaLibraries\\Atom\\atom.xsd.cs"; - - var tree2 = new FileInfo(existingAtomCode).ToSyntaxTree(); + var existingCodeFile = "atom.xsd.cs"; + var existingAtomCode = Environment.CurrentDirectory + .AscendToFolder("GeneratedSchemaLibraries").DescendToFolder("Atom").FindFileRecursively(existingCodeFile); + + var tree2 = existingAtomCode.ToSyntaxTree(); var ns2 = tree2.GetNamespaceRoot(); ns2 = ns2.CleanForComparison(); { - var directoryName = Path.GetDirectoryName(existingAtomCode); - var fileName = Path.GetFileNameWithoutExtension(existingAtomCode); + var directoryName = Path.GetDirectoryName(existingAtomCode.FullName); + var fileName = Path.GetFileNameWithoutExtension(existingAtomCode.FullName); // save the new one for comparison; file ext is csv to prevent hot reload from triggering during test debug - var filePath = Path.Combine(directoryName, fileName + ".2.csx"); - ns1.WriteToFile(filePath); - ns2.WriteToFile(existingAtomCode); + var comparisonFilePath = Path.Combine(directoryName!, fileName + ".2.csx"); + ns1.WriteToFile(comparisonFilePath); + ns2.WriteToFile(existingAtomCode.FullName); } Assert.IsEmpty(ns1.CompareProperties(ns2)); @@ -430,9 +432,13 @@ public void ValidatorSubTypesExist() var newNs = newTree.GetNamespaceRoot(); newNs = newNs.CleanForComparison(); - var existingAtomCode = "..\\..\\..\\..\\GeneratedSchemaLibraries\\Atom\\atom.xsd.cs"; - - var treeFromExisting = new FileInfo(existingAtomCode).ToSyntaxTree(); + var existingCodeFile = "atom.xsd.cs"; + var existingAtomCsFilePath = new DirectoryInfo(Environment.CurrentDirectory) + .AscendToFolder("GeneratedSchemaLibraries").DescendToFolder("Atom").FindFileRecursively(existingCodeFile); + + Assert.True(existingAtomCsFilePath.Exists, $"Can't find existing code generated for file: '{existingCodeFile}'"); + + var treeFromExisting = existingAtomCsFilePath.ToSyntaxTree(); var existingNs = treeFromExisting.GetNamespaceRoot(); existingNs = existingNs.CleanForComparison(); @@ -446,7 +452,8 @@ from tt1 in t1.Members.OfType() from tt2 in t2.Members.OfType() select tt2).ToList(); - Assert.AreEqual(newTypes.Count, existingTypes.Count); + Assert.AreEqual(newTypes.Count, existingTypes.Count, + $"Type count mismatch between new code and existing code! New count: {newTypes.Count}, Existing count: {existingTypes.Count}"); Assert.IsNotEmpty(newSubTypes); Assert.IsNotNull(newSubTypes.SingleOrDefault()); diff --git a/XObjectsTests/Extensions/DirectoryExtensions.cs b/XObjectsTests/Extensions/DirectoryExtensions.cs index 3f01058..38526c8 100644 --- a/XObjectsTests/Extensions/DirectoryExtensions.cs +++ b/XObjectsTests/Extensions/DirectoryExtensions.cs @@ -43,6 +43,14 @@ public static DirectoryInfo AscendToFolder(this DirectoryInfo startingDirectory, throw new DirectoryNotFoundException( $"Ancestor folder '{ancestorFolderName}' was not found starting from '{startingDirectory.FullName}'."); } + + public static DirectoryInfo AscendToFolder(this string startingDirPath, string ancestorFolderName) + { + if (string.IsNullOrEmpty(startingDirPath)) throw new ArgumentNullException(nameof(startingDirPath)); + + var startingDirectory = new DirectoryInfo(startingDirPath); + return startingDirectory.AscendToFolder(ancestorFolderName); + } /// /// Traverses downward (depth-first) from startingDirectory looking for a descendant folder From 313740f8e411622162e30b468879a33df58d46e2 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Sun, 23 Nov 2025 20:30:32 +1000 Subject: [PATCH 019/107] Added individual XSD feature test files. --- .../Elements/ElementsTests.xsd | 30 + .../Elements/ElementsTests.xsd.config | 13 + .../Elements/ElementsTests.xsd.cs | 757 +++++ .../Elements/ElementsWithComplexTypes.xsd | 43 + .../ElementsWithComplexTypes.xsd.config | 13 + .../Elements/ElementsWithComplexTypes.xsd.cs | 1136 ++++++++ .../Elements/ElementsWithTypes.xsd | 81 + .../Elements/ElementsWithTypes.xsd.config | 13 + .../Elements/ElementsWithTypes.xsd.cs | 1955 +++++++++++++ .../ElementsWithTypesSimpleDerived.xsd | 104 + .../ElementsWithTypesSimpleDerived.xsd.config | 14 + .../ElementsWithTypesSimpleDerived.xsd.cs | 2459 +++++++++++++++++ 12 files changed, 6618 insertions(+) create mode 100644 LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsTests.xsd create mode 100644 LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsTests.xsd.config create mode 100644 LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsTests.xsd.cs create mode 100644 LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsWithComplexTypes.xsd create mode 100644 LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsWithComplexTypes.xsd.config create mode 100644 LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsWithComplexTypes.xsd.cs create mode 100644 LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsWithTypes.xsd create mode 100644 LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsWithTypes.xsd.config create mode 100644 LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsWithTypes.xsd.cs create mode 100644 LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsWithTypesSimpleDerived.xsd create mode 100644 LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsWithTypesSimpleDerived.xsd.config create mode 100644 LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsWithTypesSimpleDerived.xsd.cs diff --git a/LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsTests.xsd b/LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsTests.xsd new file mode 100644 index 0000000..464e169 --- /dev/null +++ b/LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsTests.xsd @@ -0,0 +1,30 @@ + + + + + Basic XSD that tests global elemnts, and the 3 compositors: all, sequence and choice. NO types. + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsTests.xsd.config b/LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsTests.xsd.config new file mode 100644 index 0000000..1dd38c5 --- /dev/null +++ b/LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsTests.xsd.config @@ -0,0 +1,13 @@ + + + + + + false + + false + + + + + \ No newline at end of file diff --git a/LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsTests.xsd.cs b/LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsTests.xsd.cs new file mode 100644 index 0000000..15cd228 --- /dev/null +++ b/LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsTests.xsd.cs @@ -0,0 +1,757 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace urn.linqtoxsd.schemas.elementtests { + using System; + using System.Collections; + using System.Collections.Generic; + using System.ComponentModel; + using System.IO; + using System.Linq; + using System.Diagnostics; + using System.Xml; + using System.Xml.Schema; + using System.Xml.Linq; + using Xml.Schema.Linq; + + + /// + /// + /// Regular expression: (allLocalChildElement) + /// + /// + public partial class globalElement1 : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static globalElement1 Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static globalElement1 Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static globalElement1 Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator globalElement1(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + /// + /// + /// Regular expression: (allLocalChildElement) + /// + /// + public globalElement1() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalChildElementXName = System.Xml.Linq.XName.Get("allLocalChildElement", "urn:linqtoxsd.schemas.elementtests"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalChildElement) + /// + /// + public virtual XTypedElement allLocalChildElement { + get { + XElement x = this.GetElement(allLocalChildElementXName); + return ((XTypedElement)(x)); + } + set { + this.SetElement(allLocalChildElementXName, value); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("globalElement1", "urn:linqtoxsd.schemas.elementtests"); + + static globalElement1() { + BuildElementDictionary(); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static Dictionary localElementDictionary = new Dictionary(); + + private static void BuildElementDictionary() { + localElementDictionary.Add(allLocalChildElementXName, typeof(XTypedElement)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + Dictionary IXMetaData.LocalElementsDictionary { + get { + return localElementDictionary; + } + } + + ContentModelEntity IXMetaData.GetContentModel() { + return ContentModelEntity.Default; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + /// + /// + /// Regular expression: (sequenceLocalChildElement) + /// + /// + public partial class globalElement2 : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static globalElement2 Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static globalElement2 Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static globalElement2 Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator globalElement2(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + /// + /// + /// Regular expression: (sequenceLocalChildElement) + /// + /// + public globalElement2() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalChildElementXName = System.Xml.Linq.XName.Get("sequenceLocalChildElement", "urn:linqtoxsd.schemas.elementtests"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalChildElement) + /// + /// + public virtual XTypedElement sequenceLocalChildElement { + get { + XElement x = this.GetElement(sequenceLocalChildElementXName); + return ((XTypedElement)(x)); + } + set { + this.SetElement(sequenceLocalChildElementXName, value); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("globalElement2", "urn:linqtoxsd.schemas.elementtests"); + + static globalElement2() { + BuildElementDictionary(); + contentModel = new SequenceContentModelEntity(new NamedContentModelEntity(sequenceLocalChildElementXName)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static Dictionary localElementDictionary = new Dictionary(); + + private static void BuildElementDictionary() { + localElementDictionary.Add(sequenceLocalChildElementXName, typeof(XTypedElement)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + Dictionary IXMetaData.LocalElementsDictionary { + get { + return localElementDictionary; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static ContentModelEntity contentModel; + + ContentModelEntity IXMetaData.GetContentModel() { + return contentModel; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + /// + /// + /// Regular expression: (choiceLocalElement1 | choiceLocalElement2) + /// + /// + public partial class globalElement3 : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static globalElement3 Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static globalElement3 Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static globalElement3 Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator globalElement3(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + /// + /// + /// Regular expression: (choiceLocalElement1 | choiceLocalElement2) + /// + /// + public globalElement3() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElement1XName = System.Xml.Linq.XName.Get("choiceLocalElement1", "urn:linqtoxsd.schemas.elementtests"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElement1 | choiceLocalElement2) + /// + /// + public virtual XTypedElement choiceLocalElement1 { + get { + XElement x = this.GetElement(choiceLocalElement1XName); + if ((x == null)) { + return null; + } + return ((XTypedElement)(x)); + } + set { + this.SetElement(choiceLocalElement1XName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElement2XName = System.Xml.Linq.XName.Get("choiceLocalElement2", "urn:linqtoxsd.schemas.elementtests"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElement1 | choiceLocalElement2) + /// + /// + public virtual XTypedElement choiceLocalElement2 { + get { + XElement x = this.GetElement(choiceLocalElement2XName); + if ((x == null)) { + return null; + } + return ((XTypedElement)(x)); + } + set { + this.SetElement(choiceLocalElement2XName, value); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("globalElement3", "urn:linqtoxsd.schemas.elementtests"); + + static globalElement3() { + BuildElementDictionary(); + contentModel = new ChoiceContentModelEntity(new NamedContentModelEntity(choiceLocalElement1XName), new NamedContentModelEntity(choiceLocalElement2XName)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static Dictionary localElementDictionary = new Dictionary(); + + private static void BuildElementDictionary() { + localElementDictionary.Add(choiceLocalElement1XName, typeof(XTypedElement)); + localElementDictionary.Add(choiceLocalElement2XName, typeof(XTypedElement)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + Dictionary IXMetaData.LocalElementsDictionary { + get { + return localElementDictionary; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static ContentModelEntity contentModel; + + ContentModelEntity IXMetaData.GetContentModel() { + return contentModel; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + public class LinqToXsdTypeManager : ILinqToXsdTypeManager { + + private LinqToXsdTypeManager() { + } + + private static Dictionary elementDictionary = new Dictionary(); + + private static void BuildElementDictionary() { + elementDictionary.Add(System.Xml.Linq.XName.Get("globalElement1", "urn:linqtoxsd.schemas.elementtests"), typeof(global::urn.linqtoxsd.schemas.elementtests.globalElement1)); + elementDictionary.Add(System.Xml.Linq.XName.Get("globalElement2", "urn:linqtoxsd.schemas.elementtests"), typeof(global::urn.linqtoxsd.schemas.elementtests.globalElement2)); + elementDictionary.Add(System.Xml.Linq.XName.Get("globalElement3", "urn:linqtoxsd.schemas.elementtests"), typeof(global::urn.linqtoxsd.schemas.elementtests.globalElement3)); + } + + private static XmlSchemaSet schemaSet; + + XmlSchemaSet ILinqToXsdTypeManager.Schemas { + get { + if ((schemaSet == null)) { + XmlSchemaSet tempSet = new XmlSchemaSet(); + System.Threading.Interlocked.CompareExchange(ref schemaSet, tempSet, null); + } + return schemaSet; + } + set { + schemaSet = value; + } + } + + protected internal static void AddSchemas(XmlSchemaSet schemas) { + schemas.Add(schemaSet); + } + + Dictionary ILinqToXsdTypeManager.GlobalTypeDictionary { + get { + return XTypedServices.EmptyDictionary; + } + } + + Dictionary ILinqToXsdTypeManager.GlobalElementDictionary { + get { + return elementDictionary; + } + } + + Dictionary ILinqToXsdTypeManager.RootContentTypeMapping { + get { + return XTypedServices.EmptyTypeMappingDictionary; + } + } + + static LinqToXsdTypeManager() { + BuildElementDictionary(); + } + + public static System.Type GetRootType() { + return elementDictionary[System.Xml.Linq.XName.Get("globalElement1", "urn:linqtoxsd.schemas.elementtests")]; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static LinqToXsdTypeManager typeManagerSingleton = new LinqToXsdTypeManager(); + + public static LinqToXsdTypeManager Instance { + get { + return typeManagerSingleton; + } + } + } + + public partial class XRootNamespace { + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private XDocument doc; + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private XTypedElement rootObject; + + private XRootNamespace() { + } + + public static XRootNamespace Load(string xmlFile) { + XRootNamespace root = new XRootNamespace(); + root.doc = XDocument.Load(xmlFile); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRootNamespace Load(string xmlFile, LoadOptions options) { + XRootNamespace root = new XRootNamespace(); + root.doc = XDocument.Load(xmlFile, options); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRootNamespace Load(TextReader textReader) { + XRootNamespace root = new XRootNamespace(); + root.doc = XDocument.Load(textReader); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRootNamespace Load(TextReader textReader, LoadOptions options) { + XRootNamespace root = new XRootNamespace(); + root.doc = XDocument.Load(textReader, options); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRootNamespace Load(XmlReader xmlReader) { + XRootNamespace root = new XRootNamespace(); + root.doc = XDocument.Load(xmlReader); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRootNamespace Parse(string text) { + XRootNamespace root = new XRootNamespace(); + root.doc = XDocument.Parse(text); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRootNamespace Parse(string text, LoadOptions options) { + XRootNamespace root = new XRootNamespace(); + root.doc = XDocument.Parse(text, options); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public virtual void Save(string fileName) { + doc.Save(fileName); + } + + public virtual void Save(TextWriter textWriter) { + doc.Save(textWriter); + } + + public virtual void Save(XmlWriter writer) { + doc.Save(writer); + } + + public virtual void Save(TextWriter textWriter, SaveOptions options) { + doc.Save(textWriter, options); + } + + public virtual void Save(string fileName, SaveOptions options) { + doc.Save(fileName, options); + } + + public virtual XDocument XDocument { + get { + return doc; + } + } + + public virtual XTypedElement Root { + get { + return rootObject; + } + } + + public XRootNamespace(globalElement1 root) { + this.doc = new XDocument(root.Untyped); + this.rootObject = root; + } + + + public globalElement1 globalElement1 { get {return rootObject as globalElement1; } } + + public XRootNamespace(globalElement2 root) { + this.doc = new XDocument(root.Untyped); + this.rootObject = root; + } + + + public globalElement2 globalElement2 { get {return rootObject as globalElement2; } } + + public XRootNamespace(globalElement3 root) { + this.doc = new XDocument(root.Untyped); + this.rootObject = root; + } + + + public globalElement3 globalElement3 { get {return rootObject as globalElement3; } } + } + + public partial class XRoot { + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private XDocument doc; + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private XTypedElement rootObject; + + private XRoot() { + } + + public static XRoot Load(string xmlFile) { + XRoot root = new XRoot(); + root.doc = XDocument.Load(xmlFile); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRoot Load(string xmlFile, LoadOptions options) { + XRoot root = new XRoot(); + root.doc = XDocument.Load(xmlFile, options); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRoot Load(TextReader textReader) { + XRoot root = new XRoot(); + root.doc = XDocument.Load(textReader); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRoot Load(TextReader textReader, LoadOptions options) { + XRoot root = new XRoot(); + root.doc = XDocument.Load(textReader, options); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRoot Load(XmlReader xmlReader) { + XRoot root = new XRoot(); + root.doc = XDocument.Load(xmlReader); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRoot Parse(string text) { + XRoot root = new XRoot(); + root.doc = XDocument.Parse(text); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRoot Parse(string text, LoadOptions options) { + XRoot root = new XRoot(); + root.doc = XDocument.Parse(text, options); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public virtual void Save(string fileName) { + doc.Save(fileName); + } + + public virtual void Save(TextWriter textWriter) { + doc.Save(textWriter); + } + + public virtual void Save(XmlWriter writer) { + doc.Save(writer); + } + + public virtual void Save(TextWriter textWriter, SaveOptions options) { + doc.Save(textWriter, options); + } + + public virtual void Save(string fileName, SaveOptions options) { + doc.Save(fileName, options); + } + + public virtual XDocument XDocument { + get { + return doc; + } + } + + public virtual XTypedElement Root { + get { + return rootObject; + } + } + + public XRoot(global::urn.linqtoxsd.schemas.elementtests.globalElement1 root) { + this.doc = new XDocument(root.Untyped); + this.rootObject = root; + } + + + public global::urn.linqtoxsd.schemas.elementtests.globalElement1 globalElement1 { get {return rootObject as global::urn.linqtoxsd.schemas.elementtests.globalElement1; } } + + public XRoot(global::urn.linqtoxsd.schemas.elementtests.globalElement2 root) { + this.doc = new XDocument(root.Untyped); + this.rootObject = root; + } + + + public global::urn.linqtoxsd.schemas.elementtests.globalElement2 globalElement2 { get {return rootObject as global::urn.linqtoxsd.schemas.elementtests.globalElement2; } } + + public XRoot(global::urn.linqtoxsd.schemas.elementtests.globalElement3 root) { + this.doc = new XDocument(root.Untyped); + this.rootObject = root; + } + + + public global::urn.linqtoxsd.schemas.elementtests.globalElement3 globalElement3 { get {return rootObject as global::urn.linqtoxsd.schemas.elementtests.globalElement3; } } + } +} diff --git a/LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsWithComplexTypes.xsd b/LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsWithComplexTypes.xsd new file mode 100644 index 0000000..4a82b83 --- /dev/null +++ b/LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsWithComplexTypes.xsd @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsWithComplexTypes.xsd.config b/LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsWithComplexTypes.xsd.config new file mode 100644 index 0000000..f5bd85d --- /dev/null +++ b/LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsWithComplexTypes.xsd.config @@ -0,0 +1,13 @@ + + + + + + false + + false + + + + + \ No newline at end of file diff --git a/LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsWithComplexTypes.xsd.cs b/LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsWithComplexTypes.xsd.cs new file mode 100644 index 0000000..d838f3d --- /dev/null +++ b/LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsWithComplexTypes.xsd.cs @@ -0,0 +1,1136 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace urn.linqtoxsd.schemas.ElementsWithComplexTypes { + using System; + using System.Collections; + using System.Collections.Generic; + using System.ComponentModel; + using System.IO; + using System.Linq; + using System.Diagnostics; + using System.Xml; + using System.Xml.Schema; + using System.Xml.Linq; + using Xml.Schema.Linq; + + + /// + /// + /// Regular expression: (localElementAnonAllCt1, localElementAnonSeqCt2, localElementAnonChoiceCt3) + /// + /// + public partial class globalElement1 : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static globalElement1 Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static globalElement1 Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static globalElement1 Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator globalElement1(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + /// + /// + /// Regular expression: (localElementAnonAllCt1, localElementAnonSeqCt2, localElementAnonChoiceCt3) + /// + /// + public globalElement1() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName localElementAnonAllCt1XName = System.Xml.Linq.XName.Get("localElementAnonAllCt1", "urn:linqtoxsd.schemas.ElementsWithComplexTypes"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (localElementAnonAllCt1, localElementAnonSeqCt2, localElementAnonChoiceCt3) + /// + /// + public virtual localElementAnonAllCt1LocalType localElementAnonAllCt1 { + get { + XElement x = this.GetElement(localElementAnonAllCt1XName); + return ((localElementAnonAllCt1LocalType)(x)); + } + set { + this.SetElement(localElementAnonAllCt1XName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName localElementAnonSeqCt2XName = System.Xml.Linq.XName.Get("localElementAnonSeqCt2", "urn:linqtoxsd.schemas.ElementsWithComplexTypes"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (localElementAnonAllCt1, localElementAnonSeqCt2, localElementAnonChoiceCt3) + /// + /// + public virtual localElementAnonSeqCt2LocalType localElementAnonSeqCt2 { + get { + XElement x = this.GetElement(localElementAnonSeqCt2XName); + return ((localElementAnonSeqCt2LocalType)(x)); + } + set { + this.SetElement(localElementAnonSeqCt2XName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName localElementAnonChoiceCt3XName = System.Xml.Linq.XName.Get("localElementAnonChoiceCt3", "urn:linqtoxsd.schemas.ElementsWithComplexTypes"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (localElementAnonAllCt1, localElementAnonSeqCt2, localElementAnonChoiceCt3) + /// + /// + public virtual localElementAnonChoiceCt3LocalType localElementAnonChoiceCt3 { + get { + XElement x = this.GetElement(localElementAnonChoiceCt3XName); + return ((localElementAnonChoiceCt3LocalType)(x)); + } + set { + this.SetElement(localElementAnonChoiceCt3XName, value); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("globalElement1", "urn:linqtoxsd.schemas.ElementsWithComplexTypes"); + + static globalElement1() { + BuildElementDictionary(); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static Dictionary localElementDictionary = new Dictionary(); + + private static void BuildElementDictionary() { + localElementDictionary.Add(localElementAnonAllCt1XName, typeof(localElementAnonAllCt1LocalType)); + localElementDictionary.Add(localElementAnonSeqCt2XName, typeof(localElementAnonSeqCt2LocalType)); + localElementDictionary.Add(localElementAnonChoiceCt3XName, typeof(localElementAnonChoiceCt3LocalType)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + Dictionary IXMetaData.LocalElementsDictionary { + get { + return localElementDictionary; + } + } + + ContentModelEntity IXMetaData.GetContentModel() { + return ContentModelEntity.Default; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + + /// + /// + /// Regular expression: (ctle1) + /// + /// + public partial class localElementAnonAllCt1LocalType : XTypedElement, IXMetaData { + + public static explicit operator localElementAnonAllCt1LocalType(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + /// + /// + /// Regular expression: (ctle1) + /// + /// + public localElementAnonAllCt1LocalType() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName ctle1XName = System.Xml.Linq.XName.Get("ctle1", "urn:linqtoxsd.schemas.ElementsWithComplexTypes"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (ctle1) + /// + /// + public virtual XTypedElement ctle1 { + get { + XElement x = this.GetElement(ctle1XName); + return ((XTypedElement)(x)); + } + set { + this.SetElement(ctle1XName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalAttr1XName = System.Xml.Linq.XName.Get("allLocalAttr1", ""); + + /// + /// + /// Occurrence: optional + /// + /// + public virtual string allLocalAttr1 { + get { + XAttribute x = this.Attribute(allLocalAttr1XName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + set { + this.SetAttribute(allLocalAttr1XName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("localElementAnonAllCt1", "urn:linqtoxsd.schemas.ElementsWithComplexTypes"); + + static localElementAnonAllCt1LocalType() { + BuildElementDictionary(); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static Dictionary localElementDictionary = new Dictionary(); + + private static void BuildElementDictionary() { + localElementDictionary.Add(ctle1XName, typeof(XTypedElement)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + Dictionary IXMetaData.LocalElementsDictionary { + get { + return localElementDictionary; + } + } + + ContentModelEntity IXMetaData.GetContentModel() { + return ContentModelEntity.Default; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Fragment; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + /// + /// + /// Regular expression: (ctle2) + /// + /// + public partial class localElementAnonSeqCt2LocalType : XTypedElement, IXMetaData { + + public static explicit operator localElementAnonSeqCt2LocalType(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + /// + /// + /// Regular expression: (ctle2) + /// + /// + public localElementAnonSeqCt2LocalType() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName ctle2XName = System.Xml.Linq.XName.Get("ctle2", "urn:linqtoxsd.schemas.ElementsWithComplexTypes"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (ctle2) + /// + /// + public virtual XTypedElement ctle2 { + get { + XElement x = this.GetElement(ctle2XName); + return ((XTypedElement)(x)); + } + set { + this.SetElement(ctle2XName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName seqLocalAttr1XName = System.Xml.Linq.XName.Get("seqLocalAttr1", ""); + + /// + /// + /// Occurrence: optional + /// + /// + public virtual string seqLocalAttr1 { + get { + XAttribute x = this.Attribute(seqLocalAttr1XName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + set { + this.SetAttribute(seqLocalAttr1XName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("localElementAnonSeqCt2", "urn:linqtoxsd.schemas.ElementsWithComplexTypes"); + + static localElementAnonSeqCt2LocalType() { + BuildElementDictionary(); + contentModel = new SequenceContentModelEntity(new NamedContentModelEntity(ctle2XName)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static Dictionary localElementDictionary = new Dictionary(); + + private static void BuildElementDictionary() { + localElementDictionary.Add(ctle2XName, typeof(XTypedElement)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + Dictionary IXMetaData.LocalElementsDictionary { + get { + return localElementDictionary; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static ContentModelEntity contentModel; + + ContentModelEntity IXMetaData.GetContentModel() { + return contentModel; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Fragment; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + /// + /// + /// Regular expression: (ctle3) + /// + /// + public partial class localElementAnonChoiceCt3LocalType : XTypedElement, IXMetaData { + + public static explicit operator localElementAnonChoiceCt3LocalType(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + /// + /// + /// Regular expression: (ctle3) + /// + /// + public localElementAnonChoiceCt3LocalType() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName ctle3XName = System.Xml.Linq.XName.Get("ctle3", "urn:linqtoxsd.schemas.ElementsWithComplexTypes"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (ctle3) + /// + /// + public virtual XTypedElement ctle3 { + get { + XElement x = this.GetElement(ctle3XName); + if ((x == null)) { + return null; + } + return ((XTypedElement)(x)); + } + set { + this.SetElement(ctle3XName, value); + } + } + + public localElementAnonChoiceCt3LocalType(XTypedElement ctle3) { + this.ctle3 = ctle3; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalAttr1XName = System.Xml.Linq.XName.Get("choiceLocalAttr1", ""); + + /// + /// + /// Occurrence: optional + /// + /// + public virtual string choiceLocalAttr1 { + get { + XAttribute x = this.Attribute(choiceLocalAttr1XName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + set { + this.SetAttribute(choiceLocalAttr1XName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("localElementAnonChoiceCt3", "urn:linqtoxsd.schemas.ElementsWithComplexTypes"); + + static localElementAnonChoiceCt3LocalType() { + BuildElementDictionary(); + contentModel = new ChoiceContentModelEntity(new NamedContentModelEntity(ctle3XName)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static Dictionary localElementDictionary = new Dictionary(); + + private static void BuildElementDictionary() { + localElementDictionary.Add(ctle3XName, typeof(XTypedElement)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + Dictionary IXMetaData.LocalElementsDictionary { + get { + return localElementDictionary; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static ContentModelEntity contentModel; + + ContentModelEntity IXMetaData.GetContentModel() { + return contentModel; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Fragment; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + } + + /// + /// + /// Regular expression: (gct1le) + /// + /// + public partial class globalCt1 : XTypedElement, IXMetaData { + + public static explicit operator globalCt1(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + /// + /// + /// Regular expression: (gct1le) + /// + /// + public globalCt1() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName gct1leXName = System.Xml.Linq.XName.Get("gct1-le", "urn:linqtoxsd.schemas.ElementsWithComplexTypes"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (gct1le) + /// + /// + public virtual XTypedElement gct1le { + get { + XElement x = this.GetElement(gct1leXName); + return ((XTypedElement)(x)); + } + set { + this.SetElement(gct1leXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName localAttr1XName = System.Xml.Linq.XName.Get("localAttr1", ""); + + /// + /// + /// Occurrence: optional + /// + /// + public virtual string localAttr1 { + get { + XAttribute x = this.Attribute(localAttr1XName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + set { + this.SetAttribute(localAttr1XName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("globalCt1", "urn:linqtoxsd.schemas.ElementsWithComplexTypes"); + + static globalCt1() { + BuildElementDictionary(); + contentModel = new SequenceContentModelEntity(new NamedContentModelEntity(gct1leXName)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static Dictionary localElementDictionary = new Dictionary(); + + private static void BuildElementDictionary() { + localElementDictionary.Add(gct1leXName, typeof(XTypedElement)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + Dictionary IXMetaData.LocalElementsDictionary { + get { + return localElementDictionary; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static ContentModelEntity contentModel; + + ContentModelEntity IXMetaData.GetContentModel() { + return contentModel; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Fragment; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + public partial class globalElement2 : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static globalElement2 Load(string xmlFile) { + return XTypedServices.Load(xmlFile, LinqToXsdTypeManager.Instance); + } + + public static globalElement2 Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile, LinqToXsdTypeManager.Instance); + } + + public static globalElement2 Parse(string xml) { + return XTypedServices.Parse(xml, LinqToXsdTypeManager.Instance); + } + + public static explicit operator globalElement2(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return new globalElement2(((globalCt1)(this.Content.Clone()))); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private globalCt1 ContentField; + + public globalElement2() { + SetInnerType(new globalCt1()); + } + + public override XElement Untyped { + get { + return base.Untyped; + } + set { + base.Untyped = value; + this.ContentField.Untyped = value; + } + } + + public virtual globalCt1 Content { + get { + return ContentField; + } + } + + private void SetInnerType(globalCt1 ContentField) { + this.ContentField = ((globalCt1)(XTypedServices.GetCloneIfRooted(ContentField))); + XTypedServices.SetName(this, this.ContentField); + } + + public globalElement2(globalCt1 content) { + SetInnerType(content); + } + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (gct1le) + /// + /// + public virtual XTypedElement gct1le { + get { + return this.ContentField.gct1le; + } + set { + this.ContentField.gct1le = value; + } + } + + /// + /// + /// Occurrence: optional + /// + /// + public virtual string localAttr1 { + get { + return this.ContentField.localAttr1; + } + set { + this.ContentField.localAttr1 = value; + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("globalElement2", "urn:linqtoxsd.schemas.ElementsWithComplexTypes"); + + Dictionary IXMetaData.LocalElementsDictionary { + get { + IXMetaData schemaMetaData = ((IXMetaData)(this.Content)); + return schemaMetaData.LocalElementsDictionary; + } + } + + XTypedElement IXMetaData.Content { + get { + return this.Content; + } + } + + ContentModelEntity IXMetaData.GetContentModel() { + return ContentModelEntity.Default; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + public class LinqToXsdTypeManager : ILinqToXsdTypeManager { + + private LinqToXsdTypeManager() { + } + + private static Dictionary typeDictionary = new Dictionary(); + + private static void BuildTypeDictionary() { + typeDictionary.Add(System.Xml.Linq.XName.Get("globalCt1", "urn:linqtoxsd.schemas.ElementsWithComplexTypes"), typeof(global::urn.linqtoxsd.schemas.ElementsWithComplexTypes.globalCt1)); + } + + private static Dictionary elementDictionary = new Dictionary(); + + private static void BuildElementDictionary() { + elementDictionary.Add(System.Xml.Linq.XName.Get("globalElement1", "urn:linqtoxsd.schemas.ElementsWithComplexTypes"), typeof(global::urn.linqtoxsd.schemas.ElementsWithComplexTypes.globalElement1)); + elementDictionary.Add(System.Xml.Linq.XName.Get("globalElement2", "urn:linqtoxsd.schemas.ElementsWithComplexTypes"), typeof(global::urn.linqtoxsd.schemas.ElementsWithComplexTypes.globalElement2)); + } + + private static Dictionary wrapperDictionary = new Dictionary(); + + private static void BuildWrapperDictionary() { + wrapperDictionary.Add(typeof(urn.linqtoxsd.schemas.ElementsWithComplexTypes.globalElement2), typeof(global::urn.linqtoxsd.schemas.ElementsWithComplexTypes.globalCt1)); + } + + private static XmlSchemaSet schemaSet; + + XmlSchemaSet ILinqToXsdTypeManager.Schemas { + get { + if ((schemaSet == null)) { + XmlSchemaSet tempSet = new XmlSchemaSet(); + System.Threading.Interlocked.CompareExchange(ref schemaSet, tempSet, null); + } + return schemaSet; + } + set { + schemaSet = value; + } + } + + protected internal static void AddSchemas(XmlSchemaSet schemas) { + schemas.Add(schemaSet); + } + + Dictionary ILinqToXsdTypeManager.GlobalTypeDictionary { + get { + return typeDictionary; + } + } + + Dictionary ILinqToXsdTypeManager.GlobalElementDictionary { + get { + return elementDictionary; + } + } + + Dictionary ILinqToXsdTypeManager.RootContentTypeMapping { + get { + return wrapperDictionary; + } + } + + static LinqToXsdTypeManager() { + BuildTypeDictionary(); + BuildElementDictionary(); + BuildWrapperDictionary(); + } + + public static System.Type GetRootType() { + return elementDictionary[System.Xml.Linq.XName.Get("globalElement1", "urn:linqtoxsd.schemas.ElementsWithComplexTypes")]; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static LinqToXsdTypeManager typeManagerSingleton = new LinqToXsdTypeManager(); + + public static LinqToXsdTypeManager Instance { + get { + return typeManagerSingleton; + } + } + } + + public partial class XRootNamespace { + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private XDocument doc; + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private XTypedElement rootObject; + + private XRootNamespace() { + } + + public static XRootNamespace Load(string xmlFile) { + XRootNamespace root = new XRootNamespace(); + root.doc = XDocument.Load(xmlFile); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRootNamespace Load(string xmlFile, LoadOptions options) { + XRootNamespace root = new XRootNamespace(); + root.doc = XDocument.Load(xmlFile, options); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRootNamespace Load(TextReader textReader) { + XRootNamespace root = new XRootNamespace(); + root.doc = XDocument.Load(textReader); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRootNamespace Load(TextReader textReader, LoadOptions options) { + XRootNamespace root = new XRootNamespace(); + root.doc = XDocument.Load(textReader, options); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRootNamespace Load(XmlReader xmlReader) { + XRootNamespace root = new XRootNamespace(); + root.doc = XDocument.Load(xmlReader); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRootNamespace Parse(string text) { + XRootNamespace root = new XRootNamespace(); + root.doc = XDocument.Parse(text); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRootNamespace Parse(string text, LoadOptions options) { + XRootNamespace root = new XRootNamespace(); + root.doc = XDocument.Parse(text, options); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public virtual void Save(string fileName) { + doc.Save(fileName); + } + + public virtual void Save(TextWriter textWriter) { + doc.Save(textWriter); + } + + public virtual void Save(XmlWriter writer) { + doc.Save(writer); + } + + public virtual void Save(TextWriter textWriter, SaveOptions options) { + doc.Save(textWriter, options); + } + + public virtual void Save(string fileName, SaveOptions options) { + doc.Save(fileName, options); + } + + public virtual XDocument XDocument { + get { + return doc; + } + } + + public virtual XTypedElement Root { + get { + return rootObject; + } + } + + public XRootNamespace(globalElement1 root) { + this.doc = new XDocument(root.Untyped); + this.rootObject = root; + } + + + public globalElement1 globalElement1 { get {return rootObject as globalElement1; } } + + public XRootNamespace(globalElement2 root) { + this.doc = new XDocument(root.Untyped); + this.rootObject = root; + } + + + public globalElement2 globalElement2 { get {return rootObject as globalElement2; } } + } + + public partial class XRoot { + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private XDocument doc; + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private XTypedElement rootObject; + + private XRoot() { + } + + public static XRoot Load(string xmlFile) { + XRoot root = new XRoot(); + root.doc = XDocument.Load(xmlFile); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRoot Load(string xmlFile, LoadOptions options) { + XRoot root = new XRoot(); + root.doc = XDocument.Load(xmlFile, options); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRoot Load(TextReader textReader) { + XRoot root = new XRoot(); + root.doc = XDocument.Load(textReader); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRoot Load(TextReader textReader, LoadOptions options) { + XRoot root = new XRoot(); + root.doc = XDocument.Load(textReader, options); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRoot Load(XmlReader xmlReader) { + XRoot root = new XRoot(); + root.doc = XDocument.Load(xmlReader); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRoot Parse(string text) { + XRoot root = new XRoot(); + root.doc = XDocument.Parse(text); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRoot Parse(string text, LoadOptions options) { + XRoot root = new XRoot(); + root.doc = XDocument.Parse(text, options); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public virtual void Save(string fileName) { + doc.Save(fileName); + } + + public virtual void Save(TextWriter textWriter) { + doc.Save(textWriter); + } + + public virtual void Save(XmlWriter writer) { + doc.Save(writer); + } + + public virtual void Save(TextWriter textWriter, SaveOptions options) { + doc.Save(textWriter, options); + } + + public virtual void Save(string fileName, SaveOptions options) { + doc.Save(fileName, options); + } + + public virtual XDocument XDocument { + get { + return doc; + } + } + + public virtual XTypedElement Root { + get { + return rootObject; + } + } + + public XRoot(global::urn.linqtoxsd.schemas.ElementsWithComplexTypes.globalElement1 root) { + this.doc = new XDocument(root.Untyped); + this.rootObject = root; + } + + + public global::urn.linqtoxsd.schemas.ElementsWithComplexTypes.globalElement1 globalElement1 { get {return rootObject as global::urn.linqtoxsd.schemas.ElementsWithComplexTypes.globalElement1; } } + + public XRoot(global::urn.linqtoxsd.schemas.ElementsWithComplexTypes.globalElement2 root) { + this.doc = new XDocument(root.Untyped); + this.rootObject = root; + } + + + public global::urn.linqtoxsd.schemas.ElementsWithComplexTypes.globalElement2 globalElement2 { get {return rootObject as global::urn.linqtoxsd.schemas.ElementsWithComplexTypes.globalElement2; } } + } +} diff --git a/LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsWithTypes.xsd b/LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsWithTypes.xsd new file mode 100644 index 0000000..f1f1250 --- /dev/null +++ b/LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsWithTypes.xsd @@ -0,0 +1,81 @@ + + + + + Basic XSD that tests global elemnts, and the 3 compositors: all, sequence and choice, and includes local child elements of all simple types. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsWithTypes.xsd.config b/LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsWithTypes.xsd.config new file mode 100644 index 0000000..b6544ef --- /dev/null +++ b/LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsWithTypes.xsd.config @@ -0,0 +1,13 @@ + + + + + + false + + false + + + + + \ No newline at end of file diff --git a/LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsWithTypes.xsd.cs b/LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsWithTypes.xsd.cs new file mode 100644 index 0000000..3de7b6a --- /dev/null +++ b/LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsWithTypes.xsd.cs @@ -0,0 +1,1955 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace urn.linqtoxsd.schemas.ElementsWithTypesTest { + using System; + using System.Collections; + using System.Collections.Generic; + using System.ComponentModel; + using System.IO; + using System.Linq; + using System.Diagnostics; + using System.Xml; + using System.Xml.Schema; + using System.Xml.Linq; + using Xml.Schema.Linq; + + + /// + /// + /// Regular expression: (allLocalChildElementString, allLocalChildElementBoolean, allLocalChildElementFloat, allLocalChildElementDouble, allLocalChildElementDecimal, allLocalChildElementDuration, allLocalChildElementDatetime, allLocalChildElementTime, allLocalChildElementDate, allLocalChildElementGyearmonth, allLocalChildElementGyear, allLocalChildElementGmonthday, allLocalChildElementGday, allLocalChildElementGmonth, allLocalChildElementHexbinary, allLocalChildElementBase64binary, allLocalChildElementAnyuri, allLocalChildElementQname) + /// + /// + public partial class globalElement1 : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static globalElement1 Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static globalElement1 Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static globalElement1 Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator globalElement1(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + /// + /// + /// Regular expression: (allLocalChildElementString, allLocalChildElementBoolean, allLocalChildElementFloat, allLocalChildElementDouble, allLocalChildElementDecimal, allLocalChildElementDuration, allLocalChildElementDatetime, allLocalChildElementTime, allLocalChildElementDate, allLocalChildElementGyearmonth, allLocalChildElementGyear, allLocalChildElementGmonthday, allLocalChildElementGday, allLocalChildElementGmonth, allLocalChildElementHexbinary, allLocalChildElementBase64binary, allLocalChildElementAnyuri, allLocalChildElementQname) + /// + /// + public globalElement1() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalChildElementStringXName = System.Xml.Linq.XName.Get("allLocalChildElementString", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalChildElementString, allLocalChildElementBoolean, allLocalChildElementFloat, allLocalChildElementDouble, allLocalChildElementDecimal, allLocalChildElementDuration, allLocalChildElementDatetime, allLocalChildElementTime, allLocalChildElementDate, allLocalChildElementGyearmonth, allLocalChildElementGyear, allLocalChildElementGmonthday, allLocalChildElementGday, allLocalChildElementGmonth, allLocalChildElementHexbinary, allLocalChildElementBase64binary, allLocalChildElementAnyuri, allLocalChildElementQname) + /// + /// + public virtual string allLocalChildElementString { + get { + XElement x = this.GetElement(allLocalChildElementStringXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype); + } + set { + this.SetElement(allLocalChildElementStringXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalChildElementBooleanXName = System.Xml.Linq.XName.Get("allLocalChildElementBoolean", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalChildElementString, allLocalChildElementBoolean, allLocalChildElementFloat, allLocalChildElementDouble, allLocalChildElementDecimal, allLocalChildElementDuration, allLocalChildElementDatetime, allLocalChildElementTime, allLocalChildElementDate, allLocalChildElementGyearmonth, allLocalChildElementGyear, allLocalChildElementGmonthday, allLocalChildElementGday, allLocalChildElementGmonth, allLocalChildElementHexbinary, allLocalChildElementBase64binary, allLocalChildElementAnyuri, allLocalChildElementQname) + /// + /// + public virtual bool allLocalChildElementBoolean { + get { + XElement x = this.GetElement(allLocalChildElementBooleanXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Boolean).Datatype); + } + set { + this.SetElement(allLocalChildElementBooleanXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Boolean).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalChildElementFloatXName = System.Xml.Linq.XName.Get("allLocalChildElementFloat", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalChildElementString, allLocalChildElementBoolean, allLocalChildElementFloat, allLocalChildElementDouble, allLocalChildElementDecimal, allLocalChildElementDuration, allLocalChildElementDatetime, allLocalChildElementTime, allLocalChildElementDate, allLocalChildElementGyearmonth, allLocalChildElementGyear, allLocalChildElementGmonthday, allLocalChildElementGday, allLocalChildElementGmonth, allLocalChildElementHexbinary, allLocalChildElementBase64binary, allLocalChildElementAnyuri, allLocalChildElementQname) + /// + /// + public virtual float allLocalChildElementFloat { + get { + XElement x = this.GetElement(allLocalChildElementFloatXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Float).Datatype); + } + set { + this.SetElement(allLocalChildElementFloatXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Float).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalChildElementDoubleXName = System.Xml.Linq.XName.Get("allLocalChildElementDouble", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalChildElementString, allLocalChildElementBoolean, allLocalChildElementFloat, allLocalChildElementDouble, allLocalChildElementDecimal, allLocalChildElementDuration, allLocalChildElementDatetime, allLocalChildElementTime, allLocalChildElementDate, allLocalChildElementGyearmonth, allLocalChildElementGyear, allLocalChildElementGmonthday, allLocalChildElementGday, allLocalChildElementGmonth, allLocalChildElementHexbinary, allLocalChildElementBase64binary, allLocalChildElementAnyuri, allLocalChildElementQname) + /// + /// + public virtual double allLocalChildElementDouble { + get { + XElement x = this.GetElement(allLocalChildElementDoubleXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Double).Datatype); + } + set { + this.SetElement(allLocalChildElementDoubleXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Double).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalChildElementDecimalXName = System.Xml.Linq.XName.Get("allLocalChildElementDecimal", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalChildElementString, allLocalChildElementBoolean, allLocalChildElementFloat, allLocalChildElementDouble, allLocalChildElementDecimal, allLocalChildElementDuration, allLocalChildElementDatetime, allLocalChildElementTime, allLocalChildElementDate, allLocalChildElementGyearmonth, allLocalChildElementGyear, allLocalChildElementGmonthday, allLocalChildElementGday, allLocalChildElementGmonth, allLocalChildElementHexbinary, allLocalChildElementBase64binary, allLocalChildElementAnyuri, allLocalChildElementQname) + /// + /// + public virtual decimal allLocalChildElementDecimal { + get { + XElement x = this.GetElement(allLocalChildElementDecimalXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Decimal).Datatype); + } + set { + this.SetElement(allLocalChildElementDecimalXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Decimal).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalChildElementDurationXName = System.Xml.Linq.XName.Get("allLocalChildElementDuration", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalChildElementString, allLocalChildElementBoolean, allLocalChildElementFloat, allLocalChildElementDouble, allLocalChildElementDecimal, allLocalChildElementDuration, allLocalChildElementDatetime, allLocalChildElementTime, allLocalChildElementDate, allLocalChildElementGyearmonth, allLocalChildElementGyear, allLocalChildElementGmonthday, allLocalChildElementGday, allLocalChildElementGmonth, allLocalChildElementHexbinary, allLocalChildElementBase64binary, allLocalChildElementAnyuri, allLocalChildElementQname) + /// + /// + public virtual System.TimeSpan allLocalChildElementDuration { + get { + XElement x = this.GetElement(allLocalChildElementDurationXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Duration).Datatype); + } + set { + this.SetElement(allLocalChildElementDurationXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Duration).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalChildElementDatetimeXName = System.Xml.Linq.XName.Get("allLocalChildElementDatetime", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalChildElementString, allLocalChildElementBoolean, allLocalChildElementFloat, allLocalChildElementDouble, allLocalChildElementDecimal, allLocalChildElementDuration, allLocalChildElementDatetime, allLocalChildElementTime, allLocalChildElementDate, allLocalChildElementGyearmonth, allLocalChildElementGyear, allLocalChildElementGmonthday, allLocalChildElementGday, allLocalChildElementGmonth, allLocalChildElementHexbinary, allLocalChildElementBase64binary, allLocalChildElementAnyuri, allLocalChildElementQname) + /// + /// + public virtual System.DateTime allLocalChildElementDatetime { + get { + XElement x = this.GetElement(allLocalChildElementDatetimeXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.DateTime).Datatype); + } + set { + this.SetElement(allLocalChildElementDatetimeXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.DateTime).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalChildElementTimeXName = System.Xml.Linq.XName.Get("allLocalChildElementTime", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalChildElementString, allLocalChildElementBoolean, allLocalChildElementFloat, allLocalChildElementDouble, allLocalChildElementDecimal, allLocalChildElementDuration, allLocalChildElementDatetime, allLocalChildElementTime, allLocalChildElementDate, allLocalChildElementGyearmonth, allLocalChildElementGyear, allLocalChildElementGmonthday, allLocalChildElementGday, allLocalChildElementGmonth, allLocalChildElementHexbinary, allLocalChildElementBase64binary, allLocalChildElementAnyuri, allLocalChildElementQname) + /// + /// + public virtual System.DateTime allLocalChildElementTime { + get { + XElement x = this.GetElement(allLocalChildElementTimeXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Time).Datatype); + } + set { + this.SetElement(allLocalChildElementTimeXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Time).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalChildElementDateXName = System.Xml.Linq.XName.Get("allLocalChildElementDate", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalChildElementString, allLocalChildElementBoolean, allLocalChildElementFloat, allLocalChildElementDouble, allLocalChildElementDecimal, allLocalChildElementDuration, allLocalChildElementDatetime, allLocalChildElementTime, allLocalChildElementDate, allLocalChildElementGyearmonth, allLocalChildElementGyear, allLocalChildElementGmonthday, allLocalChildElementGday, allLocalChildElementGmonth, allLocalChildElementHexbinary, allLocalChildElementBase64binary, allLocalChildElementAnyuri, allLocalChildElementQname) + /// + /// + public virtual System.DateTime allLocalChildElementDate { + get { + XElement x = this.GetElement(allLocalChildElementDateXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Date).Datatype); + } + set { + this.SetElement(allLocalChildElementDateXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Date).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalChildElementGyearmonthXName = System.Xml.Linq.XName.Get("allLocalChildElementGyearmonth", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalChildElementString, allLocalChildElementBoolean, allLocalChildElementFloat, allLocalChildElementDouble, allLocalChildElementDecimal, allLocalChildElementDuration, allLocalChildElementDatetime, allLocalChildElementTime, allLocalChildElementDate, allLocalChildElementGyearmonth, allLocalChildElementGyear, allLocalChildElementGmonthday, allLocalChildElementGday, allLocalChildElementGmonth, allLocalChildElementHexbinary, allLocalChildElementBase64binary, allLocalChildElementAnyuri, allLocalChildElementQname) + /// + /// + public virtual System.DateTime allLocalChildElementGyearmonth { + get { + XElement x = this.GetElement(allLocalChildElementGyearmonthXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.GYearMonth).Datatype); + } + set { + this.SetElement(allLocalChildElementGyearmonthXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.GYearMonth).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalChildElementGyearXName = System.Xml.Linq.XName.Get("allLocalChildElementGyear", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalChildElementString, allLocalChildElementBoolean, allLocalChildElementFloat, allLocalChildElementDouble, allLocalChildElementDecimal, allLocalChildElementDuration, allLocalChildElementDatetime, allLocalChildElementTime, allLocalChildElementDate, allLocalChildElementGyearmonth, allLocalChildElementGyear, allLocalChildElementGmonthday, allLocalChildElementGday, allLocalChildElementGmonth, allLocalChildElementHexbinary, allLocalChildElementBase64binary, allLocalChildElementAnyuri, allLocalChildElementQname) + /// + /// + public virtual System.DateTime allLocalChildElementGyear { + get { + XElement x = this.GetElement(allLocalChildElementGyearXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.GYear).Datatype); + } + set { + this.SetElement(allLocalChildElementGyearXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.GYear).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalChildElementGmonthdayXName = System.Xml.Linq.XName.Get("allLocalChildElementGmonthday", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalChildElementString, allLocalChildElementBoolean, allLocalChildElementFloat, allLocalChildElementDouble, allLocalChildElementDecimal, allLocalChildElementDuration, allLocalChildElementDatetime, allLocalChildElementTime, allLocalChildElementDate, allLocalChildElementGyearmonth, allLocalChildElementGyear, allLocalChildElementGmonthday, allLocalChildElementGday, allLocalChildElementGmonth, allLocalChildElementHexbinary, allLocalChildElementBase64binary, allLocalChildElementAnyuri, allLocalChildElementQname) + /// + /// + public virtual System.DateTime allLocalChildElementGmonthday { + get { + XElement x = this.GetElement(allLocalChildElementGmonthdayXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.GMonthDay).Datatype); + } + set { + this.SetElement(allLocalChildElementGmonthdayXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.GMonthDay).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalChildElementGdayXName = System.Xml.Linq.XName.Get("allLocalChildElementGday", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalChildElementString, allLocalChildElementBoolean, allLocalChildElementFloat, allLocalChildElementDouble, allLocalChildElementDecimal, allLocalChildElementDuration, allLocalChildElementDatetime, allLocalChildElementTime, allLocalChildElementDate, allLocalChildElementGyearmonth, allLocalChildElementGyear, allLocalChildElementGmonthday, allLocalChildElementGday, allLocalChildElementGmonth, allLocalChildElementHexbinary, allLocalChildElementBase64binary, allLocalChildElementAnyuri, allLocalChildElementQname) + /// + /// + public virtual System.DateTime allLocalChildElementGday { + get { + XElement x = this.GetElement(allLocalChildElementGdayXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.GDay).Datatype); + } + set { + this.SetElement(allLocalChildElementGdayXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.GDay).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalChildElementGmonthXName = System.Xml.Linq.XName.Get("allLocalChildElementGmonth", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalChildElementString, allLocalChildElementBoolean, allLocalChildElementFloat, allLocalChildElementDouble, allLocalChildElementDecimal, allLocalChildElementDuration, allLocalChildElementDatetime, allLocalChildElementTime, allLocalChildElementDate, allLocalChildElementGyearmonth, allLocalChildElementGyear, allLocalChildElementGmonthday, allLocalChildElementGday, allLocalChildElementGmonth, allLocalChildElementHexbinary, allLocalChildElementBase64binary, allLocalChildElementAnyuri, allLocalChildElementQname) + /// + /// + public virtual System.DateTime allLocalChildElementGmonth { + get { + XElement x = this.GetElement(allLocalChildElementGmonthXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.GMonth).Datatype); + } + set { + this.SetElement(allLocalChildElementGmonthXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.GMonth).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalChildElementHexbinaryXName = System.Xml.Linq.XName.Get("allLocalChildElementHexbinary", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalChildElementString, allLocalChildElementBoolean, allLocalChildElementFloat, allLocalChildElementDouble, allLocalChildElementDecimal, allLocalChildElementDuration, allLocalChildElementDatetime, allLocalChildElementTime, allLocalChildElementDate, allLocalChildElementGyearmonth, allLocalChildElementGyear, allLocalChildElementGmonthday, allLocalChildElementGday, allLocalChildElementGmonth, allLocalChildElementHexbinary, allLocalChildElementBase64binary, allLocalChildElementAnyuri, allLocalChildElementQname) + /// + /// + public virtual byte[] allLocalChildElementHexbinary { + get { + XElement x = this.GetElement(allLocalChildElementHexbinaryXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.HexBinary).Datatype); + } + set { + this.SetElement(allLocalChildElementHexbinaryXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.HexBinary).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalChildElementBase64binaryXName = System.Xml.Linq.XName.Get("allLocalChildElementBase64binary", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalChildElementString, allLocalChildElementBoolean, allLocalChildElementFloat, allLocalChildElementDouble, allLocalChildElementDecimal, allLocalChildElementDuration, allLocalChildElementDatetime, allLocalChildElementTime, allLocalChildElementDate, allLocalChildElementGyearmonth, allLocalChildElementGyear, allLocalChildElementGmonthday, allLocalChildElementGday, allLocalChildElementGmonth, allLocalChildElementHexbinary, allLocalChildElementBase64binary, allLocalChildElementAnyuri, allLocalChildElementQname) + /// + /// + public virtual byte[] allLocalChildElementBase64binary { + get { + XElement x = this.GetElement(allLocalChildElementBase64binaryXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Base64Binary).Datatype); + } + set { + this.SetElement(allLocalChildElementBase64binaryXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Base64Binary).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalChildElementAnyuriXName = System.Xml.Linq.XName.Get("allLocalChildElementAnyuri", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalChildElementString, allLocalChildElementBoolean, allLocalChildElementFloat, allLocalChildElementDouble, allLocalChildElementDecimal, allLocalChildElementDuration, allLocalChildElementDatetime, allLocalChildElementTime, allLocalChildElementDate, allLocalChildElementGyearmonth, allLocalChildElementGyear, allLocalChildElementGmonthday, allLocalChildElementGday, allLocalChildElementGmonth, allLocalChildElementHexbinary, allLocalChildElementBase64binary, allLocalChildElementAnyuri, allLocalChildElementQname) + /// + /// + public virtual System.Uri allLocalChildElementAnyuri { + get { + XElement x = this.GetElement(allLocalChildElementAnyuriXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyUri).Datatype); + } + set { + this.SetElement(allLocalChildElementAnyuriXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyUri).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalChildElementQnameXName = System.Xml.Linq.XName.Get("allLocalChildElementQname", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalChildElementString, allLocalChildElementBoolean, allLocalChildElementFloat, allLocalChildElementDouble, allLocalChildElementDecimal, allLocalChildElementDuration, allLocalChildElementDatetime, allLocalChildElementTime, allLocalChildElementDate, allLocalChildElementGyearmonth, allLocalChildElementGyear, allLocalChildElementGmonthday, allLocalChildElementGday, allLocalChildElementGmonth, allLocalChildElementHexbinary, allLocalChildElementBase64binary, allLocalChildElementAnyuri, allLocalChildElementQname) + /// + /// + public virtual System.Xml.XmlQualifiedName allLocalChildElementQname { + get { + XElement x = this.GetElement(allLocalChildElementQnameXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.QName).Datatype); + } + set { + this.SetElement(allLocalChildElementQnameXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.QName).Datatype); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("globalElement1", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + static globalElement1() { + BuildElementDictionary(); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static Dictionary localElementDictionary = new Dictionary(); + + private static void BuildElementDictionary() { + localElementDictionary.Add(allLocalChildElementStringXName, typeof(string)); + localElementDictionary.Add(allLocalChildElementBooleanXName, typeof(bool)); + localElementDictionary.Add(allLocalChildElementFloatXName, typeof(float)); + localElementDictionary.Add(allLocalChildElementDoubleXName, typeof(double)); + localElementDictionary.Add(allLocalChildElementDecimalXName, typeof(decimal)); + localElementDictionary.Add(allLocalChildElementDurationXName, typeof(System.TimeSpan)); + localElementDictionary.Add(allLocalChildElementDatetimeXName, typeof(System.DateTime)); + localElementDictionary.Add(allLocalChildElementTimeXName, typeof(System.DateTime)); + localElementDictionary.Add(allLocalChildElementDateXName, typeof(System.DateTime)); + localElementDictionary.Add(allLocalChildElementGyearmonthXName, typeof(System.DateTime)); + localElementDictionary.Add(allLocalChildElementGyearXName, typeof(System.DateTime)); + localElementDictionary.Add(allLocalChildElementGmonthdayXName, typeof(System.DateTime)); + localElementDictionary.Add(allLocalChildElementGdayXName, typeof(System.DateTime)); + localElementDictionary.Add(allLocalChildElementGmonthXName, typeof(System.DateTime)); + localElementDictionary.Add(allLocalChildElementHexbinaryXName, typeof(byte[])); + localElementDictionary.Add(allLocalChildElementBase64binaryXName, typeof(byte[])); + localElementDictionary.Add(allLocalChildElementAnyuriXName, typeof(System.Uri)); + localElementDictionary.Add(allLocalChildElementQnameXName, typeof(System.Xml.XmlQualifiedName)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + Dictionary IXMetaData.LocalElementsDictionary { + get { + return localElementDictionary; + } + } + + ContentModelEntity IXMetaData.GetContentModel() { + return ContentModelEntity.Default; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + /// + /// + /// Regular expression: (sequenceLocalElementString, sequenceLocalElementBoolean, sequenceLocalElementFloat, sequenceLocalElementDouble, sequenceLocalElementDecimal, sequenceLocalElementDuration, sequenceLocalElementDatetime, sequenceLocalElementTime, sequenceLocalElementDate, sequenceLocalElementGyearmonth, sequenceLocalElementGyear, sequenceLocalElementGmonthday, sequenceLocalElementGday, sequenceLocalElementGmonth, sequenceLocalElementHexbinary, sequenceLocalElementBase64binary, sequenceLocalElementAnyuri, sequenceLocalElementQname) + /// + /// + public partial class globalElement2 : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static globalElement2 Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static globalElement2 Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static globalElement2 Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator globalElement2(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + /// + /// + /// Regular expression: (sequenceLocalElementString, sequenceLocalElementBoolean, sequenceLocalElementFloat, sequenceLocalElementDouble, sequenceLocalElementDecimal, sequenceLocalElementDuration, sequenceLocalElementDatetime, sequenceLocalElementTime, sequenceLocalElementDate, sequenceLocalElementGyearmonth, sequenceLocalElementGyear, sequenceLocalElementGmonthday, sequenceLocalElementGday, sequenceLocalElementGmonth, sequenceLocalElementHexbinary, sequenceLocalElementBase64binary, sequenceLocalElementAnyuri, sequenceLocalElementQname) + /// + /// + public globalElement2() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementStringXName = System.Xml.Linq.XName.Get("sequenceLocalElementString", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementString, sequenceLocalElementBoolean, sequenceLocalElementFloat, sequenceLocalElementDouble, sequenceLocalElementDecimal, sequenceLocalElementDuration, sequenceLocalElementDatetime, sequenceLocalElementTime, sequenceLocalElementDate, sequenceLocalElementGyearmonth, sequenceLocalElementGyear, sequenceLocalElementGmonthday, sequenceLocalElementGday, sequenceLocalElementGmonth, sequenceLocalElementHexbinary, sequenceLocalElementBase64binary, sequenceLocalElementAnyuri, sequenceLocalElementQname) + /// + /// + public virtual string sequenceLocalElementString { + get { + XElement x = this.GetElement(sequenceLocalElementStringXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype); + } + set { + this.SetElement(sequenceLocalElementStringXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementBooleanXName = System.Xml.Linq.XName.Get("sequenceLocalElementBoolean", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementString, sequenceLocalElementBoolean, sequenceLocalElementFloat, sequenceLocalElementDouble, sequenceLocalElementDecimal, sequenceLocalElementDuration, sequenceLocalElementDatetime, sequenceLocalElementTime, sequenceLocalElementDate, sequenceLocalElementGyearmonth, sequenceLocalElementGyear, sequenceLocalElementGmonthday, sequenceLocalElementGday, sequenceLocalElementGmonth, sequenceLocalElementHexbinary, sequenceLocalElementBase64binary, sequenceLocalElementAnyuri, sequenceLocalElementQname) + /// + /// + public virtual bool sequenceLocalElementBoolean { + get { + XElement x = this.GetElement(sequenceLocalElementBooleanXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Boolean).Datatype); + } + set { + this.SetElement(sequenceLocalElementBooleanXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Boolean).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementFloatXName = System.Xml.Linq.XName.Get("sequenceLocalElementFloat", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementString, sequenceLocalElementBoolean, sequenceLocalElementFloat, sequenceLocalElementDouble, sequenceLocalElementDecimal, sequenceLocalElementDuration, sequenceLocalElementDatetime, sequenceLocalElementTime, sequenceLocalElementDate, sequenceLocalElementGyearmonth, sequenceLocalElementGyear, sequenceLocalElementGmonthday, sequenceLocalElementGday, sequenceLocalElementGmonth, sequenceLocalElementHexbinary, sequenceLocalElementBase64binary, sequenceLocalElementAnyuri, sequenceLocalElementQname) + /// + /// + public virtual float sequenceLocalElementFloat { + get { + XElement x = this.GetElement(sequenceLocalElementFloatXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Float).Datatype); + } + set { + this.SetElement(sequenceLocalElementFloatXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Float).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementDoubleXName = System.Xml.Linq.XName.Get("sequenceLocalElementDouble", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementString, sequenceLocalElementBoolean, sequenceLocalElementFloat, sequenceLocalElementDouble, sequenceLocalElementDecimal, sequenceLocalElementDuration, sequenceLocalElementDatetime, sequenceLocalElementTime, sequenceLocalElementDate, sequenceLocalElementGyearmonth, sequenceLocalElementGyear, sequenceLocalElementGmonthday, sequenceLocalElementGday, sequenceLocalElementGmonth, sequenceLocalElementHexbinary, sequenceLocalElementBase64binary, sequenceLocalElementAnyuri, sequenceLocalElementQname) + /// + /// + public virtual double sequenceLocalElementDouble { + get { + XElement x = this.GetElement(sequenceLocalElementDoubleXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Double).Datatype); + } + set { + this.SetElement(sequenceLocalElementDoubleXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Double).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementDecimalXName = System.Xml.Linq.XName.Get("sequenceLocalElementDecimal", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementString, sequenceLocalElementBoolean, sequenceLocalElementFloat, sequenceLocalElementDouble, sequenceLocalElementDecimal, sequenceLocalElementDuration, sequenceLocalElementDatetime, sequenceLocalElementTime, sequenceLocalElementDate, sequenceLocalElementGyearmonth, sequenceLocalElementGyear, sequenceLocalElementGmonthday, sequenceLocalElementGday, sequenceLocalElementGmonth, sequenceLocalElementHexbinary, sequenceLocalElementBase64binary, sequenceLocalElementAnyuri, sequenceLocalElementQname) + /// + /// + public virtual decimal sequenceLocalElementDecimal { + get { + XElement x = this.GetElement(sequenceLocalElementDecimalXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Decimal).Datatype); + } + set { + this.SetElement(sequenceLocalElementDecimalXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Decimal).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementDurationXName = System.Xml.Linq.XName.Get("sequenceLocalElementDuration", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementString, sequenceLocalElementBoolean, sequenceLocalElementFloat, sequenceLocalElementDouble, sequenceLocalElementDecimal, sequenceLocalElementDuration, sequenceLocalElementDatetime, sequenceLocalElementTime, sequenceLocalElementDate, sequenceLocalElementGyearmonth, sequenceLocalElementGyear, sequenceLocalElementGmonthday, sequenceLocalElementGday, sequenceLocalElementGmonth, sequenceLocalElementHexbinary, sequenceLocalElementBase64binary, sequenceLocalElementAnyuri, sequenceLocalElementQname) + /// + /// + public virtual System.TimeSpan sequenceLocalElementDuration { + get { + XElement x = this.GetElement(sequenceLocalElementDurationXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Duration).Datatype); + } + set { + this.SetElement(sequenceLocalElementDurationXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Duration).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementDatetimeXName = System.Xml.Linq.XName.Get("sequenceLocalElementDatetime", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementString, sequenceLocalElementBoolean, sequenceLocalElementFloat, sequenceLocalElementDouble, sequenceLocalElementDecimal, sequenceLocalElementDuration, sequenceLocalElementDatetime, sequenceLocalElementTime, sequenceLocalElementDate, sequenceLocalElementGyearmonth, sequenceLocalElementGyear, sequenceLocalElementGmonthday, sequenceLocalElementGday, sequenceLocalElementGmonth, sequenceLocalElementHexbinary, sequenceLocalElementBase64binary, sequenceLocalElementAnyuri, sequenceLocalElementQname) + /// + /// + public virtual System.DateTime sequenceLocalElementDatetime { + get { + XElement x = this.GetElement(sequenceLocalElementDatetimeXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.DateTime).Datatype); + } + set { + this.SetElement(sequenceLocalElementDatetimeXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.DateTime).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementTimeXName = System.Xml.Linq.XName.Get("sequenceLocalElementTime", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementString, sequenceLocalElementBoolean, sequenceLocalElementFloat, sequenceLocalElementDouble, sequenceLocalElementDecimal, sequenceLocalElementDuration, sequenceLocalElementDatetime, sequenceLocalElementTime, sequenceLocalElementDate, sequenceLocalElementGyearmonth, sequenceLocalElementGyear, sequenceLocalElementGmonthday, sequenceLocalElementGday, sequenceLocalElementGmonth, sequenceLocalElementHexbinary, sequenceLocalElementBase64binary, sequenceLocalElementAnyuri, sequenceLocalElementQname) + /// + /// + public virtual System.DateTime sequenceLocalElementTime { + get { + XElement x = this.GetElement(sequenceLocalElementTimeXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Time).Datatype); + } + set { + this.SetElement(sequenceLocalElementTimeXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Time).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementDateXName = System.Xml.Linq.XName.Get("sequenceLocalElementDate", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementString, sequenceLocalElementBoolean, sequenceLocalElementFloat, sequenceLocalElementDouble, sequenceLocalElementDecimal, sequenceLocalElementDuration, sequenceLocalElementDatetime, sequenceLocalElementTime, sequenceLocalElementDate, sequenceLocalElementGyearmonth, sequenceLocalElementGyear, sequenceLocalElementGmonthday, sequenceLocalElementGday, sequenceLocalElementGmonth, sequenceLocalElementHexbinary, sequenceLocalElementBase64binary, sequenceLocalElementAnyuri, sequenceLocalElementQname) + /// + /// + public virtual System.DateTime sequenceLocalElementDate { + get { + XElement x = this.GetElement(sequenceLocalElementDateXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Date).Datatype); + } + set { + this.SetElement(sequenceLocalElementDateXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Date).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementGyearmonthXName = System.Xml.Linq.XName.Get("sequenceLocalElementGyearmonth", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementString, sequenceLocalElementBoolean, sequenceLocalElementFloat, sequenceLocalElementDouble, sequenceLocalElementDecimal, sequenceLocalElementDuration, sequenceLocalElementDatetime, sequenceLocalElementTime, sequenceLocalElementDate, sequenceLocalElementGyearmonth, sequenceLocalElementGyear, sequenceLocalElementGmonthday, sequenceLocalElementGday, sequenceLocalElementGmonth, sequenceLocalElementHexbinary, sequenceLocalElementBase64binary, sequenceLocalElementAnyuri, sequenceLocalElementQname) + /// + /// + public virtual System.DateTime sequenceLocalElementGyearmonth { + get { + XElement x = this.GetElement(sequenceLocalElementGyearmonthXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.GYearMonth).Datatype); + } + set { + this.SetElement(sequenceLocalElementGyearmonthXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.GYearMonth).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementGyearXName = System.Xml.Linq.XName.Get("sequenceLocalElementGyear", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementString, sequenceLocalElementBoolean, sequenceLocalElementFloat, sequenceLocalElementDouble, sequenceLocalElementDecimal, sequenceLocalElementDuration, sequenceLocalElementDatetime, sequenceLocalElementTime, sequenceLocalElementDate, sequenceLocalElementGyearmonth, sequenceLocalElementGyear, sequenceLocalElementGmonthday, sequenceLocalElementGday, sequenceLocalElementGmonth, sequenceLocalElementHexbinary, sequenceLocalElementBase64binary, sequenceLocalElementAnyuri, sequenceLocalElementQname) + /// + /// + public virtual System.DateTime sequenceLocalElementGyear { + get { + XElement x = this.GetElement(sequenceLocalElementGyearXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.GYear).Datatype); + } + set { + this.SetElement(sequenceLocalElementGyearXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.GYear).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementGmonthdayXName = System.Xml.Linq.XName.Get("sequenceLocalElementGmonthday", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementString, sequenceLocalElementBoolean, sequenceLocalElementFloat, sequenceLocalElementDouble, sequenceLocalElementDecimal, sequenceLocalElementDuration, sequenceLocalElementDatetime, sequenceLocalElementTime, sequenceLocalElementDate, sequenceLocalElementGyearmonth, sequenceLocalElementGyear, sequenceLocalElementGmonthday, sequenceLocalElementGday, sequenceLocalElementGmonth, sequenceLocalElementHexbinary, sequenceLocalElementBase64binary, sequenceLocalElementAnyuri, sequenceLocalElementQname) + /// + /// + public virtual System.DateTime sequenceLocalElementGmonthday { + get { + XElement x = this.GetElement(sequenceLocalElementGmonthdayXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.GMonthDay).Datatype); + } + set { + this.SetElement(sequenceLocalElementGmonthdayXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.GMonthDay).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementGdayXName = System.Xml.Linq.XName.Get("sequenceLocalElementGday", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementString, sequenceLocalElementBoolean, sequenceLocalElementFloat, sequenceLocalElementDouble, sequenceLocalElementDecimal, sequenceLocalElementDuration, sequenceLocalElementDatetime, sequenceLocalElementTime, sequenceLocalElementDate, sequenceLocalElementGyearmonth, sequenceLocalElementGyear, sequenceLocalElementGmonthday, sequenceLocalElementGday, sequenceLocalElementGmonth, sequenceLocalElementHexbinary, sequenceLocalElementBase64binary, sequenceLocalElementAnyuri, sequenceLocalElementQname) + /// + /// + public virtual System.DateTime sequenceLocalElementGday { + get { + XElement x = this.GetElement(sequenceLocalElementGdayXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.GDay).Datatype); + } + set { + this.SetElement(sequenceLocalElementGdayXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.GDay).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementGmonthXName = System.Xml.Linq.XName.Get("sequenceLocalElementGmonth", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementString, sequenceLocalElementBoolean, sequenceLocalElementFloat, sequenceLocalElementDouble, sequenceLocalElementDecimal, sequenceLocalElementDuration, sequenceLocalElementDatetime, sequenceLocalElementTime, sequenceLocalElementDate, sequenceLocalElementGyearmonth, sequenceLocalElementGyear, sequenceLocalElementGmonthday, sequenceLocalElementGday, sequenceLocalElementGmonth, sequenceLocalElementHexbinary, sequenceLocalElementBase64binary, sequenceLocalElementAnyuri, sequenceLocalElementQname) + /// + /// + public virtual System.DateTime sequenceLocalElementGmonth { + get { + XElement x = this.GetElement(sequenceLocalElementGmonthXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.GMonth).Datatype); + } + set { + this.SetElement(sequenceLocalElementGmonthXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.GMonth).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementHexbinaryXName = System.Xml.Linq.XName.Get("sequenceLocalElementHexbinary", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementString, sequenceLocalElementBoolean, sequenceLocalElementFloat, sequenceLocalElementDouble, sequenceLocalElementDecimal, sequenceLocalElementDuration, sequenceLocalElementDatetime, sequenceLocalElementTime, sequenceLocalElementDate, sequenceLocalElementGyearmonth, sequenceLocalElementGyear, sequenceLocalElementGmonthday, sequenceLocalElementGday, sequenceLocalElementGmonth, sequenceLocalElementHexbinary, sequenceLocalElementBase64binary, sequenceLocalElementAnyuri, sequenceLocalElementQname) + /// + /// + public virtual byte[] sequenceLocalElementHexbinary { + get { + XElement x = this.GetElement(sequenceLocalElementHexbinaryXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.HexBinary).Datatype); + } + set { + this.SetElement(sequenceLocalElementHexbinaryXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.HexBinary).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementBase64binaryXName = System.Xml.Linq.XName.Get("sequenceLocalElementBase64binary", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementString, sequenceLocalElementBoolean, sequenceLocalElementFloat, sequenceLocalElementDouble, sequenceLocalElementDecimal, sequenceLocalElementDuration, sequenceLocalElementDatetime, sequenceLocalElementTime, sequenceLocalElementDate, sequenceLocalElementGyearmonth, sequenceLocalElementGyear, sequenceLocalElementGmonthday, sequenceLocalElementGday, sequenceLocalElementGmonth, sequenceLocalElementHexbinary, sequenceLocalElementBase64binary, sequenceLocalElementAnyuri, sequenceLocalElementQname) + /// + /// + public virtual byte[] sequenceLocalElementBase64binary { + get { + XElement x = this.GetElement(sequenceLocalElementBase64binaryXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Base64Binary).Datatype); + } + set { + this.SetElement(sequenceLocalElementBase64binaryXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Base64Binary).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementAnyuriXName = System.Xml.Linq.XName.Get("sequenceLocalElementAnyuri", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementString, sequenceLocalElementBoolean, sequenceLocalElementFloat, sequenceLocalElementDouble, sequenceLocalElementDecimal, sequenceLocalElementDuration, sequenceLocalElementDatetime, sequenceLocalElementTime, sequenceLocalElementDate, sequenceLocalElementGyearmonth, sequenceLocalElementGyear, sequenceLocalElementGmonthday, sequenceLocalElementGday, sequenceLocalElementGmonth, sequenceLocalElementHexbinary, sequenceLocalElementBase64binary, sequenceLocalElementAnyuri, sequenceLocalElementQname) + /// + /// + public virtual System.Uri sequenceLocalElementAnyuri { + get { + XElement x = this.GetElement(sequenceLocalElementAnyuriXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyUri).Datatype); + } + set { + this.SetElement(sequenceLocalElementAnyuriXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyUri).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementQnameXName = System.Xml.Linq.XName.Get("sequenceLocalElementQname", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementString, sequenceLocalElementBoolean, sequenceLocalElementFloat, sequenceLocalElementDouble, sequenceLocalElementDecimal, sequenceLocalElementDuration, sequenceLocalElementDatetime, sequenceLocalElementTime, sequenceLocalElementDate, sequenceLocalElementGyearmonth, sequenceLocalElementGyear, sequenceLocalElementGmonthday, sequenceLocalElementGday, sequenceLocalElementGmonth, sequenceLocalElementHexbinary, sequenceLocalElementBase64binary, sequenceLocalElementAnyuri, sequenceLocalElementQname) + /// + /// + public virtual System.Xml.XmlQualifiedName sequenceLocalElementQname { + get { + XElement x = this.GetElement(sequenceLocalElementQnameXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.QName).Datatype); + } + set { + this.SetElement(sequenceLocalElementQnameXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.QName).Datatype); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("globalElement2", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + static globalElement2() { + BuildElementDictionary(); + contentModel = new SequenceContentModelEntity(new NamedContentModelEntity(sequenceLocalElementStringXName), new NamedContentModelEntity(sequenceLocalElementBooleanXName), new NamedContentModelEntity(sequenceLocalElementFloatXName), new NamedContentModelEntity(sequenceLocalElementDoubleXName), new NamedContentModelEntity(sequenceLocalElementDecimalXName), new NamedContentModelEntity(sequenceLocalElementDurationXName), new NamedContentModelEntity(sequenceLocalElementDatetimeXName), new NamedContentModelEntity(sequenceLocalElementTimeXName), new NamedContentModelEntity(sequenceLocalElementDateXName), new NamedContentModelEntity(sequenceLocalElementGyearmonthXName), new NamedContentModelEntity(sequenceLocalElementGyearXName), new NamedContentModelEntity(sequenceLocalElementGmonthdayXName), new NamedContentModelEntity(sequenceLocalElementGdayXName), new NamedContentModelEntity(sequenceLocalElementGmonthXName), new NamedContentModelEntity(sequenceLocalElementHexbinaryXName), new NamedContentModelEntity(sequenceLocalElementBase64binaryXName), new NamedContentModelEntity(sequenceLocalElementAnyuriXName), new NamedContentModelEntity(sequenceLocalElementQnameXName)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static Dictionary localElementDictionary = new Dictionary(); + + private static void BuildElementDictionary() { + localElementDictionary.Add(sequenceLocalElementStringXName, typeof(string)); + localElementDictionary.Add(sequenceLocalElementBooleanXName, typeof(bool)); + localElementDictionary.Add(sequenceLocalElementFloatXName, typeof(float)); + localElementDictionary.Add(sequenceLocalElementDoubleXName, typeof(double)); + localElementDictionary.Add(sequenceLocalElementDecimalXName, typeof(decimal)); + localElementDictionary.Add(sequenceLocalElementDurationXName, typeof(System.TimeSpan)); + localElementDictionary.Add(sequenceLocalElementDatetimeXName, typeof(System.DateTime)); + localElementDictionary.Add(sequenceLocalElementTimeXName, typeof(System.DateTime)); + localElementDictionary.Add(sequenceLocalElementDateXName, typeof(System.DateTime)); + localElementDictionary.Add(sequenceLocalElementGyearmonthXName, typeof(System.DateTime)); + localElementDictionary.Add(sequenceLocalElementGyearXName, typeof(System.DateTime)); + localElementDictionary.Add(sequenceLocalElementGmonthdayXName, typeof(System.DateTime)); + localElementDictionary.Add(sequenceLocalElementGdayXName, typeof(System.DateTime)); + localElementDictionary.Add(sequenceLocalElementGmonthXName, typeof(System.DateTime)); + localElementDictionary.Add(sequenceLocalElementHexbinaryXName, typeof(byte[])); + localElementDictionary.Add(sequenceLocalElementBase64binaryXName, typeof(byte[])); + localElementDictionary.Add(sequenceLocalElementAnyuriXName, typeof(System.Uri)); + localElementDictionary.Add(sequenceLocalElementQnameXName, typeof(System.Xml.XmlQualifiedName)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + Dictionary IXMetaData.LocalElementsDictionary { + get { + return localElementDictionary; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static ContentModelEntity contentModel; + + ContentModelEntity IXMetaData.GetContentModel() { + return contentModel; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + /// + /// + /// Regular expression: (choiceLocalElementString | choiceLocalElementBoolean | choiceLocalElementFloat | choiceLocalElementDouble | choiceLocalElementDecimal | choiceLocalElementDuration | choiceLocalElementDatetime | choiceLocalElementTime | choiceLocalElementDate | choiceLocalElementGyearmonth | choiceLocalElementGyear | choiceLocalElementGmonthday | choiceLocalElementGday | choiceLocalElementGmonth | choiceLocalElementHexbinary | choiceLocalElementBase64binary | choiceLocalElementAnyuri | choiceLocalElementQname) + /// + /// + public partial class globalElement3 : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static globalElement3 Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static globalElement3 Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static globalElement3 Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator globalElement3(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + /// + /// + /// Regular expression: (choiceLocalElementString | choiceLocalElementBoolean | choiceLocalElementFloat | choiceLocalElementDouble | choiceLocalElementDecimal | choiceLocalElementDuration | choiceLocalElementDatetime | choiceLocalElementTime | choiceLocalElementDate | choiceLocalElementGyearmonth | choiceLocalElementGyear | choiceLocalElementGmonthday | choiceLocalElementGday | choiceLocalElementGmonth | choiceLocalElementHexbinary | choiceLocalElementBase64binary | choiceLocalElementAnyuri | choiceLocalElementQname) + /// + /// + public globalElement3() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementStringXName = System.Xml.Linq.XName.Get("choiceLocalElementString", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementString | choiceLocalElementBoolean | choiceLocalElementFloat | choiceLocalElementDouble | choiceLocalElementDecimal | choiceLocalElementDuration | choiceLocalElementDatetime | choiceLocalElementTime | choiceLocalElementDate | choiceLocalElementGyearmonth | choiceLocalElementGyear | choiceLocalElementGmonthday | choiceLocalElementGday | choiceLocalElementGmonth | choiceLocalElementHexbinary | choiceLocalElementBase64binary | choiceLocalElementAnyuri | choiceLocalElementQname) + /// + /// + public virtual string choiceLocalElementString { + get { + XElement x = this.GetElement(choiceLocalElementStringXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype); + } + set { + this.SetElement(choiceLocalElementStringXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementBooleanXName = System.Xml.Linq.XName.Get("choiceLocalElementBoolean", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementString | choiceLocalElementBoolean | choiceLocalElementFloat | choiceLocalElementDouble | choiceLocalElementDecimal | choiceLocalElementDuration | choiceLocalElementDatetime | choiceLocalElementTime | choiceLocalElementDate | choiceLocalElementGyearmonth | choiceLocalElementGyear | choiceLocalElementGmonthday | choiceLocalElementGday | choiceLocalElementGmonth | choiceLocalElementHexbinary | choiceLocalElementBase64binary | choiceLocalElementAnyuri | choiceLocalElementQname) + /// + /// + public virtual System.Boolean? choiceLocalElementBoolean { + get { + XElement x = this.GetElement(choiceLocalElementBooleanXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Boolean).Datatype); + } + set { + this.SetElement(choiceLocalElementBooleanXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Boolean).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementFloatXName = System.Xml.Linq.XName.Get("choiceLocalElementFloat", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementString | choiceLocalElementBoolean | choiceLocalElementFloat | choiceLocalElementDouble | choiceLocalElementDecimal | choiceLocalElementDuration | choiceLocalElementDatetime | choiceLocalElementTime | choiceLocalElementDate | choiceLocalElementGyearmonth | choiceLocalElementGyear | choiceLocalElementGmonthday | choiceLocalElementGday | choiceLocalElementGmonth | choiceLocalElementHexbinary | choiceLocalElementBase64binary | choiceLocalElementAnyuri | choiceLocalElementQname) + /// + /// + public virtual System.Single? choiceLocalElementFloat { + get { + XElement x = this.GetElement(choiceLocalElementFloatXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Float).Datatype); + } + set { + this.SetElement(choiceLocalElementFloatXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Float).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementDoubleXName = System.Xml.Linq.XName.Get("choiceLocalElementDouble", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementString | choiceLocalElementBoolean | choiceLocalElementFloat | choiceLocalElementDouble | choiceLocalElementDecimal | choiceLocalElementDuration | choiceLocalElementDatetime | choiceLocalElementTime | choiceLocalElementDate | choiceLocalElementGyearmonth | choiceLocalElementGyear | choiceLocalElementGmonthday | choiceLocalElementGday | choiceLocalElementGmonth | choiceLocalElementHexbinary | choiceLocalElementBase64binary | choiceLocalElementAnyuri | choiceLocalElementQname) + /// + /// + public virtual System.Double? choiceLocalElementDouble { + get { + XElement x = this.GetElement(choiceLocalElementDoubleXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Double).Datatype); + } + set { + this.SetElement(choiceLocalElementDoubleXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Double).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementDecimalXName = System.Xml.Linq.XName.Get("choiceLocalElementDecimal", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementString | choiceLocalElementBoolean | choiceLocalElementFloat | choiceLocalElementDouble | choiceLocalElementDecimal | choiceLocalElementDuration | choiceLocalElementDatetime | choiceLocalElementTime | choiceLocalElementDate | choiceLocalElementGyearmonth | choiceLocalElementGyear | choiceLocalElementGmonthday | choiceLocalElementGday | choiceLocalElementGmonth | choiceLocalElementHexbinary | choiceLocalElementBase64binary | choiceLocalElementAnyuri | choiceLocalElementQname) + /// + /// + public virtual System.Decimal? choiceLocalElementDecimal { + get { + XElement x = this.GetElement(choiceLocalElementDecimalXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Decimal).Datatype); + } + set { + this.SetElement(choiceLocalElementDecimalXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Decimal).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementDurationXName = System.Xml.Linq.XName.Get("choiceLocalElementDuration", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementString | choiceLocalElementBoolean | choiceLocalElementFloat | choiceLocalElementDouble | choiceLocalElementDecimal | choiceLocalElementDuration | choiceLocalElementDatetime | choiceLocalElementTime | choiceLocalElementDate | choiceLocalElementGyearmonth | choiceLocalElementGyear | choiceLocalElementGmonthday | choiceLocalElementGday | choiceLocalElementGmonth | choiceLocalElementHexbinary | choiceLocalElementBase64binary | choiceLocalElementAnyuri | choiceLocalElementQname) + /// + /// + public virtual System.TimeSpan? choiceLocalElementDuration { + get { + XElement x = this.GetElement(choiceLocalElementDurationXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Duration).Datatype); + } + set { + this.SetElement(choiceLocalElementDurationXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Duration).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementDatetimeXName = System.Xml.Linq.XName.Get("choiceLocalElementDatetime", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementString | choiceLocalElementBoolean | choiceLocalElementFloat | choiceLocalElementDouble | choiceLocalElementDecimal | choiceLocalElementDuration | choiceLocalElementDatetime | choiceLocalElementTime | choiceLocalElementDate | choiceLocalElementGyearmonth | choiceLocalElementGyear | choiceLocalElementGmonthday | choiceLocalElementGday | choiceLocalElementGmonth | choiceLocalElementHexbinary | choiceLocalElementBase64binary | choiceLocalElementAnyuri | choiceLocalElementQname) + /// + /// + public virtual System.DateTime? choiceLocalElementDatetime { + get { + XElement x = this.GetElement(choiceLocalElementDatetimeXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.DateTime).Datatype); + } + set { + this.SetElement(choiceLocalElementDatetimeXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.DateTime).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementTimeXName = System.Xml.Linq.XName.Get("choiceLocalElementTime", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementString | choiceLocalElementBoolean | choiceLocalElementFloat | choiceLocalElementDouble | choiceLocalElementDecimal | choiceLocalElementDuration | choiceLocalElementDatetime | choiceLocalElementTime | choiceLocalElementDate | choiceLocalElementGyearmonth | choiceLocalElementGyear | choiceLocalElementGmonthday | choiceLocalElementGday | choiceLocalElementGmonth | choiceLocalElementHexbinary | choiceLocalElementBase64binary | choiceLocalElementAnyuri | choiceLocalElementQname) + /// + /// + public virtual System.DateTime? choiceLocalElementTime { + get { + XElement x = this.GetElement(choiceLocalElementTimeXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Time).Datatype); + } + set { + this.SetElement(choiceLocalElementTimeXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Time).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementDateXName = System.Xml.Linq.XName.Get("choiceLocalElementDate", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementString | choiceLocalElementBoolean | choiceLocalElementFloat | choiceLocalElementDouble | choiceLocalElementDecimal | choiceLocalElementDuration | choiceLocalElementDatetime | choiceLocalElementTime | choiceLocalElementDate | choiceLocalElementGyearmonth | choiceLocalElementGyear | choiceLocalElementGmonthday | choiceLocalElementGday | choiceLocalElementGmonth | choiceLocalElementHexbinary | choiceLocalElementBase64binary | choiceLocalElementAnyuri | choiceLocalElementQname) + /// + /// + public virtual System.DateTime? choiceLocalElementDate { + get { + XElement x = this.GetElement(choiceLocalElementDateXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Date).Datatype); + } + set { + this.SetElement(choiceLocalElementDateXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Date).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementGyearmonthXName = System.Xml.Linq.XName.Get("choiceLocalElementGyearmonth", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementString | choiceLocalElementBoolean | choiceLocalElementFloat | choiceLocalElementDouble | choiceLocalElementDecimal | choiceLocalElementDuration | choiceLocalElementDatetime | choiceLocalElementTime | choiceLocalElementDate | choiceLocalElementGyearmonth | choiceLocalElementGyear | choiceLocalElementGmonthday | choiceLocalElementGday | choiceLocalElementGmonth | choiceLocalElementHexbinary | choiceLocalElementBase64binary | choiceLocalElementAnyuri | choiceLocalElementQname) + /// + /// + public virtual System.DateTime? choiceLocalElementGyearmonth { + get { + XElement x = this.GetElement(choiceLocalElementGyearmonthXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.GYearMonth).Datatype); + } + set { + this.SetElement(choiceLocalElementGyearmonthXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.GYearMonth).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementGyearXName = System.Xml.Linq.XName.Get("choiceLocalElementGyear", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementString | choiceLocalElementBoolean | choiceLocalElementFloat | choiceLocalElementDouble | choiceLocalElementDecimal | choiceLocalElementDuration | choiceLocalElementDatetime | choiceLocalElementTime | choiceLocalElementDate | choiceLocalElementGyearmonth | choiceLocalElementGyear | choiceLocalElementGmonthday | choiceLocalElementGday | choiceLocalElementGmonth | choiceLocalElementHexbinary | choiceLocalElementBase64binary | choiceLocalElementAnyuri | choiceLocalElementQname) + /// + /// + public virtual System.DateTime? choiceLocalElementGyear { + get { + XElement x = this.GetElement(choiceLocalElementGyearXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.GYear).Datatype); + } + set { + this.SetElement(choiceLocalElementGyearXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.GYear).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementGmonthdayXName = System.Xml.Linq.XName.Get("choiceLocalElementGmonthday", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementString | choiceLocalElementBoolean | choiceLocalElementFloat | choiceLocalElementDouble | choiceLocalElementDecimal | choiceLocalElementDuration | choiceLocalElementDatetime | choiceLocalElementTime | choiceLocalElementDate | choiceLocalElementGyearmonth | choiceLocalElementGyear | choiceLocalElementGmonthday | choiceLocalElementGday | choiceLocalElementGmonth | choiceLocalElementHexbinary | choiceLocalElementBase64binary | choiceLocalElementAnyuri | choiceLocalElementQname) + /// + /// + public virtual System.DateTime? choiceLocalElementGmonthday { + get { + XElement x = this.GetElement(choiceLocalElementGmonthdayXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.GMonthDay).Datatype); + } + set { + this.SetElement(choiceLocalElementGmonthdayXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.GMonthDay).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementGdayXName = System.Xml.Linq.XName.Get("choiceLocalElementGday", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementString | choiceLocalElementBoolean | choiceLocalElementFloat | choiceLocalElementDouble | choiceLocalElementDecimal | choiceLocalElementDuration | choiceLocalElementDatetime | choiceLocalElementTime | choiceLocalElementDate | choiceLocalElementGyearmonth | choiceLocalElementGyear | choiceLocalElementGmonthday | choiceLocalElementGday | choiceLocalElementGmonth | choiceLocalElementHexbinary | choiceLocalElementBase64binary | choiceLocalElementAnyuri | choiceLocalElementQname) + /// + /// + public virtual System.DateTime? choiceLocalElementGday { + get { + XElement x = this.GetElement(choiceLocalElementGdayXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.GDay).Datatype); + } + set { + this.SetElement(choiceLocalElementGdayXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.GDay).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementGmonthXName = System.Xml.Linq.XName.Get("choiceLocalElementGmonth", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementString | choiceLocalElementBoolean | choiceLocalElementFloat | choiceLocalElementDouble | choiceLocalElementDecimal | choiceLocalElementDuration | choiceLocalElementDatetime | choiceLocalElementTime | choiceLocalElementDate | choiceLocalElementGyearmonth | choiceLocalElementGyear | choiceLocalElementGmonthday | choiceLocalElementGday | choiceLocalElementGmonth | choiceLocalElementHexbinary | choiceLocalElementBase64binary | choiceLocalElementAnyuri | choiceLocalElementQname) + /// + /// + public virtual System.DateTime? choiceLocalElementGmonth { + get { + XElement x = this.GetElement(choiceLocalElementGmonthXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.GMonth).Datatype); + } + set { + this.SetElement(choiceLocalElementGmonthXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.GMonth).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementHexbinaryXName = System.Xml.Linq.XName.Get("choiceLocalElementHexbinary", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementString | choiceLocalElementBoolean | choiceLocalElementFloat | choiceLocalElementDouble | choiceLocalElementDecimal | choiceLocalElementDuration | choiceLocalElementDatetime | choiceLocalElementTime | choiceLocalElementDate | choiceLocalElementGyearmonth | choiceLocalElementGyear | choiceLocalElementGmonthday | choiceLocalElementGday | choiceLocalElementGmonth | choiceLocalElementHexbinary | choiceLocalElementBase64binary | choiceLocalElementAnyuri | choiceLocalElementQname) + /// + /// + public virtual byte[] choiceLocalElementHexbinary { + get { + XElement x = this.GetElement(choiceLocalElementHexbinaryXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.HexBinary).Datatype); + } + set { + this.SetElement(choiceLocalElementHexbinaryXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.HexBinary).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementBase64binaryXName = System.Xml.Linq.XName.Get("choiceLocalElementBase64binary", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementString | choiceLocalElementBoolean | choiceLocalElementFloat | choiceLocalElementDouble | choiceLocalElementDecimal | choiceLocalElementDuration | choiceLocalElementDatetime | choiceLocalElementTime | choiceLocalElementDate | choiceLocalElementGyearmonth | choiceLocalElementGyear | choiceLocalElementGmonthday | choiceLocalElementGday | choiceLocalElementGmonth | choiceLocalElementHexbinary | choiceLocalElementBase64binary | choiceLocalElementAnyuri | choiceLocalElementQname) + /// + /// + public virtual byte[] choiceLocalElementBase64binary { + get { + XElement x = this.GetElement(choiceLocalElementBase64binaryXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Base64Binary).Datatype); + } + set { + this.SetElement(choiceLocalElementBase64binaryXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Base64Binary).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementAnyuriXName = System.Xml.Linq.XName.Get("choiceLocalElementAnyuri", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementString | choiceLocalElementBoolean | choiceLocalElementFloat | choiceLocalElementDouble | choiceLocalElementDecimal | choiceLocalElementDuration | choiceLocalElementDatetime | choiceLocalElementTime | choiceLocalElementDate | choiceLocalElementGyearmonth | choiceLocalElementGyear | choiceLocalElementGmonthday | choiceLocalElementGday | choiceLocalElementGmonth | choiceLocalElementHexbinary | choiceLocalElementBase64binary | choiceLocalElementAnyuri | choiceLocalElementQname) + /// + /// + public virtual System.Uri choiceLocalElementAnyuri { + get { + XElement x = this.GetElement(choiceLocalElementAnyuriXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyUri).Datatype); + } + set { + this.SetElement(choiceLocalElementAnyuriXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyUri).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementQnameXName = System.Xml.Linq.XName.Get("choiceLocalElementQname", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementString | choiceLocalElementBoolean | choiceLocalElementFloat | choiceLocalElementDouble | choiceLocalElementDecimal | choiceLocalElementDuration | choiceLocalElementDatetime | choiceLocalElementTime | choiceLocalElementDate | choiceLocalElementGyearmonth | choiceLocalElementGyear | choiceLocalElementGmonthday | choiceLocalElementGday | choiceLocalElementGmonth | choiceLocalElementHexbinary | choiceLocalElementBase64binary | choiceLocalElementAnyuri | choiceLocalElementQname) + /// + /// + public virtual System.Xml.XmlQualifiedName choiceLocalElementQname { + get { + XElement x = this.GetElement(choiceLocalElementQnameXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.QName).Datatype); + } + set { + this.SetElement(choiceLocalElementQnameXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.QName).Datatype); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("globalElement3", "urn:linqtoxsd.schemas.ElementsWithTypesTest"); + + static globalElement3() { + BuildElementDictionary(); + contentModel = new ChoiceContentModelEntity(new NamedContentModelEntity(choiceLocalElementStringXName), new NamedContentModelEntity(choiceLocalElementBooleanXName), new NamedContentModelEntity(choiceLocalElementFloatXName), new NamedContentModelEntity(choiceLocalElementDoubleXName), new NamedContentModelEntity(choiceLocalElementDecimalXName), new NamedContentModelEntity(choiceLocalElementDurationXName), new NamedContentModelEntity(choiceLocalElementDatetimeXName), new NamedContentModelEntity(choiceLocalElementTimeXName), new NamedContentModelEntity(choiceLocalElementDateXName), new NamedContentModelEntity(choiceLocalElementGyearmonthXName), new NamedContentModelEntity(choiceLocalElementGyearXName), new NamedContentModelEntity(choiceLocalElementGmonthdayXName), new NamedContentModelEntity(choiceLocalElementGdayXName), new NamedContentModelEntity(choiceLocalElementGmonthXName), new NamedContentModelEntity(choiceLocalElementHexbinaryXName), new NamedContentModelEntity(choiceLocalElementBase64binaryXName), new NamedContentModelEntity(choiceLocalElementAnyuriXName), new NamedContentModelEntity(choiceLocalElementQnameXName)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static Dictionary localElementDictionary = new Dictionary(); + + private static void BuildElementDictionary() { + localElementDictionary.Add(choiceLocalElementStringXName, typeof(string)); + localElementDictionary.Add(choiceLocalElementBooleanXName, typeof(bool)); + localElementDictionary.Add(choiceLocalElementFloatXName, typeof(float)); + localElementDictionary.Add(choiceLocalElementDoubleXName, typeof(double)); + localElementDictionary.Add(choiceLocalElementDecimalXName, typeof(decimal)); + localElementDictionary.Add(choiceLocalElementDurationXName, typeof(System.TimeSpan)); + localElementDictionary.Add(choiceLocalElementDatetimeXName, typeof(System.DateTime)); + localElementDictionary.Add(choiceLocalElementTimeXName, typeof(System.DateTime)); + localElementDictionary.Add(choiceLocalElementDateXName, typeof(System.DateTime)); + localElementDictionary.Add(choiceLocalElementGyearmonthXName, typeof(System.DateTime)); + localElementDictionary.Add(choiceLocalElementGyearXName, typeof(System.DateTime)); + localElementDictionary.Add(choiceLocalElementGmonthdayXName, typeof(System.DateTime)); + localElementDictionary.Add(choiceLocalElementGdayXName, typeof(System.DateTime)); + localElementDictionary.Add(choiceLocalElementGmonthXName, typeof(System.DateTime)); + localElementDictionary.Add(choiceLocalElementHexbinaryXName, typeof(byte[])); + localElementDictionary.Add(choiceLocalElementBase64binaryXName, typeof(byte[])); + localElementDictionary.Add(choiceLocalElementAnyuriXName, typeof(System.Uri)); + localElementDictionary.Add(choiceLocalElementQnameXName, typeof(System.Xml.XmlQualifiedName)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + Dictionary IXMetaData.LocalElementsDictionary { + get { + return localElementDictionary; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static ContentModelEntity contentModel; + + ContentModelEntity IXMetaData.GetContentModel() { + return contentModel; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + public class LinqToXsdTypeManager : ILinqToXsdTypeManager { + + private LinqToXsdTypeManager() { + } + + private static Dictionary elementDictionary = new Dictionary(); + + private static void BuildElementDictionary() { + elementDictionary.Add(System.Xml.Linq.XName.Get("globalElement1", "urn:linqtoxsd.schemas.ElementsWithTypesTest"), typeof(global::urn.linqtoxsd.schemas.ElementsWithTypesTest.globalElement1)); + elementDictionary.Add(System.Xml.Linq.XName.Get("globalElement2", "urn:linqtoxsd.schemas.ElementsWithTypesTest"), typeof(global::urn.linqtoxsd.schemas.ElementsWithTypesTest.globalElement2)); + elementDictionary.Add(System.Xml.Linq.XName.Get("globalElement3", "urn:linqtoxsd.schemas.ElementsWithTypesTest"), typeof(global::urn.linqtoxsd.schemas.ElementsWithTypesTest.globalElement3)); + } + + private static XmlSchemaSet schemaSet; + + XmlSchemaSet ILinqToXsdTypeManager.Schemas { + get { + if ((schemaSet == null)) { + XmlSchemaSet tempSet = new XmlSchemaSet(); + System.Threading.Interlocked.CompareExchange(ref schemaSet, tempSet, null); + } + return schemaSet; + } + set { + schemaSet = value; + } + } + + protected internal static void AddSchemas(XmlSchemaSet schemas) { + schemas.Add(schemaSet); + } + + Dictionary ILinqToXsdTypeManager.GlobalTypeDictionary { + get { + return XTypedServices.EmptyDictionary; + } + } + + Dictionary ILinqToXsdTypeManager.GlobalElementDictionary { + get { + return elementDictionary; + } + } + + Dictionary ILinqToXsdTypeManager.RootContentTypeMapping { + get { + return XTypedServices.EmptyTypeMappingDictionary; + } + } + + static LinqToXsdTypeManager() { + BuildElementDictionary(); + } + + public static System.Type GetRootType() { + return elementDictionary[System.Xml.Linq.XName.Get("globalElement1", "urn:linqtoxsd.schemas.ElementsWithTypesTest")]; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static LinqToXsdTypeManager typeManagerSingleton = new LinqToXsdTypeManager(); + + public static LinqToXsdTypeManager Instance { + get { + return typeManagerSingleton; + } + } + } + + public partial class XRootNamespace { + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private XDocument doc; + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private XTypedElement rootObject; + + private XRootNamespace() { + } + + public static XRootNamespace Load(string xmlFile) { + XRootNamespace root = new XRootNamespace(); + root.doc = XDocument.Load(xmlFile); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRootNamespace Load(string xmlFile, LoadOptions options) { + XRootNamespace root = new XRootNamespace(); + root.doc = XDocument.Load(xmlFile, options); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRootNamespace Load(TextReader textReader) { + XRootNamespace root = new XRootNamespace(); + root.doc = XDocument.Load(textReader); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRootNamespace Load(TextReader textReader, LoadOptions options) { + XRootNamespace root = new XRootNamespace(); + root.doc = XDocument.Load(textReader, options); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRootNamespace Load(XmlReader xmlReader) { + XRootNamespace root = new XRootNamespace(); + root.doc = XDocument.Load(xmlReader); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRootNamespace Parse(string text) { + XRootNamespace root = new XRootNamespace(); + root.doc = XDocument.Parse(text); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRootNamespace Parse(string text, LoadOptions options) { + XRootNamespace root = new XRootNamespace(); + root.doc = XDocument.Parse(text, options); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public virtual void Save(string fileName) { + doc.Save(fileName); + } + + public virtual void Save(TextWriter textWriter) { + doc.Save(textWriter); + } + + public virtual void Save(XmlWriter writer) { + doc.Save(writer); + } + + public virtual void Save(TextWriter textWriter, SaveOptions options) { + doc.Save(textWriter, options); + } + + public virtual void Save(string fileName, SaveOptions options) { + doc.Save(fileName, options); + } + + public virtual XDocument XDocument { + get { + return doc; + } + } + + public virtual XTypedElement Root { + get { + return rootObject; + } + } + + public XRootNamespace(globalElement1 root) { + this.doc = new XDocument(root.Untyped); + this.rootObject = root; + } + + + public globalElement1 globalElement1 { get {return rootObject as globalElement1; } } + + public XRootNamespace(globalElement2 root) { + this.doc = new XDocument(root.Untyped); + this.rootObject = root; + } + + + public globalElement2 globalElement2 { get {return rootObject as globalElement2; } } + + public XRootNamespace(globalElement3 root) { + this.doc = new XDocument(root.Untyped); + this.rootObject = root; + } + + + public globalElement3 globalElement3 { get {return rootObject as globalElement3; } } + } + + public partial class XRoot { + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private XDocument doc; + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private XTypedElement rootObject; + + private XRoot() { + } + + public static XRoot Load(string xmlFile) { + XRoot root = new XRoot(); + root.doc = XDocument.Load(xmlFile); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRoot Load(string xmlFile, LoadOptions options) { + XRoot root = new XRoot(); + root.doc = XDocument.Load(xmlFile, options); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRoot Load(TextReader textReader) { + XRoot root = new XRoot(); + root.doc = XDocument.Load(textReader); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRoot Load(TextReader textReader, LoadOptions options) { + XRoot root = new XRoot(); + root.doc = XDocument.Load(textReader, options); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRoot Load(XmlReader xmlReader) { + XRoot root = new XRoot(); + root.doc = XDocument.Load(xmlReader); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRoot Parse(string text) { + XRoot root = new XRoot(); + root.doc = XDocument.Parse(text); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRoot Parse(string text, LoadOptions options) { + XRoot root = new XRoot(); + root.doc = XDocument.Parse(text, options); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public virtual void Save(string fileName) { + doc.Save(fileName); + } + + public virtual void Save(TextWriter textWriter) { + doc.Save(textWriter); + } + + public virtual void Save(XmlWriter writer) { + doc.Save(writer); + } + + public virtual void Save(TextWriter textWriter, SaveOptions options) { + doc.Save(textWriter, options); + } + + public virtual void Save(string fileName, SaveOptions options) { + doc.Save(fileName, options); + } + + public virtual XDocument XDocument { + get { + return doc; + } + } + + public virtual XTypedElement Root { + get { + return rootObject; + } + } + + public XRoot(global::urn.linqtoxsd.schemas.ElementsWithTypesTest.globalElement1 root) { + this.doc = new XDocument(root.Untyped); + this.rootObject = root; + } + + + public global::urn.linqtoxsd.schemas.ElementsWithTypesTest.globalElement1 globalElement1 { get {return rootObject as global::urn.linqtoxsd.schemas.ElementsWithTypesTest.globalElement1; } } + + public XRoot(global::urn.linqtoxsd.schemas.ElementsWithTypesTest.globalElement2 root) { + this.doc = new XDocument(root.Untyped); + this.rootObject = root; + } + + + public global::urn.linqtoxsd.schemas.ElementsWithTypesTest.globalElement2 globalElement2 { get {return rootObject as global::urn.linqtoxsd.schemas.ElementsWithTypesTest.globalElement2; } } + + public XRoot(global::urn.linqtoxsd.schemas.ElementsWithTypesTest.globalElement3 root) { + this.doc = new XDocument(root.Untyped); + this.rootObject = root; + } + + + public global::urn.linqtoxsd.schemas.ElementsWithTypesTest.globalElement3 globalElement3 { get {return rootObject as global::urn.linqtoxsd.schemas.ElementsWithTypesTest.globalElement3; } } + } +} diff --git a/LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsWithTypesSimpleDerived.xsd b/LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsWithTypesSimpleDerived.xsd new file mode 100644 index 0000000..525000e --- /dev/null +++ b/LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsWithTypesSimpleDerived.xsd @@ -0,0 +1,104 @@ + + + + + Basic XSD that tests global elemnts, and the 3 compositors: all, sequence and choice, and includes local child elements of all simple derived types. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsWithTypesSimpleDerived.xsd.config b/LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsWithTypesSimpleDerived.xsd.config new file mode 100644 index 0000000..1ce939a --- /dev/null +++ b/LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsWithTypesSimpleDerived.xsd.config @@ -0,0 +1,14 @@ + + + + + + + false + + false + + + + + \ No newline at end of file diff --git a/LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsWithTypesSimpleDerived.xsd.cs b/LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsWithTypesSimpleDerived.xsd.cs new file mode 100644 index 0000000..b11af0d --- /dev/null +++ b/LinqToXsd.Schemas/XsdFeatureTests/Elements/ElementsWithTypesSimpleDerived.xsd.cs @@ -0,0 +1,2459 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace urn.linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest { + using System; + using System.Collections; + using System.Collections.Generic; + using System.ComponentModel; + using System.IO; + using System.Linq; + using System.Diagnostics; + using System.Xml; + using System.Xml.Schema; + using System.Xml.Linq; + using Xml.Schema.Linq; + + + /// + /// + /// Regular expression: (allLocalElementNormalizedString, allLocalElementToken, allLocalElementLanguage, allLocalElementNMTOKEN, allLocalElementNMTOKENS, allLocalElementName, allLocalElementNCName, allLocalElementID, allLocalElementIDREF, allLocalElementIDREFS, allLocalElementENTITY, allLocalElementENTITIES, allLocalElementInteger, allLocalElementNonPositiveInteger, allLocalElementNegativeInteger, allLocalElementLong, allLocalElementInt, allLocalElementShort, allLocalElementByte, allLocalElementNonNegativeInteger, allLocalElementUnsignedLong, allLocalElementUnsignedInt, allLocalElementUnsignedShort, allLocalElementUnsignedByte, allLocalElementPositiveInteger) + /// + /// + public partial class globalElement1 : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static globalElement1 Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static globalElement1 Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static globalElement1 Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator globalElement1(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + /// + /// + /// Regular expression: (allLocalElementNormalizedString, allLocalElementToken, allLocalElementLanguage, allLocalElementNMTOKEN, allLocalElementNMTOKENS, allLocalElementName, allLocalElementNCName, allLocalElementID, allLocalElementIDREF, allLocalElementIDREFS, allLocalElementENTITY, allLocalElementENTITIES, allLocalElementInteger, allLocalElementNonPositiveInteger, allLocalElementNegativeInteger, allLocalElementLong, allLocalElementInt, allLocalElementShort, allLocalElementByte, allLocalElementNonNegativeInteger, allLocalElementUnsignedLong, allLocalElementUnsignedInt, allLocalElementUnsignedShort, allLocalElementUnsignedByte, allLocalElementPositiveInteger) + /// + /// + public globalElement1() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalElementNormalizedStringXName = System.Xml.Linq.XName.Get("allLocalElementNormalizedString", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalElementNormalizedString, allLocalElementToken, allLocalElementLanguage, allLocalElementNMTOKEN, allLocalElementNMTOKENS, allLocalElementName, allLocalElementNCName, allLocalElementID, allLocalElementIDREF, allLocalElementIDREFS, allLocalElementENTITY, allLocalElementENTITIES, allLocalElementInteger, allLocalElementNonPositiveInteger, allLocalElementNegativeInteger, allLocalElementLong, allLocalElementInt, allLocalElementShort, allLocalElementByte, allLocalElementNonNegativeInteger, allLocalElementUnsignedLong, allLocalElementUnsignedInt, allLocalElementUnsignedShort, allLocalElementUnsignedByte, allLocalElementPositiveInteger) + /// + /// + public virtual string allLocalElementNormalizedString { + get { + XElement x = this.GetElement(allLocalElementNormalizedStringXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NormalizedString).Datatype); + } + set { + this.SetElement(allLocalElementNormalizedStringXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NormalizedString).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalElementTokenXName = System.Xml.Linq.XName.Get("allLocalElementToken", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalElementNormalizedString, allLocalElementToken, allLocalElementLanguage, allLocalElementNMTOKEN, allLocalElementNMTOKENS, allLocalElementName, allLocalElementNCName, allLocalElementID, allLocalElementIDREF, allLocalElementIDREFS, allLocalElementENTITY, allLocalElementENTITIES, allLocalElementInteger, allLocalElementNonPositiveInteger, allLocalElementNegativeInteger, allLocalElementLong, allLocalElementInt, allLocalElementShort, allLocalElementByte, allLocalElementNonNegativeInteger, allLocalElementUnsignedLong, allLocalElementUnsignedInt, allLocalElementUnsignedShort, allLocalElementUnsignedByte, allLocalElementPositiveInteger) + /// + /// + public virtual string allLocalElementToken { + get { + XElement x = this.GetElement(allLocalElementTokenXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Token).Datatype); + } + set { + this.SetElement(allLocalElementTokenXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Token).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalElementLanguageXName = System.Xml.Linq.XName.Get("allLocalElementLanguage", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalElementNormalizedString, allLocalElementToken, allLocalElementLanguage, allLocalElementNMTOKEN, allLocalElementNMTOKENS, allLocalElementName, allLocalElementNCName, allLocalElementID, allLocalElementIDREF, allLocalElementIDREFS, allLocalElementENTITY, allLocalElementENTITIES, allLocalElementInteger, allLocalElementNonPositiveInteger, allLocalElementNegativeInteger, allLocalElementLong, allLocalElementInt, allLocalElementShort, allLocalElementByte, allLocalElementNonNegativeInteger, allLocalElementUnsignedLong, allLocalElementUnsignedInt, allLocalElementUnsignedShort, allLocalElementUnsignedByte, allLocalElementPositiveInteger) + /// + /// + public virtual string allLocalElementLanguage { + get { + XElement x = this.GetElement(allLocalElementLanguageXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Language).Datatype); + } + set { + this.SetElement(allLocalElementLanguageXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Language).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalElementNMTOKENXName = System.Xml.Linq.XName.Get("allLocalElementNMTOKEN", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalElementNormalizedString, allLocalElementToken, allLocalElementLanguage, allLocalElementNMTOKEN, allLocalElementNMTOKENS, allLocalElementName, allLocalElementNCName, allLocalElementID, allLocalElementIDREF, allLocalElementIDREFS, allLocalElementENTITY, allLocalElementENTITIES, allLocalElementInteger, allLocalElementNonPositiveInteger, allLocalElementNegativeInteger, allLocalElementLong, allLocalElementInt, allLocalElementShort, allLocalElementByte, allLocalElementNonNegativeInteger, allLocalElementUnsignedLong, allLocalElementUnsignedInt, allLocalElementUnsignedShort, allLocalElementUnsignedByte, allLocalElementPositiveInteger) + /// + /// + public virtual string allLocalElementNMTOKEN { + get { + XElement x = this.GetElement(allLocalElementNMTOKENXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NmToken).Datatype); + } + set { + this.SetElement(allLocalElementNMTOKENXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NmToken).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalElementNMTOKENSXName = System.Xml.Linq.XName.Get("allLocalElementNMTOKENS", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalElementNormalizedString, allLocalElementToken, allLocalElementLanguage, allLocalElementNMTOKEN, allLocalElementNMTOKENS, allLocalElementName, allLocalElementNCName, allLocalElementID, allLocalElementIDREF, allLocalElementIDREFS, allLocalElementENTITY, allLocalElementENTITIES, allLocalElementInteger, allLocalElementNonPositiveInteger, allLocalElementNegativeInteger, allLocalElementLong, allLocalElementInt, allLocalElementShort, allLocalElementByte, allLocalElementNonNegativeInteger, allLocalElementUnsignedLong, allLocalElementUnsignedInt, allLocalElementUnsignedShort, allLocalElementUnsignedByte, allLocalElementPositiveInteger) + /// + /// + public virtual IList allLocalElementNMTOKENS { + get { + XElement x = this.GetElement(allLocalElementNMTOKENSXName); + return XTypedServices.ParseListValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NmToken).Datatype); + } + set { + this.SetListElement(allLocalElementNMTOKENSXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NmToken).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalElementNameXName = System.Xml.Linq.XName.Get("allLocalElementName", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalElementNormalizedString, allLocalElementToken, allLocalElementLanguage, allLocalElementNMTOKEN, allLocalElementNMTOKENS, allLocalElementName, allLocalElementNCName, allLocalElementID, allLocalElementIDREF, allLocalElementIDREFS, allLocalElementENTITY, allLocalElementENTITIES, allLocalElementInteger, allLocalElementNonPositiveInteger, allLocalElementNegativeInteger, allLocalElementLong, allLocalElementInt, allLocalElementShort, allLocalElementByte, allLocalElementNonNegativeInteger, allLocalElementUnsignedLong, allLocalElementUnsignedInt, allLocalElementUnsignedShort, allLocalElementUnsignedByte, allLocalElementPositiveInteger) + /// + /// + public virtual string allLocalElementName { + get { + XElement x = this.GetElement(allLocalElementNameXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Name).Datatype); + } + set { + this.SetElement(allLocalElementNameXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Name).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalElementNCNameXName = System.Xml.Linq.XName.Get("allLocalElementNCName", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalElementNormalizedString, allLocalElementToken, allLocalElementLanguage, allLocalElementNMTOKEN, allLocalElementNMTOKENS, allLocalElementName, allLocalElementNCName, allLocalElementID, allLocalElementIDREF, allLocalElementIDREFS, allLocalElementENTITY, allLocalElementENTITIES, allLocalElementInteger, allLocalElementNonPositiveInteger, allLocalElementNegativeInteger, allLocalElementLong, allLocalElementInt, allLocalElementShort, allLocalElementByte, allLocalElementNonNegativeInteger, allLocalElementUnsignedLong, allLocalElementUnsignedInt, allLocalElementUnsignedShort, allLocalElementUnsignedByte, allLocalElementPositiveInteger) + /// + /// + public virtual string allLocalElementNCName { + get { + XElement x = this.GetElement(allLocalElementNCNameXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NCName).Datatype); + } + set { + this.SetElement(allLocalElementNCNameXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NCName).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalElementIDXName = System.Xml.Linq.XName.Get("allLocalElementID", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalElementNormalizedString, allLocalElementToken, allLocalElementLanguage, allLocalElementNMTOKEN, allLocalElementNMTOKENS, allLocalElementName, allLocalElementNCName, allLocalElementID, allLocalElementIDREF, allLocalElementIDREFS, allLocalElementENTITY, allLocalElementENTITIES, allLocalElementInteger, allLocalElementNonPositiveInteger, allLocalElementNegativeInteger, allLocalElementLong, allLocalElementInt, allLocalElementShort, allLocalElementByte, allLocalElementNonNegativeInteger, allLocalElementUnsignedLong, allLocalElementUnsignedInt, allLocalElementUnsignedShort, allLocalElementUnsignedByte, allLocalElementPositiveInteger) + /// + /// + public virtual string allLocalElementID { + get { + XElement x = this.GetElement(allLocalElementIDXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Id).Datatype); + } + set { + this.SetElement(allLocalElementIDXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Id).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalElementIDREFXName = System.Xml.Linq.XName.Get("allLocalElementIDREF", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalElementNormalizedString, allLocalElementToken, allLocalElementLanguage, allLocalElementNMTOKEN, allLocalElementNMTOKENS, allLocalElementName, allLocalElementNCName, allLocalElementID, allLocalElementIDREF, allLocalElementIDREFS, allLocalElementENTITY, allLocalElementENTITIES, allLocalElementInteger, allLocalElementNonPositiveInteger, allLocalElementNegativeInteger, allLocalElementLong, allLocalElementInt, allLocalElementShort, allLocalElementByte, allLocalElementNonNegativeInteger, allLocalElementUnsignedLong, allLocalElementUnsignedInt, allLocalElementUnsignedShort, allLocalElementUnsignedByte, allLocalElementPositiveInteger) + /// + /// + public virtual string allLocalElementIDREF { + get { + XElement x = this.GetElement(allLocalElementIDREFXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Idref).Datatype); + } + set { + this.SetElement(allLocalElementIDREFXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Idref).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalElementIDREFSXName = System.Xml.Linq.XName.Get("allLocalElementIDREFS", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalElementNormalizedString, allLocalElementToken, allLocalElementLanguage, allLocalElementNMTOKEN, allLocalElementNMTOKENS, allLocalElementName, allLocalElementNCName, allLocalElementID, allLocalElementIDREF, allLocalElementIDREFS, allLocalElementENTITY, allLocalElementENTITIES, allLocalElementInteger, allLocalElementNonPositiveInteger, allLocalElementNegativeInteger, allLocalElementLong, allLocalElementInt, allLocalElementShort, allLocalElementByte, allLocalElementNonNegativeInteger, allLocalElementUnsignedLong, allLocalElementUnsignedInt, allLocalElementUnsignedShort, allLocalElementUnsignedByte, allLocalElementPositiveInteger) + /// + /// + public virtual IList allLocalElementIDREFS { + get { + XElement x = this.GetElement(allLocalElementIDREFSXName); + return XTypedServices.ParseListValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Idref).Datatype); + } + set { + this.SetListElement(allLocalElementIDREFSXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Idref).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalElementENTITYXName = System.Xml.Linq.XName.Get("allLocalElementENTITY", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalElementNormalizedString, allLocalElementToken, allLocalElementLanguage, allLocalElementNMTOKEN, allLocalElementNMTOKENS, allLocalElementName, allLocalElementNCName, allLocalElementID, allLocalElementIDREF, allLocalElementIDREFS, allLocalElementENTITY, allLocalElementENTITIES, allLocalElementInteger, allLocalElementNonPositiveInteger, allLocalElementNegativeInteger, allLocalElementLong, allLocalElementInt, allLocalElementShort, allLocalElementByte, allLocalElementNonNegativeInteger, allLocalElementUnsignedLong, allLocalElementUnsignedInt, allLocalElementUnsignedShort, allLocalElementUnsignedByte, allLocalElementPositiveInteger) + /// + /// + public virtual string allLocalElementENTITY { + get { + XElement x = this.GetElement(allLocalElementENTITYXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Entity).Datatype); + } + set { + this.SetElement(allLocalElementENTITYXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Entity).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalElementENTITIESXName = System.Xml.Linq.XName.Get("allLocalElementENTITIES", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalElementNormalizedString, allLocalElementToken, allLocalElementLanguage, allLocalElementNMTOKEN, allLocalElementNMTOKENS, allLocalElementName, allLocalElementNCName, allLocalElementID, allLocalElementIDREF, allLocalElementIDREFS, allLocalElementENTITY, allLocalElementENTITIES, allLocalElementInteger, allLocalElementNonPositiveInteger, allLocalElementNegativeInteger, allLocalElementLong, allLocalElementInt, allLocalElementShort, allLocalElementByte, allLocalElementNonNegativeInteger, allLocalElementUnsignedLong, allLocalElementUnsignedInt, allLocalElementUnsignedShort, allLocalElementUnsignedByte, allLocalElementPositiveInteger) + /// + /// + public virtual IList allLocalElementENTITIES { + get { + XElement x = this.GetElement(allLocalElementENTITIESXName); + return XTypedServices.ParseListValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Entity).Datatype); + } + set { + this.SetListElement(allLocalElementENTITIESXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Entity).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalElementIntegerXName = System.Xml.Linq.XName.Get("allLocalElementInteger", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalElementNormalizedString, allLocalElementToken, allLocalElementLanguage, allLocalElementNMTOKEN, allLocalElementNMTOKENS, allLocalElementName, allLocalElementNCName, allLocalElementID, allLocalElementIDREF, allLocalElementIDREFS, allLocalElementENTITY, allLocalElementENTITIES, allLocalElementInteger, allLocalElementNonPositiveInteger, allLocalElementNegativeInteger, allLocalElementLong, allLocalElementInt, allLocalElementShort, allLocalElementByte, allLocalElementNonNegativeInteger, allLocalElementUnsignedLong, allLocalElementUnsignedInt, allLocalElementUnsignedShort, allLocalElementUnsignedByte, allLocalElementPositiveInteger) + /// + /// + public virtual decimal allLocalElementInteger { + get { + XElement x = this.GetElement(allLocalElementIntegerXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Integer).Datatype); + } + set { + this.SetElement(allLocalElementIntegerXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Integer).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalElementNonPositiveIntegerXName = System.Xml.Linq.XName.Get("allLocalElementNonPositiveInteger", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalElementNormalizedString, allLocalElementToken, allLocalElementLanguage, allLocalElementNMTOKEN, allLocalElementNMTOKENS, allLocalElementName, allLocalElementNCName, allLocalElementID, allLocalElementIDREF, allLocalElementIDREFS, allLocalElementENTITY, allLocalElementENTITIES, allLocalElementInteger, allLocalElementNonPositiveInteger, allLocalElementNegativeInteger, allLocalElementLong, allLocalElementInt, allLocalElementShort, allLocalElementByte, allLocalElementNonNegativeInteger, allLocalElementUnsignedLong, allLocalElementUnsignedInt, allLocalElementUnsignedShort, allLocalElementUnsignedByte, allLocalElementPositiveInteger) + /// + /// + public virtual decimal allLocalElementNonPositiveInteger { + get { + XElement x = this.GetElement(allLocalElementNonPositiveIntegerXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NonPositiveInteger).Datatype); + } + set { + this.SetElement(allLocalElementNonPositiveIntegerXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NonPositiveInteger).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalElementNegativeIntegerXName = System.Xml.Linq.XName.Get("allLocalElementNegativeInteger", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalElementNormalizedString, allLocalElementToken, allLocalElementLanguage, allLocalElementNMTOKEN, allLocalElementNMTOKENS, allLocalElementName, allLocalElementNCName, allLocalElementID, allLocalElementIDREF, allLocalElementIDREFS, allLocalElementENTITY, allLocalElementENTITIES, allLocalElementInteger, allLocalElementNonPositiveInteger, allLocalElementNegativeInteger, allLocalElementLong, allLocalElementInt, allLocalElementShort, allLocalElementByte, allLocalElementNonNegativeInteger, allLocalElementUnsignedLong, allLocalElementUnsignedInt, allLocalElementUnsignedShort, allLocalElementUnsignedByte, allLocalElementPositiveInteger) + /// + /// + public virtual decimal allLocalElementNegativeInteger { + get { + XElement x = this.GetElement(allLocalElementNegativeIntegerXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NegativeInteger).Datatype); + } + set { + this.SetElement(allLocalElementNegativeIntegerXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NegativeInteger).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalElementLongXName = System.Xml.Linq.XName.Get("allLocalElementLong", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalElementNormalizedString, allLocalElementToken, allLocalElementLanguage, allLocalElementNMTOKEN, allLocalElementNMTOKENS, allLocalElementName, allLocalElementNCName, allLocalElementID, allLocalElementIDREF, allLocalElementIDREFS, allLocalElementENTITY, allLocalElementENTITIES, allLocalElementInteger, allLocalElementNonPositiveInteger, allLocalElementNegativeInteger, allLocalElementLong, allLocalElementInt, allLocalElementShort, allLocalElementByte, allLocalElementNonNegativeInteger, allLocalElementUnsignedLong, allLocalElementUnsignedInt, allLocalElementUnsignedShort, allLocalElementUnsignedByte, allLocalElementPositiveInteger) + /// + /// + public virtual long allLocalElementLong { + get { + XElement x = this.GetElement(allLocalElementLongXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Long).Datatype); + } + set { + this.SetElement(allLocalElementLongXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Long).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalElementIntXName = System.Xml.Linq.XName.Get("allLocalElementInt", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalElementNormalizedString, allLocalElementToken, allLocalElementLanguage, allLocalElementNMTOKEN, allLocalElementNMTOKENS, allLocalElementName, allLocalElementNCName, allLocalElementID, allLocalElementIDREF, allLocalElementIDREFS, allLocalElementENTITY, allLocalElementENTITIES, allLocalElementInteger, allLocalElementNonPositiveInteger, allLocalElementNegativeInteger, allLocalElementLong, allLocalElementInt, allLocalElementShort, allLocalElementByte, allLocalElementNonNegativeInteger, allLocalElementUnsignedLong, allLocalElementUnsignedInt, allLocalElementUnsignedShort, allLocalElementUnsignedByte, allLocalElementPositiveInteger) + /// + /// + public virtual int allLocalElementInt { + get { + XElement x = this.GetElement(allLocalElementIntXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Int).Datatype); + } + set { + this.SetElement(allLocalElementIntXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Int).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalElementShortXName = System.Xml.Linq.XName.Get("allLocalElementShort", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalElementNormalizedString, allLocalElementToken, allLocalElementLanguage, allLocalElementNMTOKEN, allLocalElementNMTOKENS, allLocalElementName, allLocalElementNCName, allLocalElementID, allLocalElementIDREF, allLocalElementIDREFS, allLocalElementENTITY, allLocalElementENTITIES, allLocalElementInteger, allLocalElementNonPositiveInteger, allLocalElementNegativeInteger, allLocalElementLong, allLocalElementInt, allLocalElementShort, allLocalElementByte, allLocalElementNonNegativeInteger, allLocalElementUnsignedLong, allLocalElementUnsignedInt, allLocalElementUnsignedShort, allLocalElementUnsignedByte, allLocalElementPositiveInteger) + /// + /// + public virtual short allLocalElementShort { + get { + XElement x = this.GetElement(allLocalElementShortXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Short).Datatype); + } + set { + this.SetElement(allLocalElementShortXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Short).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalElementByteXName = System.Xml.Linq.XName.Get("allLocalElementByte", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalElementNormalizedString, allLocalElementToken, allLocalElementLanguage, allLocalElementNMTOKEN, allLocalElementNMTOKENS, allLocalElementName, allLocalElementNCName, allLocalElementID, allLocalElementIDREF, allLocalElementIDREFS, allLocalElementENTITY, allLocalElementENTITIES, allLocalElementInteger, allLocalElementNonPositiveInteger, allLocalElementNegativeInteger, allLocalElementLong, allLocalElementInt, allLocalElementShort, allLocalElementByte, allLocalElementNonNegativeInteger, allLocalElementUnsignedLong, allLocalElementUnsignedInt, allLocalElementUnsignedShort, allLocalElementUnsignedByte, allLocalElementPositiveInteger) + /// + /// + public virtual sbyte allLocalElementByte { + get { + XElement x = this.GetElement(allLocalElementByteXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Byte).Datatype); + } + set { + this.SetElement(allLocalElementByteXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Byte).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalElementNonNegativeIntegerXName = System.Xml.Linq.XName.Get("allLocalElementNonNegativeInteger", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalElementNormalizedString, allLocalElementToken, allLocalElementLanguage, allLocalElementNMTOKEN, allLocalElementNMTOKENS, allLocalElementName, allLocalElementNCName, allLocalElementID, allLocalElementIDREF, allLocalElementIDREFS, allLocalElementENTITY, allLocalElementENTITIES, allLocalElementInteger, allLocalElementNonPositiveInteger, allLocalElementNegativeInteger, allLocalElementLong, allLocalElementInt, allLocalElementShort, allLocalElementByte, allLocalElementNonNegativeInteger, allLocalElementUnsignedLong, allLocalElementUnsignedInt, allLocalElementUnsignedShort, allLocalElementUnsignedByte, allLocalElementPositiveInteger) + /// + /// + public virtual decimal allLocalElementNonNegativeInteger { + get { + XElement x = this.GetElement(allLocalElementNonNegativeIntegerXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NonNegativeInteger).Datatype); + } + set { + this.SetElement(allLocalElementNonNegativeIntegerXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NonNegativeInteger).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalElementUnsignedLongXName = System.Xml.Linq.XName.Get("allLocalElementUnsignedLong", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalElementNormalizedString, allLocalElementToken, allLocalElementLanguage, allLocalElementNMTOKEN, allLocalElementNMTOKENS, allLocalElementName, allLocalElementNCName, allLocalElementID, allLocalElementIDREF, allLocalElementIDREFS, allLocalElementENTITY, allLocalElementENTITIES, allLocalElementInteger, allLocalElementNonPositiveInteger, allLocalElementNegativeInteger, allLocalElementLong, allLocalElementInt, allLocalElementShort, allLocalElementByte, allLocalElementNonNegativeInteger, allLocalElementUnsignedLong, allLocalElementUnsignedInt, allLocalElementUnsignedShort, allLocalElementUnsignedByte, allLocalElementPositiveInteger) + /// + /// + public virtual ulong allLocalElementUnsignedLong { + get { + XElement x = this.GetElement(allLocalElementUnsignedLongXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.UnsignedLong).Datatype); + } + set { + this.SetElement(allLocalElementUnsignedLongXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.UnsignedLong).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalElementUnsignedIntXName = System.Xml.Linq.XName.Get("allLocalElementUnsignedInt", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalElementNormalizedString, allLocalElementToken, allLocalElementLanguage, allLocalElementNMTOKEN, allLocalElementNMTOKENS, allLocalElementName, allLocalElementNCName, allLocalElementID, allLocalElementIDREF, allLocalElementIDREFS, allLocalElementENTITY, allLocalElementENTITIES, allLocalElementInteger, allLocalElementNonPositiveInteger, allLocalElementNegativeInteger, allLocalElementLong, allLocalElementInt, allLocalElementShort, allLocalElementByte, allLocalElementNonNegativeInteger, allLocalElementUnsignedLong, allLocalElementUnsignedInt, allLocalElementUnsignedShort, allLocalElementUnsignedByte, allLocalElementPositiveInteger) + /// + /// + public virtual uint allLocalElementUnsignedInt { + get { + XElement x = this.GetElement(allLocalElementUnsignedIntXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.UnsignedInt).Datatype); + } + set { + this.SetElement(allLocalElementUnsignedIntXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.UnsignedInt).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalElementUnsignedShortXName = System.Xml.Linq.XName.Get("allLocalElementUnsignedShort", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalElementNormalizedString, allLocalElementToken, allLocalElementLanguage, allLocalElementNMTOKEN, allLocalElementNMTOKENS, allLocalElementName, allLocalElementNCName, allLocalElementID, allLocalElementIDREF, allLocalElementIDREFS, allLocalElementENTITY, allLocalElementENTITIES, allLocalElementInteger, allLocalElementNonPositiveInteger, allLocalElementNegativeInteger, allLocalElementLong, allLocalElementInt, allLocalElementShort, allLocalElementByte, allLocalElementNonNegativeInteger, allLocalElementUnsignedLong, allLocalElementUnsignedInt, allLocalElementUnsignedShort, allLocalElementUnsignedByte, allLocalElementPositiveInteger) + /// + /// + public virtual ushort allLocalElementUnsignedShort { + get { + XElement x = this.GetElement(allLocalElementUnsignedShortXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.UnsignedShort).Datatype); + } + set { + this.SetElement(allLocalElementUnsignedShortXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.UnsignedShort).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalElementUnsignedByteXName = System.Xml.Linq.XName.Get("allLocalElementUnsignedByte", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalElementNormalizedString, allLocalElementToken, allLocalElementLanguage, allLocalElementNMTOKEN, allLocalElementNMTOKENS, allLocalElementName, allLocalElementNCName, allLocalElementID, allLocalElementIDREF, allLocalElementIDREFS, allLocalElementENTITY, allLocalElementENTITIES, allLocalElementInteger, allLocalElementNonPositiveInteger, allLocalElementNegativeInteger, allLocalElementLong, allLocalElementInt, allLocalElementShort, allLocalElementByte, allLocalElementNonNegativeInteger, allLocalElementUnsignedLong, allLocalElementUnsignedInt, allLocalElementUnsignedShort, allLocalElementUnsignedByte, allLocalElementPositiveInteger) + /// + /// + public virtual byte allLocalElementUnsignedByte { + get { + XElement x = this.GetElement(allLocalElementUnsignedByteXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.UnsignedByte).Datatype); + } + set { + this.SetElement(allLocalElementUnsignedByteXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.UnsignedByte).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName allLocalElementPositiveIntegerXName = System.Xml.Linq.XName.Get("allLocalElementPositiveInteger", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (allLocalElementNormalizedString, allLocalElementToken, allLocalElementLanguage, allLocalElementNMTOKEN, allLocalElementNMTOKENS, allLocalElementName, allLocalElementNCName, allLocalElementID, allLocalElementIDREF, allLocalElementIDREFS, allLocalElementENTITY, allLocalElementENTITIES, allLocalElementInteger, allLocalElementNonPositiveInteger, allLocalElementNegativeInteger, allLocalElementLong, allLocalElementInt, allLocalElementShort, allLocalElementByte, allLocalElementNonNegativeInteger, allLocalElementUnsignedLong, allLocalElementUnsignedInt, allLocalElementUnsignedShort, allLocalElementUnsignedByte, allLocalElementPositiveInteger) + /// + /// + public virtual decimal allLocalElementPositiveInteger { + get { + XElement x = this.GetElement(allLocalElementPositiveIntegerXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.PositiveInteger).Datatype); + } + set { + this.SetElement(allLocalElementPositiveIntegerXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.PositiveInteger).Datatype); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("globalElement1", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + static globalElement1() { + BuildElementDictionary(); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static Dictionary localElementDictionary = new Dictionary(); + + private static void BuildElementDictionary() { + localElementDictionary.Add(allLocalElementNormalizedStringXName, typeof(string)); + localElementDictionary.Add(allLocalElementTokenXName, typeof(string)); + localElementDictionary.Add(allLocalElementLanguageXName, typeof(string)); + localElementDictionary.Add(allLocalElementNMTOKENXName, typeof(string)); + localElementDictionary.Add(allLocalElementNMTOKENSXName, typeof(string)); + localElementDictionary.Add(allLocalElementNameXName, typeof(string)); + localElementDictionary.Add(allLocalElementNCNameXName, typeof(string)); + localElementDictionary.Add(allLocalElementIDXName, typeof(string)); + localElementDictionary.Add(allLocalElementIDREFXName, typeof(string)); + localElementDictionary.Add(allLocalElementIDREFSXName, typeof(string)); + localElementDictionary.Add(allLocalElementENTITYXName, typeof(string)); + localElementDictionary.Add(allLocalElementENTITIESXName, typeof(string)); + localElementDictionary.Add(allLocalElementIntegerXName, typeof(decimal)); + localElementDictionary.Add(allLocalElementNonPositiveIntegerXName, typeof(decimal)); + localElementDictionary.Add(allLocalElementNegativeIntegerXName, typeof(decimal)); + localElementDictionary.Add(allLocalElementLongXName, typeof(long)); + localElementDictionary.Add(allLocalElementIntXName, typeof(int)); + localElementDictionary.Add(allLocalElementShortXName, typeof(short)); + localElementDictionary.Add(allLocalElementByteXName, typeof(sbyte)); + localElementDictionary.Add(allLocalElementNonNegativeIntegerXName, typeof(decimal)); + localElementDictionary.Add(allLocalElementUnsignedLongXName, typeof(ulong)); + localElementDictionary.Add(allLocalElementUnsignedIntXName, typeof(uint)); + localElementDictionary.Add(allLocalElementUnsignedShortXName, typeof(ushort)); + localElementDictionary.Add(allLocalElementUnsignedByteXName, typeof(byte)); + localElementDictionary.Add(allLocalElementPositiveIntegerXName, typeof(decimal)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + Dictionary IXMetaData.LocalElementsDictionary { + get { + return localElementDictionary; + } + } + + ContentModelEntity IXMetaData.GetContentModel() { + return ContentModelEntity.Default; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + /// + /// + /// Regular expression: (sequenceLocalElementNormalizedString, sequenceLocalElementToken, sequenceLocalElementLanguage, sequenceLocalElementNMTOKEN, sequenceLocalElementNMTOKENS, sequenceLocalElementName, sequenceLocalElementNCName, sequenceLocalElementID, sequenceLocalElementIDREF, sequenceLocalElementIDREFS, sequenceLocalElementENTITY, sequenceLocalElementENTITIES, sequenceLocalElementInteger, sequenceLocalElementNonPositiveInteger, sequenceLocalElementNegativeInteger, sequenceLocalElementLong, sequenceLocalElementInt, sequenceLocalElementShort, sequenceLocalElementByte, sequenceLocalElementNonNegativeInteger, sequenceLocalElementUnsignedLong, sequenceLocalElementUnsignedInt, sequenceLocalElementUnsignedShort, sequenceLocalElementUnsignedByte, sequenceLocalElementPositiveInteger) + /// + /// + public partial class globalElement2 : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static globalElement2 Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static globalElement2 Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static globalElement2 Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator globalElement2(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + /// + /// + /// Regular expression: (sequenceLocalElementNormalizedString, sequenceLocalElementToken, sequenceLocalElementLanguage, sequenceLocalElementNMTOKEN, sequenceLocalElementNMTOKENS, sequenceLocalElementName, sequenceLocalElementNCName, sequenceLocalElementID, sequenceLocalElementIDREF, sequenceLocalElementIDREFS, sequenceLocalElementENTITY, sequenceLocalElementENTITIES, sequenceLocalElementInteger, sequenceLocalElementNonPositiveInteger, sequenceLocalElementNegativeInteger, sequenceLocalElementLong, sequenceLocalElementInt, sequenceLocalElementShort, sequenceLocalElementByte, sequenceLocalElementNonNegativeInteger, sequenceLocalElementUnsignedLong, sequenceLocalElementUnsignedInt, sequenceLocalElementUnsignedShort, sequenceLocalElementUnsignedByte, sequenceLocalElementPositiveInteger) + /// + /// + public globalElement2() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementNormalizedStringXName = System.Xml.Linq.XName.Get("sequenceLocalElementNormalizedString", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementNormalizedString, sequenceLocalElementToken, sequenceLocalElementLanguage, sequenceLocalElementNMTOKEN, sequenceLocalElementNMTOKENS, sequenceLocalElementName, sequenceLocalElementNCName, sequenceLocalElementID, sequenceLocalElementIDREF, sequenceLocalElementIDREFS, sequenceLocalElementENTITY, sequenceLocalElementENTITIES, sequenceLocalElementInteger, sequenceLocalElementNonPositiveInteger, sequenceLocalElementNegativeInteger, sequenceLocalElementLong, sequenceLocalElementInt, sequenceLocalElementShort, sequenceLocalElementByte, sequenceLocalElementNonNegativeInteger, sequenceLocalElementUnsignedLong, sequenceLocalElementUnsignedInt, sequenceLocalElementUnsignedShort, sequenceLocalElementUnsignedByte, sequenceLocalElementPositiveInteger) + /// + /// + public virtual string sequenceLocalElementNormalizedString { + get { + XElement x = this.GetElement(sequenceLocalElementNormalizedStringXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NormalizedString).Datatype); + } + set { + this.SetElement(sequenceLocalElementNormalizedStringXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NormalizedString).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementTokenXName = System.Xml.Linq.XName.Get("sequenceLocalElementToken", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementNormalizedString, sequenceLocalElementToken, sequenceLocalElementLanguage, sequenceLocalElementNMTOKEN, sequenceLocalElementNMTOKENS, sequenceLocalElementName, sequenceLocalElementNCName, sequenceLocalElementID, sequenceLocalElementIDREF, sequenceLocalElementIDREFS, sequenceLocalElementENTITY, sequenceLocalElementENTITIES, sequenceLocalElementInteger, sequenceLocalElementNonPositiveInteger, sequenceLocalElementNegativeInteger, sequenceLocalElementLong, sequenceLocalElementInt, sequenceLocalElementShort, sequenceLocalElementByte, sequenceLocalElementNonNegativeInteger, sequenceLocalElementUnsignedLong, sequenceLocalElementUnsignedInt, sequenceLocalElementUnsignedShort, sequenceLocalElementUnsignedByte, sequenceLocalElementPositiveInteger) + /// + /// + public virtual string sequenceLocalElementToken { + get { + XElement x = this.GetElement(sequenceLocalElementTokenXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Token).Datatype); + } + set { + this.SetElement(sequenceLocalElementTokenXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Token).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementLanguageXName = System.Xml.Linq.XName.Get("sequenceLocalElementLanguage", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementNormalizedString, sequenceLocalElementToken, sequenceLocalElementLanguage, sequenceLocalElementNMTOKEN, sequenceLocalElementNMTOKENS, sequenceLocalElementName, sequenceLocalElementNCName, sequenceLocalElementID, sequenceLocalElementIDREF, sequenceLocalElementIDREFS, sequenceLocalElementENTITY, sequenceLocalElementENTITIES, sequenceLocalElementInteger, sequenceLocalElementNonPositiveInteger, sequenceLocalElementNegativeInteger, sequenceLocalElementLong, sequenceLocalElementInt, sequenceLocalElementShort, sequenceLocalElementByte, sequenceLocalElementNonNegativeInteger, sequenceLocalElementUnsignedLong, sequenceLocalElementUnsignedInt, sequenceLocalElementUnsignedShort, sequenceLocalElementUnsignedByte, sequenceLocalElementPositiveInteger) + /// + /// + public virtual string sequenceLocalElementLanguage { + get { + XElement x = this.GetElement(sequenceLocalElementLanguageXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Language).Datatype); + } + set { + this.SetElement(sequenceLocalElementLanguageXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Language).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementNMTOKENXName = System.Xml.Linq.XName.Get("sequenceLocalElementNMTOKEN", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementNormalizedString, sequenceLocalElementToken, sequenceLocalElementLanguage, sequenceLocalElementNMTOKEN, sequenceLocalElementNMTOKENS, sequenceLocalElementName, sequenceLocalElementNCName, sequenceLocalElementID, sequenceLocalElementIDREF, sequenceLocalElementIDREFS, sequenceLocalElementENTITY, sequenceLocalElementENTITIES, sequenceLocalElementInteger, sequenceLocalElementNonPositiveInteger, sequenceLocalElementNegativeInteger, sequenceLocalElementLong, sequenceLocalElementInt, sequenceLocalElementShort, sequenceLocalElementByte, sequenceLocalElementNonNegativeInteger, sequenceLocalElementUnsignedLong, sequenceLocalElementUnsignedInt, sequenceLocalElementUnsignedShort, sequenceLocalElementUnsignedByte, sequenceLocalElementPositiveInteger) + /// + /// + public virtual string sequenceLocalElementNMTOKEN { + get { + XElement x = this.GetElement(sequenceLocalElementNMTOKENXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NmToken).Datatype); + } + set { + this.SetElement(sequenceLocalElementNMTOKENXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NmToken).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementNMTOKENSXName = System.Xml.Linq.XName.Get("sequenceLocalElementNMTOKENS", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementNormalizedString, sequenceLocalElementToken, sequenceLocalElementLanguage, sequenceLocalElementNMTOKEN, sequenceLocalElementNMTOKENS, sequenceLocalElementName, sequenceLocalElementNCName, sequenceLocalElementID, sequenceLocalElementIDREF, sequenceLocalElementIDREFS, sequenceLocalElementENTITY, sequenceLocalElementENTITIES, sequenceLocalElementInteger, sequenceLocalElementNonPositiveInteger, sequenceLocalElementNegativeInteger, sequenceLocalElementLong, sequenceLocalElementInt, sequenceLocalElementShort, sequenceLocalElementByte, sequenceLocalElementNonNegativeInteger, sequenceLocalElementUnsignedLong, sequenceLocalElementUnsignedInt, sequenceLocalElementUnsignedShort, sequenceLocalElementUnsignedByte, sequenceLocalElementPositiveInteger) + /// + /// + public virtual IList sequenceLocalElementNMTOKENS { + get { + XElement x = this.GetElement(sequenceLocalElementNMTOKENSXName); + return XTypedServices.ParseListValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NmToken).Datatype); + } + set { + this.SetListElement(sequenceLocalElementNMTOKENSXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NmToken).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementNameXName = System.Xml.Linq.XName.Get("sequenceLocalElementName", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementNormalizedString, sequenceLocalElementToken, sequenceLocalElementLanguage, sequenceLocalElementNMTOKEN, sequenceLocalElementNMTOKENS, sequenceLocalElementName, sequenceLocalElementNCName, sequenceLocalElementID, sequenceLocalElementIDREF, sequenceLocalElementIDREFS, sequenceLocalElementENTITY, sequenceLocalElementENTITIES, sequenceLocalElementInteger, sequenceLocalElementNonPositiveInteger, sequenceLocalElementNegativeInteger, sequenceLocalElementLong, sequenceLocalElementInt, sequenceLocalElementShort, sequenceLocalElementByte, sequenceLocalElementNonNegativeInteger, sequenceLocalElementUnsignedLong, sequenceLocalElementUnsignedInt, sequenceLocalElementUnsignedShort, sequenceLocalElementUnsignedByte, sequenceLocalElementPositiveInteger) + /// + /// + public virtual string sequenceLocalElementName { + get { + XElement x = this.GetElement(sequenceLocalElementNameXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Name).Datatype); + } + set { + this.SetElement(sequenceLocalElementNameXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Name).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementNCNameXName = System.Xml.Linq.XName.Get("sequenceLocalElementNCName", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementNormalizedString, sequenceLocalElementToken, sequenceLocalElementLanguage, sequenceLocalElementNMTOKEN, sequenceLocalElementNMTOKENS, sequenceLocalElementName, sequenceLocalElementNCName, sequenceLocalElementID, sequenceLocalElementIDREF, sequenceLocalElementIDREFS, sequenceLocalElementENTITY, sequenceLocalElementENTITIES, sequenceLocalElementInteger, sequenceLocalElementNonPositiveInteger, sequenceLocalElementNegativeInteger, sequenceLocalElementLong, sequenceLocalElementInt, sequenceLocalElementShort, sequenceLocalElementByte, sequenceLocalElementNonNegativeInteger, sequenceLocalElementUnsignedLong, sequenceLocalElementUnsignedInt, sequenceLocalElementUnsignedShort, sequenceLocalElementUnsignedByte, sequenceLocalElementPositiveInteger) + /// + /// + public virtual string sequenceLocalElementNCName { + get { + XElement x = this.GetElement(sequenceLocalElementNCNameXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NCName).Datatype); + } + set { + this.SetElement(sequenceLocalElementNCNameXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NCName).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementIDXName = System.Xml.Linq.XName.Get("sequenceLocalElementID", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementNormalizedString, sequenceLocalElementToken, sequenceLocalElementLanguage, sequenceLocalElementNMTOKEN, sequenceLocalElementNMTOKENS, sequenceLocalElementName, sequenceLocalElementNCName, sequenceLocalElementID, sequenceLocalElementIDREF, sequenceLocalElementIDREFS, sequenceLocalElementENTITY, sequenceLocalElementENTITIES, sequenceLocalElementInteger, sequenceLocalElementNonPositiveInteger, sequenceLocalElementNegativeInteger, sequenceLocalElementLong, sequenceLocalElementInt, sequenceLocalElementShort, sequenceLocalElementByte, sequenceLocalElementNonNegativeInteger, sequenceLocalElementUnsignedLong, sequenceLocalElementUnsignedInt, sequenceLocalElementUnsignedShort, sequenceLocalElementUnsignedByte, sequenceLocalElementPositiveInteger) + /// + /// + public virtual string sequenceLocalElementID { + get { + XElement x = this.GetElement(sequenceLocalElementIDXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Id).Datatype); + } + set { + this.SetElement(sequenceLocalElementIDXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Id).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementIDREFXName = System.Xml.Linq.XName.Get("sequenceLocalElementIDREF", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementNormalizedString, sequenceLocalElementToken, sequenceLocalElementLanguage, sequenceLocalElementNMTOKEN, sequenceLocalElementNMTOKENS, sequenceLocalElementName, sequenceLocalElementNCName, sequenceLocalElementID, sequenceLocalElementIDREF, sequenceLocalElementIDREFS, sequenceLocalElementENTITY, sequenceLocalElementENTITIES, sequenceLocalElementInteger, sequenceLocalElementNonPositiveInteger, sequenceLocalElementNegativeInteger, sequenceLocalElementLong, sequenceLocalElementInt, sequenceLocalElementShort, sequenceLocalElementByte, sequenceLocalElementNonNegativeInteger, sequenceLocalElementUnsignedLong, sequenceLocalElementUnsignedInt, sequenceLocalElementUnsignedShort, sequenceLocalElementUnsignedByte, sequenceLocalElementPositiveInteger) + /// + /// + public virtual string sequenceLocalElementIDREF { + get { + XElement x = this.GetElement(sequenceLocalElementIDREFXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Idref).Datatype); + } + set { + this.SetElement(sequenceLocalElementIDREFXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Idref).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementIDREFSXName = System.Xml.Linq.XName.Get("sequenceLocalElementIDREFS", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementNormalizedString, sequenceLocalElementToken, sequenceLocalElementLanguage, sequenceLocalElementNMTOKEN, sequenceLocalElementNMTOKENS, sequenceLocalElementName, sequenceLocalElementNCName, sequenceLocalElementID, sequenceLocalElementIDREF, sequenceLocalElementIDREFS, sequenceLocalElementENTITY, sequenceLocalElementENTITIES, sequenceLocalElementInteger, sequenceLocalElementNonPositiveInteger, sequenceLocalElementNegativeInteger, sequenceLocalElementLong, sequenceLocalElementInt, sequenceLocalElementShort, sequenceLocalElementByte, sequenceLocalElementNonNegativeInteger, sequenceLocalElementUnsignedLong, sequenceLocalElementUnsignedInt, sequenceLocalElementUnsignedShort, sequenceLocalElementUnsignedByte, sequenceLocalElementPositiveInteger) + /// + /// + public virtual IList sequenceLocalElementIDREFS { + get { + XElement x = this.GetElement(sequenceLocalElementIDREFSXName); + return XTypedServices.ParseListValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Idref).Datatype); + } + set { + this.SetListElement(sequenceLocalElementIDREFSXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Idref).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementENTITYXName = System.Xml.Linq.XName.Get("sequenceLocalElementENTITY", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementNormalizedString, sequenceLocalElementToken, sequenceLocalElementLanguage, sequenceLocalElementNMTOKEN, sequenceLocalElementNMTOKENS, sequenceLocalElementName, sequenceLocalElementNCName, sequenceLocalElementID, sequenceLocalElementIDREF, sequenceLocalElementIDREFS, sequenceLocalElementENTITY, sequenceLocalElementENTITIES, sequenceLocalElementInteger, sequenceLocalElementNonPositiveInteger, sequenceLocalElementNegativeInteger, sequenceLocalElementLong, sequenceLocalElementInt, sequenceLocalElementShort, sequenceLocalElementByte, sequenceLocalElementNonNegativeInteger, sequenceLocalElementUnsignedLong, sequenceLocalElementUnsignedInt, sequenceLocalElementUnsignedShort, sequenceLocalElementUnsignedByte, sequenceLocalElementPositiveInteger) + /// + /// + public virtual string sequenceLocalElementENTITY { + get { + XElement x = this.GetElement(sequenceLocalElementENTITYXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Entity).Datatype); + } + set { + this.SetElement(sequenceLocalElementENTITYXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Entity).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementENTITIESXName = System.Xml.Linq.XName.Get("sequenceLocalElementENTITIES", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementNormalizedString, sequenceLocalElementToken, sequenceLocalElementLanguage, sequenceLocalElementNMTOKEN, sequenceLocalElementNMTOKENS, sequenceLocalElementName, sequenceLocalElementNCName, sequenceLocalElementID, sequenceLocalElementIDREF, sequenceLocalElementIDREFS, sequenceLocalElementENTITY, sequenceLocalElementENTITIES, sequenceLocalElementInteger, sequenceLocalElementNonPositiveInteger, sequenceLocalElementNegativeInteger, sequenceLocalElementLong, sequenceLocalElementInt, sequenceLocalElementShort, sequenceLocalElementByte, sequenceLocalElementNonNegativeInteger, sequenceLocalElementUnsignedLong, sequenceLocalElementUnsignedInt, sequenceLocalElementUnsignedShort, sequenceLocalElementUnsignedByte, sequenceLocalElementPositiveInteger) + /// + /// + public virtual IList sequenceLocalElementENTITIES { + get { + XElement x = this.GetElement(sequenceLocalElementENTITIESXName); + return XTypedServices.ParseListValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Entity).Datatype); + } + set { + this.SetListElement(sequenceLocalElementENTITIESXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Entity).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementIntegerXName = System.Xml.Linq.XName.Get("sequenceLocalElementInteger", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementNormalizedString, sequenceLocalElementToken, sequenceLocalElementLanguage, sequenceLocalElementNMTOKEN, sequenceLocalElementNMTOKENS, sequenceLocalElementName, sequenceLocalElementNCName, sequenceLocalElementID, sequenceLocalElementIDREF, sequenceLocalElementIDREFS, sequenceLocalElementENTITY, sequenceLocalElementENTITIES, sequenceLocalElementInteger, sequenceLocalElementNonPositiveInteger, sequenceLocalElementNegativeInteger, sequenceLocalElementLong, sequenceLocalElementInt, sequenceLocalElementShort, sequenceLocalElementByte, sequenceLocalElementNonNegativeInteger, sequenceLocalElementUnsignedLong, sequenceLocalElementUnsignedInt, sequenceLocalElementUnsignedShort, sequenceLocalElementUnsignedByte, sequenceLocalElementPositiveInteger) + /// + /// + public virtual decimal sequenceLocalElementInteger { + get { + XElement x = this.GetElement(sequenceLocalElementIntegerXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Integer).Datatype); + } + set { + this.SetElement(sequenceLocalElementIntegerXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Integer).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementNonPositiveIntegerXName = System.Xml.Linq.XName.Get("sequenceLocalElementNonPositiveInteger", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementNormalizedString, sequenceLocalElementToken, sequenceLocalElementLanguage, sequenceLocalElementNMTOKEN, sequenceLocalElementNMTOKENS, sequenceLocalElementName, sequenceLocalElementNCName, sequenceLocalElementID, sequenceLocalElementIDREF, sequenceLocalElementIDREFS, sequenceLocalElementENTITY, sequenceLocalElementENTITIES, sequenceLocalElementInteger, sequenceLocalElementNonPositiveInteger, sequenceLocalElementNegativeInteger, sequenceLocalElementLong, sequenceLocalElementInt, sequenceLocalElementShort, sequenceLocalElementByte, sequenceLocalElementNonNegativeInteger, sequenceLocalElementUnsignedLong, sequenceLocalElementUnsignedInt, sequenceLocalElementUnsignedShort, sequenceLocalElementUnsignedByte, sequenceLocalElementPositiveInteger) + /// + /// + public virtual decimal sequenceLocalElementNonPositiveInteger { + get { + XElement x = this.GetElement(sequenceLocalElementNonPositiveIntegerXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NonPositiveInteger).Datatype); + } + set { + this.SetElement(sequenceLocalElementNonPositiveIntegerXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NonPositiveInteger).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementNegativeIntegerXName = System.Xml.Linq.XName.Get("sequenceLocalElementNegativeInteger", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementNormalizedString, sequenceLocalElementToken, sequenceLocalElementLanguage, sequenceLocalElementNMTOKEN, sequenceLocalElementNMTOKENS, sequenceLocalElementName, sequenceLocalElementNCName, sequenceLocalElementID, sequenceLocalElementIDREF, sequenceLocalElementIDREFS, sequenceLocalElementENTITY, sequenceLocalElementENTITIES, sequenceLocalElementInteger, sequenceLocalElementNonPositiveInteger, sequenceLocalElementNegativeInteger, sequenceLocalElementLong, sequenceLocalElementInt, sequenceLocalElementShort, sequenceLocalElementByte, sequenceLocalElementNonNegativeInteger, sequenceLocalElementUnsignedLong, sequenceLocalElementUnsignedInt, sequenceLocalElementUnsignedShort, sequenceLocalElementUnsignedByte, sequenceLocalElementPositiveInteger) + /// + /// + public virtual decimal sequenceLocalElementNegativeInteger { + get { + XElement x = this.GetElement(sequenceLocalElementNegativeIntegerXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NegativeInteger).Datatype); + } + set { + this.SetElement(sequenceLocalElementNegativeIntegerXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NegativeInteger).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementLongXName = System.Xml.Linq.XName.Get("sequenceLocalElementLong", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementNormalizedString, sequenceLocalElementToken, sequenceLocalElementLanguage, sequenceLocalElementNMTOKEN, sequenceLocalElementNMTOKENS, sequenceLocalElementName, sequenceLocalElementNCName, sequenceLocalElementID, sequenceLocalElementIDREF, sequenceLocalElementIDREFS, sequenceLocalElementENTITY, sequenceLocalElementENTITIES, sequenceLocalElementInteger, sequenceLocalElementNonPositiveInteger, sequenceLocalElementNegativeInteger, sequenceLocalElementLong, sequenceLocalElementInt, sequenceLocalElementShort, sequenceLocalElementByte, sequenceLocalElementNonNegativeInteger, sequenceLocalElementUnsignedLong, sequenceLocalElementUnsignedInt, sequenceLocalElementUnsignedShort, sequenceLocalElementUnsignedByte, sequenceLocalElementPositiveInteger) + /// + /// + public virtual long sequenceLocalElementLong { + get { + XElement x = this.GetElement(sequenceLocalElementLongXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Long).Datatype); + } + set { + this.SetElement(sequenceLocalElementLongXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Long).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementIntXName = System.Xml.Linq.XName.Get("sequenceLocalElementInt", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementNormalizedString, sequenceLocalElementToken, sequenceLocalElementLanguage, sequenceLocalElementNMTOKEN, sequenceLocalElementNMTOKENS, sequenceLocalElementName, sequenceLocalElementNCName, sequenceLocalElementID, sequenceLocalElementIDREF, sequenceLocalElementIDREFS, sequenceLocalElementENTITY, sequenceLocalElementENTITIES, sequenceLocalElementInteger, sequenceLocalElementNonPositiveInteger, sequenceLocalElementNegativeInteger, sequenceLocalElementLong, sequenceLocalElementInt, sequenceLocalElementShort, sequenceLocalElementByte, sequenceLocalElementNonNegativeInteger, sequenceLocalElementUnsignedLong, sequenceLocalElementUnsignedInt, sequenceLocalElementUnsignedShort, sequenceLocalElementUnsignedByte, sequenceLocalElementPositiveInteger) + /// + /// + public virtual int sequenceLocalElementInt { + get { + XElement x = this.GetElement(sequenceLocalElementIntXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Int).Datatype); + } + set { + this.SetElement(sequenceLocalElementIntXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Int).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementShortXName = System.Xml.Linq.XName.Get("sequenceLocalElementShort", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementNormalizedString, sequenceLocalElementToken, sequenceLocalElementLanguage, sequenceLocalElementNMTOKEN, sequenceLocalElementNMTOKENS, sequenceLocalElementName, sequenceLocalElementNCName, sequenceLocalElementID, sequenceLocalElementIDREF, sequenceLocalElementIDREFS, sequenceLocalElementENTITY, sequenceLocalElementENTITIES, sequenceLocalElementInteger, sequenceLocalElementNonPositiveInteger, sequenceLocalElementNegativeInteger, sequenceLocalElementLong, sequenceLocalElementInt, sequenceLocalElementShort, sequenceLocalElementByte, sequenceLocalElementNonNegativeInteger, sequenceLocalElementUnsignedLong, sequenceLocalElementUnsignedInt, sequenceLocalElementUnsignedShort, sequenceLocalElementUnsignedByte, sequenceLocalElementPositiveInteger) + /// + /// + public virtual short sequenceLocalElementShort { + get { + XElement x = this.GetElement(sequenceLocalElementShortXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Short).Datatype); + } + set { + this.SetElement(sequenceLocalElementShortXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Short).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementByteXName = System.Xml.Linq.XName.Get("sequenceLocalElementByte", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementNormalizedString, sequenceLocalElementToken, sequenceLocalElementLanguage, sequenceLocalElementNMTOKEN, sequenceLocalElementNMTOKENS, sequenceLocalElementName, sequenceLocalElementNCName, sequenceLocalElementID, sequenceLocalElementIDREF, sequenceLocalElementIDREFS, sequenceLocalElementENTITY, sequenceLocalElementENTITIES, sequenceLocalElementInteger, sequenceLocalElementNonPositiveInteger, sequenceLocalElementNegativeInteger, sequenceLocalElementLong, sequenceLocalElementInt, sequenceLocalElementShort, sequenceLocalElementByte, sequenceLocalElementNonNegativeInteger, sequenceLocalElementUnsignedLong, sequenceLocalElementUnsignedInt, sequenceLocalElementUnsignedShort, sequenceLocalElementUnsignedByte, sequenceLocalElementPositiveInteger) + /// + /// + public virtual sbyte sequenceLocalElementByte { + get { + XElement x = this.GetElement(sequenceLocalElementByteXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Byte).Datatype); + } + set { + this.SetElement(sequenceLocalElementByteXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Byte).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementNonNegativeIntegerXName = System.Xml.Linq.XName.Get("sequenceLocalElementNonNegativeInteger", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementNormalizedString, sequenceLocalElementToken, sequenceLocalElementLanguage, sequenceLocalElementNMTOKEN, sequenceLocalElementNMTOKENS, sequenceLocalElementName, sequenceLocalElementNCName, sequenceLocalElementID, sequenceLocalElementIDREF, sequenceLocalElementIDREFS, sequenceLocalElementENTITY, sequenceLocalElementENTITIES, sequenceLocalElementInteger, sequenceLocalElementNonPositiveInteger, sequenceLocalElementNegativeInteger, sequenceLocalElementLong, sequenceLocalElementInt, sequenceLocalElementShort, sequenceLocalElementByte, sequenceLocalElementNonNegativeInteger, sequenceLocalElementUnsignedLong, sequenceLocalElementUnsignedInt, sequenceLocalElementUnsignedShort, sequenceLocalElementUnsignedByte, sequenceLocalElementPositiveInteger) + /// + /// + public virtual decimal sequenceLocalElementNonNegativeInteger { + get { + XElement x = this.GetElement(sequenceLocalElementNonNegativeIntegerXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NonNegativeInteger).Datatype); + } + set { + this.SetElement(sequenceLocalElementNonNegativeIntegerXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NonNegativeInteger).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementUnsignedLongXName = System.Xml.Linq.XName.Get("sequenceLocalElementUnsignedLong", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementNormalizedString, sequenceLocalElementToken, sequenceLocalElementLanguage, sequenceLocalElementNMTOKEN, sequenceLocalElementNMTOKENS, sequenceLocalElementName, sequenceLocalElementNCName, sequenceLocalElementID, sequenceLocalElementIDREF, sequenceLocalElementIDREFS, sequenceLocalElementENTITY, sequenceLocalElementENTITIES, sequenceLocalElementInteger, sequenceLocalElementNonPositiveInteger, sequenceLocalElementNegativeInteger, sequenceLocalElementLong, sequenceLocalElementInt, sequenceLocalElementShort, sequenceLocalElementByte, sequenceLocalElementNonNegativeInteger, sequenceLocalElementUnsignedLong, sequenceLocalElementUnsignedInt, sequenceLocalElementUnsignedShort, sequenceLocalElementUnsignedByte, sequenceLocalElementPositiveInteger) + /// + /// + public virtual ulong sequenceLocalElementUnsignedLong { + get { + XElement x = this.GetElement(sequenceLocalElementUnsignedLongXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.UnsignedLong).Datatype); + } + set { + this.SetElement(sequenceLocalElementUnsignedLongXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.UnsignedLong).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementUnsignedIntXName = System.Xml.Linq.XName.Get("sequenceLocalElementUnsignedInt", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementNormalizedString, sequenceLocalElementToken, sequenceLocalElementLanguage, sequenceLocalElementNMTOKEN, sequenceLocalElementNMTOKENS, sequenceLocalElementName, sequenceLocalElementNCName, sequenceLocalElementID, sequenceLocalElementIDREF, sequenceLocalElementIDREFS, sequenceLocalElementENTITY, sequenceLocalElementENTITIES, sequenceLocalElementInteger, sequenceLocalElementNonPositiveInteger, sequenceLocalElementNegativeInteger, sequenceLocalElementLong, sequenceLocalElementInt, sequenceLocalElementShort, sequenceLocalElementByte, sequenceLocalElementNonNegativeInteger, sequenceLocalElementUnsignedLong, sequenceLocalElementUnsignedInt, sequenceLocalElementUnsignedShort, sequenceLocalElementUnsignedByte, sequenceLocalElementPositiveInteger) + /// + /// + public virtual uint sequenceLocalElementUnsignedInt { + get { + XElement x = this.GetElement(sequenceLocalElementUnsignedIntXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.UnsignedInt).Datatype); + } + set { + this.SetElement(sequenceLocalElementUnsignedIntXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.UnsignedInt).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementUnsignedShortXName = System.Xml.Linq.XName.Get("sequenceLocalElementUnsignedShort", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementNormalizedString, sequenceLocalElementToken, sequenceLocalElementLanguage, sequenceLocalElementNMTOKEN, sequenceLocalElementNMTOKENS, sequenceLocalElementName, sequenceLocalElementNCName, sequenceLocalElementID, sequenceLocalElementIDREF, sequenceLocalElementIDREFS, sequenceLocalElementENTITY, sequenceLocalElementENTITIES, sequenceLocalElementInteger, sequenceLocalElementNonPositiveInteger, sequenceLocalElementNegativeInteger, sequenceLocalElementLong, sequenceLocalElementInt, sequenceLocalElementShort, sequenceLocalElementByte, sequenceLocalElementNonNegativeInteger, sequenceLocalElementUnsignedLong, sequenceLocalElementUnsignedInt, sequenceLocalElementUnsignedShort, sequenceLocalElementUnsignedByte, sequenceLocalElementPositiveInteger) + /// + /// + public virtual ushort sequenceLocalElementUnsignedShort { + get { + XElement x = this.GetElement(sequenceLocalElementUnsignedShortXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.UnsignedShort).Datatype); + } + set { + this.SetElement(sequenceLocalElementUnsignedShortXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.UnsignedShort).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementUnsignedByteXName = System.Xml.Linq.XName.Get("sequenceLocalElementUnsignedByte", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementNormalizedString, sequenceLocalElementToken, sequenceLocalElementLanguage, sequenceLocalElementNMTOKEN, sequenceLocalElementNMTOKENS, sequenceLocalElementName, sequenceLocalElementNCName, sequenceLocalElementID, sequenceLocalElementIDREF, sequenceLocalElementIDREFS, sequenceLocalElementENTITY, sequenceLocalElementENTITIES, sequenceLocalElementInteger, sequenceLocalElementNonPositiveInteger, sequenceLocalElementNegativeInteger, sequenceLocalElementLong, sequenceLocalElementInt, sequenceLocalElementShort, sequenceLocalElementByte, sequenceLocalElementNonNegativeInteger, sequenceLocalElementUnsignedLong, sequenceLocalElementUnsignedInt, sequenceLocalElementUnsignedShort, sequenceLocalElementUnsignedByte, sequenceLocalElementPositiveInteger) + /// + /// + public virtual byte sequenceLocalElementUnsignedByte { + get { + XElement x = this.GetElement(sequenceLocalElementUnsignedByteXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.UnsignedByte).Datatype); + } + set { + this.SetElement(sequenceLocalElementUnsignedByteXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.UnsignedByte).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName sequenceLocalElementPositiveIntegerXName = System.Xml.Linq.XName.Get("sequenceLocalElementPositiveInteger", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (sequenceLocalElementNormalizedString, sequenceLocalElementToken, sequenceLocalElementLanguage, sequenceLocalElementNMTOKEN, sequenceLocalElementNMTOKENS, sequenceLocalElementName, sequenceLocalElementNCName, sequenceLocalElementID, sequenceLocalElementIDREF, sequenceLocalElementIDREFS, sequenceLocalElementENTITY, sequenceLocalElementENTITIES, sequenceLocalElementInteger, sequenceLocalElementNonPositiveInteger, sequenceLocalElementNegativeInteger, sequenceLocalElementLong, sequenceLocalElementInt, sequenceLocalElementShort, sequenceLocalElementByte, sequenceLocalElementNonNegativeInteger, sequenceLocalElementUnsignedLong, sequenceLocalElementUnsignedInt, sequenceLocalElementUnsignedShort, sequenceLocalElementUnsignedByte, sequenceLocalElementPositiveInteger) + /// + /// + public virtual decimal sequenceLocalElementPositiveInteger { + get { + XElement x = this.GetElement(sequenceLocalElementPositiveIntegerXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.PositiveInteger).Datatype); + } + set { + this.SetElement(sequenceLocalElementPositiveIntegerXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.PositiveInteger).Datatype); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("globalElement2", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + static globalElement2() { + BuildElementDictionary(); + contentModel = new SequenceContentModelEntity(new NamedContentModelEntity(sequenceLocalElementNormalizedStringXName), new NamedContentModelEntity(sequenceLocalElementTokenXName), new NamedContentModelEntity(sequenceLocalElementLanguageXName), new NamedContentModelEntity(sequenceLocalElementNMTOKENXName), new NamedContentModelEntity(sequenceLocalElementNMTOKENSXName), new NamedContentModelEntity(sequenceLocalElementNameXName), new NamedContentModelEntity(sequenceLocalElementNCNameXName), new NamedContentModelEntity(sequenceLocalElementIDXName), new NamedContentModelEntity(sequenceLocalElementIDREFXName), new NamedContentModelEntity(sequenceLocalElementIDREFSXName), new NamedContentModelEntity(sequenceLocalElementENTITYXName), new NamedContentModelEntity(sequenceLocalElementENTITIESXName), new NamedContentModelEntity(sequenceLocalElementIntegerXName), new NamedContentModelEntity(sequenceLocalElementNonPositiveIntegerXName), new NamedContentModelEntity(sequenceLocalElementNegativeIntegerXName), new NamedContentModelEntity(sequenceLocalElementLongXName), new NamedContentModelEntity(sequenceLocalElementIntXName), new NamedContentModelEntity(sequenceLocalElementShortXName), new NamedContentModelEntity(sequenceLocalElementByteXName), new NamedContentModelEntity(sequenceLocalElementNonNegativeIntegerXName), new NamedContentModelEntity(sequenceLocalElementUnsignedLongXName), new NamedContentModelEntity(sequenceLocalElementUnsignedIntXName), new NamedContentModelEntity(sequenceLocalElementUnsignedShortXName), new NamedContentModelEntity(sequenceLocalElementUnsignedByteXName), new NamedContentModelEntity(sequenceLocalElementPositiveIntegerXName)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static Dictionary localElementDictionary = new Dictionary(); + + private static void BuildElementDictionary() { + localElementDictionary.Add(sequenceLocalElementNormalizedStringXName, typeof(string)); + localElementDictionary.Add(sequenceLocalElementTokenXName, typeof(string)); + localElementDictionary.Add(sequenceLocalElementLanguageXName, typeof(string)); + localElementDictionary.Add(sequenceLocalElementNMTOKENXName, typeof(string)); + localElementDictionary.Add(sequenceLocalElementNMTOKENSXName, typeof(string)); + localElementDictionary.Add(sequenceLocalElementNameXName, typeof(string)); + localElementDictionary.Add(sequenceLocalElementNCNameXName, typeof(string)); + localElementDictionary.Add(sequenceLocalElementIDXName, typeof(string)); + localElementDictionary.Add(sequenceLocalElementIDREFXName, typeof(string)); + localElementDictionary.Add(sequenceLocalElementIDREFSXName, typeof(string)); + localElementDictionary.Add(sequenceLocalElementENTITYXName, typeof(string)); + localElementDictionary.Add(sequenceLocalElementENTITIESXName, typeof(string)); + localElementDictionary.Add(sequenceLocalElementIntegerXName, typeof(decimal)); + localElementDictionary.Add(sequenceLocalElementNonPositiveIntegerXName, typeof(decimal)); + localElementDictionary.Add(sequenceLocalElementNegativeIntegerXName, typeof(decimal)); + localElementDictionary.Add(sequenceLocalElementLongXName, typeof(long)); + localElementDictionary.Add(sequenceLocalElementIntXName, typeof(int)); + localElementDictionary.Add(sequenceLocalElementShortXName, typeof(short)); + localElementDictionary.Add(sequenceLocalElementByteXName, typeof(sbyte)); + localElementDictionary.Add(sequenceLocalElementNonNegativeIntegerXName, typeof(decimal)); + localElementDictionary.Add(sequenceLocalElementUnsignedLongXName, typeof(ulong)); + localElementDictionary.Add(sequenceLocalElementUnsignedIntXName, typeof(uint)); + localElementDictionary.Add(sequenceLocalElementUnsignedShortXName, typeof(ushort)); + localElementDictionary.Add(sequenceLocalElementUnsignedByteXName, typeof(byte)); + localElementDictionary.Add(sequenceLocalElementPositiveIntegerXName, typeof(decimal)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + Dictionary IXMetaData.LocalElementsDictionary { + get { + return localElementDictionary; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static ContentModelEntity contentModel; + + ContentModelEntity IXMetaData.GetContentModel() { + return contentModel; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + /// + /// + /// Regular expression: (choiceLocalElementNormalizedString | choiceLocalElementToken | choiceLocalElementLanguage | choiceLocalElementNMTOKEN | choiceLocalElementNMTOKENS | choiceLocalElementName | choiceLocalElementNCName | choiceLocalElementID | choiceLocalElementIDREF | choiceLocalElementIDREFS | choiceLocalElementENTITY | choiceLocalElementENTITIES | choiceLocalElementInteger | choiceLocalElementNonPositiveInteger | choiceLocalElementNegativeInteger | choiceLocalElementLong | choiceLocalElementInt | choiceLocalElementShort | choiceLocalElementByte | choiceLocalElementNonNegativeInteger | choiceLocalElementUnsignedLong | choiceLocalElementUnsignedInt | choiceLocalElementUnsignedShort | choiceLocalElementUnsignedByte | choiceLocalElementPositiveInteger) + /// + /// + public partial class globalElement3 : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static globalElement3 Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static globalElement3 Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static globalElement3 Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator globalElement3(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + /// + /// + /// Regular expression: (choiceLocalElementNormalizedString | choiceLocalElementToken | choiceLocalElementLanguage | choiceLocalElementNMTOKEN | choiceLocalElementNMTOKENS | choiceLocalElementName | choiceLocalElementNCName | choiceLocalElementID | choiceLocalElementIDREF | choiceLocalElementIDREFS | choiceLocalElementENTITY | choiceLocalElementENTITIES | choiceLocalElementInteger | choiceLocalElementNonPositiveInteger | choiceLocalElementNegativeInteger | choiceLocalElementLong | choiceLocalElementInt | choiceLocalElementShort | choiceLocalElementByte | choiceLocalElementNonNegativeInteger | choiceLocalElementUnsignedLong | choiceLocalElementUnsignedInt | choiceLocalElementUnsignedShort | choiceLocalElementUnsignedByte | choiceLocalElementPositiveInteger) + /// + /// + public globalElement3() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementNormalizedStringXName = System.Xml.Linq.XName.Get("choiceLocalElementNormalizedString", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementNormalizedString | choiceLocalElementToken | choiceLocalElementLanguage | choiceLocalElementNMTOKEN | choiceLocalElementNMTOKENS | choiceLocalElementName | choiceLocalElementNCName | choiceLocalElementID | choiceLocalElementIDREF | choiceLocalElementIDREFS | choiceLocalElementENTITY | choiceLocalElementENTITIES | choiceLocalElementInteger | choiceLocalElementNonPositiveInteger | choiceLocalElementNegativeInteger | choiceLocalElementLong | choiceLocalElementInt | choiceLocalElementShort | choiceLocalElementByte | choiceLocalElementNonNegativeInteger | choiceLocalElementUnsignedLong | choiceLocalElementUnsignedInt | choiceLocalElementUnsignedShort | choiceLocalElementUnsignedByte | choiceLocalElementPositiveInteger) + /// + /// + public virtual string choiceLocalElementNormalizedString { + get { + XElement x = this.GetElement(choiceLocalElementNormalizedStringXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NormalizedString).Datatype); + } + set { + this.SetElement(choiceLocalElementNormalizedStringXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NormalizedString).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementTokenXName = System.Xml.Linq.XName.Get("choiceLocalElementToken", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementNormalizedString | choiceLocalElementToken | choiceLocalElementLanguage | choiceLocalElementNMTOKEN | choiceLocalElementNMTOKENS | choiceLocalElementName | choiceLocalElementNCName | choiceLocalElementID | choiceLocalElementIDREF | choiceLocalElementIDREFS | choiceLocalElementENTITY | choiceLocalElementENTITIES | choiceLocalElementInteger | choiceLocalElementNonPositiveInteger | choiceLocalElementNegativeInteger | choiceLocalElementLong | choiceLocalElementInt | choiceLocalElementShort | choiceLocalElementByte | choiceLocalElementNonNegativeInteger | choiceLocalElementUnsignedLong | choiceLocalElementUnsignedInt | choiceLocalElementUnsignedShort | choiceLocalElementUnsignedByte | choiceLocalElementPositiveInteger) + /// + /// + public virtual string choiceLocalElementToken { + get { + XElement x = this.GetElement(choiceLocalElementTokenXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Token).Datatype); + } + set { + this.SetElement(choiceLocalElementTokenXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Token).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementLanguageXName = System.Xml.Linq.XName.Get("choiceLocalElementLanguage", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementNormalizedString | choiceLocalElementToken | choiceLocalElementLanguage | choiceLocalElementNMTOKEN | choiceLocalElementNMTOKENS | choiceLocalElementName | choiceLocalElementNCName | choiceLocalElementID | choiceLocalElementIDREF | choiceLocalElementIDREFS | choiceLocalElementENTITY | choiceLocalElementENTITIES | choiceLocalElementInteger | choiceLocalElementNonPositiveInteger | choiceLocalElementNegativeInteger | choiceLocalElementLong | choiceLocalElementInt | choiceLocalElementShort | choiceLocalElementByte | choiceLocalElementNonNegativeInteger | choiceLocalElementUnsignedLong | choiceLocalElementUnsignedInt | choiceLocalElementUnsignedShort | choiceLocalElementUnsignedByte | choiceLocalElementPositiveInteger) + /// + /// + public virtual string choiceLocalElementLanguage { + get { + XElement x = this.GetElement(choiceLocalElementLanguageXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Language).Datatype); + } + set { + this.SetElement(choiceLocalElementLanguageXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Language).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementNMTOKENXName = System.Xml.Linq.XName.Get("choiceLocalElementNMTOKEN", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementNormalizedString | choiceLocalElementToken | choiceLocalElementLanguage | choiceLocalElementNMTOKEN | choiceLocalElementNMTOKENS | choiceLocalElementName | choiceLocalElementNCName | choiceLocalElementID | choiceLocalElementIDREF | choiceLocalElementIDREFS | choiceLocalElementENTITY | choiceLocalElementENTITIES | choiceLocalElementInteger | choiceLocalElementNonPositiveInteger | choiceLocalElementNegativeInteger | choiceLocalElementLong | choiceLocalElementInt | choiceLocalElementShort | choiceLocalElementByte | choiceLocalElementNonNegativeInteger | choiceLocalElementUnsignedLong | choiceLocalElementUnsignedInt | choiceLocalElementUnsignedShort | choiceLocalElementUnsignedByte | choiceLocalElementPositiveInteger) + /// + /// + public virtual string choiceLocalElementNMTOKEN { + get { + XElement x = this.GetElement(choiceLocalElementNMTOKENXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NmToken).Datatype); + } + set { + this.SetElement(choiceLocalElementNMTOKENXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NmToken).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementNMTOKENSXName = System.Xml.Linq.XName.Get("choiceLocalElementNMTOKENS", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementNormalizedString | choiceLocalElementToken | choiceLocalElementLanguage | choiceLocalElementNMTOKEN | choiceLocalElementNMTOKENS | choiceLocalElementName | choiceLocalElementNCName | choiceLocalElementID | choiceLocalElementIDREF | choiceLocalElementIDREFS | choiceLocalElementENTITY | choiceLocalElementENTITIES | choiceLocalElementInteger | choiceLocalElementNonPositiveInteger | choiceLocalElementNegativeInteger | choiceLocalElementLong | choiceLocalElementInt | choiceLocalElementShort | choiceLocalElementByte | choiceLocalElementNonNegativeInteger | choiceLocalElementUnsignedLong | choiceLocalElementUnsignedInt | choiceLocalElementUnsignedShort | choiceLocalElementUnsignedByte | choiceLocalElementPositiveInteger) + /// + /// + public virtual IList choiceLocalElementNMTOKENS { + get { + XElement x = this.GetElement(choiceLocalElementNMTOKENSXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseListValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NmToken).Datatype); + } + set { + this.SetListElement(choiceLocalElementNMTOKENSXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NmToken).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementNameXName = System.Xml.Linq.XName.Get("choiceLocalElementName", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementNormalizedString | choiceLocalElementToken | choiceLocalElementLanguage | choiceLocalElementNMTOKEN | choiceLocalElementNMTOKENS | choiceLocalElementName | choiceLocalElementNCName | choiceLocalElementID | choiceLocalElementIDREF | choiceLocalElementIDREFS | choiceLocalElementENTITY | choiceLocalElementENTITIES | choiceLocalElementInteger | choiceLocalElementNonPositiveInteger | choiceLocalElementNegativeInteger | choiceLocalElementLong | choiceLocalElementInt | choiceLocalElementShort | choiceLocalElementByte | choiceLocalElementNonNegativeInteger | choiceLocalElementUnsignedLong | choiceLocalElementUnsignedInt | choiceLocalElementUnsignedShort | choiceLocalElementUnsignedByte | choiceLocalElementPositiveInteger) + /// + /// + public virtual string choiceLocalElementName { + get { + XElement x = this.GetElement(choiceLocalElementNameXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Name).Datatype); + } + set { + this.SetElement(choiceLocalElementNameXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Name).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementNCNameXName = System.Xml.Linq.XName.Get("choiceLocalElementNCName", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementNormalizedString | choiceLocalElementToken | choiceLocalElementLanguage | choiceLocalElementNMTOKEN | choiceLocalElementNMTOKENS | choiceLocalElementName | choiceLocalElementNCName | choiceLocalElementID | choiceLocalElementIDREF | choiceLocalElementIDREFS | choiceLocalElementENTITY | choiceLocalElementENTITIES | choiceLocalElementInteger | choiceLocalElementNonPositiveInteger | choiceLocalElementNegativeInteger | choiceLocalElementLong | choiceLocalElementInt | choiceLocalElementShort | choiceLocalElementByte | choiceLocalElementNonNegativeInteger | choiceLocalElementUnsignedLong | choiceLocalElementUnsignedInt | choiceLocalElementUnsignedShort | choiceLocalElementUnsignedByte | choiceLocalElementPositiveInteger) + /// + /// + public virtual string choiceLocalElementNCName { + get { + XElement x = this.GetElement(choiceLocalElementNCNameXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NCName).Datatype); + } + set { + this.SetElement(choiceLocalElementNCNameXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NCName).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementIDXName = System.Xml.Linq.XName.Get("choiceLocalElementID", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementNormalizedString | choiceLocalElementToken | choiceLocalElementLanguage | choiceLocalElementNMTOKEN | choiceLocalElementNMTOKENS | choiceLocalElementName | choiceLocalElementNCName | choiceLocalElementID | choiceLocalElementIDREF | choiceLocalElementIDREFS | choiceLocalElementENTITY | choiceLocalElementENTITIES | choiceLocalElementInteger | choiceLocalElementNonPositiveInteger | choiceLocalElementNegativeInteger | choiceLocalElementLong | choiceLocalElementInt | choiceLocalElementShort | choiceLocalElementByte | choiceLocalElementNonNegativeInteger | choiceLocalElementUnsignedLong | choiceLocalElementUnsignedInt | choiceLocalElementUnsignedShort | choiceLocalElementUnsignedByte | choiceLocalElementPositiveInteger) + /// + /// + public virtual string choiceLocalElementID { + get { + XElement x = this.GetElement(choiceLocalElementIDXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Id).Datatype); + } + set { + this.SetElement(choiceLocalElementIDXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Id).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementIDREFXName = System.Xml.Linq.XName.Get("choiceLocalElementIDREF", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementNormalizedString | choiceLocalElementToken | choiceLocalElementLanguage | choiceLocalElementNMTOKEN | choiceLocalElementNMTOKENS | choiceLocalElementName | choiceLocalElementNCName | choiceLocalElementID | choiceLocalElementIDREF | choiceLocalElementIDREFS | choiceLocalElementENTITY | choiceLocalElementENTITIES | choiceLocalElementInteger | choiceLocalElementNonPositiveInteger | choiceLocalElementNegativeInteger | choiceLocalElementLong | choiceLocalElementInt | choiceLocalElementShort | choiceLocalElementByte | choiceLocalElementNonNegativeInteger | choiceLocalElementUnsignedLong | choiceLocalElementUnsignedInt | choiceLocalElementUnsignedShort | choiceLocalElementUnsignedByte | choiceLocalElementPositiveInteger) + /// + /// + public virtual string choiceLocalElementIDREF { + get { + XElement x = this.GetElement(choiceLocalElementIDREFXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Idref).Datatype); + } + set { + this.SetElement(choiceLocalElementIDREFXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Idref).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementIDREFSXName = System.Xml.Linq.XName.Get("choiceLocalElementIDREFS", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementNormalizedString | choiceLocalElementToken | choiceLocalElementLanguage | choiceLocalElementNMTOKEN | choiceLocalElementNMTOKENS | choiceLocalElementName | choiceLocalElementNCName | choiceLocalElementID | choiceLocalElementIDREF | choiceLocalElementIDREFS | choiceLocalElementENTITY | choiceLocalElementENTITIES | choiceLocalElementInteger | choiceLocalElementNonPositiveInteger | choiceLocalElementNegativeInteger | choiceLocalElementLong | choiceLocalElementInt | choiceLocalElementShort | choiceLocalElementByte | choiceLocalElementNonNegativeInteger | choiceLocalElementUnsignedLong | choiceLocalElementUnsignedInt | choiceLocalElementUnsignedShort | choiceLocalElementUnsignedByte | choiceLocalElementPositiveInteger) + /// + /// + public virtual IList choiceLocalElementIDREFS { + get { + XElement x = this.GetElement(choiceLocalElementIDREFSXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseListValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Idref).Datatype); + } + set { + this.SetListElement(choiceLocalElementIDREFSXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Idref).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementENTITYXName = System.Xml.Linq.XName.Get("choiceLocalElementENTITY", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementNormalizedString | choiceLocalElementToken | choiceLocalElementLanguage | choiceLocalElementNMTOKEN | choiceLocalElementNMTOKENS | choiceLocalElementName | choiceLocalElementNCName | choiceLocalElementID | choiceLocalElementIDREF | choiceLocalElementIDREFS | choiceLocalElementENTITY | choiceLocalElementENTITIES | choiceLocalElementInteger | choiceLocalElementNonPositiveInteger | choiceLocalElementNegativeInteger | choiceLocalElementLong | choiceLocalElementInt | choiceLocalElementShort | choiceLocalElementByte | choiceLocalElementNonNegativeInteger | choiceLocalElementUnsignedLong | choiceLocalElementUnsignedInt | choiceLocalElementUnsignedShort | choiceLocalElementUnsignedByte | choiceLocalElementPositiveInteger) + /// + /// + public virtual string choiceLocalElementENTITY { + get { + XElement x = this.GetElement(choiceLocalElementENTITYXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Entity).Datatype); + } + set { + this.SetElement(choiceLocalElementENTITYXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Entity).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementENTITIESXName = System.Xml.Linq.XName.Get("choiceLocalElementENTITIES", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementNormalizedString | choiceLocalElementToken | choiceLocalElementLanguage | choiceLocalElementNMTOKEN | choiceLocalElementNMTOKENS | choiceLocalElementName | choiceLocalElementNCName | choiceLocalElementID | choiceLocalElementIDREF | choiceLocalElementIDREFS | choiceLocalElementENTITY | choiceLocalElementENTITIES | choiceLocalElementInteger | choiceLocalElementNonPositiveInteger | choiceLocalElementNegativeInteger | choiceLocalElementLong | choiceLocalElementInt | choiceLocalElementShort | choiceLocalElementByte | choiceLocalElementNonNegativeInteger | choiceLocalElementUnsignedLong | choiceLocalElementUnsignedInt | choiceLocalElementUnsignedShort | choiceLocalElementUnsignedByte | choiceLocalElementPositiveInteger) + /// + /// + public virtual IList choiceLocalElementENTITIES { + get { + XElement x = this.GetElement(choiceLocalElementENTITIESXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseListValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Entity).Datatype); + } + set { + this.SetListElement(choiceLocalElementENTITIESXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Entity).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementIntegerXName = System.Xml.Linq.XName.Get("choiceLocalElementInteger", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementNormalizedString | choiceLocalElementToken | choiceLocalElementLanguage | choiceLocalElementNMTOKEN | choiceLocalElementNMTOKENS | choiceLocalElementName | choiceLocalElementNCName | choiceLocalElementID | choiceLocalElementIDREF | choiceLocalElementIDREFS | choiceLocalElementENTITY | choiceLocalElementENTITIES | choiceLocalElementInteger | choiceLocalElementNonPositiveInteger | choiceLocalElementNegativeInteger | choiceLocalElementLong | choiceLocalElementInt | choiceLocalElementShort | choiceLocalElementByte | choiceLocalElementNonNegativeInteger | choiceLocalElementUnsignedLong | choiceLocalElementUnsignedInt | choiceLocalElementUnsignedShort | choiceLocalElementUnsignedByte | choiceLocalElementPositiveInteger) + /// + /// + public virtual System.Decimal? choiceLocalElementInteger { + get { + XElement x = this.GetElement(choiceLocalElementIntegerXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Integer).Datatype); + } + set { + this.SetElement(choiceLocalElementIntegerXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Integer).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementNonPositiveIntegerXName = System.Xml.Linq.XName.Get("choiceLocalElementNonPositiveInteger", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementNormalizedString | choiceLocalElementToken | choiceLocalElementLanguage | choiceLocalElementNMTOKEN | choiceLocalElementNMTOKENS | choiceLocalElementName | choiceLocalElementNCName | choiceLocalElementID | choiceLocalElementIDREF | choiceLocalElementIDREFS | choiceLocalElementENTITY | choiceLocalElementENTITIES | choiceLocalElementInteger | choiceLocalElementNonPositiveInteger | choiceLocalElementNegativeInteger | choiceLocalElementLong | choiceLocalElementInt | choiceLocalElementShort | choiceLocalElementByte | choiceLocalElementNonNegativeInteger | choiceLocalElementUnsignedLong | choiceLocalElementUnsignedInt | choiceLocalElementUnsignedShort | choiceLocalElementUnsignedByte | choiceLocalElementPositiveInteger) + /// + /// + public virtual System.Decimal? choiceLocalElementNonPositiveInteger { + get { + XElement x = this.GetElement(choiceLocalElementNonPositiveIntegerXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NonPositiveInteger).Datatype); + } + set { + this.SetElement(choiceLocalElementNonPositiveIntegerXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NonPositiveInteger).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementNegativeIntegerXName = System.Xml.Linq.XName.Get("choiceLocalElementNegativeInteger", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementNormalizedString | choiceLocalElementToken | choiceLocalElementLanguage | choiceLocalElementNMTOKEN | choiceLocalElementNMTOKENS | choiceLocalElementName | choiceLocalElementNCName | choiceLocalElementID | choiceLocalElementIDREF | choiceLocalElementIDREFS | choiceLocalElementENTITY | choiceLocalElementENTITIES | choiceLocalElementInteger | choiceLocalElementNonPositiveInteger | choiceLocalElementNegativeInteger | choiceLocalElementLong | choiceLocalElementInt | choiceLocalElementShort | choiceLocalElementByte | choiceLocalElementNonNegativeInteger | choiceLocalElementUnsignedLong | choiceLocalElementUnsignedInt | choiceLocalElementUnsignedShort | choiceLocalElementUnsignedByte | choiceLocalElementPositiveInteger) + /// + /// + public virtual System.Decimal? choiceLocalElementNegativeInteger { + get { + XElement x = this.GetElement(choiceLocalElementNegativeIntegerXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NegativeInteger).Datatype); + } + set { + this.SetElement(choiceLocalElementNegativeIntegerXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NegativeInteger).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementLongXName = System.Xml.Linq.XName.Get("choiceLocalElementLong", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementNormalizedString | choiceLocalElementToken | choiceLocalElementLanguage | choiceLocalElementNMTOKEN | choiceLocalElementNMTOKENS | choiceLocalElementName | choiceLocalElementNCName | choiceLocalElementID | choiceLocalElementIDREF | choiceLocalElementIDREFS | choiceLocalElementENTITY | choiceLocalElementENTITIES | choiceLocalElementInteger | choiceLocalElementNonPositiveInteger | choiceLocalElementNegativeInteger | choiceLocalElementLong | choiceLocalElementInt | choiceLocalElementShort | choiceLocalElementByte | choiceLocalElementNonNegativeInteger | choiceLocalElementUnsignedLong | choiceLocalElementUnsignedInt | choiceLocalElementUnsignedShort | choiceLocalElementUnsignedByte | choiceLocalElementPositiveInteger) + /// + /// + public virtual System.Int64? choiceLocalElementLong { + get { + XElement x = this.GetElement(choiceLocalElementLongXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Long).Datatype); + } + set { + this.SetElement(choiceLocalElementLongXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Long).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementIntXName = System.Xml.Linq.XName.Get("choiceLocalElementInt", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementNormalizedString | choiceLocalElementToken | choiceLocalElementLanguage | choiceLocalElementNMTOKEN | choiceLocalElementNMTOKENS | choiceLocalElementName | choiceLocalElementNCName | choiceLocalElementID | choiceLocalElementIDREF | choiceLocalElementIDREFS | choiceLocalElementENTITY | choiceLocalElementENTITIES | choiceLocalElementInteger | choiceLocalElementNonPositiveInteger | choiceLocalElementNegativeInteger | choiceLocalElementLong | choiceLocalElementInt | choiceLocalElementShort | choiceLocalElementByte | choiceLocalElementNonNegativeInteger | choiceLocalElementUnsignedLong | choiceLocalElementUnsignedInt | choiceLocalElementUnsignedShort | choiceLocalElementUnsignedByte | choiceLocalElementPositiveInteger) + /// + /// + public virtual System.Int32? choiceLocalElementInt { + get { + XElement x = this.GetElement(choiceLocalElementIntXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Int).Datatype); + } + set { + this.SetElement(choiceLocalElementIntXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Int).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementShortXName = System.Xml.Linq.XName.Get("choiceLocalElementShort", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementNormalizedString | choiceLocalElementToken | choiceLocalElementLanguage | choiceLocalElementNMTOKEN | choiceLocalElementNMTOKENS | choiceLocalElementName | choiceLocalElementNCName | choiceLocalElementID | choiceLocalElementIDREF | choiceLocalElementIDREFS | choiceLocalElementENTITY | choiceLocalElementENTITIES | choiceLocalElementInteger | choiceLocalElementNonPositiveInteger | choiceLocalElementNegativeInteger | choiceLocalElementLong | choiceLocalElementInt | choiceLocalElementShort | choiceLocalElementByte | choiceLocalElementNonNegativeInteger | choiceLocalElementUnsignedLong | choiceLocalElementUnsignedInt | choiceLocalElementUnsignedShort | choiceLocalElementUnsignedByte | choiceLocalElementPositiveInteger) + /// + /// + public virtual System.Int16? choiceLocalElementShort { + get { + XElement x = this.GetElement(choiceLocalElementShortXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Short).Datatype); + } + set { + this.SetElement(choiceLocalElementShortXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Short).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementByteXName = System.Xml.Linq.XName.Get("choiceLocalElementByte", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementNormalizedString | choiceLocalElementToken | choiceLocalElementLanguage | choiceLocalElementNMTOKEN | choiceLocalElementNMTOKENS | choiceLocalElementName | choiceLocalElementNCName | choiceLocalElementID | choiceLocalElementIDREF | choiceLocalElementIDREFS | choiceLocalElementENTITY | choiceLocalElementENTITIES | choiceLocalElementInteger | choiceLocalElementNonPositiveInteger | choiceLocalElementNegativeInteger | choiceLocalElementLong | choiceLocalElementInt | choiceLocalElementShort | choiceLocalElementByte | choiceLocalElementNonNegativeInteger | choiceLocalElementUnsignedLong | choiceLocalElementUnsignedInt | choiceLocalElementUnsignedShort | choiceLocalElementUnsignedByte | choiceLocalElementPositiveInteger) + /// + /// + public virtual System.SByte? choiceLocalElementByte { + get { + XElement x = this.GetElement(choiceLocalElementByteXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Byte).Datatype); + } + set { + this.SetElement(choiceLocalElementByteXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.Byte).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementNonNegativeIntegerXName = System.Xml.Linq.XName.Get("choiceLocalElementNonNegativeInteger", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementNormalizedString | choiceLocalElementToken | choiceLocalElementLanguage | choiceLocalElementNMTOKEN | choiceLocalElementNMTOKENS | choiceLocalElementName | choiceLocalElementNCName | choiceLocalElementID | choiceLocalElementIDREF | choiceLocalElementIDREFS | choiceLocalElementENTITY | choiceLocalElementENTITIES | choiceLocalElementInteger | choiceLocalElementNonPositiveInteger | choiceLocalElementNegativeInteger | choiceLocalElementLong | choiceLocalElementInt | choiceLocalElementShort | choiceLocalElementByte | choiceLocalElementNonNegativeInteger | choiceLocalElementUnsignedLong | choiceLocalElementUnsignedInt | choiceLocalElementUnsignedShort | choiceLocalElementUnsignedByte | choiceLocalElementPositiveInteger) + /// + /// + public virtual System.Decimal? choiceLocalElementNonNegativeInteger { + get { + XElement x = this.GetElement(choiceLocalElementNonNegativeIntegerXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NonNegativeInteger).Datatype); + } + set { + this.SetElement(choiceLocalElementNonNegativeIntegerXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.NonNegativeInteger).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementUnsignedLongXName = System.Xml.Linq.XName.Get("choiceLocalElementUnsignedLong", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementNormalizedString | choiceLocalElementToken | choiceLocalElementLanguage | choiceLocalElementNMTOKEN | choiceLocalElementNMTOKENS | choiceLocalElementName | choiceLocalElementNCName | choiceLocalElementID | choiceLocalElementIDREF | choiceLocalElementIDREFS | choiceLocalElementENTITY | choiceLocalElementENTITIES | choiceLocalElementInteger | choiceLocalElementNonPositiveInteger | choiceLocalElementNegativeInteger | choiceLocalElementLong | choiceLocalElementInt | choiceLocalElementShort | choiceLocalElementByte | choiceLocalElementNonNegativeInteger | choiceLocalElementUnsignedLong | choiceLocalElementUnsignedInt | choiceLocalElementUnsignedShort | choiceLocalElementUnsignedByte | choiceLocalElementPositiveInteger) + /// + /// + public virtual System.UInt64? choiceLocalElementUnsignedLong { + get { + XElement x = this.GetElement(choiceLocalElementUnsignedLongXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.UnsignedLong).Datatype); + } + set { + this.SetElement(choiceLocalElementUnsignedLongXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.UnsignedLong).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementUnsignedIntXName = System.Xml.Linq.XName.Get("choiceLocalElementUnsignedInt", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementNormalizedString | choiceLocalElementToken | choiceLocalElementLanguage | choiceLocalElementNMTOKEN | choiceLocalElementNMTOKENS | choiceLocalElementName | choiceLocalElementNCName | choiceLocalElementID | choiceLocalElementIDREF | choiceLocalElementIDREFS | choiceLocalElementENTITY | choiceLocalElementENTITIES | choiceLocalElementInteger | choiceLocalElementNonPositiveInteger | choiceLocalElementNegativeInteger | choiceLocalElementLong | choiceLocalElementInt | choiceLocalElementShort | choiceLocalElementByte | choiceLocalElementNonNegativeInteger | choiceLocalElementUnsignedLong | choiceLocalElementUnsignedInt | choiceLocalElementUnsignedShort | choiceLocalElementUnsignedByte | choiceLocalElementPositiveInteger) + /// + /// + public virtual System.UInt32? choiceLocalElementUnsignedInt { + get { + XElement x = this.GetElement(choiceLocalElementUnsignedIntXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.UnsignedInt).Datatype); + } + set { + this.SetElement(choiceLocalElementUnsignedIntXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.UnsignedInt).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementUnsignedShortXName = System.Xml.Linq.XName.Get("choiceLocalElementUnsignedShort", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementNormalizedString | choiceLocalElementToken | choiceLocalElementLanguage | choiceLocalElementNMTOKEN | choiceLocalElementNMTOKENS | choiceLocalElementName | choiceLocalElementNCName | choiceLocalElementID | choiceLocalElementIDREF | choiceLocalElementIDREFS | choiceLocalElementENTITY | choiceLocalElementENTITIES | choiceLocalElementInteger | choiceLocalElementNonPositiveInteger | choiceLocalElementNegativeInteger | choiceLocalElementLong | choiceLocalElementInt | choiceLocalElementShort | choiceLocalElementByte | choiceLocalElementNonNegativeInteger | choiceLocalElementUnsignedLong | choiceLocalElementUnsignedInt | choiceLocalElementUnsignedShort | choiceLocalElementUnsignedByte | choiceLocalElementPositiveInteger) + /// + /// + public virtual System.UInt16? choiceLocalElementUnsignedShort { + get { + XElement x = this.GetElement(choiceLocalElementUnsignedShortXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.UnsignedShort).Datatype); + } + set { + this.SetElement(choiceLocalElementUnsignedShortXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.UnsignedShort).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementUnsignedByteXName = System.Xml.Linq.XName.Get("choiceLocalElementUnsignedByte", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementNormalizedString | choiceLocalElementToken | choiceLocalElementLanguage | choiceLocalElementNMTOKEN | choiceLocalElementNMTOKENS | choiceLocalElementName | choiceLocalElementNCName | choiceLocalElementID | choiceLocalElementIDREF | choiceLocalElementIDREFS | choiceLocalElementENTITY | choiceLocalElementENTITIES | choiceLocalElementInteger | choiceLocalElementNonPositiveInteger | choiceLocalElementNegativeInteger | choiceLocalElementLong | choiceLocalElementInt | choiceLocalElementShort | choiceLocalElementByte | choiceLocalElementNonNegativeInteger | choiceLocalElementUnsignedLong | choiceLocalElementUnsignedInt | choiceLocalElementUnsignedShort | choiceLocalElementUnsignedByte | choiceLocalElementPositiveInteger) + /// + /// + public virtual System.Byte? choiceLocalElementUnsignedByte { + get { + XElement x = this.GetElement(choiceLocalElementUnsignedByteXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.UnsignedByte).Datatype); + } + set { + this.SetElement(choiceLocalElementUnsignedByteXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.UnsignedByte).Datatype); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName choiceLocalElementPositiveIntegerXName = System.Xml.Linq.XName.Get("choiceLocalElementPositiveInteger", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Regular expression: (choiceLocalElementNormalizedString | choiceLocalElementToken | choiceLocalElementLanguage | choiceLocalElementNMTOKEN | choiceLocalElementNMTOKENS | choiceLocalElementName | choiceLocalElementNCName | choiceLocalElementID | choiceLocalElementIDREF | choiceLocalElementIDREFS | choiceLocalElementENTITY | choiceLocalElementENTITIES | choiceLocalElementInteger | choiceLocalElementNonPositiveInteger | choiceLocalElementNegativeInteger | choiceLocalElementLong | choiceLocalElementInt | choiceLocalElementShort | choiceLocalElementByte | choiceLocalElementNonNegativeInteger | choiceLocalElementUnsignedLong | choiceLocalElementUnsignedInt | choiceLocalElementUnsignedShort | choiceLocalElementUnsignedByte | choiceLocalElementPositiveInteger) + /// + /// + public virtual System.Decimal? choiceLocalElementPositiveInteger { + get { + XElement x = this.GetElement(choiceLocalElementPositiveIntegerXName); + if ((x == null)) { + return null; + } + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.PositiveInteger).Datatype); + } + set { + this.SetElement(choiceLocalElementPositiveIntegerXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.PositiveInteger).Datatype); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("globalElement3", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"); + + static globalElement3() { + BuildElementDictionary(); + contentModel = new ChoiceContentModelEntity(new NamedContentModelEntity(choiceLocalElementNormalizedStringXName), new NamedContentModelEntity(choiceLocalElementTokenXName), new NamedContentModelEntity(choiceLocalElementLanguageXName), new NamedContentModelEntity(choiceLocalElementNMTOKENXName), new NamedContentModelEntity(choiceLocalElementNMTOKENSXName), new NamedContentModelEntity(choiceLocalElementNameXName), new NamedContentModelEntity(choiceLocalElementNCNameXName), new NamedContentModelEntity(choiceLocalElementIDXName), new NamedContentModelEntity(choiceLocalElementIDREFXName), new NamedContentModelEntity(choiceLocalElementIDREFSXName), new NamedContentModelEntity(choiceLocalElementENTITYXName), new NamedContentModelEntity(choiceLocalElementENTITIESXName), new NamedContentModelEntity(choiceLocalElementIntegerXName), new NamedContentModelEntity(choiceLocalElementNonPositiveIntegerXName), new NamedContentModelEntity(choiceLocalElementNegativeIntegerXName), new NamedContentModelEntity(choiceLocalElementLongXName), new NamedContentModelEntity(choiceLocalElementIntXName), new NamedContentModelEntity(choiceLocalElementShortXName), new NamedContentModelEntity(choiceLocalElementByteXName), new NamedContentModelEntity(choiceLocalElementNonNegativeIntegerXName), new NamedContentModelEntity(choiceLocalElementUnsignedLongXName), new NamedContentModelEntity(choiceLocalElementUnsignedIntXName), new NamedContentModelEntity(choiceLocalElementUnsignedShortXName), new NamedContentModelEntity(choiceLocalElementUnsignedByteXName), new NamedContentModelEntity(choiceLocalElementPositiveIntegerXName)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static Dictionary localElementDictionary = new Dictionary(); + + private static void BuildElementDictionary() { + localElementDictionary.Add(choiceLocalElementNormalizedStringXName, typeof(string)); + localElementDictionary.Add(choiceLocalElementTokenXName, typeof(string)); + localElementDictionary.Add(choiceLocalElementLanguageXName, typeof(string)); + localElementDictionary.Add(choiceLocalElementNMTOKENXName, typeof(string)); + localElementDictionary.Add(choiceLocalElementNMTOKENSXName, typeof(string)); + localElementDictionary.Add(choiceLocalElementNameXName, typeof(string)); + localElementDictionary.Add(choiceLocalElementNCNameXName, typeof(string)); + localElementDictionary.Add(choiceLocalElementIDXName, typeof(string)); + localElementDictionary.Add(choiceLocalElementIDREFXName, typeof(string)); + localElementDictionary.Add(choiceLocalElementIDREFSXName, typeof(string)); + localElementDictionary.Add(choiceLocalElementENTITYXName, typeof(string)); + localElementDictionary.Add(choiceLocalElementENTITIESXName, typeof(string)); + localElementDictionary.Add(choiceLocalElementIntegerXName, typeof(decimal)); + localElementDictionary.Add(choiceLocalElementNonPositiveIntegerXName, typeof(decimal)); + localElementDictionary.Add(choiceLocalElementNegativeIntegerXName, typeof(decimal)); + localElementDictionary.Add(choiceLocalElementLongXName, typeof(long)); + localElementDictionary.Add(choiceLocalElementIntXName, typeof(int)); + localElementDictionary.Add(choiceLocalElementShortXName, typeof(short)); + localElementDictionary.Add(choiceLocalElementByteXName, typeof(sbyte)); + localElementDictionary.Add(choiceLocalElementNonNegativeIntegerXName, typeof(decimal)); + localElementDictionary.Add(choiceLocalElementUnsignedLongXName, typeof(ulong)); + localElementDictionary.Add(choiceLocalElementUnsignedIntXName, typeof(uint)); + localElementDictionary.Add(choiceLocalElementUnsignedShortXName, typeof(ushort)); + localElementDictionary.Add(choiceLocalElementUnsignedByteXName, typeof(byte)); + localElementDictionary.Add(choiceLocalElementPositiveIntegerXName, typeof(decimal)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + Dictionary IXMetaData.LocalElementsDictionary { + get { + return localElementDictionary; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static ContentModelEntity contentModel; + + ContentModelEntity IXMetaData.GetContentModel() { + return contentModel; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + public class LinqToXsdTypeManager : ILinqToXsdTypeManager { + + private LinqToXsdTypeManager() { + } + + private static Dictionary elementDictionary = new Dictionary(); + + private static void BuildElementDictionary() { + elementDictionary.Add(System.Xml.Linq.XName.Get("globalElement1", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"), typeof(global::urn.linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest.globalElement1)); + elementDictionary.Add(System.Xml.Linq.XName.Get("globalElement2", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"), typeof(global::urn.linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest.globalElement2)); + elementDictionary.Add(System.Xml.Linq.XName.Get("globalElement3", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest"), typeof(global::urn.linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest.globalElement3)); + } + + private static XmlSchemaSet schemaSet; + + XmlSchemaSet ILinqToXsdTypeManager.Schemas { + get { + if ((schemaSet == null)) { + XmlSchemaSet tempSet = new XmlSchemaSet(); + System.Threading.Interlocked.CompareExchange(ref schemaSet, tempSet, null); + } + return schemaSet; + } + set { + schemaSet = value; + } + } + + protected internal static void AddSchemas(XmlSchemaSet schemas) { + schemas.Add(schemaSet); + } + + Dictionary ILinqToXsdTypeManager.GlobalTypeDictionary { + get { + return XTypedServices.EmptyDictionary; + } + } + + Dictionary ILinqToXsdTypeManager.GlobalElementDictionary { + get { + return elementDictionary; + } + } + + Dictionary ILinqToXsdTypeManager.RootContentTypeMapping { + get { + return XTypedServices.EmptyTypeMappingDictionary; + } + } + + static LinqToXsdTypeManager() { + BuildElementDictionary(); + } + + public static System.Type GetRootType() { + return elementDictionary[System.Xml.Linq.XName.Get("globalElement1", "urn:linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest")]; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static LinqToXsdTypeManager typeManagerSingleton = new LinqToXsdTypeManager(); + + public static LinqToXsdTypeManager Instance { + get { + return typeManagerSingleton; + } + } + } + + public partial class XRootNamespace { + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private XDocument doc; + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private XTypedElement rootObject; + + private XRootNamespace() { + } + + public static XRootNamespace Load(string xmlFile) { + XRootNamespace root = new XRootNamespace(); + root.doc = XDocument.Load(xmlFile); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRootNamespace Load(string xmlFile, LoadOptions options) { + XRootNamespace root = new XRootNamespace(); + root.doc = XDocument.Load(xmlFile, options); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRootNamespace Load(TextReader textReader) { + XRootNamespace root = new XRootNamespace(); + root.doc = XDocument.Load(textReader); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRootNamespace Load(TextReader textReader, LoadOptions options) { + XRootNamespace root = new XRootNamespace(); + root.doc = XDocument.Load(textReader, options); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRootNamespace Load(XmlReader xmlReader) { + XRootNamespace root = new XRootNamespace(); + root.doc = XDocument.Load(xmlReader); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRootNamespace Parse(string text) { + XRootNamespace root = new XRootNamespace(); + root.doc = XDocument.Parse(text); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRootNamespace Parse(string text, LoadOptions options) { + XRootNamespace root = new XRootNamespace(); + root.doc = XDocument.Parse(text, options); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public virtual void Save(string fileName) { + doc.Save(fileName); + } + + public virtual void Save(TextWriter textWriter) { + doc.Save(textWriter); + } + + public virtual void Save(XmlWriter writer) { + doc.Save(writer); + } + + public virtual void Save(TextWriter textWriter, SaveOptions options) { + doc.Save(textWriter, options); + } + + public virtual void Save(string fileName, SaveOptions options) { + doc.Save(fileName, options); + } + + public virtual XDocument XDocument { + get { + return doc; + } + } + + public virtual XTypedElement Root { + get { + return rootObject; + } + } + + public XRootNamespace(globalElement1 root) { + this.doc = new XDocument(root.Untyped); + this.rootObject = root; + } + + + public globalElement1 globalElement1 { get {return rootObject as globalElement1; } } + + public XRootNamespace(globalElement2 root) { + this.doc = new XDocument(root.Untyped); + this.rootObject = root; + } + + + public globalElement2 globalElement2 { get {return rootObject as globalElement2; } } + + public XRootNamespace(globalElement3 root) { + this.doc = new XDocument(root.Untyped); + this.rootObject = root; + } + + + public globalElement3 globalElement3 { get {return rootObject as globalElement3; } } + } + + public partial class XRoot { + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private XDocument doc; + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private XTypedElement rootObject; + + private XRoot() { + } + + public static XRoot Load(string xmlFile) { + XRoot root = new XRoot(); + root.doc = XDocument.Load(xmlFile); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRoot Load(string xmlFile, LoadOptions options) { + XRoot root = new XRoot(); + root.doc = XDocument.Load(xmlFile, options); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRoot Load(TextReader textReader) { + XRoot root = new XRoot(); + root.doc = XDocument.Load(textReader); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRoot Load(TextReader textReader, LoadOptions options) { + XRoot root = new XRoot(); + root.doc = XDocument.Load(textReader, options); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRoot Load(XmlReader xmlReader) { + XRoot root = new XRoot(); + root.doc = XDocument.Load(xmlReader); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRoot Parse(string text) { + XRoot root = new XRoot(); + root.doc = XDocument.Parse(text); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public static XRoot Parse(string text, LoadOptions options) { + XRoot root = new XRoot(); + root.doc = XDocument.Parse(text, options); + XTypedElement typedRoot = XTypedServices.ToXTypedElement(root.doc.Root, LinqToXsdTypeManager.Instance); + if ((typedRoot == null)) { + throw new LinqToXsdException("Invalid root element in xml document."); + } + root.rootObject = typedRoot; + return root; + } + + public virtual void Save(string fileName) { + doc.Save(fileName); + } + + public virtual void Save(TextWriter textWriter) { + doc.Save(textWriter); + } + + public virtual void Save(XmlWriter writer) { + doc.Save(writer); + } + + public virtual void Save(TextWriter textWriter, SaveOptions options) { + doc.Save(textWriter, options); + } + + public virtual void Save(string fileName, SaveOptions options) { + doc.Save(fileName, options); + } + + public virtual XDocument XDocument { + get { + return doc; + } + } + + public virtual XTypedElement Root { + get { + return rootObject; + } + } + + public XRoot(global::urn.linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest.globalElement1 root) { + this.doc = new XDocument(root.Untyped); + this.rootObject = root; + } + + + public global::urn.linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest.globalElement1 globalElement1 { get {return rootObject as global::urn.linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest.globalElement1; } } + + public XRoot(global::urn.linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest.globalElement2 root) { + this.doc = new XDocument(root.Untyped); + this.rootObject = root; + } + + + public global::urn.linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest.globalElement2 globalElement2 { get {return rootObject as global::urn.linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest.globalElement2; } } + + public XRoot(global::urn.linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest.globalElement3 root) { + this.doc = new XDocument(root.Untyped); + this.rootObject = root; + } + + + public global::urn.linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest.globalElement3 globalElement3 { get {return rootObject as global::urn.linqtoxsd.schemas.ElementsWithSimpleDerivedTypesTest.globalElement3; } } + } +} From 12473d3b1cf3f25d896392d8ec12992d17a2c1eb Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Tue, 9 Dec 2025 14:48:21 +1000 Subject: [PATCH 020/107] Updated target SDK to use .NET 10; LinqToXsd CLI tool now runs on .NET 7,8,9,10. --- LinqToXsd/LinqToXsd.csproj | 2 +- global.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LinqToXsd/LinqToXsd.csproj b/LinqToXsd/LinqToXsd.csproj index fb95885..444dad9 100644 --- a/LinqToXsd/LinqToXsd.csproj +++ b/LinqToXsd/LinqToXsd.csproj @@ -1,7 +1,7 @@  - net6.0;net5.0;netcoreapp3.1;netframework472 + net10.0;net9.0;net8.0;net7.0;net6.0;net5.0;netcoreapp3.1;netframework472 Exe A command line tool that facilitates generating code from an XSD; also generates configuration files to control code generation. Do not include this nuget package as a dependency in shipping applications or libraries; use the code it generates in a shipping library or app and include a dependency on the XObjectsCore nuget package. Can be installed via 'dotnet tool install LinqToXsdCore --global', and then invoked via 'linqtoxsd'. Original Authors: Microsoft Corporation. RELEASENOTES.md diff --git a/global.json b/global.json index 4fec7ea..3f0d94c 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "6.0.428", + "version": "10.0.*", "rollForward": "latestFeature" } } \ No newline at end of file From 9a263d2e996c3fb1d65e57f2009a2ded8f52dfe5 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Tue, 9 Dec 2025 14:54:53 +1000 Subject: [PATCH 021/107] Solution wide upgrade to minimum .NET 8 target. .NET standard remains unchanged. --- LinqToXsd/LinqToXsd.csproj | 8 ++++---- XObjectsCode/XObjectsCodeGen.csproj | 6 +++--- XObjectsCore/XObjectsCore.csproj | 2 +- XObjectsTests/XObjectsTests.csproj | 14 +++++++------- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/LinqToXsd/LinqToXsd.csproj b/LinqToXsd/LinqToXsd.csproj index 444dad9..730e495 100644 --- a/LinqToXsd/LinqToXsd.csproj +++ b/LinqToXsd/LinqToXsd.csproj @@ -27,16 +27,16 @@ - + - TargetFramework=net6.0 + $(TargetFramework) - TargetFramework=net6.0 + $(TargetFramework) - + TargetFramework=netstandard2.0 diff --git a/XObjectsCode/XObjectsCodeGen.csproj b/XObjectsCode/XObjectsCodeGen.csproj index 0936503..39df84d 100644 --- a/XObjectsCode/XObjectsCodeGen.csproj +++ b/XObjectsCode/XObjectsCodeGen.csproj @@ -1,7 +1,7 @@  - netstandard2.0;net6.0 + netstandard2.0;net8.0 The $(MSBuildProjectName) provides code generation facilities, and is consumed by the LinqToXsdCore command line tool; use the LinqToXsdCore tool to generate code, and link to the XObjectsCore nuget package to consume the generated code in your shipping app or library. Original Authors: Microsoft Corporation. 3.2.6 $(VersionSuffix) @@ -23,9 +23,9 @@ - + - TargetFramework=net6.0 + TargetFramework=net8.0 diff --git a/XObjectsCore/XObjectsCore.csproj b/XObjectsCore/XObjectsCore.csproj index 6a257d3..633ca13 100644 --- a/XObjectsCore/XObjectsCore.csproj +++ b/XObjectsCore/XObjectsCore.csproj @@ -1,7 +1,7 @@  - netstandard2.0;net6.0 + netstandard2.0;net8.0 This $(MSBuildProjectName) library provides an API for generated code and projects that use said generated code. Use this library in shipping apps + libraries; use LinqToXsdCore to generate code. Original Authors: Microsoft Corporation. RELEASENOTES.md diff --git a/XObjectsTests/XObjectsTests.csproj b/XObjectsTests/XObjectsTests.csproj index c1f9316..3aabea8 100644 --- a/XObjectsTests/XObjectsTests.csproj +++ b/XObjectsTests/XObjectsTests.csproj @@ -1,7 +1,7 @@  - net6.0;netframework472 + net8.0;netframework472 $(RootNamespace).Tests false preview @@ -32,8 +32,8 @@ - - TargetFramework=net6.0 + + TargetFramework=net8.0 TargetFramework=netframework472 @@ -41,15 +41,15 @@ - - TargetFramework=net6.0 + + TargetFramework=net8.0 TargetFramework=netstandard2.0 - - TargetFramework=net6.0 + + TargetFramework=net8.0 TargetFramework=netstandard2.0 From 5ebb45c9c18d63b1d58366f9edfa75beed08a67b Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Tue, 9 Dec 2025 14:57:07 +1000 Subject: [PATCH 022/107] Updated runtime identifier (win7 no longer recognised by .NET 10 SDK). --- LinqToXsd/LinqToXsd.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LinqToXsd/LinqToXsd.csproj b/LinqToXsd/LinqToXsd.csproj index 730e495..848558d 100644 --- a/LinqToXsd/LinqToXsd.csproj +++ b/LinqToXsd/LinqToXsd.csproj @@ -5,7 +5,7 @@ Exe A command line tool that facilitates generating code from an XSD; also generates configuration files to control code generation. Do not include this nuget package as a dependency in shipping applications or libraries; use the code it generates in a shipping library or app and include a dependency on the XObjectsCore nuget package. Can be installed via 'dotnet tool install LinqToXsdCore --global', and then invoked via 'linqtoxsd'. Original Authors: Microsoft Corporation. RELEASENOTES.md - win7-x64;win7-x86 + win-x64;win-x86 From 3eef115551f6659c9fce6d0c4163efff50e196bb Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Tue, 9 Dec 2025 15:17:18 +1000 Subject: [PATCH 023/107] Removed net6.0 as a default target from Build.props. Updated Portable.System.DateTimeOnly and System.Memory nuget. --- Directory.Build.props | 1 - LinqToXsd.Schemas/LinqToXsd.Schemas.csproj | 6 +++--- LinqToXsd/LinqToXsd.csproj | 4 ++-- XObjectsCore/XObjectsCore.csproj | 4 ++-- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 09272f6..6db54c6 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -3,7 +3,6 @@ - net6.0 Xml.Schema.Linq diff --git a/LinqToXsd.Schemas/LinqToXsd.Schemas.csproj b/LinqToXsd.Schemas/LinqToXsd.Schemas.csproj index af19769..32163c7 100644 --- a/LinqToXsd.Schemas/LinqToXsd.Schemas.csproj +++ b/LinqToXsd.Schemas/LinqToXsd.Schemas.csproj @@ -24,9 +24,9 @@ - + - TargetFramework=net6.0 + TargetFramework=netstandard2.0 @@ -39,7 +39,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/LinqToXsd/LinqToXsd.csproj b/LinqToXsd/LinqToXsd.csproj index 848558d..ed6d1a9 100644 --- a/LinqToXsd/LinqToXsd.csproj +++ b/LinqToXsd/LinqToXsd.csproj @@ -29,10 +29,10 @@ - $(TargetFramework) + TargetFramework=netstandard2.0 - $(TargetFramework) + TargetFramework=netstandard2.0 diff --git a/XObjectsCore/XObjectsCore.csproj b/XObjectsCore/XObjectsCore.csproj index 633ca13..b33c6a4 100644 --- a/XObjectsCore/XObjectsCore.csproj +++ b/XObjectsCore/XObjectsCore.csproj @@ -20,8 +20,8 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + From 8fd10f3454a040cbc7d5c578a7547632ecea8cd0 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Tue, 9 Dec 2025 15:17:29 +1000 Subject: [PATCH 024/107] Switched to using .NET framework compatible API. --- XObjectsTests/Extensions/DirectoryExtensions.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/XObjectsTests/Extensions/DirectoryExtensions.cs b/XObjectsTests/Extensions/DirectoryExtensions.cs index 38526c8..fafc198 100644 --- a/XObjectsTests/Extensions/DirectoryExtensions.cs +++ b/XObjectsTests/Extensions/DirectoryExtensions.cs @@ -117,8 +117,6 @@ static DirectoryInfo[] SafeEnumerateDirectories(DirectoryInfo directory) public static FileInfo FindFileRecursively(this DirectoryInfo dir, string fileName) { - return dir.GetFiles(fileName, new EnumerationOptions() { - RecurseSubdirectories = true - }).Single(); + return dir.GetFiles(fileName, SearchOption.AllDirectories).Single(); } } From 5b91857edf27007b1149f0d507417a53c6e4e07d Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Tue, 9 Dec 2025 15:40:12 +1000 Subject: [PATCH 025/107] Updated version 3.4.12. --- Version.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Version.props b/Version.props index 779155c..98abc01 100644 --- a/Version.props +++ b/Version.props @@ -1,6 +1,6 @@ - 3.4.11 + 3.4.12 $(VersionSuffix) $(Version)-$(VersionSuffix) From 4ca0beb90396f876ffafc29f5d0035e881a2bc00 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Tue, 9 Dec 2025 15:47:55 +1000 Subject: [PATCH 026/107] Updated release notes. --- RELEASENOTES.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 4c16d50..b64700b 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -1,5 +1,13 @@ # LinqToXsdCore Release Notes +## Version 3.4.12 +Nuget packages: +* https://www.nuget.org/packages/LinqToXsdCore/3.4.12 +* https://www.nuget.org/packages/XObjectsCore/3.4.12 + * [#79](https://github.com/mamift/LinqToXsdCore/pull/79). + * The LinqToXsd CLI tool now runs on .NET 7,8,9 and 10. Still supports .NET core 3.1, 5 and 6 and .NET Framework 4.7.2 + * Fixes a bug occurring in the CLI tool when a directory with trailling quotes (' or ") is provided for the `gen -a path\` command. + ## Version 3.4.10 Nuget packages: * https://www.nuget.org/packages/LinqToXsdCore/3.4.10 From 45f586a1f142de8ff4ea9b06701b20341ba6c98b Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Tue, 9 Dec 2025 15:55:17 +1000 Subject: [PATCH 027/107] Fixed global.json syntax. --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index 3f0d94c..859752a 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "10.0.*", + "version": "10.0.0", "rollForward": "latestFeature" } } \ No newline at end of file From fd0fafc6b3a4ffb1585337b291ed91ad94e5be9f Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Tue, 9 Dec 2025 16:08:29 +1000 Subject: [PATCH 028/107] no 10.0.0 versoin! there is a 10.0.100 tho. --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index 859752a..f72210c 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "10.0.0", + "version": "10.0.100", "rollForward": "latestFeature" } } \ No newline at end of file From 823232bf5cdf613716c250212c442f75599dfbca Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Wed, 10 Dec 2025 08:36:36 +1000 Subject: [PATCH 029/107] Added runtime ids to XObjectsCore and CodeGen to fix packing error. --- XObjectsCode/XObjectsCodeGen.csproj | 1 + XObjectsCore/XObjectsCore.csproj | 1 + 2 files changed, 2 insertions(+) diff --git a/XObjectsCode/XObjectsCodeGen.csproj b/XObjectsCode/XObjectsCodeGen.csproj index 39df84d..ca14d90 100644 --- a/XObjectsCode/XObjectsCodeGen.csproj +++ b/XObjectsCode/XObjectsCodeGen.csproj @@ -6,6 +6,7 @@ 3.2.6 $(VersionSuffix) $(Version)-$(VersionSuffix) + win-x64;win-x86 diff --git a/XObjectsCore/XObjectsCore.csproj b/XObjectsCore/XObjectsCore.csproj index b33c6a4..1bc5c15 100644 --- a/XObjectsCore/XObjectsCore.csproj +++ b/XObjectsCore/XObjectsCore.csproj @@ -4,6 +4,7 @@ netstandard2.0;net8.0 This $(MSBuildProjectName) library provides an API for generated code and projects that use said generated code. Use this library in shipping apps + libraries; use LinqToXsdCore to generate code. Original Authors: Microsoft Corporation. RELEASENOTES.md + win-x64;win-x86 From 57bc480e1975d0e13ddac68a6158d197384594d4 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Wed, 10 Dec 2025 10:48:46 +1000 Subject: [PATCH 030/107] Turned off runtime ids (this is an optional .NET 10 SDK feature: https://learn.microsoft.com/en-us/dotnet/core/tools/rid-specific-tools#overview ) --- LinqToXsd/LinqToXsd.csproj | 1 - XObjectsCode/XObjectsCodeGen.csproj | 1 - XObjectsCore/XObjectsCore.csproj | 1 - 3 files changed, 3 deletions(-) diff --git a/LinqToXsd/LinqToXsd.csproj b/LinqToXsd/LinqToXsd.csproj index ed6d1a9..1a812f1 100644 --- a/LinqToXsd/LinqToXsd.csproj +++ b/LinqToXsd/LinqToXsd.csproj @@ -5,7 +5,6 @@ Exe A command line tool that facilitates generating code from an XSD; also generates configuration files to control code generation. Do not include this nuget package as a dependency in shipping applications or libraries; use the code it generates in a shipping library or app and include a dependency on the XObjectsCore nuget package. Can be installed via 'dotnet tool install LinqToXsdCore --global', and then invoked via 'linqtoxsd'. Original Authors: Microsoft Corporation. RELEASENOTES.md - win-x64;win-x86 diff --git a/XObjectsCode/XObjectsCodeGen.csproj b/XObjectsCode/XObjectsCodeGen.csproj index ca14d90..39df84d 100644 --- a/XObjectsCode/XObjectsCodeGen.csproj +++ b/XObjectsCode/XObjectsCodeGen.csproj @@ -6,7 +6,6 @@ 3.2.6 $(VersionSuffix) $(Version)-$(VersionSuffix) - win-x64;win-x86 diff --git a/XObjectsCore/XObjectsCore.csproj b/XObjectsCore/XObjectsCore.csproj index 1bc5c15..b33c6a4 100644 --- a/XObjectsCore/XObjectsCore.csproj +++ b/XObjectsCore/XObjectsCore.csproj @@ -4,7 +4,6 @@ netstandard2.0;net8.0 This $(MSBuildProjectName) library provides an API for generated code and projects that use said generated code. Use this library in shipping apps + libraries; use LinqToXsdCore to generate code. Original Authors: Microsoft Corporation. RELEASENOTES.md - win-x64;win-x86 From fa0836f2f17102dc897a71cb2da4f00054b4e93d Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Wed, 10 Dec 2025 12:36:00 +1000 Subject: [PATCH 031/107] Comment to re-trigger PR checks in GITHUb. --- Directory.Build.props | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Directory.Build.props b/Directory.Build.props index 6db54c6..6e18200 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -4,6 +4,8 @@ Xml.Schema.Linq + + From a3417b6b712b29b08173d3e87293a10e2cfcbf9b Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Wed, 10 Dec 2025 13:03:28 +1000 Subject: [PATCH 032/107] Sorted list of generated schema libraries in solution filter; added CityGML to filter. --- LinqToXsd-TestingSuite.slnf | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/LinqToXsd-TestingSuite.slnf b/LinqToXsd-TestingSuite.slnf index 4f573f3..593b313 100644 --- a/LinqToXsd-TestingSuite.slnf +++ b/LinqToXsd-TestingSuite.slnf @@ -10,33 +10,37 @@ "GeneratedSchemaLibraries\\Atom\\Atom.csproj", "GeneratedSchemaLibraries\\BasePropsTest\\BasePropsTest.csproj", "GeneratedSchemaLibraries\\ContentModelTest\\ContentModelTest.csproj", + "GeneratedSchemaLibraries\\CityGML\\CityGML.csproj", "GeneratedSchemaLibraries\\EnumsTest\\EnumsTest.csproj", "GeneratedSchemaLibraries\\EnzymeML\\EnzymeML.csproj", - "GeneratedSchemaLibraries\\GS1\\GS1.csproj", "GeneratedSchemaLibraries\\GelML\\GelML.csproj", + "GeneratedSchemaLibraries\\GS1\\GS1.csproj", "GeneratedSchemaLibraries\\HL-7\\HL-7.csproj", "GeneratedSchemaLibraries\\HR-XML\\HR-XML.csproj", "GeneratedSchemaLibraries\\LegalRuleML\\LegalRuleML.csproj", - "GeneratedSchemaLibraries\\MSBuild\\MSBuild.csproj", "GeneratedSchemaLibraries\\MetaLEX\\MetaLEX.csproj", "GeneratedSchemaLibraries\\Microsoft Project 2007\\Microsoft Project 2007.csproj", "GeneratedSchemaLibraries\\Microsoft Search\\Microsoft Search.csproj", + "GeneratedSchemaLibraries\\MSBuild\\MSBuild.csproj", "GeneratedSchemaLibraries\\Multi-namespaces\\Multi-namespaces.csproj", - "GeneratedSchemaLibraries\\NHS CDS\\NHS CDS.csproj", + "GeneratedSchemaLibraries\\mzIdentML\\mzIdentML.csproj", + "GeneratedSchemaLibraries\\mzML\\mzML.csproj", + "GeneratedSchemaLibraries\\mzQuantML\\mzQuantML.csproj", "GeneratedSchemaLibraries\\NameMangled\\NameMangled.csproj", - "GeneratedSchemaLibraries\\OFMX\\OFMX.csproj", - "GeneratedSchemaLibraries\\OPC\\OPC.csproj", + "GeneratedSchemaLibraries\\NHS CDS\\NHS CDS.csproj", "GeneratedSchemaLibraries\\OcmContracts\\OcmContracts.csproj", "GeneratedSchemaLibraries\\Office 2003 Reference schemas\\Office 2003 Reference schemas.csproj", "GeneratedSchemaLibraries\\OfficeOpenXML-XMLSchema-Strict\\OfficeOpenXML-XMLSchema-Strict.csproj", "GeneratedSchemaLibraries\\OfficeOpenXML-XMLSchema-Transitional\\OfficeOpenXML-XMLSchema-Transitional.csproj", + "GeneratedSchemaLibraries\\OFMX\\OFMX.csproj", + "GeneratedSchemaLibraries\\OPC\\OPC.csproj", "GeneratedSchemaLibraries\\OpenPackagingConventions-XMLSchema\\OpenPackagingConventions-XMLSchema.csproj", "GeneratedSchemaLibraries\\Opml\\Opml.csproj", "GeneratedSchemaLibraries\\Pubmed\\Pubmed.csproj", "GeneratedSchemaLibraries\\Rss\\Rss.csproj", "GeneratedSchemaLibraries\\SBML\\SBML.csproj", - "GeneratedSchemaLibraries\\SWRL\\SWRL.csproj", "GeneratedSchemaLibraries\\SharePoint2010\\SharePoint2010.csproj", + "GeneratedSchemaLibraries\\SWRL\\SWRL.csproj", "GeneratedSchemaLibraries\\ThermoML\\ThermoML.csproj", "GeneratedSchemaLibraries\\Toy schemas\\Toy schemas.csproj", "GeneratedSchemaLibraries\\TraML\\TraML.csproj", @@ -45,9 +49,6 @@ "GeneratedSchemaLibraries\\XMLSpec\\XMLSpec.csproj", "GeneratedSchemaLibraries\\XQueryX\\XQueryX.csproj", "GeneratedSchemaLibraries\\XSD\\XSD.csproj", - "GeneratedSchemaLibraries\\mzIdentML\\mzIdentML.csproj", - "GeneratedSchemaLibraries\\mzML\\mzML.csproj", - "GeneratedSchemaLibraries\\mzQuantML\\mzQuantML.csproj", "LinqToXsd.Schemas\\LinqToXsd.Schemas.csproj", "LinqToXsd\\LinqToXsd.csproj", "XObjectsCode\\XObjectsCodeGen.csproj", From 964d50e2e42bf5238dabfbc634b0e6c690899e2f Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Wed, 10 Dec 2025 13:09:21 +1000 Subject: [PATCH 033/107] Updated testing suite solution filter (these projects build OK). --- LinqToXsd-TestingSuite.slnf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/LinqToXsd-TestingSuite.slnf b/LinqToXsd-TestingSuite.slnf index 593b313..aa5e3f7 100644 --- a/LinqToXsd-TestingSuite.slnf +++ b/LinqToXsd-TestingSuite.slnf @@ -9,6 +9,7 @@ "GeneratedSchemaLibraries\\AspNetSiteMaps\\AspNetSiteMaps.csproj", "GeneratedSchemaLibraries\\Atom\\Atom.csproj", "GeneratedSchemaLibraries\\BasePropsTest\\BasePropsTest.csproj", + "GeneratedSchemaLibraries\\BITS-2.0-XSD\\BITS-2.0-XSD.csproj", "GeneratedSchemaLibraries\\ContentModelTest\\ContentModelTest.csproj", "GeneratedSchemaLibraries\\CityGML\\CityGML.csproj", "GeneratedSchemaLibraries\\EnumsTest\\EnumsTest.csproj", @@ -27,12 +28,14 @@ "GeneratedSchemaLibraries\\mzML\\mzML.csproj", "GeneratedSchemaLibraries\\mzQuantML\\mzQuantML.csproj", "GeneratedSchemaLibraries\\NameMangled\\NameMangled.csproj", + "GeneratedSchemaLibraries\\NestedChoiceTest\\NestedChoiceTest.csproj", "GeneratedSchemaLibraries\\NHS CDS\\NHS CDS.csproj", "GeneratedSchemaLibraries\\OcmContracts\\OcmContracts.csproj", "GeneratedSchemaLibraries\\Office 2003 Reference schemas\\Office 2003 Reference schemas.csproj", "GeneratedSchemaLibraries\\OfficeOpenXML-XMLSchema-Strict\\OfficeOpenXML-XMLSchema-Strict.csproj", "GeneratedSchemaLibraries\\OfficeOpenXML-XMLSchema-Transitional\\OfficeOpenXML-XMLSchema-Transitional.csproj", "GeneratedSchemaLibraries\\OFMX\\OFMX.csproj", + "GeneratedSchemaLibraries\\OGC-misc\\OGC-misc.csproj", "GeneratedSchemaLibraries\\OPC\\OPC.csproj", "GeneratedSchemaLibraries\\OpenPackagingConventions-XMLSchema\\OpenPackagingConventions-XMLSchema.csproj", "GeneratedSchemaLibraries\\Opml\\Opml.csproj", @@ -45,6 +48,7 @@ "GeneratedSchemaLibraries\\Toy schemas\\Toy schemas.csproj", "GeneratedSchemaLibraries\\TraML\\TraML.csproj", "GeneratedSchemaLibraries\\UK CabinetOffice\\UK CabinetOffice.csproj", + "GeneratedSchemaLibraries\\W3C.XML\\W3C.XML.csproj", "GeneratedSchemaLibraries\\Windows\\Windows.csproj", "GeneratedSchemaLibraries\\XMLSpec\\XMLSpec.csproj", "GeneratedSchemaLibraries\\XQueryX\\XQueryX.csproj", From 8c963bcc2afba836e8b86538b21f1bf50ecddb8b Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Wed, 10 Dec 2025 13:23:39 +1000 Subject: [PATCH 034/107] Explicitly set target framework for these nuget packages, to make it consistent with XObjectsCodeGen and other projects. --- LinqToXsd.Schemas/LinqToXsd.Schemas.csproj | 5 ++++- XObjectsCore/XObjectsCore.csproj | 9 +++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/LinqToXsd.Schemas/LinqToXsd.Schemas.csproj b/LinqToXsd.Schemas/LinqToXsd.Schemas.csproj index 32163c7..19f3e67 100644 --- a/LinqToXsd.Schemas/LinqToXsd.Schemas.csproj +++ b/LinqToXsd.Schemas/LinqToXsd.Schemas.csproj @@ -38,8 +38,11 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive + TargetFramework=netstandard2.0 - + + TargetFramework=netstandard2.0 + diff --git a/XObjectsCore/XObjectsCore.csproj b/XObjectsCore/XObjectsCore.csproj index b33c6a4..af8df66 100644 --- a/XObjectsCore/XObjectsCore.csproj +++ b/XObjectsCore/XObjectsCore.csproj @@ -19,9 +19,14 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive + TargetFramework=netstandard2.0 - - + + TargetFramework=netstandard2.0 + + + TargetFramework=netstandard2.0 + From 4791647b15ebf360f9531f16571bcbc58458568c Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Wed, 10 Dec 2025 15:48:01 +1000 Subject: [PATCH 035/107] Added editorconfig file. --- .editorconfig | 4201 +++++++++++++++++++++++++++++++++++++++++++++ LinqToXsdCore.sln | 3 +- 2 files changed, 4203 insertions(+), 1 deletion(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..8dad22a --- /dev/null +++ b/.editorconfig @@ -0,0 +1,4201 @@ + +[*.{appxmanifest,axml,blockshader,c,c++,c++m,cc,ccm,cginc,compute,config,cp,cpp,cppm,cql,csproj,cu,cuh,cxx,cxxm,dbml,discomap,dtd,fx,fxh,h,h++,hh,hlsl,hlsli,hlslinc,hp,hpp,hxx,icc,inc,inl,ino,ipp,ixx,jsproj,lsproj,mpp,mq4,mq5,mqh,mxx,njsproj,nuspec,proj,props,resw,resx,shaderFoundry,sql,StyleCop,targets,tasks,tcc,tpp,urtshader,usf,ush,vbproj,xml,xsd}] +indent_style = tab +indent_size = tab +tab_width = 4 + +[*.{asax,ascx,aspx,cs,cshtml,htm,html,master,razor,skin,vb}] +indent_style = space +indent_size = 4 +tab_width = 4 + +[*.{axaml,paml,xaml,xamlx,xoml}] +indent_style = space +indent_size = 2 +tab_width = 2 + +[*] + +# Standard properties +end_of_line = native + +# Microsoft .NET properties +csharp_indent_braces = false +csharp_indent_switch_labels = true +csharp_new_line_before_catch = true +csharp_new_line_before_else = true +csharp_new_line_before_finally = true +csharp_new_line_before_members_in_object_initializers = false +csharp_new_line_before_open_brace = events,indexers,local_functions,methods,properties,types +csharp_new_line_between_query_expression_clauses = true +csharp_preferred_modifier_order = public, private, protected, internal, file, new, static, abstract, virtual, sealed, readonly, override, extern, unsafe, volatile, async, required:suggestion +csharp_preserve_single_line_blocks = true +csharp_space_after_cast = false +csharp_space_after_colon_in_inheritance_clause = true +csharp_space_after_comma = true +csharp_space_after_dot = false +csharp_space_after_keywords_in_control_flow_statements = true +csharp_space_after_semicolon_in_for_statement = true +csharp_space_around_binary_operators = before_and_after +csharp_space_before_colon_in_inheritance_clause = true +csharp_space_before_comma = false +csharp_space_before_dot = false +csharp_space_before_open_square_brackets = false +csharp_space_before_semicolon_in_for_statement = false +csharp_space_between_empty_square_brackets = false +csharp_space_between_method_call_empty_parameter_list_parentheses = false +csharp_space_between_method_call_name_and_opening_parenthesis = false +csharp_space_between_method_call_parameter_list_parentheses = false +csharp_space_between_method_declaration_empty_parameter_list_parentheses = false +csharp_space_between_method_declaration_name_and_open_parenthesis = false +csharp_space_between_method_declaration_parameter_list_parentheses = false +csharp_space_between_parentheses = false +csharp_space_between_square_brackets = false +csharp_style_namespace_declarations = file_scoped:suggestion +csharp_style_prefer_utf8_string_literals = true:suggestion +csharp_style_var_elsewhere = true:suggestion +csharp_style_var_for_built_in_types = true:suggestion +csharp_style_var_when_type_is_apparent = true:suggestion +csharp_using_directive_placement = outside_namespace:silent +dotnet_diagnostic.bc40000.severity = warning +dotnet_diagnostic.bc400005.severity = warning +dotnet_diagnostic.bc40008.severity = warning +dotnet_diagnostic.bc40056.severity = warning +dotnet_diagnostic.bc42016.severity = warning +dotnet_diagnostic.bc42024.severity = warning +dotnet_diagnostic.bc42025.severity = warning +dotnet_diagnostic.bc42104.severity = warning +dotnet_diagnostic.bc42105.severity = warning +dotnet_diagnostic.bc42106.severity = warning +dotnet_diagnostic.bc42107.severity = warning +dotnet_diagnostic.bc42304.severity = warning +dotnet_diagnostic.bc42309.severity = warning +dotnet_diagnostic.bc42322.severity = warning +dotnet_diagnostic.bc42349.severity = warning +dotnet_diagnostic.bc42353.severity = warning +dotnet_diagnostic.bc42354.severity = warning +dotnet_diagnostic.bc42355.severity = warning +dotnet_diagnostic.bc42356.severity = warning +dotnet_diagnostic.bc42358.severity = warning +dotnet_diagnostic.bc42380.severity = warning +dotnet_diagnostic.bc42504.severity = warning +dotnet_diagnostic.bc42505.severity = warning +dotnet_diagnostic.ca2252.severity = error +dotnet_diagnostic.ca2254.severity = suggestion +dotnet_diagnostic.cs0067.severity = warning +dotnet_diagnostic.cs0078.severity = warning +dotnet_diagnostic.cs0108.severity = warning +dotnet_diagnostic.cs0109.severity = warning +dotnet_diagnostic.cs0114.severity = warning +dotnet_diagnostic.cs0162.severity = warning +dotnet_diagnostic.cs0164.severity = warning +dotnet_diagnostic.cs0168.severity = warning +dotnet_diagnostic.cs0169.severity = warning +dotnet_diagnostic.cs0183.severity = warning +dotnet_diagnostic.cs0184.severity = warning +dotnet_diagnostic.cs0197.severity = warning +dotnet_diagnostic.cs0219.severity = warning +dotnet_diagnostic.cs0252.severity = warning +dotnet_diagnostic.cs0253.severity = warning +dotnet_diagnostic.cs0282.severity = warning +dotnet_diagnostic.cs0414.severity = warning +dotnet_diagnostic.cs0420.severity = warning +dotnet_diagnostic.cs0458.severity = warning +dotnet_diagnostic.cs0464.severity = warning +dotnet_diagnostic.cs0465.severity = warning +dotnet_diagnostic.cs0469.severity = warning +dotnet_diagnostic.cs0472.severity = warning +dotnet_diagnostic.cs0612.severity = warning +dotnet_diagnostic.cs0618.severity = warning +dotnet_diagnostic.cs0628.severity = warning +dotnet_diagnostic.cs0642.severity = warning +dotnet_diagnostic.cs0649.severity = warning +dotnet_diagnostic.cs0652.severity = warning +dotnet_diagnostic.cs0657.severity = warning +dotnet_diagnostic.cs0658.severity = warning +dotnet_diagnostic.cs0659.severity = warning +dotnet_diagnostic.cs0660.severity = warning +dotnet_diagnostic.cs0661.severity = warning +dotnet_diagnostic.cs0665.severity = warning +dotnet_diagnostic.cs0672.severity = warning +dotnet_diagnostic.cs0675.severity = warning +dotnet_diagnostic.cs0693.severity = warning +dotnet_diagnostic.cs0728.severity = warning +dotnet_diagnostic.cs0809.severity = warning +dotnet_diagnostic.cs1030.severity = warning +dotnet_diagnostic.cs1058.severity = warning +dotnet_diagnostic.cs1066.severity = warning +dotnet_diagnostic.cs1522.severity = warning +dotnet_diagnostic.cs1570.severity = warning +dotnet_diagnostic.cs1571.severity = warning +dotnet_diagnostic.cs1572.severity = warning +dotnet_diagnostic.cs1573.severity = warning +dotnet_diagnostic.cs1574.severity = warning +dotnet_diagnostic.cs1580.severity = warning +dotnet_diagnostic.cs1581.severity = warning +dotnet_diagnostic.cs1584.severity = warning +dotnet_diagnostic.cs1587.severity = warning +dotnet_diagnostic.cs1589.severity = warning +dotnet_diagnostic.cs1590.severity = warning +dotnet_diagnostic.cs1591.severity = warning +dotnet_diagnostic.cs1592.severity = warning +dotnet_diagnostic.cs1687.severity = warning +dotnet_diagnostic.cs1710.severity = warning +dotnet_diagnostic.cs1711.severity = warning +dotnet_diagnostic.cs1712.severity = warning +dotnet_diagnostic.cs1717.severity = warning +dotnet_diagnostic.cs1723.severity = warning +dotnet_diagnostic.cs1911.severity = warning +dotnet_diagnostic.cs1957.severity = warning +dotnet_diagnostic.cs1981.severity = warning +dotnet_diagnostic.cs1998.severity = warning +dotnet_diagnostic.cs4014.severity = warning +dotnet_diagnostic.cs4024.severity = warning +dotnet_diagnostic.cs4025.severity = warning +dotnet_diagnostic.cs4026.severity = warning +dotnet_diagnostic.cs7022.severity = warning +dotnet_diagnostic.cs7023.severity = warning +dotnet_diagnostic.cs7080.severity = warning +dotnet_diagnostic.cs7081.severity = warning +dotnet_diagnostic.cs7082.severity = warning +dotnet_diagnostic.cs7095.severity = warning +dotnet_diagnostic.cs8073.severity = warning +dotnet_diagnostic.cs8094.severity = warning +dotnet_diagnostic.cs8123.severity = warning +dotnet_diagnostic.cs8305.severity = warning +dotnet_diagnostic.cs8321.severity = warning +dotnet_diagnostic.cs8383.severity = warning +dotnet_diagnostic.cs8424.severity = warning +dotnet_diagnostic.cs8425.severity = warning +dotnet_diagnostic.cs8500.severity = warning +dotnet_diagnostic.cs8509.severity = warning +dotnet_diagnostic.cs8519.severity = warning +dotnet_diagnostic.cs8520.severity = warning +dotnet_diagnostic.cs8524.severity = warning +dotnet_diagnostic.cs8597.severity = warning +dotnet_diagnostic.cs8600.severity = warning +dotnet_diagnostic.cs8601.severity = warning +dotnet_diagnostic.cs8602.severity = warning +dotnet_diagnostic.cs8603.severity = warning +dotnet_diagnostic.cs8604.severity = warning +dotnet_diagnostic.cs8605.severity = warning +dotnet_diagnostic.cs8607.severity = warning +dotnet_diagnostic.cs8608.severity = warning +dotnet_diagnostic.cs8609.severity = warning +dotnet_diagnostic.cs8610.severity = warning +dotnet_diagnostic.cs8611.severity = warning +dotnet_diagnostic.cs8612.severity = warning +dotnet_diagnostic.cs8613.severity = warning +dotnet_diagnostic.cs8614.severity = warning +dotnet_diagnostic.cs8615.severity = warning +dotnet_diagnostic.cs8616.severity = warning +dotnet_diagnostic.cs8617.severity = warning +dotnet_diagnostic.cs8618.severity = warning +dotnet_diagnostic.cs8619.severity = warning +dotnet_diagnostic.cs8620.severity = warning +dotnet_diagnostic.cs8621.severity = warning +dotnet_diagnostic.cs8622.severity = warning +dotnet_diagnostic.cs8624.severity = warning +dotnet_diagnostic.cs8625.severity = warning +dotnet_diagnostic.cs8629.severity = warning +dotnet_diagnostic.cs8631.severity = warning +dotnet_diagnostic.cs8632.severity = warning +dotnet_diagnostic.cs8633.severity = warning +dotnet_diagnostic.cs8634.severity = warning +dotnet_diagnostic.cs8643.severity = warning +dotnet_diagnostic.cs8644.severity = warning +dotnet_diagnostic.cs8645.severity = warning +dotnet_diagnostic.cs8655.severity = warning +dotnet_diagnostic.cs8656.severity = warning +dotnet_diagnostic.cs8667.severity = warning +dotnet_diagnostic.cs8669.severity = warning +dotnet_diagnostic.cs8670.severity = warning +dotnet_diagnostic.cs8714.severity = warning +dotnet_diagnostic.cs8762.severity = warning +dotnet_diagnostic.cs8763.severity = warning +dotnet_diagnostic.cs8764.severity = warning +dotnet_diagnostic.cs8765.severity = warning +dotnet_diagnostic.cs8766.severity = warning +dotnet_diagnostic.cs8767.severity = warning +dotnet_diagnostic.cs8768.severity = warning +dotnet_diagnostic.cs8769.severity = warning +dotnet_diagnostic.cs8770.severity = warning +dotnet_diagnostic.cs8774.severity = warning +dotnet_diagnostic.cs8775.severity = warning +dotnet_diagnostic.cs8776.severity = warning +dotnet_diagnostic.cs8777.severity = warning +dotnet_diagnostic.cs8794.severity = warning +dotnet_diagnostic.cs8819.severity = warning +dotnet_diagnostic.cs8824.severity = warning +dotnet_diagnostic.cs8825.severity = warning +dotnet_diagnostic.cs8846.severity = warning +dotnet_diagnostic.cs8847.severity = warning +dotnet_diagnostic.cs8851.severity = warning +dotnet_diagnostic.cs8860.severity = warning +dotnet_diagnostic.cs8892.severity = warning +dotnet_diagnostic.cs8907.severity = warning +dotnet_diagnostic.cs8947.severity = warning +dotnet_diagnostic.cs8960.severity = warning +dotnet_diagnostic.cs8961.severity = warning +dotnet_diagnostic.cs8962.severity = warning +dotnet_diagnostic.cs8963.severity = warning +dotnet_diagnostic.cs8965.severity = warning +dotnet_diagnostic.cs8966.severity = warning +dotnet_diagnostic.cs8971.severity = warning +dotnet_diagnostic.cs8974.severity = warning +dotnet_diagnostic.cs8981.severity = warning +dotnet_diagnostic.cs9042.severity = warning +dotnet_diagnostic.cs9073.severity = warning +dotnet_diagnostic.cs9074.severity = warning +dotnet_diagnostic.cs9080.severity = warning +dotnet_diagnostic.cs9081.severity = warning +dotnet_diagnostic.cs9082.severity = warning +dotnet_diagnostic.cs9083.severity = warning +dotnet_diagnostic.cs9084.severity = warning +dotnet_diagnostic.cs9085.severity = warning +dotnet_diagnostic.cs9086.severity = warning +dotnet_diagnostic.cs9087.severity = warning +dotnet_diagnostic.cs9088.severity = warning +dotnet_diagnostic.cs9089.severity = warning +dotnet_diagnostic.cs9090.severity = warning +dotnet_diagnostic.cs9091.severity = warning +dotnet_diagnostic.cs9092.severity = warning +dotnet_diagnostic.cs9093.severity = warning +dotnet_diagnostic.cs9094.severity = warning +dotnet_diagnostic.cs9095.severity = warning +dotnet_diagnostic.cs9097.severity = warning +dotnet_diagnostic.cs9099.severity = warning +dotnet_diagnostic.cs9100.severity = warning +dotnet_diagnostic.cs9107.severity = warning +dotnet_diagnostic.cs9113.severity = warning +dotnet_diagnostic.cs9123.severity = warning +dotnet_diagnostic.cs9124.severity = warning +dotnet_diagnostic.cs9154.severity = warning +dotnet_diagnostic.cs9158.severity = warning +dotnet_diagnostic.cs9159.severity = warning +dotnet_diagnostic.cs9179.severity = warning +dotnet_diagnostic.cs9181.severity = warning +dotnet_diagnostic.cs9182.severity = warning +dotnet_diagnostic.cs9183.severity = warning +dotnet_diagnostic.cs9184.severity = warning +dotnet_diagnostic.cs9191.severity = warning +dotnet_diagnostic.cs9192.severity = warning +dotnet_diagnostic.cs9193.severity = warning +dotnet_diagnostic.cs9195.severity = warning +dotnet_diagnostic.cs9196.severity = warning +dotnet_diagnostic.cs9197.severity = warning +dotnet_diagnostic.cs9198.severity = warning +dotnet_diagnostic.cs9200.severity = warning +dotnet_diagnostic.cs9204.severity = warning +dotnet_diagnostic.cs9208.severity = warning +dotnet_diagnostic.cs9209.severity = warning +dotnet_diagnostic.cs9216.severity = warning +dotnet_diagnostic.cs9256.severity = warning +dotnet_diagnostic.cs9258.severity = warning +dotnet_diagnostic.cs9264.severity = warning +dotnet_diagnostic.cs9266.severity = warning +dotnet_diagnostic.syslib1014.severity = warning +dotnet_diagnostic.wme006.severity = warning +dotnet_naming_rule.constants_rule.import_to_resharper = True +dotnet_naming_rule.constants_rule.resharper_description = Constant fields (not private) +dotnet_naming_rule.constants_rule.resharper_guid = 669e5282-fb4b-4e90-91e7-07d269d04b60 +dotnet_naming_rule.constants_rule.severity = warning +dotnet_naming_rule.constants_rule.style = upper_camel_case_style +dotnet_naming_rule.constants_rule.symbols = constants_symbols +dotnet_naming_rule.enum_member_rule.import_to_resharper = True +dotnet_naming_rule.enum_member_rule.resharper_description = Enum members +dotnet_naming_rule.enum_member_rule.resharper_guid = 8b8504e3-f0be-4c14-9103-c732f2bddc15 +dotnet_naming_rule.enum_member_rule.severity = warning +dotnet_naming_rule.enum_member_rule.style = upper_camel_case_style +dotnet_naming_rule.enum_member_rule.symbols = enum_member_symbols +dotnet_naming_rule.event_rule.import_to_resharper = True +dotnet_naming_rule.event_rule.resharper_description = Events +dotnet_naming_rule.event_rule.resharper_guid = 0c4c6401-2a1f-4db1-a21f-562f51542cf8 +dotnet_naming_rule.event_rule.severity = warning +dotnet_naming_rule.event_rule.style = upper_camel_case_style +dotnet_naming_rule.event_rule.symbols = event_symbols +dotnet_naming_rule.interfaces_rule.import_to_resharper = True +dotnet_naming_rule.interfaces_rule.resharper_description = Interfaces +dotnet_naming_rule.interfaces_rule.resharper_exclusive_prefixes_suffixes = true +dotnet_naming_rule.interfaces_rule.resharper_guid = a7a3339e-4e89-4319-9735-a9dc4cb74cc7 +dotnet_naming_rule.interfaces_rule.severity = warning +dotnet_naming_rule.interfaces_rule.style = i_upper_camel_case_style +dotnet_naming_rule.interfaces_rule.symbols = interfaces_symbols +dotnet_naming_rule.locals_rule.import_to_resharper = True +dotnet_naming_rule.locals_rule.resharper_description = Local variables +dotnet_naming_rule.locals_rule.resharper_guid = 61a991a4-d0a3-4d19-90a5-f8f4d75c30c1 +dotnet_naming_rule.locals_rule.severity = warning +dotnet_naming_rule.locals_rule.style = lower_camel_case_style +dotnet_naming_rule.locals_rule.symbols = locals_symbols +dotnet_naming_rule.local_constants_rule.import_to_resharper = True +dotnet_naming_rule.local_constants_rule.resharper_description = Local constants +dotnet_naming_rule.local_constants_rule.resharper_guid = a4f433b8-abcd-4e55-a08f-82e78cef0f0c +dotnet_naming_rule.local_constants_rule.severity = warning +dotnet_naming_rule.local_constants_rule.style = lower_camel_case_style +dotnet_naming_rule.local_constants_rule.symbols = local_constants_symbols +dotnet_naming_rule.local_functions_rule.import_to_resharper = True +dotnet_naming_rule.local_functions_rule.resharper_description = Local functions +dotnet_naming_rule.local_functions_rule.resharper_guid = 76f79b1e-ece7-4df2-a322-1bd7fea25eb7 +dotnet_naming_rule.local_functions_rule.severity = warning +dotnet_naming_rule.local_functions_rule.style = upper_camel_case_style +dotnet_naming_rule.local_functions_rule.symbols = local_functions_symbols +dotnet_naming_rule.method_rule.import_to_resharper = True +dotnet_naming_rule.method_rule.resharper_description = Methods +dotnet_naming_rule.method_rule.resharper_guid = 8284009d-e743-4d89-9402-a5bf9a89b657 +dotnet_naming_rule.method_rule.severity = warning +dotnet_naming_rule.method_rule.style = upper_camel_case_style +dotnet_naming_rule.method_rule.symbols = method_symbols +dotnet_naming_rule.parameters_rule.import_to_resharper = True +dotnet_naming_rule.parameters_rule.resharper_description = Parameters +dotnet_naming_rule.parameters_rule.resharper_guid = 8a85b61a-1024-4f87-b9ef-1fdae19930a1 +dotnet_naming_rule.parameters_rule.severity = warning +dotnet_naming_rule.parameters_rule.style = lower_camel_case_style +dotnet_naming_rule.parameters_rule.symbols = parameters_symbols +dotnet_naming_rule.private_constants_rule.import_to_resharper = True +dotnet_naming_rule.private_constants_rule.resharper_description = Constant fields (private) +dotnet_naming_rule.private_constants_rule.resharper_guid = 236f7aa5-7b06-43ca-bf2a-9b31bfcff09a +dotnet_naming_rule.private_constants_rule.severity = warning +dotnet_naming_rule.private_constants_rule.style = upper_camel_case_style +dotnet_naming_rule.private_constants_rule.symbols = private_constants_symbols +dotnet_naming_rule.private_instance_fields_rule.import_to_resharper = True +dotnet_naming_rule.private_instance_fields_rule.resharper_description = Instance fields (private) +dotnet_naming_rule.private_instance_fields_rule.resharper_exclusive_prefixes_suffixes = true +dotnet_naming_rule.private_instance_fields_rule.resharper_guid = 4a98fdf6-7d98-4f5a-afeb-ea44ad98c70c +dotnet_naming_rule.private_instance_fields_rule.severity = warning +dotnet_naming_rule.private_instance_fields_rule.style = lower_camel_case_style_1 +dotnet_naming_rule.private_instance_fields_rule.symbols = private_instance_fields_symbols +dotnet_naming_rule.private_static_fields_rule.import_to_resharper = True +dotnet_naming_rule.private_static_fields_rule.resharper_description = Static fields (private) +dotnet_naming_rule.private_static_fields_rule.resharper_exclusive_prefixes_suffixes = true +dotnet_naming_rule.private_static_fields_rule.resharper_guid = f9fce829-e6f4-4cb2-80f1-5497c44f51df +dotnet_naming_rule.private_static_fields_rule.severity = warning +dotnet_naming_rule.private_static_fields_rule.style = lower_camel_case_style_1 +dotnet_naming_rule.private_static_fields_rule.symbols = private_static_fields_symbols +dotnet_naming_rule.private_static_readonly_rule.import_to_resharper = True +dotnet_naming_rule.private_static_readonly_rule.resharper_description = Static readonly fields (private) +dotnet_naming_rule.private_static_readonly_rule.resharper_guid = 15b5b1f1-457c-4ca6-b278-5615aedc07d3 +dotnet_naming_rule.private_static_readonly_rule.severity = warning +dotnet_naming_rule.private_static_readonly_rule.style = upper_camel_case_style +dotnet_naming_rule.private_static_readonly_rule.symbols = private_static_readonly_symbols +dotnet_naming_rule.property_rule.import_to_resharper = True +dotnet_naming_rule.property_rule.resharper_description = Properties +dotnet_naming_rule.property_rule.resharper_guid = c85a0503-4de2-40f1-9cd6-a4054c05d384 +dotnet_naming_rule.property_rule.severity = warning +dotnet_naming_rule.property_rule.style = upper_camel_case_style +dotnet_naming_rule.property_rule.symbols = property_symbols +dotnet_naming_rule.public_fields_rule.import_to_resharper = True +dotnet_naming_rule.public_fields_rule.resharper_description = Instance fields (not private) +dotnet_naming_rule.public_fields_rule.resharper_guid = 53eecf85-d821-40e8-ac97-fdb734542b84 +dotnet_naming_rule.public_fields_rule.severity = warning +dotnet_naming_rule.public_fields_rule.style = lower_camel_case_style +dotnet_naming_rule.public_fields_rule.symbols = public_fields_symbols +dotnet_naming_rule.public_static_fields_rule.import_to_resharper = True +dotnet_naming_rule.public_static_fields_rule.resharper_description = Static fields (not private) +dotnet_naming_rule.public_static_fields_rule.resharper_guid = 70345118-4b40-4ece-937c-bbeb7a0b2e70 +dotnet_naming_rule.public_static_fields_rule.severity = warning +dotnet_naming_rule.public_static_fields_rule.style = lower_camel_case_style +dotnet_naming_rule.public_static_fields_rule.symbols = public_static_fields_symbols +dotnet_naming_rule.static_readonly_rule.import_to_resharper = True +dotnet_naming_rule.static_readonly_rule.resharper_description = Static readonly fields (not private) +dotnet_naming_rule.static_readonly_rule.resharper_guid = c873eafb-d57f-481d-8c93-77f6863c2f88 +dotnet_naming_rule.static_readonly_rule.severity = warning +dotnet_naming_rule.static_readonly_rule.style = upper_camel_case_style +dotnet_naming_rule.static_readonly_rule.symbols = static_readonly_symbols +dotnet_naming_rule.types_and_namespaces_rule.import_to_resharper = True +dotnet_naming_rule.types_and_namespaces_rule.resharper_description = Types and namespaces +dotnet_naming_rule.types_and_namespaces_rule.resharper_guid = a0b4bc4d-d13b-4a37-b37e-c9c6864e4302 +dotnet_naming_rule.types_and_namespaces_rule.severity = warning +dotnet_naming_rule.types_and_namespaces_rule.style = upper_camel_case_style +dotnet_naming_rule.types_and_namespaces_rule.symbols = types_and_namespaces_symbols +dotnet_naming_rule.type_parameters_rule.import_to_resharper = True +dotnet_naming_rule.type_parameters_rule.resharper_description = Type parameters +dotnet_naming_rule.type_parameters_rule.resharper_exclusive_prefixes_suffixes = true +dotnet_naming_rule.type_parameters_rule.resharper_guid = 2c62818f-621b-4425-adc9-78611099bfcb +dotnet_naming_rule.type_parameters_rule.severity = warning +dotnet_naming_rule.type_parameters_rule.style = t_upper_camel_case_style +dotnet_naming_rule.type_parameters_rule.symbols = type_parameters_symbols +dotnet_naming_style.i_upper_camel_case_style.capitalization = pascal_case +dotnet_naming_style.i_upper_camel_case_style.required_prefix = I +dotnet_naming_style.lower_camel_case_style.capitalization = camel_case +dotnet_naming_style.lower_camel_case_style_1.capitalization = camel_case +dotnet_naming_style.lower_camel_case_style_1.required_prefix = _ +dotnet_naming_style.t_upper_camel_case_style.capitalization = pascal_case +dotnet_naming_style.t_upper_camel_case_style.required_prefix = T +dotnet_naming_style.upper_camel_case_style.capitalization = pascal_case +dotnet_naming_symbols.constants_symbols.applicable_accessibilities = public,internal,protected,protected_internal,private_protected +dotnet_naming_symbols.constants_symbols.applicable_kinds = field +dotnet_naming_symbols.constants_symbols.required_modifiers = const +dotnet_naming_symbols.constants_symbols.resharper_applicable_kinds = constant_field +dotnet_naming_symbols.constants_symbols.resharper_required_modifiers = any +dotnet_naming_symbols.enum_member_symbols.applicable_accessibilities = * +dotnet_naming_symbols.enum_member_symbols.applicable_kinds = +dotnet_naming_symbols.enum_member_symbols.resharper_applicable_kinds = enum_member +dotnet_naming_symbols.enum_member_symbols.resharper_required_modifiers = any +dotnet_naming_symbols.event_symbols.applicable_accessibilities = * +dotnet_naming_symbols.event_symbols.applicable_kinds = event +dotnet_naming_symbols.event_symbols.resharper_applicable_kinds = event +dotnet_naming_symbols.event_symbols.resharper_required_modifiers = any +dotnet_naming_symbols.interfaces_symbols.applicable_accessibilities = * +dotnet_naming_symbols.interfaces_symbols.applicable_kinds = interface +dotnet_naming_symbols.interfaces_symbols.resharper_applicable_kinds = interface +dotnet_naming_symbols.interfaces_symbols.resharper_required_modifiers = any +dotnet_naming_symbols.locals_symbols.applicable_accessibilities = * +dotnet_naming_symbols.locals_symbols.applicable_kinds = local +dotnet_naming_symbols.locals_symbols.resharper_applicable_kinds = local_variable +dotnet_naming_symbols.locals_symbols.resharper_required_modifiers = any +dotnet_naming_symbols.local_constants_symbols.applicable_accessibilities = * +dotnet_naming_symbols.local_constants_symbols.applicable_kinds = local +dotnet_naming_symbols.local_constants_symbols.required_modifiers = const +dotnet_naming_symbols.local_constants_symbols.resharper_applicable_kinds = local_constant +dotnet_naming_symbols.local_constants_symbols.resharper_required_modifiers = any +dotnet_naming_symbols.local_functions_symbols.applicable_accessibilities = * +dotnet_naming_symbols.local_functions_symbols.applicable_kinds = local_function +dotnet_naming_symbols.local_functions_symbols.resharper_applicable_kinds = local_function +dotnet_naming_symbols.local_functions_symbols.resharper_required_modifiers = any +dotnet_naming_symbols.method_symbols.applicable_accessibilities = * +dotnet_naming_symbols.method_symbols.applicable_kinds = method +dotnet_naming_symbols.method_symbols.resharper_applicable_kinds = method +dotnet_naming_symbols.method_symbols.resharper_required_modifiers = any +dotnet_naming_symbols.parameters_symbols.applicable_accessibilities = * +dotnet_naming_symbols.parameters_symbols.applicable_kinds = parameter +dotnet_naming_symbols.parameters_symbols.resharper_applicable_kinds = parameter +dotnet_naming_symbols.parameters_symbols.resharper_required_modifiers = any +dotnet_naming_symbols.private_constants_symbols.applicable_accessibilities = private +dotnet_naming_symbols.private_constants_symbols.applicable_kinds = field +dotnet_naming_symbols.private_constants_symbols.required_modifiers = const +dotnet_naming_symbols.private_constants_symbols.resharper_applicable_kinds = constant_field +dotnet_naming_symbols.private_constants_symbols.resharper_required_modifiers = any +dotnet_naming_symbols.private_instance_fields_symbols.applicable_accessibilities = private +dotnet_naming_symbols.private_instance_fields_symbols.applicable_kinds = field +dotnet_naming_symbols.private_instance_fields_symbols.resharper_applicable_kinds = field,readonly_field +dotnet_naming_symbols.private_instance_fields_symbols.resharper_required_modifiers = instance +dotnet_naming_symbols.private_static_fields_symbols.applicable_accessibilities = private +dotnet_naming_symbols.private_static_fields_symbols.applicable_kinds = field +dotnet_naming_symbols.private_static_fields_symbols.required_modifiers = static +dotnet_naming_symbols.private_static_fields_symbols.resharper_applicable_kinds = field +dotnet_naming_symbols.private_static_fields_symbols.resharper_required_modifiers = static +dotnet_naming_symbols.private_static_readonly_symbols.applicable_accessibilities = private +dotnet_naming_symbols.private_static_readonly_symbols.applicable_kinds = field +dotnet_naming_symbols.private_static_readonly_symbols.required_modifiers = readonly,static +dotnet_naming_symbols.private_static_readonly_symbols.resharper_applicable_kinds = readonly_field +dotnet_naming_symbols.private_static_readonly_symbols.resharper_required_modifiers = static +dotnet_naming_symbols.property_symbols.applicable_accessibilities = * +dotnet_naming_symbols.property_symbols.applicable_kinds = property +dotnet_naming_symbols.property_symbols.resharper_applicable_kinds = property +dotnet_naming_symbols.property_symbols.resharper_required_modifiers = any +dotnet_naming_symbols.public_fields_symbols.applicable_accessibilities = public,internal,protected,protected_internal,private_protected +dotnet_naming_symbols.public_fields_symbols.applicable_kinds = field +dotnet_naming_symbols.public_fields_symbols.resharper_applicable_kinds = field,readonly_field +dotnet_naming_symbols.public_fields_symbols.resharper_required_modifiers = instance +dotnet_naming_symbols.public_static_fields_symbols.applicable_accessibilities = public,internal,protected,protected_internal,private_protected +dotnet_naming_symbols.public_static_fields_symbols.applicable_kinds = field +dotnet_naming_symbols.public_static_fields_symbols.required_modifiers = static +dotnet_naming_symbols.public_static_fields_symbols.resharper_applicable_kinds = field +dotnet_naming_symbols.public_static_fields_symbols.resharper_required_modifiers = static +dotnet_naming_symbols.static_readonly_symbols.applicable_accessibilities = public,internal,protected,protected_internal,private_protected +dotnet_naming_symbols.static_readonly_symbols.applicable_kinds = field +dotnet_naming_symbols.static_readonly_symbols.required_modifiers = readonly,static +dotnet_naming_symbols.static_readonly_symbols.resharper_applicable_kinds = readonly_field +dotnet_naming_symbols.static_readonly_symbols.resharper_required_modifiers = static +dotnet_naming_symbols.types_and_namespaces_symbols.applicable_accessibilities = * +dotnet_naming_symbols.types_and_namespaces_symbols.applicable_kinds = class,delegate,enum,namespace,struct +dotnet_naming_symbols.types_and_namespaces_symbols.resharper_applicable_kinds = namespace,class,struct,enum,delegate +dotnet_naming_symbols.types_and_namespaces_symbols.resharper_required_modifiers = any +dotnet_naming_symbols.type_parameters_symbols.applicable_accessibilities = * +dotnet_naming_symbols.type_parameters_symbols.applicable_kinds = type_parameter +dotnet_naming_symbols.type_parameters_symbols.resharper_applicable_kinds = type_parameter +dotnet_naming_symbols.type_parameters_symbols.resharper_required_modifiers = any +dotnet_separate_import_directive_groups = false +dotnet_sort_system_directives_first = true +dotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary:none +dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:none +dotnet_style_parentheses_in_relational_binary_operators = never_if_unnecessary:none +dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion +dotnet_style_predefined_type_for_member_access = true:suggestion +dotnet_style_prefer_collection_expression = when_types_loosely_match:suggestion +dotnet_style_qualification_for_event = false:suggestion +dotnet_style_qualification_for_field = false:suggestion +dotnet_style_qualification_for_method = false:suggestion +dotnet_style_qualification_for_property = false:suggestion +dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion +file_header_template = + +# ReSharper properties +resharper_accessor_owner_body = expression_body +resharper_alignment_tab_fill_style = use_spaces +resharper_align_altered_items = true +resharper_align_altering_instructions = true +resharper_align_asc_desc = false +resharper_align_equals = true +resharper_align_first_arg_by_paren = false +resharper_align_first_word_of_clause = to_left +resharper_align_joined_tables = false +resharper_align_line_comments_at_right_of_elements = true +resharper_align_linq_query = false +resharper_align_multiline_array_and_object_initializer = false +resharper_align_multiline_array_initializer = true +resharper_align_multiline_binary_patterns = false +resharper_align_multiline_comments = true +resharper_align_multiline_ctor_init = true +resharper_align_multiline_expression_braces = false +resharper_align_multiline_implements_list = true +resharper_align_multiline_list_pattern = false +resharper_align_multiline_property_pattern = false +resharper_align_multiline_statement_conditions = true +resharper_align_multiline_switch_expression = false +resharper_align_multiline_type_argument = true +resharper_align_multiline_type_parameter = true +resharper_align_multiline_type_parameter_constraints = false +resharper_align_multiline_type_parameter_list = false +resharper_align_multi_row_values = false +resharper_align_multi_row_values_break_threshold = seven +resharper_align_multi_row_values_minimal_increase_threshold = three +resharper_align_multi_row_values_percentile = auto +resharper_align_multi_row_values_with_insert = false +resharper_align_options = true +resharper_align_section_elements = true +resharper_align_table_aliases = false +resharper_align_ternary = align_not_nested +resharper_align_tuple_components = false +resharper_allow_alias = true +resharper_allow_comment_after_lbrace = false +resharper_allow_far_alignment = false +resharper_alter_table_align_defaults = true +resharper_alter_table_align_nullabilities = true +resharper_alter_table_align_types = true +resharper_always_use_end_of_line_brace_style = false +resharper_apply_auto_detected_rules = true +resharper_apply_on_completion = false +resharper_arguments_anonymous_function = positional +resharper_arguments_literal = positional +resharper_arguments_named = positional +resharper_arguments_other = positional +resharper_arguments_skip_single = false +resharper_arguments_string_literal = positional +resharper_attribute_style = do_not_touch +resharper_autodetect_indent_settings = true +resharper_binary_expression_align_operands_in_binary_expressions = true +resharper_binary_expression_space_within_parenthesized_sub_expressions = false +resharper_binary_expression_use_spaces_around_operators = yes +resharper_blank_lines_after_access_specifier = 0 +resharper_blank_lines_after_block_statements = 1 +resharper_blank_lines_after_case = 0 +resharper_blank_lines_after_control_transfer_statements = 0 +resharper_blank_lines_after_file_scoped_namespace_directive = 1 +resharper_blank_lines_after_imports = 1 +resharper_blank_lines_after_multiline_statements = 0 +resharper_blank_lines_after_options = 1 +resharper_blank_lines_after_start_comment = 1 +resharper_blank_lines_after_using_list = 1 +resharper_blank_lines_around_accessor = 0 +resharper_blank_lines_around_auto_property = 1 +resharper_blank_lines_around_block_case_section = 0 +resharper_blank_lines_around_class_definition = 1 +resharper_blank_lines_around_field = 1 +resharper_blank_lines_around_function_declaration = 0 +resharper_blank_lines_around_function_definition = 1 +resharper_blank_lines_around_global_attribute = 0 +resharper_blank_lines_around_invocable = 1 +resharper_blank_lines_around_local_method = 1 +resharper_blank_lines_around_multiline_case_section = 0 +resharper_blank_lines_around_namespace = 1 +resharper_blank_lines_around_other_declaration = 0 +resharper_blank_lines_around_property = 1 +resharper_blank_lines_around_razor_functions = 1 +resharper_blank_lines_around_razor_helpers = 1 +resharper_blank_lines_around_razor_sections = 1 +resharper_blank_lines_around_region = 1 +resharper_blank_lines_around_single_line_accessor = 0 +resharper_blank_lines_around_single_line_auto_property = 0 +resharper_blank_lines_around_single_line_field = 0 +resharper_blank_lines_around_single_line_function_definition = 0 +resharper_blank_lines_around_single_line_invocable = 0 +resharper_blank_lines_around_single_line_local_method = 0 +resharper_blank_lines_around_single_line_property = 0 +resharper_blank_lines_around_single_line_type = 1 +resharper_blank_lines_around_type = 1 +resharper_blank_lines_before_access_specifier = 1 +resharper_blank_lines_before_block_statements = 0 +resharper_blank_lines_before_case = 0 +resharper_blank_lines_before_control_transfer_statements = 0 +resharper_blank_lines_before_multiline_statements = 0 +resharper_blank_lines_before_single_line_comment = 0 +resharper_blank_lines_inside_namespace = 0 +resharper_blank_lines_inside_region = 1 +resharper_blank_lines_inside_type = 0 +resharper_blank_line_after_pi = true +resharper_braces_for_dowhile = required +resharper_braces_for_fixed = required +resharper_braces_for_for = not_required +resharper_braces_for_foreach = not_required +resharper_braces_for_ifelse = not_required_for_both +resharper_braces_for_lock = required +resharper_braces_for_using = required +resharper_braces_for_while = not_required +resharper_braces_redundant = true +resharper_break_template_declaration = line_break +resharper_builtin_type_apply_to_native_integer = false +resharper_can_use_global_alias = true +resharper_case_align_else_under_then_when_then_aligned = false +resharper_case_align_end = do_not_change +resharper_case_align_then = false +resharper_case_collapse_short_clause = true +resharper_case_indent_when_if_wrapped = true +resharper_case_keep_new_line_after_then_else = false +resharper_case_wrap_then = false +resharper_case_wrap_when = true +resharper_collapse_short_multi_row_values = false +resharper_collapse_short_statement = subqueries_only +resharper_commands_follow_by_blank_lines = do_not_change +resharper_configure_await_analysis_mode = disabled +resharper_constructor_or_destructor_body = block_body +resharper_continuation_indent_size = 8 +resharper_continuous_indent_multiplier = 1 +resharper_continuous_line_indent = single +resharper_cortege_add_space_before_opening_parenthesis = true +resharper_cortege_place_comma_to_begin = false +resharper_cortege_space_after_comma = true +resharper_cortege_space_before_comma = false +resharper_cortege_space_within_parenthesis = false +resharper_cpp_align_multiline_argument = true +resharper_cpp_align_multiline_binary_expressions_chain = false +resharper_cpp_align_multiline_calls_chain = true +resharper_cpp_align_multiline_extends_list = true +resharper_cpp_align_multiline_for_stmt = true +resharper_cpp_align_multiline_parameter = true +resharper_cpp_align_multiple_declaration = true +resharper_cpp_anonymous_method_declaration_braces = next_line +resharper_cpp_case_block_braces = next_line_shifted_2 +resharper_cpp_empty_block_style = multiline +resharper_cpp_indent_switch_labels = false +resharper_cpp_insert_final_newline = true +resharper_cpp_invocable_declaration_braces = next_line +resharper_cpp_keep_existing_arrangement = true +resharper_cpp_max_line_length = 120 +resharper_cpp_new_line_before_while = true +resharper_cpp_other_braces = next_line +resharper_cpp_place_simple_blocks_on_single_line = false +resharper_cpp_space_after_unary_operator = false +resharper_cpp_space_around_binary_operator = true +resharper_cpp_type_declaration_braces = next_line +resharper_cpp_wrap_lines = true +resharper_create_schema_indent_content = true +resharper_create_schema_maximum_blank_lines_between_declarations = 1 +resharper_create_schema_minimum_blank_lines_between_declarations = 1 +resharper_create_table_collapse_when_short = false +resharper_create_table_place_closing_parenthesis = under_opening +resharper_create_table_place_elements = wrapped_indented +resharper_create_table_place_opening_parenthesis = aligned +resharper_csharp_align_multiline_argument = false +resharper_csharp_align_multiline_binary_expressions_chain = true +resharper_csharp_align_multiline_calls_chain = false +resharper_csharp_align_multiline_expression = false +resharper_csharp_align_multiline_extends_list = false +resharper_csharp_align_multiline_for_stmt = false +resharper_csharp_align_multiline_parameter = false +resharper_csharp_align_multiple_declaration = false +resharper_csharp_empty_block_style = together_same_line +resharper_csharp_insert_final_newline = false +resharper_csharp_keep_existing_enum_arrangement = false +resharper_csharp_keep_nontrivial_alias = false +resharper_csharp_max_line_length = 120 +resharper_csharp_new_line_before_while = false +resharper_csharp_prefer_qualified_reference = false +resharper_csharp_space_after_unary_operator = false +resharper_csharp_wrap_lines = true +resharper_cxxcli_property_declaration_braces = next_line +resharper_declared_variables_align_assignments = true +resharper_declared_variables_align_expressions = false +resharper_declared_variables_align_types = true +resharper_declared_variables_wrap_section = true +resharper_default_exception_variable_name = e +resharper_default_value_when_type_evident = default_literal +resharper_default_value_when_type_not_evident = default_literal +resharper_delete_quotes_from_solid_values = false +resharper_disable_blank_line_changes = false +resharper_disable_formatter = false +resharper_disable_indenter = false +resharper_disable_int_align = false +resharper_disable_line_break_changes = false +resharper_disable_line_break_removal = false +resharper_disable_space_changes = false +resharper_disable_space_changes_before_trailing_comment = false +resharper_dont_remove_extra_blank_lines = false +resharper_enable_slate_format = true +resharper_enable_wrapping = false +resharper_enforce_line_ending_style = true +resharper_event_handler_pattern_long = $object$On$event$ +resharper_event_handler_pattern_short = On$event$ +resharper_export_declaration_braces = next_line +resharper_expression_braces = inside +resharper_expression_pars = inside +resharper_extra_spaces = remove_all +resharper_force_attribute_style = separate +resharper_force_chop_compound_do_expression = false +resharper_force_chop_compound_if_expression = false +resharper_force_chop_compound_while_expression = false +resharper_formatter_off_tag = +resharper_formatter_on_tag = +resharper_formatter_tags_accept_regexp = false +resharper_formatter_tags_enabled = false +resharper_format_leading_spaces_decl = false +resharper_free_block_braces = next_line +resharper_from_clause_place_comma = as_in_common +resharper_from_clause_place_elements_on = as_in_common +resharper_from_clause_wrap_elements = chop +resharper_function_call_space_after_comma = true +resharper_function_call_space_before_comma = false +resharper_function_call_space_within_parentheses = false +resharper_function_declaration_return_type_style = do_not_change +resharper_function_definition_return_type_style = do_not_change +resharper_generator_mode = false +resharper_group_by_clause_place_comma = as_in_common +resharper_group_by_clause_place_elements_on = as_in_common +resharper_group_by_clause_wrap_elements = wrap_if_long +resharper_html_attribute_indent = align_by_first_attribute +resharper_html_insert_final_newline = false +resharper_html_linebreak_before_elements = body,div,p,form,h1,h2,h3 +resharper_html_max_blank_lines_between_tags = 2 +resharper_html_max_line_length = 120 +resharper_html_pi_attribute_style = on_single_line +resharper_html_space_before_self_closing = false +resharper_html_wrap_lines = true +resharper_if_then_collapse_when_short = true +resharper_if_then_wrap_inner_code = true +resharper_ignore_space_preservation = false +resharper_include_prefix_comment_in_indent = false +resharper_indent_access_specifiers_from_class = false +resharper_indent_aligned_ternary = true +resharper_indent_altered_items = true +resharper_indent_altering_instructions = true +resharper_indent_anonymous_method_block = false +resharper_indent_braces_inside_statement_conditions = true +resharper_indent_break_from_case = true +resharper_indent_case_from_select = true +resharper_indent_child_elements = OneIndent +resharper_indent_class_members_from_access_specifiers = false +resharper_indent_comment = true +resharper_indent_declaration_after_ufunction_and_uproperty = false +resharper_indent_end_if = false +resharper_indent_end_loop = false +resharper_indent_export_declaration_members = true +resharper_indent_goto_labels = true +resharper_indent_inside_namespace = true +resharper_indent_invocation_pars = inside +resharper_indent_join = true +resharper_indent_loop = true +resharper_indent_member_initializer_list = true +resharper_indent_method_decl_pars = inside +resharper_indent_nested_fixed_stmt = false +resharper_indent_nested_foreach_stmt = false +resharper_indent_nested_for_stmt = false +resharper_indent_nested_lock_stmt = false +resharper_indent_nested_usings_stmt = false +resharper_indent_nested_while_stmt = false +resharper_indent_options = true +resharper_indent_pars = inside +resharper_indent_preprocessor_directives = none +resharper_indent_preprocessor_if = no_indent +resharper_indent_preprocessor_other = no_indent +resharper_indent_preprocessor_region = usual_indent +resharper_indent_primary_constructor_decl_pars = inside +resharper_indent_raw_literal_string = align +resharper_indent_statement_pars = inside +resharper_indent_text = OneIndent +resharper_indent_then_and_else = false +resharper_indent_typearg_angles = inside +resharper_indent_typeparam_angles = inside +resharper_indent_type_constraints = true +resharper_indent_wrapped_function_names = false +resharper_insert_statement_place_closing_parenthesis = at_the_end +resharper_insert_statement_place_comma = as_in_common +resharper_insert_statement_place_opening_parenthesis = on_the_same_line +resharper_insert_statement_spaces_within_parentheses = false +resharper_instance_members_qualify_declared_in = this_class, base_class +resharper_int_align = false +resharper_int_align_bitfield_sizes = false +resharper_int_align_comments = false +resharper_int_align_declaration_names = false +resharper_int_align_designated_initializers = false +resharper_int_align_enum_initializers = false +resharper_int_align_eq = false +resharper_int_align_fix_in_adjacent = true +resharper_keep_blank_lines_in_code = 2 +resharper_keep_blank_lines_in_declarations = 2 +resharper_keep_existing_attribute_arrangement = false +resharper_keep_existing_declaration_block_arrangement = false +resharper_keep_existing_declaration_parens_arrangement = true +resharper_keep_existing_embedded_arrangement = true +resharper_keep_existing_embedded_block_arrangement = false +resharper_keep_existing_expr_member_arrangement = true +resharper_keep_existing_invocation_parens_arrangement = true +resharper_keep_existing_list_patterns_arrangement = true +resharper_keep_existing_primary_constructor_declaration_parens_arrangement = true +resharper_keep_existing_property_patterns_arrangement = true +resharper_keep_existing_switch_expression_arrangement = true +resharper_keep_items_on_one_line_if_less_or_equal = 7 +resharper_keep_section_elements_under_section_header = true +resharper_keep_user_linebreaks = true +resharper_keep_user_wrapping = true +resharper_labeled_statement_style = line_break +resharper_linebreaks_around_razor_statements = true +resharper_linebreaks_inside_tags_for_elements_longer_than = 2147483647 +resharper_linebreaks_inside_tags_for_elements_with_child_elements = true +resharper_linebreaks_inside_tags_for_multiline_elements = true +resharper_linebreak_before_all_elements = false +resharper_linebreak_before_multiline_elements = true +resharper_linebreak_before_singleline_elements = false +resharper_line_break_after_colon_in_member_initializer_lists = do_not_change +resharper_line_break_after_comma_in_member_initializer_lists = false +resharper_line_break_after_deref_in_trailing_return_types = do_not_change +resharper_line_break_after_init_statement = do_not_change +resharper_line_break_before_comma_in_member_initializer_lists = false +resharper_line_break_before_deref_in_trailing_return_types = do_not_change +resharper_line_break_before_function_try_block = do_not_change +resharper_line_break_before_requires_clause = do_not_change +resharper_linkage_specification_braces = end_of_line +resharper_linkage_specification_indentation = none +resharper_local_function_body = block_body +resharper_loop_collapse_when_short = false +resharper_macro_block_begin = +resharper_macro_block_end = +resharper_max_array_initializer_elements_on_line = 10000 +resharper_max_attribute_length_for_same_line = 38 +resharper_max_enum_members_on_line = 3 +resharper_max_formal_parameters_on_line = 10000 +resharper_max_initializer_elements_on_line = 4 +resharper_max_invocation_arguments_on_line = 10000 +resharper_max_primary_constructor_parameters_on_line = 10000 +resharper_member_initializer_list_style = do_not_change +resharper_method_or_operator_body = block_body +resharper_namespace_declaration_braces = next_line +resharper_namespace_indentation = all +resharper_nested_ternary_style = autodetect +resharper_new_line_after_all_distinct = false +resharper_new_line_before_catch = true +resharper_new_line_before_else = true +resharper_new_line_before_enumerators = true +resharper_normalize_tag_names = false +resharper_no_indent_inside_elements = html,body,thead,tbody,tfoot +resharper_no_indent_inside_if_element_longer_than = 200 +resharper_null_checking_pattern_style = not_null_pattern +resharper_object_creation_when_type_evident = target_typed +resharper_object_creation_when_type_not_evident = explicitly_typed +resharper_old_engine = false +resharper_outdent_binary_ops = false +resharper_outdent_binary_pattern_ops = false +resharper_outdent_commas = false +resharper_outdent_dots = false +resharper_outdent_namespace_member = false +resharper_outdent_statement_labels = false +resharper_outdent_ternary_ops = false +resharper_parentheses_non_obvious_operations = none, shift, bitwise_and, bitwise_exclusive_or, bitwise_inclusive_or, bitwise +resharper_parentheses_redundancy_style = remove_if_not_clarifies_precedence +resharper_parentheses_same_type_operations = false +resharper_pi_attributes_indent = align_by_first_attribute +resharper_place_accessorholder_attribute_on_same_line = if_owner_is_single_line +resharper_place_accessor_attribute_on_same_line = if_owner_is_single_line +resharper_place_clause_elements_on = same_line +resharper_place_columns_or_values = same_line_aligned +resharper_place_comma = auto +resharper_place_comments_at_first_column = false +resharper_place_constructor_initializer_on_same_line = true +resharper_place_event_attribute_on_same_line = false +resharper_place_expr_accessor_on_single_line = if_owner_is_single_line +resharper_place_expr_method_on_single_line = if_owner_is_single_line +resharper_place_expr_property_on_single_line = if_owner_is_single_line +resharper_place_field_attribute_on_same_line = true +resharper_place_into_clause_elements_on = as_in_common +resharper_place_into_on_the_new_line = do_not_change +resharper_place_join_in_join_only_queries_under = table +resharper_place_linq_into_on_new_line = true +resharper_place_method_attribute_on_same_line = false +resharper_place_namespace_definitions_on_same_line = false +resharper_place_on_and_using_under = table +resharper_place_primary_constructor_initializer_on_same_line = true +resharper_place_property_attribute_on_same_line = false +resharper_place_record_field_attribute_on_same_line = if_owner_is_single_line +resharper_place_simple_case_statement_on_same_line = false +resharper_place_simple_embedded_statement_on_same_line = if_owner_is_single_line +resharper_place_simple_initializer_on_single_line = true +resharper_place_simple_list_pattern_on_single_line = true +resharper_place_simple_property_pattern_on_single_line = true +resharper_place_simple_switch_expression_on_single_line = false +resharper_place_single_method_argument_lambda_on_same_line = true +resharper_place_subquery = do_not_change +resharper_place_top_level_and_or_under = to_begin +resharper_place_type_attribute_on_same_line = false +resharper_place_type_constraints_on_same_line = true +resharper_place_values_clause_elements_on = as_in_common +resharper_prefer_explicit_discard_declaration = false +resharper_prefer_roslyn_rules_for_parentheses_clarity = false +resharper_prefer_separate_deconstructed_variables_declaration = false +resharper_prefer_wrap_around_eq = default +resharper_preserve_spaces_inside_tags = pre,textarea +resharper_qualified_using_at_nested_scope = false +resharper_quote_style = doublequoted +resharper_razor_prefer_qualified_reference = true +resharper_remove_blank_lines_near_braces = false +resharper_remove_blank_lines_near_braces_in_code = true +resharper_remove_blank_lines_near_braces_in_declarations = true +resharper_remove_only_unused_aliases = true +resharper_remove_spaces_on_blank_lines = true +resharper_remove_this_qualifier = true +resharper_remove_unused_only_aliases = false +resharper_requires_expression_braces = next_line +resharper_resx_attribute_indent = single_indent +resharper_resx_insert_final_newline = false +resharper_resx_linebreak_before_elements = +resharper_resx_max_blank_lines_between_tags = 0 +resharper_resx_max_line_length = 2147483647 +resharper_resx_pi_attribute_style = do_not_touch +resharper_resx_space_before_self_closing = false +resharper_resx_wrap_lines = false +resharper_resx_wrap_tags_and_pi = false +resharper_resx_wrap_text = false +resharper_routine_arguments_align_types = false +resharper_routine_arguments_place_closing_parenthesis = do_not_change +resharper_routine_arguments_place_comma = auto +resharper_routine_arguments_place_elements = do_not_change +resharper_routine_arguments_place_opening_parenthesis = on_the_same_line +resharper_routine_arguments_spaces_within_parentheses = false +resharper_routine_arguments_wrap_elements = wrap_if_long +resharper_routine_statement_wrap_as = false +resharper_routine_statement_wrap_before_closing_dollar_quote = true +resharper_routine_statement_wrap_opening_dollar_quote = true +resharper_routine_statement_wrap_options_after_closing_dollar_quote = false +resharper_routine_statement_wrap_the_content_after_opening_dollar_quote = true +resharper_select_clause_align_as = true +resharper_select_clause_place_comma = as_in_common +resharper_select_clause_place_elements_on = as_in_common +resharper_select_clause_use_as = do_not_change +resharper_select_clause_wrap_elements = chop +resharper_show_autodetect_configure_formatting_tip = true +resharper_simple_block_style = do_not_change +resharper_simple_case_statement_style = do_not_change +resharper_simple_embedded_statement_style = do_not_change +resharper_slate_brackets_indent = inside +resharper_slate_brackets_wrap = chop_always +resharper_slate_wrap_before_bracket = true +resharper_slate_wrap_chained_binary_expression = chop_if_long +resharper_slate_wrap_chained_member_access = chop_if_long +resharper_sort_attributes = false +resharper_sort_class_selectors = false +resharper_sort_usings = true +resharper_spaces_around_eq_in_attribute = false +resharper_spaces_around_eq_in_pi_attribute = false +resharper_spaces_inside_tags = false +resharper_space_after_attributes = true +resharper_space_after_attribute_target_colon = true +resharper_space_after_cast = false +resharper_space_after_colon = true +resharper_space_after_colon_in_bitfield_declarator = true +resharper_space_after_colon_in_case = true +resharper_space_after_colon_in_inheritance_clause = true +resharper_space_after_comma = true +resharper_space_after_ellipsis_in_parameter_pack = true +resharper_space_after_for_colon = true +resharper_space_after_keywords_in_control_flow_statements = true +resharper_space_after_last_attribute = false +resharper_space_after_last_pi_attribute = false +resharper_space_after_operator_keyword = true +resharper_space_after_operator_not = false +resharper_space_after_ptr_in_data_member = true +resharper_space_after_ptr_in_data_members = false +resharper_space_after_ptr_in_method = true +resharper_space_after_ptr_in_nested_declarator = false +resharper_space_after_ref_in_data_member = true +resharper_space_after_ref_in_data_members = false +resharper_space_after_ref_in_method = true +resharper_space_after_semicolon_in_for_statement = true +resharper_space_after_slate_operator = true +resharper_space_after_ternary_colon = true +resharper_space_after_ternary_quest = true +resharper_space_after_triple_slash = true +resharper_space_after_type_parameter_constraint_colon = true +resharper_space_around_additive_op = true +resharper_space_around_alias_eq = true +resharper_space_around_assignment_op = true +resharper_space_around_assignment_operator = true +resharper_space_around_deref_in_trailing_return_type = true +resharper_space_around_lambda_arrow = true +resharper_space_around_member_access_operator = false +resharper_space_around_relational_op = true +resharper_space_around_shift_op = true +resharper_space_around_stmt_colon = true +resharper_space_around_ternary_operator = true +resharper_space_before_array_rank_parentheses = false +resharper_space_before_attribute_target_colon = false +resharper_space_before_checked_parentheses = false +resharper_space_before_colon = false +resharper_space_before_colon_in_bitfield_declarator = true +resharper_space_before_colon_in_case = false +resharper_space_before_colon_in_ctor_initializer = true +resharper_space_before_colon_in_inheritance_clause = true +resharper_space_before_comma = false +resharper_space_before_default_parentheses = false +resharper_space_before_ellipsis_in_parameter_pack = false +resharper_space_before_empty_invocation_parentheses = false +resharper_space_before_empty_method_parentheses = false +resharper_space_before_for_colon = true +resharper_space_before_initializer_braces = false +resharper_space_before_invocation_parentheses = false +resharper_space_before_label_colon = false +resharper_space_before_lambda_parentheses = false +resharper_space_before_method_parentheses = false +resharper_space_before_nameof_parentheses = false +resharper_space_before_new_parentheses = false +resharper_space_before_nullable_mark = false +resharper_space_before_open_square_brackets = false +resharper_space_before_pointer_asterik_declaration = false +resharper_space_before_postfix_operator = false +resharper_space_before_ptr_in_abstract_decl = false +resharper_space_before_ptr_in_data_member = false +resharper_space_before_ptr_in_data_members = true +resharper_space_before_ptr_in_method = false +resharper_space_before_ref_in_abstract_decl = false +resharper_space_before_ref_in_data_member = false +resharper_space_before_ref_in_data_members = true +resharper_space_before_ref_in_method = false +resharper_space_before_semicolon = false +resharper_space_before_semicolon_in_for_statement = false +resharper_space_before_singleline_accessorholder = true +resharper_space_before_sizeof_parentheses = false +resharper_space_before_template_args = false +resharper_space_before_template_params = true +resharper_space_before_ternary_colon = true +resharper_space_before_ternary_quest = true +resharper_space_before_trailing_comment = true +resharper_space_before_trailing_comment_text = false +resharper_space_before_typeof_parentheses = false +resharper_space_before_type_argument_angle = false +resharper_space_before_type_parameter_angle = false +resharper_space_before_type_parameter_constraint_colon = true +resharper_space_before_type_parameter_parentheses = true +resharper_space_between_accessors_in_singleline_property = true +resharper_space_between_attribute_sections = true +resharper_space_between_closing_angle_brackets_in_template_args = false +resharper_space_between_keyword_and_expression = true +resharper_space_between_keyword_and_type = true +resharper_space_between_method_call_empty_parameter_list_parentheses = false +resharper_space_between_method_call_name_and_opening_parenthesis = false +resharper_space_between_method_call_parameter_list_parentheses = false +resharper_space_between_method_declaration_empty_parameter_list_parentheses = false +resharper_space_between_method_declaration_name_and_open_parenthesis = false +resharper_space_between_method_declaration_parameter_list_parentheses = false +resharper_space_between_parentheses_of_control_flow_statements = false +resharper_space_between_square_brackets = false +resharper_space_between_typecast_parentheses = false +resharper_space_in_singleline_accessorholder = true +resharper_space_in_singleline_anonymous_method = true +resharper_space_in_singleline_method = true +resharper_space_near_postfix_and_prefix_op = false +resharper_space_within_array_initialization_braces = false +resharper_space_within_array_rank_empty_parentheses = false +resharper_space_within_array_rank_parentheses = false +resharper_space_within_attribute_angles = false +resharper_space_within_checked_parentheses = false +resharper_space_within_declaration_parentheses = false +resharper_space_within_default_parentheses = false +resharper_space_within_empty_blocks = false +resharper_space_within_empty_braces = true +resharper_space_within_empty_initializer_braces = false +resharper_space_within_empty_invocation_parentheses = false +resharper_space_within_empty_method_parentheses = false +resharper_space_within_empty_template_params = false +resharper_space_within_expression_parentheses = false +resharper_space_within_initializer_braces = false +resharper_space_within_invocation_parentheses = false +resharper_space_within_method_parentheses = false +resharper_space_within_nameof_parentheses = false +resharper_space_within_new_parentheses = false +resharper_space_within_parentheses = false +resharper_space_within_single_line_array_initializer_braces = true +resharper_space_within_sizeof_parentheses = false +resharper_space_within_slice_pattern = true +resharper_space_within_template_args = false +resharper_space_within_template_params = false +resharper_space_within_tuple_parentheses = false +resharper_space_within_typeof_parentheses = false +resharper_space_within_type_argument_angles = false +resharper_space_within_type_parameter_angles = false +resharper_space_within_type_parameter_parentheses = false +resharper_special_else_if_treatment = true +resharper_sql_insert_final_newline = false +resharper_sql_max_line_length = 120 +resharper_sql_wrap_lines = true +resharper_static_members_qualify_members = none +resharper_static_members_qualify_with = declared_type +resharper_stick_comment = true +resharper_subquery_place_closing_parenthesis = do_not_change +resharper_subquery_place_opening_parenthesis = do_not_change +resharper_subquery_spaces_within_parentheses = false +resharper_subquery_space_after_keyword = do_not_change +resharper_support_vs_event_naming_pattern = true +resharper_toplevel_function_declaration_return_type_style = do_not_change +resharper_toplevel_function_definition_return_type_style = do_not_change +resharper_trailing_comma_in_multiline_lists = false +resharper_trailing_comma_in_singleline_lists = false +resharper_treat_asterisk_as_regular = false +resharper_treat_case_statement_with_break_as_simple = true +resharper_update_statement_place_comma = as_in_common +resharper_update_statement_place_elements_on = as_in_common +resharper_update_statement_wrap_elements = chop +resharper_use_continuous_indent_inside_initializer_braces = true +resharper_use_continuous_indent_inside_parens = true +resharper_use_continuous_line_indent_in_expression_braces = false +resharper_use_continuous_line_indent_in_method_pars = false +resharper_use_heuristics_for_body_style = true +resharper_use_indents_from_main_language_in_file = true +resharper_use_indent_from_previous_element = true +resharper_use_indent_from_vs = true +resharper_use_old_engine = false +resharper_use_roslyn_logic_for_evident_types = false +resharper_vb_align_multiline_argument = true +resharper_vb_align_multiline_expression = true +resharper_vb_align_multiline_parameter = true +resharper_vb_align_multiple_declaration = true +resharper_vb_insert_final_newline = false +resharper_vb_keep_nontrivial_alias = true +resharper_vb_max_line_length = 120 +resharper_vb_place_field_attribute_on_same_line = true +resharper_vb_place_method_attribute_on_same_line = false +resharper_vb_place_type_attribute_on_same_line = false +resharper_vb_prefer_qualified_reference = false +resharper_vb_space_after_unary_operator = true +resharper_vb_space_around_multiplicative_op = false +resharper_vb_wrap_lines = true +resharper_views_indent_query = false +resharper_views_wrap_as = false +resharper_views_wrap_the_beginning_of_the_query = true +resharper_where_clause_place_elements_on = as_in_common +resharper_where_clause_wrap_elements = chop +resharper_with_clause_align_as = false +resharper_with_clause_place_comma = as_in_common +resharper_with_clause_place_elements_on = as_in_common +resharper_with_clause_wrap_elements = chop +resharper_wrap_after_binary_opsign = true +resharper_wrap_after_declaration_lpar = false +resharper_wrap_after_dot = false +resharper_wrap_after_dot_in_method_calls = false +resharper_wrap_after_expression_lbrace = true +resharper_wrap_after_invocation_lpar = false +resharper_wrap_after_primary_constructor_declaration_lpar = true +resharper_wrap_after_property_in_chained_method_calls = false +resharper_wrap_altered_items = do_not_change +resharper_wrap_altering_instructions = yes +resharper_wrap_arguments_style = wrap_if_long +resharper_wrap_around_elements = true +resharper_wrap_array_initializer_style = wrap_if_long +resharper_wrap_base_clause_style = wrap_if_long +resharper_wrap_before_arrow_with_expressions = false +resharper_wrap_before_binary_opsign = false +resharper_wrap_before_binary_pattern_op = true +resharper_wrap_before_colon = false +resharper_wrap_before_comma = false +resharper_wrap_before_comma_in_base_clause = false +resharper_wrap_before_declaration_lpar = false +resharper_wrap_before_declaration_rpar = false +resharper_wrap_before_eq = false +resharper_wrap_before_expression_rbrace = true +resharper_wrap_before_extends_colon = false +resharper_wrap_before_first_method_call = false +resharper_wrap_before_first_type_parameter_constraint = false +resharper_wrap_before_invocation_lpar = false +resharper_wrap_before_invocation_rpar = false +resharper_wrap_before_linq_expression = false +resharper_wrap_before_primary_constructor_declaration_lpar = false +resharper_wrap_before_primary_constructor_declaration_rpar = false +resharper_wrap_before_ternary_opsigns = true +resharper_wrap_before_type_parameter_langle = false +resharper_wrap_braced_init_list_style = wrap_if_long +resharper_wrap_cascade_and_deferrability = false +resharper_wrap_chained_binary_expressions = wrap_if_long +resharper_wrap_chained_binary_patterns = wrap_if_long +resharper_wrap_chained_method_calls = wrap_if_long +resharper_wrap_columns_or_values = wrap_if_long +resharper_wrap_command_ending_semicolon = do_not_change +resharper_wrap_comments = false +resharper_wrap_constraint = true +resharper_wrap_ctor_initializer_style = wrap_if_long +resharper_wrap_else = true +resharper_wrap_enumeration_style = chop_if_long +resharper_wrap_enum_declaration = chop_always +resharper_wrap_every_statement = false +resharper_wrap_extends_list_style = wrap_if_long +resharper_wrap_first_join = true +resharper_wrap_first_option = false +resharper_wrap_for_stmt_header_style = chop_if_long +resharper_wrap_key_check = false +resharper_wrap_list_pattern = wrap_if_long +resharper_wrap_loop = true +resharper_wrap_multiple_declaration_style = chop_if_long +resharper_wrap_multiple_type_parameter_constraints_style = chop_if_long +resharper_wrap_next_join = true +resharper_wrap_next_option = true +resharper_wrap_object_and_collection_initializer_style = chop_if_long +resharper_wrap_on_and_using = false +resharper_wrap_parameters_style = wrap_if_long +resharper_wrap_primary_constructor_parameters_style = chop_if_long +resharper_wrap_property_pattern = chop_if_long +resharper_wrap_references = false +resharper_wrap_switch_expression = chop_always +resharper_wrap_ternary_expr_style = chop_if_long +resharper_wrap_then = false +resharper_wrap_variables = do_not_change +resharper_wrap_verbatim_interpolated_strings = no_wrap +resharper_xmldoc_attribute_indent = single_indent +resharper_xmldoc_insert_final_newline = false +resharper_xmldoc_linebreak_before_elements = summary,remarks,example,returns,param,typeparam,value,para +resharper_xmldoc_max_blank_lines_between_tags = 0 +resharper_xmldoc_max_line_length = 120 +resharper_xmldoc_pi_attribute_style = do_not_touch +resharper_xmldoc_space_before_self_closing = true +resharper_xmldoc_wrap_lines = true +resharper_xmldoc_wrap_tags_and_pi = true +resharper_xmldoc_wrap_text = true +resharper_xml_attribute_indent = align_by_first_attribute +resharper_xml_insert_final_newline = false +resharper_xml_linebreak_before_elements = +resharper_xml_max_blank_lines_between_tags = 2 +resharper_xml_max_line_length = 180 +resharper_xml_pi_attribute_style = do_not_touch +resharper_xml_space_before_self_closing = true +resharper_xml_wrap_lines = true +resharper_xml_wrap_tags_and_pi = true +resharper_xml_wrap_text = false + +# ReSharper inspection severities +resharper_access_rights_in_text_highlighting = warning +resharper_access_to_disposed_closure_highlighting = warning +resharper_access_to_for_each_variable_in_closure_highlighting = warning +resharper_access_to_modified_closure_highlighting = warning +resharper_access_to_static_member_via_derived_type_highlighting = warning +resharper_address_of_marshal_by_ref_object_highlighting = warning +resharper_all_underscore_local_parameter_name_highlighting = warning +resharper_angular_html_banana_highlighting = warning +resharper_annotate_can_be_null_parameter_highlighting = none +resharper_annotate_can_be_null_type_member_highlighting = none +resharper_annotate_not_null_parameter_highlighting = none +resharper_annotate_not_null_type_member_highlighting = none +resharper_annotation_conflict_in_hierarchy_highlighting = warning +resharper_annotation_redundancy_at_value_type_highlighting = warning +resharper_annotation_redundancy_in_hierarchy_highlighting = warning +resharper_append_to_collection_expression_highlighting = suggestion +resharper_arguments_style_anonymous_function_highlighting = none +resharper_arguments_style_literal_highlighting = none +resharper_arguments_style_named_expression_highlighting = none +resharper_arguments_style_other_highlighting = none +resharper_arguments_style_string_literal_highlighting = none +resharper_arrange_accessor_owner_body_highlighting = suggestion +resharper_arrange_attributes_highlighting = none +resharper_arrange_constructor_or_destructor_body_highlighting = none +resharper_arrange_default_value_when_type_evident_highlighting = suggestion +resharper_arrange_default_value_when_type_not_evident_highlighting = hint +resharper_arrange_local_function_body_highlighting = none +resharper_arrange_method_or_operator_body_highlighting = none +resharper_arrange_namespace_body_highlighting = hint +resharper_arrange_null_checking_pattern_highlighting = hint +resharper_arrange_object_creation_when_type_evident_highlighting = suggestion +resharper_arrange_object_creation_when_type_not_evident_highlighting = hint +resharper_arrange_redundant_parentheses_highlighting = hint +resharper_arrange_static_member_qualifier_highlighting = hint +resharper_arrange_this_qualifier_highlighting = hint +resharper_arrange_trailing_comma_in_multiline_lists_highlighting = hint +resharper_arrange_trailing_comma_in_singleline_lists_highlighting = hint +resharper_arrange_type_member_modifiers_highlighting = hint +resharper_arrange_type_modifiers_highlighting = hint +resharper_arrange_var_keywords_in_deconstructing_declaration_highlighting = suggestion +resharper_asp_content_placeholder_not_resolved_highlighting = error +resharper_asp_custom_page_parser_filter_type_highlighting = warning +resharper_asp_dead_code_highlighting = warning +resharper_asp_entity_highlighting = warning +resharper_asp_image_highlighting = warning +resharper_asp_invalid_control_type_highlighting = error +resharper_asp_not_resolved_highlighting = error +resharper_asp_ods_method_reference_resolve_error_highlighting = error +resharper_asp_resolve_warning_highlighting = warning +resharper_asp_skin_not_resolved_highlighting = error +resharper_asp_tag_attribute_with_optional_value_highlighting = warning +resharper_asp_theme_not_resolved_highlighting = error +resharper_asp_unused_register_directive_highlighting_highlighting = warning +resharper_asp_warning_highlighting = warning +resharper_assignment_instead_of_discard_highlighting = warning +resharper_assignment_in_conditional_expression_highlighting = warning +resharper_assignment_is_fully_discarded_highlighting = warning +resharper_assign_null_to_not_null_attribute_highlighting = warning +resharper_asxx_path_error_highlighting = warning +resharper_async_iterator_invocation_without_await_foreach_highlighting = warning +resharper_async_void_event_handler_method_highlighting = suggestion +resharper_async_void_lambda_highlighting = warning +resharper_async_void_method_highlighting = suggestion +resharper_async_void_throw_exception_highlighting = suggestion +resharper_auto_property_can_be_made_get_only_global_highlighting = suggestion +resharper_auto_property_can_be_made_get_only_local_highlighting = suggestion +resharper_bad_attribute_brackets_spaces_highlighting = none +resharper_bad_braces_spaces_highlighting = none +resharper_bad_child_statement_indent_highlighting = warning +resharper_bad_colon_spaces_highlighting = none +resharper_bad_comma_spaces_highlighting = none +resharper_bad_control_braces_indent_highlighting = suggestion +resharper_bad_control_braces_line_breaks_highlighting = none +resharper_bad_declaration_braces_indent_highlighting = none +resharper_bad_declaration_braces_line_breaks_highlighting = none +resharper_bad_empty_braces_line_breaks_highlighting = none +resharper_bad_expression_braces_indent_highlighting = none +resharper_bad_expression_braces_line_breaks_highlighting = none +resharper_bad_generic_brackets_spaces_highlighting = none +resharper_bad_indent_highlighting = none +resharper_bad_linq_line_breaks_highlighting = none +resharper_bad_list_line_breaks_highlighting = none +resharper_bad_member_access_spaces_highlighting = none +resharper_bad_namespace_braces_indent_highlighting = none +resharper_bad_parens_line_breaks_highlighting = none +resharper_bad_parens_spaces_highlighting = none +resharper_bad_preprocessor_indent_highlighting = none +resharper_bad_semicolon_spaces_highlighting = none +resharper_bad_spaces_after_keyword_highlighting = none +resharper_bad_square_brackets_spaces_highlighting = none +resharper_bad_switch_braces_indent_highlighting = none +resharper_bad_symbol_spaces_highlighting = none +resharper_base_member_has_params_highlighting = warning +resharper_base_method_call_with_default_parameter_highlighting = warning +resharper_base_object_equals_is_object_equals_highlighting = warning +resharper_base_object_get_hash_code_call_in_get_hash_code_highlighting = warning +resharper_bitwise_operator_on_enum_without_flags_highlighting = warning +resharper_blazor_editor_required_highlighting = warning +resharper_both_context_call_declaration_global_highlighting = warning +resharper_both_context_call_usage_global_highlighting = warning +resharper_built_in_type_reference_style_for_member_access_highlighting = hint +resharper_built_in_type_reference_style_highlighting = hint +resharper_by_ref_argument_is_volatile_field_highlighting = warning +resharper_cannot_apply_equality_operator_to_type_highlighting = warning +resharper_can_replace_cast_with_lambda_return_type_highlighting = hint +resharper_can_replace_cast_with_shorter_type_argument_highlighting = suggestion +resharper_can_replace_cast_with_type_argument_highlighting = hint +resharper_can_replace_cast_with_variable_type_highlighting = hint +resharper_can_simplify_dictionary_lookup_with_try_add_highlighting = suggestion +resharper_can_simplify_dictionary_lookup_with_try_get_value_highlighting = suggestion +resharper_can_simplify_dictionary_removing_with_single_call_highlighting = suggestion +resharper_can_simplify_dictionary_try_get_value_with_get_value_or_default_highlighting = suggestion +resharper_can_simplify_is_assignable_from_highlighting = suggestion +resharper_can_simplify_is_instance_of_type_highlighting = suggestion +resharper_can_simplify_set_adding_with_single_call_highlighting = suggestion +resharper_can_simplify_string_escape_sequence_highlighting = hint +resharper_captured_primary_constructor_parameter_is_mutable_highlighting = warning +resharper_center_tag_is_obsolete_highlighting = warning +resharper_change_field_type_to_system_threading_lock_highlighting = suggestion +resharper_check_for_reference_equality_instead_1_highlighting = suggestion +resharper_check_for_reference_equality_instead_2_highlighting = suggestion +resharper_check_for_reference_equality_instead_3_highlighting = suggestion +resharper_check_for_reference_equality_instead_4_highlighting = suggestion +resharper_check_namespace_highlighting = warning +resharper_class_cannot_be_instantiated_highlighting = warning +resharper_class_can_be_sealed_global_highlighting = none +resharper_class_can_be_sealed_local_highlighting = none +resharper_class_never_instantiated_global_highlighting = suggestion +resharper_class_never_instantiated_local_highlighting = suggestion +resharper_class_with_virtual_members_never_inherited_global_highlighting = suggestion +resharper_class_with_virtual_members_never_inherited_local_highlighting = suggestion +resharper_clear_attribute_is_obsolete_all_highlighting = warning +resharper_clear_attribute_is_obsolete_highlighting = warning +resharper_collection_never_queried_global_highlighting = warning +resharper_collection_never_queried_local_highlighting = warning +resharper_collection_never_updated_global_highlighting = warning +resharper_collection_never_updated_local_highlighting = warning +resharper_command_invasion_declaration_global_highlighting = warning +resharper_command_invasion_usage_global_highlighting = warning +resharper_comment_typo_highlighting = suggestion +resharper_compare_non_constrained_generic_with_null_highlighting = none +resharper_compare_of_floats_by_equality_operator_highlighting = warning +resharper_conditional_access_qualifier_is_non_nullable_according_to_api_contract_highlighting = warning +resharper_conditional_ternary_equal_branch_highlighting = warning +resharper_condition_is_always_true_or_false_according_to_nullable_api_contract_highlighting = warning +resharper_condition_is_always_true_or_false_highlighting = warning +resharper_conflict_cqrs_attribute_highlighting = warning +resharper_confusing_char_as_integer_in_constructor_highlighting = warning +resharper_constant_conditional_access_qualifier_highlighting = warning +resharper_constant_expected_highlighting = suggestion +resharper_constant_null_coalescing_condition_highlighting = warning +resharper_consteval_if_is_always_constant_highlighting = warning +resharper_constructor_initializer_loop_highlighting = warning +resharper_constructor_with_must_dispose_resource_attribute_base_is_not_annotated_highlighting = warning +resharper_container_annotation_redundancy_highlighting = warning +resharper_context_value_is_provided_highlighting = none +resharper_contract_annotation_not_parsed_highlighting = warning +resharper_convert_closure_to_method_group_highlighting = suggestion +resharper_convert_conditional_ternary_expression_to_switch_expression_highlighting = hint +resharper_convert_constructor_to_member_initializers_highlighting = suggestion +resharper_convert_if_do_to_while_highlighting = suggestion +resharper_convert_if_statement_to_conditional_ternary_expression_highlighting = suggestion +resharper_convert_if_statement_to_null_coalescing_assignment_highlighting = suggestion +resharper_convert_if_statement_to_null_coalescing_expression_highlighting = suggestion +resharper_convert_if_statement_to_return_statement_highlighting = hint +resharper_convert_if_statement_to_switch_statement_highlighting = hint +resharper_convert_if_to_or_expression_highlighting = suggestion +resharper_convert_nullable_to_short_form_highlighting = suggestion +resharper_convert_switch_statement_to_switch_expression_highlighting = hint +resharper_convert_to_auto_property_highlighting = suggestion +resharper_convert_to_auto_property_when_possible_highlighting = hint +resharper_convert_to_auto_property_with_private_setter_highlighting = hint +resharper_convert_to_compound_assignment_highlighting = hint +resharper_convert_to_constant_global_highlighting = hint +resharper_convert_to_constant_local_highlighting = hint +resharper_convert_to_extension_block_highlighting = suggestion +resharper_convert_to_lambda_expression_highlighting = suggestion +resharper_convert_to_local_function_highlighting = suggestion +resharper_convert_to_null_coalescing_compound_assignment_highlighting = suggestion +resharper_convert_to_primary_constructor_highlighting = suggestion +resharper_convert_to_static_class_highlighting = suggestion +resharper_convert_to_using_declaration_highlighting = suggestion +resharper_convert_to_vb_auto_property_highlighting = suggestion +resharper_convert_to_vb_auto_property_when_possible_highlighting = hint +resharper_convert_to_vb_auto_property_with_private_setter_highlighting = hint +resharper_convert_type_check_pattern_to_null_check_highlighting = warning +resharper_convert_type_check_to_null_check_highlighting = warning +resharper_co_variant_array_conversion_highlighting = warning +resharper_cpp_abstract_class_without_specifier_highlighting = warning +resharper_cpp_abstract_final_class_highlighting = warning +resharper_cpp_abstract_virtual_function_call_in_ctor_highlighting = error +resharper_cpp_access_specifier_with_no_declarations_highlighting = suggestion +resharper_cpp_assigned_value_is_never_used_highlighting = warning +resharper_cpp_awaiter_type_is_not_class_highlighting = warning +resharper_cpp_bad_angle_brackets_spaces_highlighting = none +resharper_cpp_bad_braces_spaces_highlighting = none +resharper_cpp_bad_child_statement_indent_highlighting = none +resharper_cpp_bad_colon_spaces_highlighting = none +resharper_cpp_bad_comma_spaces_highlighting = none +resharper_cpp_bad_control_braces_indent_highlighting = none +resharper_cpp_bad_control_braces_line_breaks_highlighting = none +resharper_cpp_bad_declaration_braces_indent_highlighting = none +resharper_cpp_bad_declaration_braces_line_breaks_highlighting = none +resharper_cpp_bad_empty_braces_line_breaks_highlighting = none +resharper_cpp_bad_expression_braces_indent_highlighting = none +resharper_cpp_bad_expression_braces_line_breaks_highlighting = none +resharper_cpp_bad_indent_highlighting = none +resharper_cpp_bad_list_line_breaks_highlighting = none +resharper_cpp_bad_member_access_spaces_highlighting = none +resharper_cpp_bad_namespace_braces_indent_highlighting = none +resharper_cpp_bad_parens_line_breaks_highlighting = none +resharper_cpp_bad_parens_spaces_highlighting = none +resharper_cpp_bad_semicolon_spaces_highlighting = none +resharper_cpp_bad_spaces_after_keyword_highlighting = none +resharper_cpp_bad_square_brackets_spaces_highlighting = none +resharper_cpp_bad_switch_braces_indent_highlighting = none +resharper_cpp_bad_symbol_spaces_highlighting = none +resharper_cpp_boolean_increment_expression_highlighting = warning +resharper_cpp_boost_format_bad_code_highlighting = warning +resharper_cpp_boost_format_legacy_code_highlighting = suggestion +resharper_cpp_boost_format_mixed_args_highlighting = error +resharper_cpp_boost_format_too_few_args_highlighting = error +resharper_cpp_boost_format_too_many_args_highlighting = warning +resharper_cpp_bound_to_delegate_method_is_not_marked_as_u_function_highlighting = warning +resharper_cpp_clang_tidy_abseil_cleanup_ctad_highlighting = none +resharper_cpp_clang_tidy_abseil_duration_addition_highlighting = none +resharper_cpp_clang_tidy_abseil_duration_comparison_highlighting = none +resharper_cpp_clang_tidy_abseil_duration_conversion_cast_highlighting = none +resharper_cpp_clang_tidy_abseil_duration_division_highlighting = none +resharper_cpp_clang_tidy_abseil_duration_factory_float_highlighting = none +resharper_cpp_clang_tidy_abseil_duration_factory_scale_highlighting = none +resharper_cpp_clang_tidy_abseil_duration_subtraction_highlighting = none +resharper_cpp_clang_tidy_abseil_duration_unnecessary_conversion_highlighting = none +resharper_cpp_clang_tidy_abseil_faster_strsplit_delimiter_highlighting = none +resharper_cpp_clang_tidy_abseil_no_internal_dependencies_highlighting = none +resharper_cpp_clang_tidy_abseil_no_namespace_highlighting = none +resharper_cpp_clang_tidy_abseil_redundant_strcat_calls_highlighting = none +resharper_cpp_clang_tidy_abseil_string_find_startswith_highlighting = none +resharper_cpp_clang_tidy_abseil_string_find_str_contains_highlighting = none +resharper_cpp_clang_tidy_abseil_str_cat_append_highlighting = none +resharper_cpp_clang_tidy_abseil_time_comparison_highlighting = none +resharper_cpp_clang_tidy_abseil_time_subtraction_highlighting = none +resharper_cpp_clang_tidy_abseil_upgrade_duration_conversions_highlighting = none +resharper_cpp_clang_tidy_altera_id_dependent_backward_branch_highlighting = none +resharper_cpp_clang_tidy_altera_kernel_name_restriction_highlighting = none +resharper_cpp_clang_tidy_altera_single_work_item_barrier_highlighting = none +resharper_cpp_clang_tidy_altera_struct_pack_align_highlighting = none +resharper_cpp_clang_tidy_altera_unroll_loops_highlighting = none +resharper_cpp_clang_tidy_android_cloexec_accept4_highlighting = none +resharper_cpp_clang_tidy_android_cloexec_accept_highlighting = none +resharper_cpp_clang_tidy_android_cloexec_creat_highlighting = none +resharper_cpp_clang_tidy_android_cloexec_dup_highlighting = none +resharper_cpp_clang_tidy_android_cloexec_epoll_create1_highlighting = none +resharper_cpp_clang_tidy_android_cloexec_epoll_create_highlighting = none +resharper_cpp_clang_tidy_android_cloexec_fopen_highlighting = none +resharper_cpp_clang_tidy_android_cloexec_inotify_init1_highlighting = none +resharper_cpp_clang_tidy_android_cloexec_inotify_init_highlighting = none +resharper_cpp_clang_tidy_android_cloexec_memfd_create_highlighting = none +resharper_cpp_clang_tidy_android_cloexec_open_highlighting = none +resharper_cpp_clang_tidy_android_cloexec_pipe2_highlighting = none +resharper_cpp_clang_tidy_android_cloexec_pipe_highlighting = none +resharper_cpp_clang_tidy_android_cloexec_socket_highlighting = none +resharper_cpp_clang_tidy_android_comparison_in_temp_failure_retry_highlighting = none +resharper_cpp_clang_tidy_boost_use_ranges_highlighting = none +resharper_cpp_clang_tidy_boost_use_to_string_highlighting = suggestion +resharper_cpp_clang_tidy_bugprone_argument_comment_highlighting = suggestion +resharper_cpp_clang_tidy_bugprone_assert_side_effect_highlighting = warning +resharper_cpp_clang_tidy_bugprone_assignment_in_if_condition_highlighting = none +resharper_cpp_clang_tidy_bugprone_bad_signal_to_kill_thread_highlighting = warning +resharper_cpp_clang_tidy_bugprone_bitwise_pointer_cast_highlighting = warning +resharper_cpp_clang_tidy_bugprone_bool_pointer_implicit_conversion_highlighting = none +resharper_cpp_clang_tidy_bugprone_branch_clone_highlighting = warning +resharper_cpp_clang_tidy_bugprone_capturing_this_in_member_variable_highlighting = warning +resharper_cpp_clang_tidy_bugprone_casting_through_void_highlighting = warning +resharper_cpp_clang_tidy_bugprone_chained_comparison_highlighting = warning +resharper_cpp_clang_tidy_bugprone_compare_pointer_to_member_virtual_function_highlighting = warning +resharper_cpp_clang_tidy_bugprone_copy_constructor_init_highlighting = warning +resharper_cpp_clang_tidy_bugprone_crtp_constructor_accessibility_highlighting = suggestion +resharper_cpp_clang_tidy_bugprone_dangling_handle_highlighting = warning +resharper_cpp_clang_tidy_bugprone_dynamic_static_initializers_highlighting = warning +resharper_cpp_clang_tidy_bugprone_easily_swappable_parameters_highlighting = none +resharper_cpp_clang_tidy_bugprone_empty_catch_highlighting = warning +resharper_cpp_clang_tidy_bugprone_exception_escape_highlighting = none +resharper_cpp_clang_tidy_bugprone_fold_init_type_highlighting = warning +resharper_cpp_clang_tidy_bugprone_forwarding_reference_overload_highlighting = warning +resharper_cpp_clang_tidy_bugprone_forward_declaration_namespace_highlighting = warning +resharper_cpp_clang_tidy_bugprone_implicit_widening_of_multiplication_result_highlighting = warning +resharper_cpp_clang_tidy_bugprone_inaccurate_erase_highlighting = warning +resharper_cpp_clang_tidy_bugprone_incorrect_enable_if_highlighting = warning +resharper_cpp_clang_tidy_bugprone_incorrect_enable_shared_from_this_highlighting = warning +resharper_cpp_clang_tidy_bugprone_incorrect_roundings_highlighting = warning +resharper_cpp_clang_tidy_bugprone_inc_dec_in_conditions_highlighting = warning +resharper_cpp_clang_tidy_bugprone_infinite_loop_highlighting = warning +resharper_cpp_clang_tidy_bugprone_integer_division_highlighting = warning +resharper_cpp_clang_tidy_bugprone_lambda_function_name_highlighting = warning +resharper_cpp_clang_tidy_bugprone_macro_parentheses_highlighting = warning +resharper_cpp_clang_tidy_bugprone_macro_repeated_side_effects_highlighting = warning +resharper_cpp_clang_tidy_bugprone_misleading_setter_of_reference_highlighting = warning +resharper_cpp_clang_tidy_bugprone_misplaced_operator_in_strlen_in_alloc_highlighting = warning +resharper_cpp_clang_tidy_bugprone_misplaced_pointer_arithmetic_in_alloc_highlighting = warning +resharper_cpp_clang_tidy_bugprone_misplaced_widening_cast_highlighting = warning +resharper_cpp_clang_tidy_bugprone_move_forwarding_reference_highlighting = warning +resharper_cpp_clang_tidy_bugprone_multiple_new_in_one_expression_highlighting = warning +resharper_cpp_clang_tidy_bugprone_multiple_statement_macro_highlighting = warning +resharper_cpp_clang_tidy_bugprone_multi_level_implicit_pointer_conversion_highlighting = warning +resharper_cpp_clang_tidy_bugprone_narrowing_conversions_highlighting = warning +resharper_cpp_clang_tidy_bugprone_nondeterministic_pointer_iteration_order_highlighting = warning +resharper_cpp_clang_tidy_bugprone_non_zero_enum_to_bool_conversion_highlighting = warning +resharper_cpp_clang_tidy_bugprone_not_null_terminated_result_highlighting = warning +resharper_cpp_clang_tidy_bugprone_no_escape_highlighting = warning +resharper_cpp_clang_tidy_bugprone_optional_value_conversion_highlighting = warning +resharper_cpp_clang_tidy_bugprone_parent_virtual_call_highlighting = warning +resharper_cpp_clang_tidy_bugprone_pointer_arithmetic_on_polymorphic_object_highlighting = warning +resharper_cpp_clang_tidy_bugprone_posix_return_highlighting = warning +resharper_cpp_clang_tidy_bugprone_redundant_branch_condition_highlighting = warning +resharper_cpp_clang_tidy_bugprone_reserved_identifier_highlighting = warning +resharper_cpp_clang_tidy_bugprone_return_const_ref_from_parameter_highlighting = warning +resharper_cpp_clang_tidy_bugprone_shared_ptr_array_mismatch_highlighting = warning +resharper_cpp_clang_tidy_bugprone_signal_handler_highlighting = warning +resharper_cpp_clang_tidy_bugprone_signed_char_misuse_highlighting = warning +resharper_cpp_clang_tidy_bugprone_sizeof_container_highlighting = warning +resharper_cpp_clang_tidy_bugprone_sizeof_expression_highlighting = warning +resharper_cpp_clang_tidy_bugprone_spuriously_wake_up_functions_highlighting = warning +resharper_cpp_clang_tidy_bugprone_standalone_empty_highlighting = warning +resharper_cpp_clang_tidy_bugprone_stringview_nullptr_highlighting = warning +resharper_cpp_clang_tidy_bugprone_string_constructor_highlighting = warning +resharper_cpp_clang_tidy_bugprone_string_integer_assignment_highlighting = warning +resharper_cpp_clang_tidy_bugprone_string_literal_with_embedded_nul_highlighting = warning +resharper_cpp_clang_tidy_bugprone_suspicious_enum_usage_highlighting = warning +resharper_cpp_clang_tidy_bugprone_suspicious_include_highlighting = warning +resharper_cpp_clang_tidy_bugprone_suspicious_memory_comparison_highlighting = warning +resharper_cpp_clang_tidy_bugprone_suspicious_memset_usage_highlighting = warning +resharper_cpp_clang_tidy_bugprone_suspicious_missing_comma_highlighting = warning +resharper_cpp_clang_tidy_bugprone_suspicious_realloc_usage_highlighting = warning +resharper_cpp_clang_tidy_bugprone_suspicious_semicolon_highlighting = warning +resharper_cpp_clang_tidy_bugprone_suspicious_stringview_data_usage_highlighting = warning +resharper_cpp_clang_tidy_bugprone_suspicious_string_compare_highlighting = warning +resharper_cpp_clang_tidy_bugprone_swapped_arguments_highlighting = warning +resharper_cpp_clang_tidy_bugprone_switch_missing_default_case_highlighting = none +resharper_cpp_clang_tidy_bugprone_tagged_union_member_count_highlighting = warning +resharper_cpp_clang_tidy_bugprone_terminating_continue_highlighting = warning +resharper_cpp_clang_tidy_bugprone_throw_keyword_missing_highlighting = warning +resharper_cpp_clang_tidy_bugprone_too_small_loop_variable_highlighting = warning +resharper_cpp_clang_tidy_bugprone_unchecked_optional_access_highlighting = warning +resharper_cpp_clang_tidy_bugprone_undefined_memory_manipulation_highlighting = warning +resharper_cpp_clang_tidy_bugprone_undelegated_constructor_highlighting = warning +resharper_cpp_clang_tidy_bugprone_unhandled_exception_at_new_highlighting = none +resharper_cpp_clang_tidy_bugprone_unhandled_self_assignment_highlighting = warning +resharper_cpp_clang_tidy_bugprone_unintended_char_ostream_output_highlighting = warning +resharper_cpp_clang_tidy_bugprone_unique_ptr_array_mismatch_highlighting = warning +resharper_cpp_clang_tidy_bugprone_unsafe_functions_highlighting = warning +resharper_cpp_clang_tidy_bugprone_unused_local_non_trivial_variable_highlighting = none +resharper_cpp_clang_tidy_bugprone_unused_raii_highlighting = warning +resharper_cpp_clang_tidy_bugprone_unused_return_value_highlighting = warning +resharper_cpp_clang_tidy_bugprone_use_after_move_highlighting = warning +resharper_cpp_clang_tidy_bugprone_virtual_near_miss_highlighting = suggestion +resharper_cpp_clang_tidy_cert_arr39_c_highlighting = none +resharper_cpp_clang_tidy_cert_con36_c_highlighting = none +resharper_cpp_clang_tidy_cert_con54_cpp_highlighting = none +resharper_cpp_clang_tidy_cert_ctr56_cpp_highlighting = none +resharper_cpp_clang_tidy_cert_dcl03_c_highlighting = none +resharper_cpp_clang_tidy_cert_dcl16_c_highlighting = none +resharper_cpp_clang_tidy_cert_dcl37_c_highlighting = none +resharper_cpp_clang_tidy_cert_dcl50_cpp_highlighting = none +resharper_cpp_clang_tidy_cert_dcl51_cpp_highlighting = none +resharper_cpp_clang_tidy_cert_dcl54_cpp_highlighting = none +resharper_cpp_clang_tidy_cert_dcl58_cpp_highlighting = warning +resharper_cpp_clang_tidy_cert_dcl59_cpp_highlighting = none +resharper_cpp_clang_tidy_cert_env33_c_highlighting = none +resharper_cpp_clang_tidy_cert_err09_cpp_highlighting = none +resharper_cpp_clang_tidy_cert_err33_c_highlighting = warning +resharper_cpp_clang_tidy_cert_err34_c_highlighting = suggestion +resharper_cpp_clang_tidy_cert_err52_cpp_highlighting = none +resharper_cpp_clang_tidy_cert_err58_cpp_highlighting = none +resharper_cpp_clang_tidy_cert_err60_cpp_highlighting = warning +resharper_cpp_clang_tidy_cert_err61_cpp_highlighting = none +resharper_cpp_clang_tidy_cert_exp42_c_highlighting = none +resharper_cpp_clang_tidy_cert_fio38_c_highlighting = none +resharper_cpp_clang_tidy_cert_flp30_c_highlighting = warning +resharper_cpp_clang_tidy_cert_flp37_c_highlighting = none +resharper_cpp_clang_tidy_cert_int09_c_highlighting = none +resharper_cpp_clang_tidy_cert_mem57_cpp_highlighting = warning +resharper_cpp_clang_tidy_cert_msc24_c_highlighting = none +resharper_cpp_clang_tidy_cert_msc30_c_highlighting = none +resharper_cpp_clang_tidy_cert_msc32_c_highlighting = none +resharper_cpp_clang_tidy_cert_msc33_c_highlighting = none +resharper_cpp_clang_tidy_cert_msc50_cpp_highlighting = none +resharper_cpp_clang_tidy_cert_msc51_cpp_highlighting = warning +resharper_cpp_clang_tidy_cert_msc54_cpp_highlighting = warning +resharper_cpp_clang_tidy_cert_oop11_cpp_highlighting = none +resharper_cpp_clang_tidy_cert_oop54_cpp_highlighting = none +resharper_cpp_clang_tidy_cert_oop57_cpp_highlighting = warning +resharper_cpp_clang_tidy_cert_oop58_cpp_highlighting = warning +resharper_cpp_clang_tidy_cert_pos44_c_highlighting = none +resharper_cpp_clang_tidy_cert_pos47_c_highlighting = none +resharper_cpp_clang_tidy_cert_sig30_c_highlighting = none +resharper_cpp_clang_tidy_cert_str34_c_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_api_modeling_errno_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_api_modeling_google_g_test_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_api_modeling_llvm_cast_value_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_api_modeling_llvm_return_value_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_api_modeling_trust_nonnull_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_api_modeling_trust_returns_nonnull_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_core_bitwise_shift_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_core_builtin_assume_modeling_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_core_builtin_builtin_functions_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_core_builtin_no_return_functions_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_core_call_and_message_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_core_call_and_message_modeling_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_core_dereference_modeling_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_core_divide_zero_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_core_dynamic_type_propagation_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_core_fixed_address_dereference_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_core_nonnil_string_constants_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_core_non_null_param_checker_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_core_null_dereference_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_core_stack_address_escape_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_core_stack_addr_escape_base_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_core_undefined_binary_operator_result_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_core_uninitialized_array_subscript_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_core_uninitialized_assign_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_core_uninitialized_branch_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_core_uninitialized_captured_block_variable_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_core_uninitialized_new_array_size_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_core_uninitialized_undef_return_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_core_vla_size_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_cplusplus_array_delete_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_cplusplus_inner_pointer_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_cplusplus_move_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_cplusplus_new_delete_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_cplusplus_new_delete_leaks_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_cplusplus_placement_new_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_cplusplus_pure_virtual_call_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_cplusplus_self_assignment_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_cplusplus_smart_ptr_modeling_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_cplusplus_string_checker_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_deadcode_dead_stores_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_fuchsia_handle_checker_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_nullability_nullable_dereferenced_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_nullability_nullable_passed_to_nonnull_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_nullability_nullable_returned_from_nonnull_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_nullability_null_passed_to_nonnull_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_nullability_null_returned_from_nonnull_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_optin_core_enum_cast_out_of_range_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_optin_cplusplus_uninitialized_object_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_optin_cplusplus_virtual_call_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_optin_mpi_mpi_checker_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_optin_osx_cocoa_localizability_empty_localization_context_checker_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_optin_osx_cocoa_localizability_non_localized_string_checker_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_optin_osx_os_object_c_style_cast_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_optin_performance_gcd_antipattern_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_optin_performance_padding_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_optin_portability_unix_api_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_optin_taint_generic_taint_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_optin_taint_tainted_alloc_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_optin_taint_tainted_div_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_optin_taint_taint_propagation_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_osx_api_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_osx_cocoa_at_sync_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_osx_cocoa_autorelease_write_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_osx_cocoa_class_release_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_osx_cocoa_dealloc_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_osx_cocoa_incompatible_method_types_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_osx_cocoa_loops_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_osx_cocoa_missing_super_call_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_osx_cocoa_nil_arg_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_osx_cocoa_non_nil_return_value_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_osx_cocoa_ns_autorelease_pool_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_osx_cocoa_ns_error_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_osx_cocoa_obj_c_generics_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_osx_cocoa_retain_count_base_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_osx_cocoa_retain_count_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_osx_cocoa_run_loop_autorelease_leak_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_osx_cocoa_self_init_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_osx_cocoa_super_dealloc_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_osx_cocoa_unused_ivars_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_osx_cocoa_variadic_method_types_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_osx_core_foundation_cf_error_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_osx_core_foundation_cf_number_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_osx_core_foundation_cf_retain_release_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_osx_core_foundation_containers_out_of_bounds_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_osx_core_foundation_containers_pointer_sized_values_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_osx_mig_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_osx_ns_or_cf_error_deref_checker_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_osx_number_object_conversion_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_osx_obj_c_property_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_osx_os_object_retain_count_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_osx_sec_keychain_api_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_security_array_bound_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_security_cert_env_invalid_ptr_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_security_float_loop_counter_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_security_insecure_api_bcmp_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_security_insecure_api_bcopy_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_security_insecure_api_bzero_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_security_insecure_api_decode_value_of_obj_c_type_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_security_insecure_api_deprecated_or_unsafe_buffer_handling_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_security_insecure_api_getpw_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_security_insecure_api_gets_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_security_insecure_api_mkstemp_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_security_insecure_api_mktemp_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_security_insecure_api_rand_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_security_insecure_api_security_syntax_checker_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_security_insecure_api_strcpy_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_security_insecure_api_unchecked_return_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_security_insecure_api_vfork_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_security_mmap_write_exec_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_security_pointer_sub_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_security_putenv_stack_array_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_security_setgid_setuid_order_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_unix_api_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_unix_block_in_critical_section_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_unix_chroot_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_unix_cstring_bad_size_arg_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_unix_cstring_c_string_modeling_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_unix_cstring_not_null_terminated_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_unix_cstring_null_arg_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_unix_dynamic_memory_modeling_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_unix_errno_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_unix_malloc_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_unix_malloc_sizeof_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_unix_mismatched_deallocator_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_unix_std_c_library_functions_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_unix_stream_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_unix_vfork_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_valist_copy_to_self_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_valist_uninitialized_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_valist_unterminated_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_valist_valist_base_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_webkit_no_uncounted_member_checker_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_webkit_ref_cntbl_base_virtual_dtor_highlighting = none +resharper_cpp_clang_tidy_clang_analyzer_webkit_uncounted_lambda_captures_checker_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_aarch64_sme_attributes_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_absolute_value_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_abstract_final_class_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_abstract_vbase_init_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_address_of_packed_member_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_address_of_temporary_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_aix_compat_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_alias_template_in_declaration_name_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_align_mismatch_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_alloca_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_alloca_with_align_alignof_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_always_inline_coroutine_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_ambiguous_delete_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_ambiguous_ellipsis_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_ambiguous_macro_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_ambiguous_member_template_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_ambiguous_reversed_operator_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_analyzer_incompatible_plugin_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_android_unversioned_fallback_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_anonymous_pack_parens_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_anon_enum_enum_conversion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_arc_bridge_casts_disallowed_in_nonarc_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_arc_maybe_repeated_use_of_weak_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_arc_non_pod_memaccess_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_arc_perform_selector_leaks_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_arc_repeated_use_of_weak_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_arc_retain_cycles_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_arc_unsafe_retained_assign_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_argument_outside_range_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_argument_undefined_behaviour_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_arm_interrupt_save_fp_no_vfp_unit_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_arm_interrupt_vfp_clobber_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_array_bounds_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_array_bounds_pointer_arithmetic_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_array_compare_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_array_parameter_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_asm_operand_widths_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_assign_enum_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_assume_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_atimport_in_framework_header_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_atomic_access_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_atomic_alignment_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_atomic_implicit_seq_cst_highlighting = suggestion +resharper_cpp_clang_tidy_clang_diagnostic_atomic_memory_ordering_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_atomic_property_with_user_defined_accessor_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_attribute_packed_for_bitfield_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_attribute_warning_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_at_protocol_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_auto_decl_extensions_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_auto_disable_vptr_sanitizer_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_auto_import_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_auto_storage_class_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_auto_var_id_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_availability_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_avr_rtlib_linking_quirks_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_backslash_newline_escape_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_bad_function_cast_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_bind_to_temporary_copy_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_bitfield_constant_conversion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_bitfield_enum_conversion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_bitfield_width_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_bitwise_conditional_parentheses_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_bitwise_instead_of_logical_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_bitwise_op_parentheses_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_bit_int_extension_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_block_capture_autoreleasing_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_bool_conversion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_bool_operation_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_bounds_safety_counted_by_elt_type_unknown_size_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_braced_scalar_init_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_branch_protection_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_bridge_cast_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_builtin_assume_aligned_alignment_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_builtin_macro_redefined_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_builtin_memcpy_chk_size_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_builtin_requires_header_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_c11_extensions_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_c23_compat_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_c23_extensions_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_c2x_compat_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_c2x_extensions_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_c2y_extensions_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_c99_compat_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_c99_designator_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_c99_extensions_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_called_once_parameter_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_call_to_pure_virtual_from_ctor_dtor_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_cast_align_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_cast_calling_convention_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_cast_function_type_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_cast_function_type_mismatch_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_cast_function_type_strict_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_cast_of_sel_type_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_cast_qual_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_cast_qual_unrelated_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_cfi_unchecked_callee_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_cf_string_literal_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_character_conversion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_char_subscripts_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_clang_cl_pch_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_class_conversion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_class_varargs_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_cmse_union_leak_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_comma_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_comment_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_compare_distinct_pointer_types_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_completion_handler_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_complex_component_init_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_compound_token_split_by_macro_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_compound_token_split_by_space_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_compound_token_split_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_conditional_type_mismatch_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_conditional_uninitialized_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_config_macros_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_constant_conversion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_constant_evaluated_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_constant_logical_operand_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_constexpr_not_const_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_consumed_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_conversion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_coroutine_missing_unhandled_exception_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_coro_non_aligned_allocation_function_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_coro_type_aware_allocation_function_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_covered_switch_default_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_cpp11_compat_deprecated_writable_strings_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_cpp11_compat_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_cpp11_compat_pedantic_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_cpp11_compat_reserved_user_defined_literal_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_cpp11_extensions_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_cpp11_extra_semi_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_cpp11_inline_namespace_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_cpp11_long_long_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_cpp11_narrowing_const_reference_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_cpp11_narrowing_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_cpp14_attribute_extensions_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_cpp14_binary_literal_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_cpp14_compat_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_cpp14_compat_pedantic_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_cpp14_extensions_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_cpp17_attribute_extensions_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_cpp17_compat_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_cpp17_compat_mangling_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_cpp17_compat_pedantic_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_cpp17_extensions_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_cpp20_attribute_extensions_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_cpp20_compat_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_cpp20_compat_pedantic_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_cpp20_designator_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_cpp20_extensions_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_cpp23_attribute_extensions_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_cpp23_compat_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_cpp23_extensions_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_cpp23_lambda_attributes_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_cpp26_extensions_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_cpp2a_compat_pedantic_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_cpp2a_extensions_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_cpp2b_extensions_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_cpp2c_compat_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_cpp2c_extensions_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_cpp98_compat_bind_to_temporary_copy_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_cpp98_compat_extra_semi_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_cpp98_compat_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_cpp98_compat_local_type_template_args_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_cpp98_compat_pedantic_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_cpp98_compat_unnamed_type_template_args_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_cpp98_cpp11_compat_binary_literal_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_cpp98_cpp11_compat_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_cpp98_cpp11_compat_pedantic_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_cpp98_cpp11_cpp14_compat_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_cpp98_cpp11_cpp14_compat_pedantic_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_cpp98_cpp11_cpp14_cpp17_compat_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_cpp98_cpp11_cpp14_cpp17_compat_pedantic_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_cpp_compat_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_cpp_hidden_decl_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_cpp_keyword_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_cpp_unterminated_string_initialization_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_cstring_format_directive_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_ctad_maybe_unsupported_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_ctu_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_cuda_compat_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_custom_atomic_properties_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_cxx_attribute_extension_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_c_attribute_extension_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_dangling_assignment_gsl_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_dangling_assignment_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_dangling_capture_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_dangling_else_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_dangling_field_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_dangling_gsl_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_dangling_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_dangling_initializer_list_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_darwin_sdk_settings_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_date_time_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_dealloc_in_category_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_debug_compression_unavailable_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_declaration_after_statement_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_decls_in_multiple_modules_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_defaulted_function_deleted_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_default_const_init_field_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_default_const_init_field_unsafe_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_default_const_init_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_default_const_init_unsafe_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_default_const_init_var_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_default_const_init_var_unsafe_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_delegating_ctor_cycles_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_delete_abstract_non_virtual_dtor_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_delete_incomplete_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_delete_non_abstract_non_virtual_dtor_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_delete_non_virtual_dtor_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_delimited_escape_sequence_extension_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_deprecated_altivec_src_compat_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_deprecated_anon_enum_enum_conversion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_deprecated_array_compare_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_deprecated_attributes_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_deprecated_builtins_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_deprecated_comma_subscript_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_deprecated_copy_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_deprecated_copy_with_dtor_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_deprecated_copy_with_user_provided_copy_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_deprecated_copy_with_user_provided_dtor_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_deprecated_coroutine_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_deprecated_declarations_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_deprecated_declarations_switch_case_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_deprecated_dynamic_exception_spec_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_deprecated_enum_compare_conditional_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_deprecated_enum_compare_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_deprecated_enum_enum_conversion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_deprecated_enum_float_conversion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_deprecated_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_deprecated_implementations_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_deprecated_increment_bool_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_deprecated_literal_operator_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_deprecated_missing_comma_variadic_parameter_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_deprecated_non_prototype_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_deprecated_objc_isa_usage_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_deprecated_objc_pointer_introspection_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_deprecated_objc_pointer_introspection_perform_selector_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_deprecated_octal_literals_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_deprecated_ofast_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_deprecated_pragma_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_deprecated_redundant_constexpr_static_def_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_deprecated_register_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_deprecated_this_capture_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_deprecated_type_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_deprecated_volatile_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_deprecate_lax_vec_conv_all_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_direct_ivar_access_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_disabled_macro_expansion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_distributed_object_modifiers_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_division_by_zero_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_dllexport_explicit_instantiation_decl_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_dllimport_static_field_def_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_dll_attribute_on_redeclaration_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_documentation_deprecated_sync_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_documentation_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_documentation_html_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_documentation_pedantic_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_documentation_unknown_command_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_dollar_in_identifier_extension_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_double_promotion_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_dtor_name_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_dtor_typedef_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_duplicate_decl_specifier_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_duplicate_enum_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_duplicate_method_arg_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_duplicate_method_match_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_duplicate_protocol_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_dxil_validation_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_dynamic_class_memaccess_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_dynamic_exception_spec_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_eager_load_cxx_named_modules_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_embedded_directive_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_empty_body_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_empty_decomposition_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_empty_init_stmt_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_empty_translation_unit_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_encode_type_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_enum_compare_conditional_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_enum_compare_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_enum_compare_switch_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_enum_conversion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_enum_enum_conversion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_enum_float_conversion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_enum_too_large_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_error_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_exceptions_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_excessive_regsave_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_excess_initializers_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_exit_time_destructors_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_expansion_to_defined_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_experimental_header_units_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_experimental_lifetime_safety_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_experimental_option_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_explicit_initialize_call_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_explicit_ownership_type_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_explicit_specialization_storage_class_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_export_unnamed_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_extern_c_compat_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_extern_initializer_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_extractapi_misuse_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_extra_qualification_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_extra_semi_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_extra_semi_stmt_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_extra_tokens_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_ext_cxx_type_aware_allocators_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_final_dtor_non_final_class_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_final_macro_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_fixed_point_overflow_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_flag_enum_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_flexible_array_extensions_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_float_conversion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_float_equal_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_float_overflow_conversion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_float_zero_conversion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_format_extra_args_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_format_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_format_insufficient_args_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_format_invalid_specifier_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_format_nonliteral_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_format_non_iso_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_format_overflow_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_format_overflow_non_kprintf_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_format_pedantic_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_format_security_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_format_signedness_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_format_truncation_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_format_truncation_non_kprintf_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_format_type_confusion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_format_zero_length_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_fortify_source_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_for_loop_analysis_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_four_char_constants_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_framework_include_private_from_public_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_frame_address_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_frame_larger_than_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_free_nonheap_object_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_friend_enum_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_function_def_in_objc_container_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_function_effects_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_function_multiversion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_future_attribute_extensions_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_gcc_compat_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_global_constructors_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_global_isel_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_gnu_alignof_expression_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_gnu_anonymous_struct_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_gnu_array_member_paren_init_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_gnu_auto_type_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_gnu_binary_literal_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_gnu_case_range_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_gnu_complex_integer_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_gnu_compound_literal_initializer_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_gnu_conditional_omitted_operand_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_gnu_designator_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_gnu_empty_initializer_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_gnu_empty_struct_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_gnu_flexible_array_initializer_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_gnu_flexible_array_union_member_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_gnu_folding_constant_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_gnu_imaginary_constant_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_gnu_include_next_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_gnu_inline_cpp_without_extern_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_gnu_label_as_value_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_gnu_line_marker_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_gnu_null_pointer_arithmetic_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_gnu_offsetof_extensions_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_gnu_pointer_arith_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_gnu_redeclared_enum_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_gnu_statement_expression_from_macro_expansion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_gnu_statement_expression_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_gnu_static_float_init_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_gnu_string_literal_operator_template_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_gnu_union_cast_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_gnu_variable_sized_type_not_at_end_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_gnu_zero_variadic_macro_arguments_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_gpu_maybe_wrong_side_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_header_guard_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_header_hygiene_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_higher_precision_for_complex_division_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_hip_omp_target_directives_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_hip_only_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_hlsl202y_extensions_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_hlsl_availability_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_hlsl_dxc_compatability_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_hlsl_extensions_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_hlsl_implicit_binding_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_idiomatic_parentheses_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_ignored_attributes_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_ignored_availability_without_sdk_settings_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_ignored_base_class_qualifiers_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_ignored_optimization_argument_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_ignored_pragmas_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_ignored_pragma_intrinsic_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_ignored_pragma_optimize_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_ignored_qualifiers_highlighting = suggestion +resharper_cpp_clang_tidy_clang_diagnostic_ignored_reference_qualifiers_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_implicitly_unsigned_literal_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_implicit_atomic_properties_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_implicit_const_int_float_conversion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_implicit_conversion_floating_point_to_bool_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_implicit_enum_enum_cast_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_implicit_exception_spec_mismatch_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_implicit_fallthrough_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_implicit_fallthrough_per_function_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_implicit_fixed_point_conversion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_implicit_float_conversion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_implicit_function_declaration_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_implicit_int_conversion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_implicit_int_conversion_on_negation_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_implicit_int_enum_cast_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_implicit_int_float_conversion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_implicit_int_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_implicit_retain_self_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_implicit_void_ptr_cast_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_import_implementation_partition_unit_in_interface_unit_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_import_preprocessor_directive_pedantic_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_inaccessible_base_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_include_angled_in_module_purview_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_include_next_absolute_path_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_include_next_outside_header_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_incompatible_exception_spec_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_incompatible_function_pointer_types_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_incompatible_function_pointer_types_strict_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_incompatible_library_redeclaration_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_incompatible_ms_pragma_section_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_incompatible_ms_struct_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_incompatible_pointer_types_discards_qualifiers_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_incompatible_pointer_types_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_incompatible_property_type_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_incompatible_sysroot_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_incomplete_framework_module_declaration_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_incomplete_implementation_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_incomplete_module_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_incomplete_setjmp_declaration_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_incomplete_umbrella_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_inconsistent_dllimport_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_inconsistent_missing_destructor_override_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_inconsistent_missing_override_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_increment_bool_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_independent_class_attribute_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_infinite_recursion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_initializer_overrides_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_init_priority_reserved_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_injected_class_name_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_inline_asm_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_inline_namespace_reopened_noninline_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_inline_new_delete_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_installapi_violation_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_instantiation_after_specialization_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_integer_overflow_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_int_conversion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_int_in_bool_context_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_int_to_pointer_cast_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_int_to_void_pointer_cast_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_invalid_constexpr_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_invalid_gnu_asm_cast_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_invalid_iboutlet_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_invalid_initializer_from_system_header_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_invalid_ios_deployment_target_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_invalid_noreturn_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_invalid_no_builtin_names_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_invalid_offsetof_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_invalid_or_nonexistent_directory_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_invalid_partial_specialization_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_invalid_pp_token_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_invalid_source_encoding_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_invalid_static_assert_message_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_invalid_token_paste_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_invalid_unevaluated_string_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_invalid_utf8_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_invalid_version_availability_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_jump_misses_init_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_jump_seh_finally_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_keyword_compat_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_keyword_macro_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_knr_promoted_parameter_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_language_extension_token_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_large_by_value_copy_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_legacy_constant_register_binding_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_linker_warnings_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_literal_conversion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_literal_range_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_local_type_template_args_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_logical_not_parentheses_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_logical_op_parentheses_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_long_long_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_macro_redefined_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_main_attached_to_named_module_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_main_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_main_return_type_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_malformed_warning_check_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_many_braces_around_scalar_init_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_mathematical_notation_identifier_extension_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_math_errno_enabled_with_veclib_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_max_tokens_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_max_unsigned_zero_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_memset_transposed_args_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_memsize_comparison_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_method_signatures_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_microsoft_abstract_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_microsoft_anon_tag_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_microsoft_cast_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_microsoft_charize_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_microsoft_comment_paste_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_microsoft_const_init_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_microsoft_cpp_macro_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_microsoft_default_arg_redefinition_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_microsoft_drectve_section_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_microsoft_end_of_file_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_microsoft_enum_forward_reference_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_microsoft_enum_value_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_microsoft_exception_spec_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_microsoft_exists_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_microsoft_explicit_constructor_call_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_microsoft_extra_qualification_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_microsoft_fixed_enum_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_microsoft_flexible_array_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_microsoft_goto_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_microsoft_inaccessible_base_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_microsoft_include_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_microsoft_init_from_predefined_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_microsoft_inline_on_non_function_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_microsoft_mutable_reference_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_microsoft_pure_definition_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_microsoft_redeclare_static_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_microsoft_sealed_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_microsoft_string_literal_from_predefined_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_microsoft_template_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_microsoft_template_shadow_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_microsoft_union_member_reference_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_microsoft_unqualified_friend_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_microsoft_using_decl_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_microsoft_void_pseudo_dtor_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_misexpect_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_misleading_indentation_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_mismatched_new_delete_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_mismatched_parameter_types_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_mismatched_return_types_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_mismatched_tags_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_missing_braces_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_missing_constinit_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_missing_declarations_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_missing_designated_field_initializers_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_missing_exception_spec_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_missing_field_initializers_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_missing_method_return_type_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_missing_multilib_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_missing_noescape_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_missing_noreturn_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_missing_prototypes_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_missing_prototype_for_cc_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_missing_selector_name_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_missing_sysroot_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_missing_template_arg_list_after_template_kw_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_missing_variable_declarations_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_misspelled_assumption_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_mix_packoffset_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_modules_ambiguous_internal_linkage_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_modules_import_nested_redundant_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_module_conflict_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_module_file_config_mismatch_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_module_file_extension_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_module_file_mapping_mismatch_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_module_import_in_extern_c_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_msvc_not_found_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_ms_bitfield_padding_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_multichar_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_multilib_not_found_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_multiple_move_vbase_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_multi_gpu_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_nan_infinity_disabled_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_nested_anon_types_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_newline_eof_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_new_returns_null_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_noderef_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_nonnull_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_nonportable_include_path_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_nonportable_system_include_path_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_nonportable_vector_initialization_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_nontrivial_memaccess_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_nontrivial_memcall_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_non_c_typedef_for_linkage_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_non_literal_null_conversion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_non_modular_include_in_framework_module_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_non_modular_include_in_module_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_non_pod_varargs_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_non_power_of_two_alignment_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_non_virtual_dtor_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_nrvo_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_nsconsumed_mismatch_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_nsreturns_mismatch_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_ns_object_attribute_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_nullability_completeness_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_nullability_completeness_on_arrays_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_nullability_declspec_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_nullability_extension_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_nullability_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_nullability_inferred_on_nested_type_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_nullable_to_nonnull_conversion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_null_arithmetic_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_null_character_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_null_conversion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_null_dereference_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_null_pointer_arithmetic_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_null_pointer_subtraction_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_nvcc_compat_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_octal_prefix_extension_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_odr_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_old_style_cast_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_openacc_cache_var_inside_loop_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_openacc_confusing_routine_name_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_openacc_deprecated_clause_alias_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_openacc_self_if_potential_conflict_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_opencl_unsupported_rgba_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_openmp51_extensions_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_openmp_clauses_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_openmp_extensions_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_openmp_future_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_openmp_loop_form_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_openmp_mapping_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_openmp_target_exception_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_openmp_target_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_option_ignored_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_ordered_compare_function_pointers_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_out_of_line_declaration_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_out_of_scope_function_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_overlength_strings_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_overloaded_shift_op_parentheses_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_overloaded_virtual_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_override_init_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_override_module_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_overriding_deployment_version_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_overriding_method_mismatch_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_overriding_option_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_over_aligned_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_packed_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_packed_non_pod_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_padded_bitfield_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_padded_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_parentheses_equality_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_parentheses_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_pass_failed_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_pch_date_time_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_pedantic_core_features_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_pedantic_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_pedantic_macros_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_perf_constraint_implies_noexcept_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_pessimizing_move_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_pointer_arith_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_pointer_bool_conversion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_pointer_compare_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_pointer_integer_compare_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_pointer_sign_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_pointer_to_enum_cast_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_pointer_to_int_cast_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_pointer_type_mismatch_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_poison_system_directories_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_potentially_evaluated_expression_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_pragmas_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_pragma_clang_attribute_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_pragma_messages_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_pragma_once_outside_header_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_pragma_pack_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_pragma_pack_suspicious_include_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_pragma_system_header_outside_header_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_predefined_identifier_outside_function_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_preferred_type_bitfield_enum_conversion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_pre_c11_compat_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_pre_c11_compat_pedantic_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_pre_c23_compat_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_pre_c23_compat_pedantic_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_pre_c2x_compat_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_pre_c2x_compat_pedantic_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_pre_c2y_compat_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_pre_c2y_compat_pedantic_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_pre_cpp14_compat_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_pre_cpp14_compat_pedantic_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_pre_cpp17_compat_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_pre_cpp17_compat_pedantic_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_pre_cpp20_compat_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_pre_cpp20_compat_pedantic_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_pre_cpp23_compat_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_pre_cpp23_compat_pedantic_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_pre_cpp26_compat_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_pre_cpp26_compat_pedantic_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_pre_cpp2c_compat_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_pre_cpp2c_compat_pedantic_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_pre_openmp51_compat_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_private_extern_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_private_header_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_private_module_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_profile_instr_missing_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_profile_instr_out_of_date_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_profile_instr_unprofiled_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_property_access_dot_syntax_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_property_attribute_mismatch_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_protocol_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_protocol_property_synthesis_ambiguity_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_psabi_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_ptrauth_null_pointers_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_qualified_void_return_type_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_quoted_include_in_framework_header_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_range_loop_analysis_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_range_loop_bind_reference_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_range_loop_construct_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_readonly_iboutlet_property_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_read_only_types_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_receiver_expr_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_receiver_forward_class_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_redeclared_class_member_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_redundant_attribute_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_redundant_consteval_if_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_redundant_move_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_redundant_parens_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_register_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_reinterpret_base_class_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_reorder_ctor_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_reorder_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_reorder_init_list_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_requires_super_attribute_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_reserved_attribute_identifier_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_reserved_identifier_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_reserved_id_macro_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_reserved_macro_identifier_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_reserved_module_identifier_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_reserved_user_defined_literal_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_restrict_expansion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_retained_language_linkage_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_return_local_addr_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_return_mismatch_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_return_stack_address_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_return_std_move_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_return_type_c_linkage_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_return_type_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_rewrite_not_bool_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_sarif_format_unstable_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_section_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_selector_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_selector_type_mismatch_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_self_assign_field_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_self_assign_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_self_assign_overloaded_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_self_move_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_semicolon_before_method_body_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_sentinel_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_serialized_diagnostics_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_shadow_field_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_shadow_field_in_constructor_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_shadow_field_in_constructor_modified_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_shadow_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_shadow_ivar_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_shadow_uncaptured_local_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_shift_bool_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_shift_count_negative_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_shift_count_overflow_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_shift_negative_value_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_shift_op_parentheses_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_shift_overflow_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_shift_sign_overflow_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_shorten64_to32_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_signed_enum_bitfield_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_signed_unsigned_wchar_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_sign_compare_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_sign_conversion_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_single_bit_bitfield_constant_conversion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_sizeof_array_argument_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_sizeof_array_decay_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_sizeof_array_div_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_sizeof_pointer_div_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_sizeof_pointer_memaccess_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_slash_u_filename_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_slh_asm_goto_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_sometimes_uninitialized_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_source_uses_openacc_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_source_uses_openmp_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_spirv_compat_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_spir_compat_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_static_float_init_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_static_inline_explicit_instantiation_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_static_in_inline_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_static_local_in_inline_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_static_self_init_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_stdlibcxx_not_found_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_strict_primary_template_shadow_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_strict_prototypes_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_strict_selector_match_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_string_compare_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_string_concatenation_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_string_conversion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_string_plus_char_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_string_plus_int_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_strlcpy_strlcat_size_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_strncat_size_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_suggest_destructor_override_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_suggest_override_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_super_class_method_mismatch_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_suspicious_bzero_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_switch_bool_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_switch_default_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_switch_enum_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_switch_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_sync_alignment_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_sync_fetch_and_nand_semantics_changed_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_target_clones_mixed_specifiers_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_tautological_bitwise_compare_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_tautological_compare_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_tautological_constant_compare_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_tautological_constant_in_range_compare_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_tautological_constant_out_of_range_compare_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_tautological_negation_compare_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_tautological_objc_bool_compare_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_tautological_overlap_compare_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_tautological_pointer_compare_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_tautological_type_limit_compare_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_tautological_undefined_compare_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_tautological_unsigned_char_zero_compare_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_tautological_unsigned_enum_zero_compare_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_tautological_unsigned_zero_compare_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_tautological_value_range_compare_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_template_in_declaration_name_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_tentative_definition_array_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_tentative_definition_compat_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_tentative_definition_incomplete_type_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_thread_safety_analysis_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_thread_safety_attributes_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_thread_safety_beta_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_thread_safety_negative_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_thread_safety_pointer_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_thread_safety_precise_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_thread_safety_reference_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_thread_safety_reference_return_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_thread_safety_verbose_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_trigraphs_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_typedef_redefinition_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_typename_missing_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_type_safety_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unable_to_open_stats_file_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unaligned_access_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unaligned_qualifier_implicit_cast_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unavailable_declarations_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_undeclared_selector_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_undefined_arm_za_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_undefined_arm_zt0_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_undefined_bool_conversion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_undefined_func_template_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_undefined_inline_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_undefined_internal_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_undefined_internal_type_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_undefined_reinterpret_cast_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_undefined_var_template_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_undef_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_undef_prefix_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_undef_true_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_underaligned_exception_object_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_underlying_atomic_qualifier_ignored_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_underlying_cv_qualifier_ignored_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unevaluated_expression_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unguarded_availability_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unguarded_availability_new_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unicode_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unicode_homoglyph_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unicode_whitespace_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unicode_zero_width_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_uninitialized_const_pointer_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_uninitialized_const_reference_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_uninitialized_explicit_init_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_uninitialized_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unique_object_duplication_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unknown_acc_extension_clause_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unknown_argument_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unknown_attributes_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_unknown_cuda_version_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_unknown_directives_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unknown_escape_sequence_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unknown_pragmas_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_unknown_sanitizers_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unknown_warning_option_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unnamed_type_template_args_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unnecessary_virtual_specifier_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unneeded_internal_declaration_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_unneeded_member_function_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unqualified_std_cast_call_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unreachable_code_break_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unreachable_code_fallthrough_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unreachable_code_generic_assoc_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unreachable_code_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unreachable_code_loop_increment_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unreachable_code_return_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unsafe_buffer_usage_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_unsafe_buffer_usage_in_container_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_unsafe_buffer_usage_in_libc_call_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_unsequenced_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unsupported_abi_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unsupported_abs_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unsupported_availability_guard_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unsupported_cb_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unsupported_dll_base_class_template_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unsupported_friend_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unsupported_gpopt_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unsupported_nan_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unsupported_target_opt_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_unsupported_visibility_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unterminated_string_initialization_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unusable_partial_specialization_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unused_but_set_parameter_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_unused_but_set_variable_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_unused_comparison_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unused_const_variable_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unused_exception_parameter_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unused_function_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unused_getter_return_value_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unused_label_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unused_lambda_capture_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_unused_local_typedef_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_unused_macros_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unused_member_function_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unused_parameter_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_unused_private_field_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unused_property_ivar_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unused_result_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_unused_template_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_unused_value_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_unused_variable_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_unused_volatile_lvalue_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_used_but_marked_unused_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_user_defined_literals_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_user_defined_warnings_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_varargs_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_variadic_macros_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_variadic_macro_arguments_omitted_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_vector_conversion_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_vec_elem_size_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_vexing_parse_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_visibility_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_vla_cxx_extension_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_vla_extension_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_vla_extension_static_assert_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_vla_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_void_pointer_to_enum_cast_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_void_pointer_to_int_cast_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_void_ptr_dereference_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_warnings_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_warning_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_wasm_exception_spec_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_weak_template_vtables_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_weak_vtables_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_writable_strings_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_xor_used_as_pow_highlighting = warning +resharper_cpp_clang_tidy_clang_diagnostic_zero_as_null_pointer_constant_highlighting = none +resharper_cpp_clang_tidy_clang_diagnostic_zero_length_array_highlighting = warning +resharper_cpp_clang_tidy_concurrency_mt_unsafe_highlighting = warning +resharper_cpp_clang_tidy_concurrency_thread_canceltype_asynchronous_highlighting = warning +resharper_cpp_clang_tidy_cppcoreguidelines_avoid_capturing_lambda_coroutines_highlighting = warning +resharper_cpp_clang_tidy_cppcoreguidelines_avoid_const_or_ref_data_members_highlighting = warning +resharper_cpp_clang_tidy_cppcoreguidelines_avoid_c_arrays_highlighting = none +resharper_cpp_clang_tidy_cppcoreguidelines_avoid_do_while_highlighting = none +resharper_cpp_clang_tidy_cppcoreguidelines_avoid_goto_highlighting = warning +resharper_cpp_clang_tidy_cppcoreguidelines_avoid_magic_numbers_highlighting = none +resharper_cpp_clang_tidy_cppcoreguidelines_avoid_non_const_global_variables_highlighting = none +resharper_cpp_clang_tidy_cppcoreguidelines_avoid_reference_coroutine_parameters_highlighting = none +resharper_cpp_clang_tidy_cppcoreguidelines_c_copy_assignment_signature_highlighting = none +resharper_cpp_clang_tidy_cppcoreguidelines_explicit_virtual_functions_highlighting = none +resharper_cpp_clang_tidy_cppcoreguidelines_init_variables_highlighting = none +resharper_cpp_clang_tidy_cppcoreguidelines_interfaces_global_init_highlighting = warning +resharper_cpp_clang_tidy_cppcoreguidelines_macro_to_enum_highlighting = none +resharper_cpp_clang_tidy_cppcoreguidelines_macro_usage_highlighting = none +resharper_cpp_clang_tidy_cppcoreguidelines_misleading_capture_default_by_value_highlighting = warning +resharper_cpp_clang_tidy_cppcoreguidelines_missing_std_forward_highlighting = warning +resharper_cpp_clang_tidy_cppcoreguidelines_narrowing_conversions_highlighting = warning +resharper_cpp_clang_tidy_cppcoreguidelines_noexcept_destructor_highlighting = warning +resharper_cpp_clang_tidy_cppcoreguidelines_noexcept_move_operations_highlighting = warning +resharper_cpp_clang_tidy_cppcoreguidelines_noexcept_swap_highlighting = warning +resharper_cpp_clang_tidy_cppcoreguidelines_non_private_member_variables_in_classes_highlighting = none +resharper_cpp_clang_tidy_cppcoreguidelines_no_malloc_highlighting = none +resharper_cpp_clang_tidy_cppcoreguidelines_no_suspend_with_lock_highlighting = warning +resharper_cpp_clang_tidy_cppcoreguidelines_owning_memory_highlighting = none +resharper_cpp_clang_tidy_cppcoreguidelines_prefer_member_initializer_highlighting = none +resharper_cpp_clang_tidy_cppcoreguidelines_pro_bounds_array_to_pointer_decay_highlighting = none +resharper_cpp_clang_tidy_cppcoreguidelines_pro_bounds_constant_array_index_highlighting = none +resharper_cpp_clang_tidy_cppcoreguidelines_pro_bounds_pointer_arithmetic_highlighting = none +resharper_cpp_clang_tidy_cppcoreguidelines_pro_type_const_cast_highlighting = none +resharper_cpp_clang_tidy_cppcoreguidelines_pro_type_cstyle_cast_highlighting = none +resharper_cpp_clang_tidy_cppcoreguidelines_pro_type_member_init_highlighting = none +resharper_cpp_clang_tidy_cppcoreguidelines_pro_type_reinterpret_cast_highlighting = none +resharper_cpp_clang_tidy_cppcoreguidelines_pro_type_static_cast_downcast_highlighting = suggestion +resharper_cpp_clang_tidy_cppcoreguidelines_pro_type_union_access_highlighting = none +resharper_cpp_clang_tidy_cppcoreguidelines_pro_type_vararg_highlighting = none +resharper_cpp_clang_tidy_cppcoreguidelines_rvalue_reference_param_not_moved_highlighting = warning +resharper_cpp_clang_tidy_cppcoreguidelines_slicing_highlighting = none +resharper_cpp_clang_tidy_cppcoreguidelines_special_member_functions_highlighting = suggestion +resharper_cpp_clang_tidy_cppcoreguidelines_use_default_member_init_highlighting = none +resharper_cpp_clang_tidy_cppcoreguidelines_use_enum_class_highlighting = none +resharper_cpp_clang_tidy_cppcoreguidelines_virtual_class_destructor_highlighting = none +resharper_cpp_clang_tidy_darwin_avoid_spinlock_highlighting = none +resharper_cpp_clang_tidy_darwin_dispatch_once_nonstatic_highlighting = none +resharper_cpp_clang_tidy_fuchsia_default_arguments_calls_highlighting = none +resharper_cpp_clang_tidy_fuchsia_default_arguments_declarations_highlighting = none +resharper_cpp_clang_tidy_fuchsia_header_anon_namespaces_highlighting = none +resharper_cpp_clang_tidy_fuchsia_multiple_inheritance_highlighting = none +resharper_cpp_clang_tidy_fuchsia_overloaded_operator_highlighting = none +resharper_cpp_clang_tidy_fuchsia_statically_constructed_objects_highlighting = none +resharper_cpp_clang_tidy_fuchsia_trailing_return_highlighting = none +resharper_cpp_clang_tidy_fuchsia_virtual_inheritance_highlighting = none +resharper_cpp_clang_tidy_google_build_explicit_make_pair_highlighting = none +resharper_cpp_clang_tidy_google_build_namespaces_highlighting = none +resharper_cpp_clang_tidy_google_build_using_namespace_highlighting = none +resharper_cpp_clang_tidy_google_default_arguments_highlighting = none +resharper_cpp_clang_tidy_google_explicit_constructor_highlighting = none +resharper_cpp_clang_tidy_google_global_names_in_headers_highlighting = none +resharper_cpp_clang_tidy_google_objc_avoid_nsobject_new_highlighting = none +resharper_cpp_clang_tidy_google_objc_avoid_throwing_exception_highlighting = none +resharper_cpp_clang_tidy_google_objc_function_naming_highlighting = none +resharper_cpp_clang_tidy_google_objc_global_variable_declaration_highlighting = none +resharper_cpp_clang_tidy_google_readability_avoid_underscore_in_googletest_name_highlighting = none +resharper_cpp_clang_tidy_google_readability_braces_around_statements_highlighting = none +resharper_cpp_clang_tidy_google_readability_casting_highlighting = none +resharper_cpp_clang_tidy_google_readability_function_size_highlighting = none +resharper_cpp_clang_tidy_google_readability_namespace_comments_highlighting = none +resharper_cpp_clang_tidy_google_readability_todo_highlighting = none +resharper_cpp_clang_tidy_google_runtime_int_highlighting = none +resharper_cpp_clang_tidy_google_runtime_operator_highlighting = warning +resharper_cpp_clang_tidy_google_upgrade_googletest_case_highlighting = suggestion +resharper_cpp_clang_tidy_hicpp_avoid_c_arrays_highlighting = none +resharper_cpp_clang_tidy_hicpp_avoid_goto_highlighting = warning +resharper_cpp_clang_tidy_hicpp_braces_around_statements_highlighting = none +resharper_cpp_clang_tidy_hicpp_deprecated_headers_highlighting = none +resharper_cpp_clang_tidy_hicpp_exception_baseclass_highlighting = suggestion +resharper_cpp_clang_tidy_hicpp_explicit_conversions_highlighting = none +resharper_cpp_clang_tidy_hicpp_function_size_highlighting = none +resharper_cpp_clang_tidy_hicpp_ignored_remove_result_highlighting = warning +resharper_cpp_clang_tidy_hicpp_invalid_access_moved_highlighting = none +resharper_cpp_clang_tidy_hicpp_member_init_highlighting = none +resharper_cpp_clang_tidy_hicpp_move_const_arg_highlighting = none +resharper_cpp_clang_tidy_hicpp_multiway_paths_covered_highlighting = warning +resharper_cpp_clang_tidy_hicpp_named_parameter_highlighting = none +resharper_cpp_clang_tidy_hicpp_new_delete_operators_highlighting = none +resharper_cpp_clang_tidy_hicpp_noexcept_move_highlighting = none +resharper_cpp_clang_tidy_hicpp_no_array_decay_highlighting = none +resharper_cpp_clang_tidy_hicpp_no_assembler_highlighting = none +resharper_cpp_clang_tidy_hicpp_no_malloc_highlighting = none +resharper_cpp_clang_tidy_hicpp_signed_bitwise_highlighting = none +resharper_cpp_clang_tidy_hicpp_special_member_functions_highlighting = none +resharper_cpp_clang_tidy_hicpp_static_assert_highlighting = none +resharper_cpp_clang_tidy_hicpp_undelegated_constructor_highlighting = none +resharper_cpp_clang_tidy_hicpp_uppercase_literal_suffix_highlighting = none +resharper_cpp_clang_tidy_hicpp_use_auto_highlighting = none +resharper_cpp_clang_tidy_hicpp_use_emplace_highlighting = none +resharper_cpp_clang_tidy_hicpp_use_equals_default_highlighting = none +resharper_cpp_clang_tidy_hicpp_use_equals_delete_highlighting = none +resharper_cpp_clang_tidy_hicpp_use_noexcept_highlighting = none +resharper_cpp_clang_tidy_hicpp_use_nullptr_highlighting = none +resharper_cpp_clang_tidy_hicpp_use_override_highlighting = none +resharper_cpp_clang_tidy_hicpp_vararg_highlighting = none +resharper_cpp_clang_tidy_highlighting_highlighting = suggestion +resharper_cpp_clang_tidy_linuxkernel_must_check_errs_highlighting = warning +resharper_cpp_clang_tidy_llvmlibc_callee_namespace_highlighting = none +resharper_cpp_clang_tidy_llvmlibc_implementation_in_namespace_highlighting = none +resharper_cpp_clang_tidy_llvmlibc_inline_function_decl_highlighting = none +resharper_cpp_clang_tidy_llvmlibc_restrict_system_libc_headers_highlighting = none +resharper_cpp_clang_tidy_llvm_else_after_return_highlighting = none +resharper_cpp_clang_tidy_llvm_header_guard_highlighting = none +resharper_cpp_clang_tidy_llvm_include_order_highlighting = none +resharper_cpp_clang_tidy_llvm_namespace_comment_highlighting = none +resharper_cpp_clang_tidy_llvm_prefer_isa_or_dyn_cast_in_conditionals_highlighting = none +resharper_cpp_clang_tidy_llvm_prefer_register_over_unsigned_highlighting = suggestion +resharper_cpp_clang_tidy_llvm_prefer_static_over_anonymous_namespace_highlighting = none +resharper_cpp_clang_tidy_llvm_qualified_auto_highlighting = none +resharper_cpp_clang_tidy_llvm_twine_local_highlighting = none +resharper_cpp_clang_tidy_misc_confusable_identifiers_highlighting = warning +resharper_cpp_clang_tidy_misc_const_correctness_highlighting = none +resharper_cpp_clang_tidy_misc_coroutine_hostile_raii_highlighting = warning +resharper_cpp_clang_tidy_misc_definitions_in_headers_highlighting = none +resharper_cpp_clang_tidy_misc_header_include_cycle_highlighting = warning +resharper_cpp_clang_tidy_misc_include_cleaner_highlighting = none +resharper_cpp_clang_tidy_misc_misleading_bidirectional_highlighting = warning +resharper_cpp_clang_tidy_misc_misleading_identifier_highlighting = warning +resharper_cpp_clang_tidy_misc_misplaced_const_highlighting = none +resharper_cpp_clang_tidy_misc_new_delete_overloads_highlighting = warning +resharper_cpp_clang_tidy_misc_non_copyable_objects_highlighting = warning +resharper_cpp_clang_tidy_misc_non_private_member_variables_in_classes_highlighting = none +resharper_cpp_clang_tidy_misc_no_recursion_highlighting = none +resharper_cpp_clang_tidy_misc_redundant_expression_highlighting = warning +resharper_cpp_clang_tidy_misc_static_assert_highlighting = suggestion +resharper_cpp_clang_tidy_misc_throw_by_value_catch_by_reference_highlighting = warning +resharper_cpp_clang_tidy_misc_unconventional_assign_operator_highlighting = warning +resharper_cpp_clang_tidy_misc_uniqueptr_reset_release_highlighting = suggestion +resharper_cpp_clang_tidy_misc_unused_alias_decls_highlighting = suggestion +resharper_cpp_clang_tidy_misc_unused_parameters_highlighting = none +resharper_cpp_clang_tidy_misc_unused_using_decls_highlighting = suggestion +resharper_cpp_clang_tidy_misc_use_anonymous_namespace_highlighting = suggestion +resharper_cpp_clang_tidy_misc_use_internal_linkage_highlighting = suggestion +resharper_cpp_clang_tidy_modernize_avoid_bind_highlighting = suggestion +resharper_cpp_clang_tidy_modernize_avoid_c_arrays_highlighting = none +resharper_cpp_clang_tidy_modernize_concat_nested_namespaces_highlighting = none +resharper_cpp_clang_tidy_modernize_deprecated_headers_highlighting = suggestion +resharper_cpp_clang_tidy_modernize_deprecated_ios_base_aliases_highlighting = warning +resharper_cpp_clang_tidy_modernize_loop_convert_highlighting = suggestion +resharper_cpp_clang_tidy_modernize_macro_to_enum_highlighting = suggestion +resharper_cpp_clang_tidy_modernize_make_shared_highlighting = none +resharper_cpp_clang_tidy_modernize_make_unique_highlighting = none +resharper_cpp_clang_tidy_modernize_min_max_use_initializer_list_highlighting = suggestion +resharper_cpp_clang_tidy_modernize_pass_by_value_highlighting = suggestion +resharper_cpp_clang_tidy_modernize_raw_string_literal_highlighting = suggestion +resharper_cpp_clang_tidy_modernize_redundant_void_arg_highlighting = none +resharper_cpp_clang_tidy_modernize_replace_auto_ptr_highlighting = suggestion +resharper_cpp_clang_tidy_modernize_replace_disallow_copy_and_assign_macro_highlighting = suggestion +resharper_cpp_clang_tidy_modernize_replace_random_shuffle_highlighting = suggestion +resharper_cpp_clang_tidy_modernize_return_braced_init_list_highlighting = suggestion +resharper_cpp_clang_tidy_modernize_shrink_to_fit_highlighting = suggestion +resharper_cpp_clang_tidy_modernize_type_traits_highlighting = none +resharper_cpp_clang_tidy_modernize_unary_static_assert_highlighting = suggestion +resharper_cpp_clang_tidy_modernize_use_auto_highlighting = none +resharper_cpp_clang_tidy_modernize_use_bool_literals_highlighting = suggestion +resharper_cpp_clang_tidy_modernize_use_constraints_highlighting = suggestion +resharper_cpp_clang_tidy_modernize_use_default_member_init_highlighting = none +resharper_cpp_clang_tidy_modernize_use_designated_initializers_highlighting = suggestion +resharper_cpp_clang_tidy_modernize_use_emplace_highlighting = suggestion +resharper_cpp_clang_tidy_modernize_use_equals_default_highlighting = suggestion +resharper_cpp_clang_tidy_modernize_use_equals_delete_highlighting = suggestion +resharper_cpp_clang_tidy_modernize_use_integer_sign_comparison_highlighting = suggestion +resharper_cpp_clang_tidy_modernize_use_nodiscard_highlighting = hint +resharper_cpp_clang_tidy_modernize_use_noexcept_highlighting = suggestion +resharper_cpp_clang_tidy_modernize_use_nullptr_highlighting = none +resharper_cpp_clang_tidy_modernize_use_override_highlighting = none +resharper_cpp_clang_tidy_modernize_use_ranges_highlighting = suggestion +resharper_cpp_clang_tidy_modernize_use_scoped_lock_highlighting = suggestion +resharper_cpp_clang_tidy_modernize_use_starts_ends_with_highlighting = suggestion +resharper_cpp_clang_tidy_modernize_use_std_format_highlighting = suggestion +resharper_cpp_clang_tidy_modernize_use_std_numbers_highlighting = suggestion +resharper_cpp_clang_tidy_modernize_use_std_print_highlighting = suggestion +resharper_cpp_clang_tidy_modernize_use_trailing_return_type_highlighting = none +resharper_cpp_clang_tidy_modernize_use_transparent_functors_highlighting = suggestion +resharper_cpp_clang_tidy_modernize_use_uncaught_exceptions_highlighting = warning +resharper_cpp_clang_tidy_modernize_use_using_highlighting = none +resharper_cpp_clang_tidy_mpi_buffer_deref_highlighting = warning +resharper_cpp_clang_tidy_mpi_type_mismatch_highlighting = warning +resharper_cpp_clang_tidy_objc_assert_equals_highlighting = warning +resharper_cpp_clang_tidy_objc_avoid_nserror_init_highlighting = warning +resharper_cpp_clang_tidy_objc_dealloc_in_category_highlighting = warning +resharper_cpp_clang_tidy_objc_forbidden_subclassing_highlighting = warning +resharper_cpp_clang_tidy_objc_missing_hash_highlighting = warning +resharper_cpp_clang_tidy_objc_nsdate_formatter_highlighting = none +resharper_cpp_clang_tidy_objc_nsinvocation_argument_lifetime_highlighting = warning +resharper_cpp_clang_tidy_objc_property_declaration_highlighting = warning +resharper_cpp_clang_tidy_objc_super_self_highlighting = warning +resharper_cpp_clang_tidy_openmp_exception_escape_highlighting = warning +resharper_cpp_clang_tidy_openmp_use_default_none_highlighting = warning +resharper_cpp_clang_tidy_performance_avoid_endl_highlighting = warning +resharper_cpp_clang_tidy_performance_enum_size_highlighting = suggestion +resharper_cpp_clang_tidy_performance_faster_string_find_highlighting = suggestion +resharper_cpp_clang_tidy_performance_for_range_copy_highlighting = suggestion +resharper_cpp_clang_tidy_performance_implicit_conversion_in_loop_highlighting = suggestion +resharper_cpp_clang_tidy_performance_inefficient_algorithm_highlighting = suggestion +resharper_cpp_clang_tidy_performance_inefficient_string_concatenation_highlighting = suggestion +resharper_cpp_clang_tidy_performance_inefficient_vector_operation_highlighting = suggestion +resharper_cpp_clang_tidy_performance_move_constructor_init_highlighting = warning +resharper_cpp_clang_tidy_performance_move_const_arg_highlighting = suggestion +resharper_cpp_clang_tidy_performance_noexcept_destructor_highlighting = warning +resharper_cpp_clang_tidy_performance_noexcept_move_constructor_highlighting = warning +resharper_cpp_clang_tidy_performance_noexcept_swap_highlighting = warning +resharper_cpp_clang_tidy_performance_no_automatic_move_highlighting = warning +resharper_cpp_clang_tidy_performance_no_int_to_ptr_highlighting = warning +resharper_cpp_clang_tidy_performance_trivially_destructible_highlighting = suggestion +resharper_cpp_clang_tidy_performance_type_promotion_in_math_fn_highlighting = suggestion +resharper_cpp_clang_tidy_performance_unnecessary_copy_initialization_highlighting = suggestion +resharper_cpp_clang_tidy_performance_unnecessary_value_param_highlighting = suggestion +resharper_cpp_clang_tidy_portability_avoid_pragma_once_highlighting = none +resharper_cpp_clang_tidy_portability_restrict_system_includes_highlighting = none +resharper_cpp_clang_tidy_portability_simd_intrinsics_highlighting = none +resharper_cpp_clang_tidy_portability_std_allocator_const_highlighting = warning +resharper_cpp_clang_tidy_portability_template_virtual_member_function_highlighting = warning +resharper_cpp_clang_tidy_readability_ambiguous_smartptr_reset_call_highlighting = suggestion +resharper_cpp_clang_tidy_readability_avoid_const_params_in_decls_highlighting = none +resharper_cpp_clang_tidy_readability_avoid_nested_conditional_operator_highlighting = none +resharper_cpp_clang_tidy_readability_avoid_return_with_void_value_highlighting = none +resharper_cpp_clang_tidy_readability_avoid_unconditional_preprocessor_if_highlighting = warning +resharper_cpp_clang_tidy_readability_braces_around_statements_highlighting = none +resharper_cpp_clang_tidy_readability_const_return_type_highlighting = none +resharper_cpp_clang_tidy_readability_container_contains_highlighting = none +resharper_cpp_clang_tidy_readability_container_data_pointer_highlighting = suggestion +resharper_cpp_clang_tidy_readability_container_size_empty_highlighting = suggestion +resharper_cpp_clang_tidy_readability_convert_member_functions_to_static_highlighting = none +resharper_cpp_clang_tidy_readability_delete_null_pointer_highlighting = suggestion +resharper_cpp_clang_tidy_readability_duplicate_include_highlighting = none +resharper_cpp_clang_tidy_readability_else_after_return_highlighting = none +resharper_cpp_clang_tidy_readability_enum_initial_value_highlighting = suggestion +resharper_cpp_clang_tidy_readability_function_cognitive_complexity_highlighting = none +resharper_cpp_clang_tidy_readability_function_size_highlighting = none +resharper_cpp_clang_tidy_readability_identifier_length_highlighting = none +resharper_cpp_clang_tidy_readability_identifier_naming_highlighting = none +resharper_cpp_clang_tidy_readability_implicit_bool_conversion_highlighting = none +resharper_cpp_clang_tidy_readability_inconsistent_declaration_parameter_name_highlighting = suggestion +resharper_cpp_clang_tidy_readability_isolate_declaration_highlighting = none +resharper_cpp_clang_tidy_readability_magic_numbers_highlighting = none +resharper_cpp_clang_tidy_readability_make_member_function_const_highlighting = none +resharper_cpp_clang_tidy_readability_math_missing_parentheses_highlighting = none +resharper_cpp_clang_tidy_readability_misleading_indentation_highlighting = none +resharper_cpp_clang_tidy_readability_misplaced_array_index_highlighting = suggestion +resharper_cpp_clang_tidy_readability_named_parameter_highlighting = none +resharper_cpp_clang_tidy_readability_non_const_parameter_highlighting = none +resharper_cpp_clang_tidy_readability_operators_representation_highlighting = suggestion +resharper_cpp_clang_tidy_readability_qualified_auto_highlighting = none +resharper_cpp_clang_tidy_readability_redundant_access_specifiers_highlighting = none +resharper_cpp_clang_tidy_readability_redundant_casting_highlighting = none +resharper_cpp_clang_tidy_readability_redundant_control_flow_highlighting = none +resharper_cpp_clang_tidy_readability_redundant_declaration_highlighting = suggestion +resharper_cpp_clang_tidy_readability_redundant_function_ptr_dereference_highlighting = suggestion +resharper_cpp_clang_tidy_readability_redundant_inline_specifier_highlighting = none +resharper_cpp_clang_tidy_readability_redundant_member_init_highlighting = none +resharper_cpp_clang_tidy_readability_redundant_preprocessor_highlighting = warning +resharper_cpp_clang_tidy_readability_redundant_smartptr_get_highlighting = suggestion +resharper_cpp_clang_tidy_readability_redundant_string_cstr_highlighting = suggestion +resharper_cpp_clang_tidy_readability_redundant_string_init_highlighting = suggestion +resharper_cpp_clang_tidy_readability_reference_to_constructed_temporary_highlighting = suggestion +resharper_cpp_clang_tidy_readability_simplify_boolean_expr_highlighting = none +resharper_cpp_clang_tidy_readability_simplify_subscript_expr_highlighting = warning +resharper_cpp_clang_tidy_readability_static_accessed_through_instance_highlighting = suggestion +resharper_cpp_clang_tidy_readability_static_definition_in_anonymous_namespace_highlighting = none +resharper_cpp_clang_tidy_readability_string_compare_highlighting = warning +resharper_cpp_clang_tidy_readability_suspicious_call_argument_highlighting = warning +resharper_cpp_clang_tidy_readability_uniqueptr_delete_release_highlighting = suggestion +resharper_cpp_clang_tidy_readability_uppercase_literal_suffix_highlighting = none +resharper_cpp_clang_tidy_readability_use_anyofallof_highlighting = suggestion +resharper_cpp_clang_tidy_readability_use_concise_preprocessor_directives_highlighting = suggestion +resharper_cpp_clang_tidy_readability_use_std_min_max_highlighting = suggestion +resharper_cpp_clang_tidy_zircon_temporary_objects_highlighting = none +resharper_cpp_class_can_be_final_highlighting = none +resharper_cpp_class_is_incomplete_highlighting = warning +resharper_cpp_class_needs_constructor_because_of_uninitialized_member_highlighting = warning +resharper_cpp_class_never_used_highlighting = warning +resharper_cpp_compile_time_constant_can_be_replaced_with_boolean_constant_highlighting = suggestion +resharper_cpp_concept_never_used_highlighting = warning +resharper_cpp_conditional_expression_can_be_simplified_highlighting = suggestion +resharper_cpp_const_parameter_in_declaration_highlighting = suggestion +resharper_cpp_const_value_function_return_type_highlighting = suggestion +resharper_cpp_coroutine_call_resolve_error_highlighting = warning +resharper_cpp_cv_qualifier_can_not_be_applied_to_reference_highlighting = warning +resharper_cpp_c_style_cast_highlighting = suggestion +resharper_cpp_declaration_hides_local_highlighting = warning +resharper_cpp_declaration_hides_uncaptured_local_highlighting = hint +resharper_cpp_declaration_specifier_without_declarators_highlighting = warning +resharper_cpp_declarator_disambiguated_as_function_highlighting = warning +resharper_cpp_declarator_never_used_highlighting = warning +resharper_cpp_declarator_used_before_initialization_highlighting = error +resharper_cpp_defaulted_special_member_function_is_implicitly_deleted_highlighting = warning +resharper_cpp_default_case_not_handled_in_switch_statement_highlighting = warning +resharper_cpp_default_initialization_with_no_user_constructor_highlighting = warning +resharper_cpp_default_is_used_as_identifier_highlighting = warning +resharper_cpp_definitions_order_highlighting = hint +resharper_cpp_deleting_void_pointer_highlighting = warning +resharper_cpp_dependent_template_without_template_keyword_highlighting = warning +resharper_cpp_dependent_type_without_typename_keyword_highlighting = warning +resharper_cpp_deprecated_entity_highlighting = warning +resharper_cpp_deprecated_overriden_method_highlighting = warning +resharper_cpp_deprecated_register_storage_class_specifier_highlighting = warning +resharper_cpp_dereference_operator_limit_exceeded_highlighting = warning +resharper_cpp_discarded_postfix_operator_result_highlighting = suggestion +resharper_cpp_doxygen_syntax_error_highlighting = warning +resharper_cpp_doxygen_undocumented_parameter_highlighting = suggestion +resharper_cpp_doxygen_unresolved_reference_highlighting = warning +resharper_cpp_empty_declaration_highlighting = warning +resharper_cpp_enforce_cv_qualifiers_order_highlighting = none +resharper_cpp_enforce_cv_qualifiers_placement_highlighting = none +resharper_cpp_enforce_do_statement_braces_highlighting = none +resharper_cpp_enforce_for_statement_braces_highlighting = none +resharper_cpp_enforce_function_declaration_style_highlighting = none +resharper_cpp_enforce_if_statement_braces_highlighting = none +resharper_cpp_enforce_nested_namespaces_style_highlighting = hint +resharper_cpp_enforce_overriding_destructor_style_highlighting = suggestion +resharper_cpp_enforce_overriding_function_style_highlighting = suggestion +resharper_cpp_enforce_type_alias_code_style_highlighting = none +resharper_cpp_enforce_while_statement_braces_highlighting = none +resharper_cpp_entity_assigned_but_no_read_highlighting = warning +resharper_cpp_entity_used_only_in_unevaluated_context_highlighting = warning +resharper_cpp_enumerator_never_used_highlighting = warning +resharper_cpp_equal_operands_in_binary_expression_highlighting = warning +resharper_cpp_evaluation_failure_highlighting = error +resharper_cpp_evaluation_internal_failure_highlighting = warning +resharper_cpp_explicit_specialization_in_non_namespace_scope_highlighting = warning +resharper_cpp_expression_without_side_effects_highlighting = warning +resharper_cpp_final_function_in_final_class_highlighting = suggestion +resharper_cpp_final_non_overriding_virtual_function_highlighting = suggestion +resharper_cpp_forward_enum_declaration_without_underlying_type_highlighting = warning +resharper_cpp_for_loop_can_be_replaced_with_while_highlighting = suggestion +resharper_cpp_functional_style_cast_highlighting = suggestion +resharper_cpp_function_doesnt_return_value_highlighting = warning +resharper_cpp_function_is_not_implemented_highlighting = warning +resharper_cpp_function_result_should_be_used_highlighting = hint +resharper_cpp_header_has_been_already_included_highlighting = hint +resharper_cpp_hidden_function_highlighting = warning +resharper_cpp_hiding_function_highlighting = warning +resharper_cpp_identical_operands_in_binary_expression_highlighting = warning +resharper_cpp_if_can_be_replaced_by_constexpr_if_highlighting = suggestion +resharper_cpp_implicit_default_constructor_not_available_highlighting = warning +resharper_cpp_incompatible_pointer_conversion_highlighting = warning +resharper_cpp_incomplete_switch_statement_highlighting = warning +resharper_cpp_inconsistent_naming_highlighting = hint +resharper_cpp_incorrect_blank_lines_near_braces_highlighting = none +resharper_cpp_initialized_value_is_always_rewritten_highlighting = warning +resharper_cpp_integral_to_pointer_conversion_highlighting = warning +resharper_cpp_invalid_line_continuation_highlighting = warning +resharper_cpp_join_declaration_and_assignment_highlighting = suggestion +resharper_cpp_lambda_capture_never_used_highlighting = warning +resharper_cpp_local_variable_may_be_const_highlighting = hint +resharper_cpp_local_variable_might_not_be_initialized_highlighting = warning +resharper_cpp_local_variable_with_non_trivial_dtor_is_never_used_highlighting = none +resharper_cpp_long_float_highlighting = warning +resharper_cpp_member_function_may_be_const_highlighting = suggestion +resharper_cpp_member_function_may_be_static_highlighting = suggestion +resharper_cpp_member_initializers_order_highlighting = suggestion +resharper_cpp_mismatched_class_tags_highlighting = warning +resharper_cpp_missing_blank_lines_highlighting = none +resharper_cpp_missing_include_guard_highlighting = warning +resharper_cpp_missing_indent_highlighting = none +resharper_cpp_missing_keyword_throw_highlighting = warning +resharper_cpp_missing_linebreak_highlighting = none +resharper_cpp_missing_space_highlighting = none +resharper_cpp_module_partition_with_several_partition_units_highlighting = warning +resharper_cpp_ms_ext_address_of_class_r_value_highlighting = warning +resharper_cpp_ms_ext_binding_r_value_to_lvalue_reference_highlighting = warning +resharper_cpp_ms_ext_copy_elision_in_copy_init_declarator_highlighting = warning +resharper_cpp_ms_ext_double_user_conversion_in_copy_init_highlighting = warning +resharper_cpp_ms_ext_not_initialized_static_const_local_var_highlighting = warning +resharper_cpp_ms_ext_reinterpret_cast_from_nullptr_highlighting = warning +resharper_cpp_multiple_spaces_highlighting = none +resharper_cpp_multi_character_literal_highlighting = warning +resharper_cpp_multi_character_wide_literal_highlighting = warning +resharper_cpp_must_be_public_virtual_to_implement_interface_highlighting = warning +resharper_cpp_mutable_specifier_on_reference_member_highlighting = warning +resharper_cpp_nodiscard_function_without_return_value_highlighting = warning +resharper_cpp_non_exception_safe_resource_acquisition_highlighting = hint +resharper_cpp_non_explicit_conversion_operator_highlighting = hint +resharper_cpp_non_explicit_converting_constructor_highlighting = hint +resharper_cpp_non_inline_function_definition_in_header_file_highlighting = warning +resharper_cpp_non_inline_variable_definition_in_header_file_highlighting = warning +resharper_cpp_not_all_paths_return_value_highlighting = warning +resharper_cpp_no_discard_expression_highlighting = warning +resharper_cpp_object_member_might_not_be_initialized_highlighting = warning +resharper_cpp_outdent_is_off_prev_level_highlighting = none +resharper_cpp_out_parameter_must_be_written_highlighting = warning +resharper_cpp_parameter_may_be_const_highlighting = hint +resharper_cpp_parameter_may_be_const_ptr_or_ref_highlighting = suggestion +resharper_cpp_parameter_names_mismatch_highlighting = hint +resharper_cpp_parameter_never_used_highlighting = hint +resharper_cpp_parameter_value_is_reassigned_highlighting = warning +resharper_cpp_pass_value_parameter_by_const_reference_highlighting = suggestion +resharper_cpp_pointer_conversion_drops_qualifiers_highlighting = warning +resharper_cpp_pointer_to_integral_conversion_highlighting = warning +resharper_cpp_polymorphic_class_with_non_virtual_public_destructor_highlighting = warning +resharper_cpp_possibly_erroneous_empty_statements_highlighting = warning +resharper_cpp_possibly_uninitialized_member_highlighting = warning +resharper_cpp_possibly_unintended_object_slicing_highlighting = warning +resharper_cpp_precompiled_header_is_not_included_highlighting = error +resharper_cpp_precompiled_header_not_found_highlighting = error +resharper_cpp_printf_bad_format_highlighting = warning +resharper_cpp_printf_extra_arg_highlighting = warning +resharper_cpp_printf_missed_arg_highlighting = error +resharper_cpp_printf_risky_format_highlighting = warning +resharper_cpp_private_special_member_function_is_not_implemented_highlighting = warning +resharper_cpp_range_based_for_incompatible_reference_highlighting = warning +resharper_cpp_redefinition_of_default_argument_in_override_function_highlighting = warning +resharper_cpp_redundant_access_specifier_highlighting = hint +resharper_cpp_redundant_base_class_access_specifier_highlighting = hint +resharper_cpp_redundant_base_class_initializer_highlighting = suggestion +resharper_cpp_redundant_blank_lines_highlighting = none +resharper_cpp_redundant_boolean_expression_argument_highlighting = warning +resharper_cpp_redundant_cast_expression_highlighting = hint +resharper_cpp_redundant_complexity_in_comparison_highlighting = suggestion +resharper_cpp_redundant_conditional_expression_highlighting = suggestion +resharper_cpp_redundant_const_specifier_highlighting = hint +resharper_cpp_redundant_control_flow_jump_highlighting = hint +resharper_cpp_redundant_dereferencing_and_taking_address_highlighting = suggestion +resharper_cpp_redundant_elaborated_type_specifier_highlighting = hint +resharper_cpp_redundant_else_keyword_highlighting = hint +resharper_cpp_redundant_else_keyword_inside_compound_statement_highlighting = hint +resharper_cpp_redundant_empty_declaration_highlighting = hint +resharper_cpp_redundant_empty_statement_highlighting = hint +resharper_cpp_redundant_export_keyword_highlighting = warning +resharper_cpp_redundant_fwd_class_or_enum_specifier_highlighting = suggestion +resharper_cpp_redundant_inline_specifier_highlighting = hint +resharper_cpp_redundant_lambda_parameter_list_highlighting = hint +resharper_cpp_redundant_linebreak_highlighting = none +resharper_cpp_redundant_member_initializer_highlighting = suggestion +resharper_cpp_redundant_namespace_definition_highlighting = suggestion +resharper_cpp_redundant_parentheses_highlighting = hint +resharper_cpp_redundant_qualifier_adl_highlighting = none +resharper_cpp_redundant_qualifier_highlighting = hint +resharper_cpp_redundant_space_highlighting = none +resharper_cpp_redundant_static_specifier_on_member_allocation_function_highlighting = hint +resharper_cpp_redundant_static_specifier_on_thread_local_local_variable_highlighting = hint +resharper_cpp_redundant_template_arguments_highlighting = hint +resharper_cpp_redundant_template_keyword_highlighting = warning +resharper_cpp_redundant_typename_keyword_highlighting = warning +resharper_cpp_redundant_void_argument_list_highlighting = suggestion +resharper_cpp_redundant_zero_initializer_in_aggregate_initialization_highlighting = suggestion +resharper_cpp_reinterpret_cast_from_void_ptr_highlighting = suggestion +resharper_cpp_remove_redundant_braces_highlighting = none +resharper_cpp_replace_memset_with_zero_initialization_highlighting = suggestion +resharper_cpp_replace_tie_with_structured_binding_highlighting = suggestion +resharper_cpp_return_no_value_in_non_void_function_highlighting = warning +resharper_cpp_smart_pointer_vs_make_function_highlighting = suggestion +resharper_cpp_some_object_members_might_not_be_initialized_highlighting = warning +resharper_cpp_special_function_without_noexcept_specification_highlighting = warning +resharper_cpp_static_assert_failure_highlighting = error +resharper_cpp_static_data_member_in_unnamed_struct_highlighting = warning +resharper_cpp_static_specifier_on_anonymous_namespace_member_highlighting = suggestion +resharper_cpp_string_literal_to_char_pointer_conversion_highlighting = warning +resharper_cpp_tabs_and_spaces_mismatch_highlighting = none +resharper_cpp_tabs_are_disallowed_highlighting = none +resharper_cpp_tabs_outside_indent_highlighting = none +resharper_cpp_template_arguments_can_be_deduced_highlighting = hint +resharper_cpp_template_parameter_never_used_highlighting = hint +resharper_cpp_template_parameter_shadowing_highlighting = warning +resharper_cpp_this_arg_member_func_delegate_ctor_is_unsuported_by_dot_net_core_highlighting = none +resharper_cpp_throw_expression_can_be_replaced_with_rethrow_highlighting = warning +resharper_cpp_too_wide_scope_highlighting = suggestion +resharper_cpp_too_wide_scope_init_statement_highlighting = hint +resharper_cpp_type_alias_never_used_highlighting = warning +resharper_cpp_ue4_blueprint_callable_function_may_be_const_highlighting = hint +resharper_cpp_ue4_blueprint_callable_function_may_be_static_highlighting = hint +resharper_cpp_ue4_coding_standard_naming_violation_warning_highlighting = hint +resharper_cpp_ue4_coding_standard_u_class_naming_violation_error_highlighting = error +resharper_cpp_ue4_probable_memory_issues_with_u_objects_in_container_highlighting = warning +resharper_cpp_ue4_probable_memory_issues_with_u_object_highlighting = warning +resharper_cpp_ue_blueprint_callable_function_unused_highlighting = warning +resharper_cpp_ue_blueprint_implementable_event_not_implemented_highlighting = warning +resharper_cpp_ue_incorrect_engine_directory_highlighting = error +resharper_cpp_ue_missing_struct_member_highlighting = error +resharper_cpp_ue_missing_super_call_highlighting = warning +resharper_cpp_ue_non_existent_input_action_highlighting = warning +resharper_cpp_ue_non_existent_input_axis_highlighting = warning +resharper_cpp_ue_source_file_without_predefined_macros_highlighting = warning +resharper_cpp_ue_source_file_without_standard_library_highlighting = error +resharper_cpp_ue_version_file_doesnt_exist_highlighting = error +resharper_cpp_uninitialized_dependent_base_class_highlighting = warning +resharper_cpp_uninitialized_non_static_data_member_highlighting = warning +resharper_cpp_union_member_of_reference_type_highlighting = warning +resharper_cpp_unmatched_pragma_end_region_directive_highlighting = warning +resharper_cpp_unmatched_pragma_region_directive_highlighting = warning +resharper_cpp_unnamed_namespace_in_header_file_highlighting = warning +resharper_cpp_unnecessary_whitespace_highlighting = none +resharper_cpp_unreachable_code_highlighting = warning +resharper_cpp_unsigned_zero_comparison_highlighting = warning +resharper_cpp_unused_include_directive_highlighting = warning +resharper_cpp_user_defined_literal_suffix_does_not_start_with_underscore_highlighting = warning +resharper_cpp_use_algorithm_with_count_highlighting = suggestion +resharper_cpp_use_associative_contains_highlighting = suggestion +resharper_cpp_use_auto_for_numeric_highlighting = hint +resharper_cpp_use_auto_highlighting = hint +resharper_cpp_use_elements_view_highlighting = suggestion +resharper_cpp_use_erase_algorithm_highlighting = suggestion +resharper_cpp_use_familiar_template_syntax_for_generic_lambdas_highlighting = suggestion +resharper_cpp_use_of_undeclared_class_highlighting = hint +resharper_cpp_use_range_algorithm_highlighting = suggestion +resharper_cpp_use_std_size_highlighting = suggestion +resharper_cpp_use_structured_binding_highlighting = hint +resharper_cpp_use_type_trait_alias_highlighting = suggestion +resharper_cpp_using_result_of_assignment_as_condition_highlighting = warning +resharper_cpp_u_function_macro_call_has_no_effect_highlighting = warning +resharper_cpp_u_property_macro_call_has_no_effect_highlighting = warning +resharper_cpp_variable_can_be_made_constexpr_highlighting = suggestion +resharper_cpp_virtual_function_call_inside_ctor_highlighting = warning +resharper_cpp_virtual_function_in_final_class_highlighting = warning +resharper_cpp_volatile_parameter_in_declaration_highlighting = suggestion +resharper_cpp_warning_directive_highlighting = warning +resharper_cpp_wrong_includes_order_highlighting = hint +resharper_cpp_wrong_indent_size_highlighting = none +resharper_cpp_wrong_slashes_in_include_directive_highlighting = hint +resharper_cpp_zero_constant_can_be_replaced_with_nullptr_highlighting = suggestion +resharper_cpp_zero_valued_expression_used_as_null_pointer_highlighting = warning +resharper_cqrs_debug_highlighting = warning +resharper_cqrs_naming_recommendation_highlighting = warning +resharper_c_declaration_with_implicit_int_type_highlighting = warning +resharper_c_sharp14_overload_resolution_with_span_breaking_change_highlighting = suggestion +resharper_c_sharp_build_cs_invalid_module_name_highlighting = warning +resharper_c_sharp_missing_plugin_dependency_highlighting = warning +resharper_default_struct_equality_is_used_global_highlighting = warning +resharper_default_struct_equality_is_used_local_highlighting = warning +resharper_default_value_attribute_for_optional_parameter_highlighting = warning +resharper_dispose_on_using_variable_highlighting = warning +resharper_double_negation_in_pattern_highlighting = suggestion +resharper_double_negation_operator_highlighting = suggestion +resharper_duplicated_chained_if_bodies_highlighting = hint +resharper_duplicated_sequential_if_bodies_highlighting = hint +resharper_duplicated_statements_highlighting = warning +resharper_duplicated_switch_expression_arms_highlighting = hint +resharper_duplicated_switch_section_bodies_highlighting = hint +resharper_duplicate_item_in_logger_template_highlighting = warning +resharper_duplicate_key_collection_initialization_highlighting = warning +resharper_duplicate_resource_highlighting = warning +resharper_empty_constructor_highlighting = warning +resharper_empty_destructor_highlighting = warning +resharper_empty_extension_block_highlighting = warning +resharper_empty_for_statement_highlighting = warning +resharper_empty_general_catch_clause_highlighting = warning +resharper_empty_namespace_highlighting = warning +resharper_empty_region_highlighting = suggestion +resharper_empty_statement_highlighting = warning +resharper_empty_title_tag_highlighting = hint +resharper_enforce_do_while_statement_braces_highlighting = none +resharper_enforce_fixed_statement_braces_highlighting = none +resharper_enforce_foreach_statement_braces_highlighting = none +resharper_enforce_for_statement_braces_highlighting = none +resharper_enforce_if_statement_braces_highlighting = none +resharper_enforce_lock_statement_braces_highlighting = none +resharper_enforce_using_statement_braces_highlighting = none +resharper_enforce_while_statement_braces_highlighting = none +resharper_entity_framework_client_side_db_function_call_highlighting = warning +resharper_entity_framework_model_validation_circular_dependency_highlighting = hint +resharper_entity_framework_model_validation_unlimited_string_length_highlighting = warning +resharper_entity_framework_n_plus_one_incomplete_data_query_highlighting = suggestion +resharper_entity_framework_n_plus_one_incomplete_data_usage_highlighting = warning +resharper_entity_framework_n_plus_one_query_highlighting = suggestion +resharper_entity_framework_n_plus_one_usage_highlighting = warning +resharper_entity_framework_unsupported_server_side_function_call_highlighting = warning +resharper_entity_name_captured_only_global_highlighting = warning +resharper_entity_name_captured_only_local_highlighting = warning +resharper_enumerable_sum_in_explicit_unchecked_context_highlighting = warning +resharper_enum_underlying_type_is_int_highlighting = warning +resharper_equal_expression_comparison_highlighting = warning +resharper_event_never_invoked_global_highlighting = suggestion +resharper_event_never_subscribed_to_global_highlighting = suggestion +resharper_event_never_subscribed_to_local_highlighting = suggestion +resharper_event_unsubscription_via_anonymous_delegate_highlighting = warning +resharper_explicit_caller_info_argument_highlighting = warning +resharper_expression_is_always_null_highlighting = warning +resharper_extract_common_branching_code_highlighting = hint +resharper_extract_common_property_pattern_highlighting = hint +resharper_field_can_be_made_read_only_global_highlighting = suggestion +resharper_field_can_be_made_read_only_local_highlighting = suggestion +resharper_field_hides_interface_property_with_default_implementation_highlighting = warning +resharper_foreach_can_be_converted_to_query_using_another_get_enumerator_highlighting = hint +resharper_foreach_can_be_partly_converted_to_query_using_another_get_enumerator_highlighting = hint +resharper_format_specifier_captures_right_braces_highlighting = warning +resharper_format_string_placeholders_mismatch_highlighting = warning +resharper_format_string_problem_highlighting = warning +resharper_for_can_be_converted_to_foreach_highlighting = suggestion +resharper_for_statement_condition_is_true_highlighting = warning +resharper_function_complexity_overflow_highlighting = none +resharper_function_never_returns_highlighting = warning +resharper_function_recursive_on_all_paths_highlighting = warning +resharper_gc_suppress_finalize_for_type_without_destructor_highlighting = warning +resharper_generic_enumerator_not_disposed_highlighting = warning +resharper_grammar_mistake_in_comment_highlighting = suggestion +resharper_grammar_mistake_in_markup_attribute_highlighting = suggestion +resharper_grammar_mistake_in_markup_text_highlighting = suggestion +resharper_grammar_mistake_in_string_literal_highlighting = none +resharper_heuristic_unreachable_code_highlighting = warning +resharper_html_attributes_quotes_highlighting = hint +resharper_html_attribute_not_resolved_highlighting = warning +resharper_html_attribute_value_not_resolved_highlighting = warning +resharper_html_dead_code_highlighting = warning +resharper_html_event_not_resolved_highlighting = warning +resharper_html_id_duplication_highlighting = warning +resharper_html_id_not_resolved_highlighting = warning +resharper_html_obsolete_highlighting = warning +resharper_html_path_error_highlighting = warning +resharper_html_tag_not_closed_highlighting = error +resharper_html_tag_not_resolved_highlighting = warning +resharper_html_tag_should_be_self_closed_highlighting = warning +resharper_html_tag_should_not_be_self_closed_highlighting = warning +resharper_html_warning_highlighting = warning +resharper_identifier_typo_highlighting = suggestion +resharper_if_std_is_constant_evaluated_can_be_replaced_highlighting = suggestion +resharper_inactive_preprocessor_branch_highlighting = warning +resharper_inconsistently_synchronized_field_highlighting = warning +resharper_inconsistent_naming_highlighting = warning +resharper_inconsistent_order_of_locks_highlighting = warning +resharper_incorrect_blank_lines_near_braces_highlighting = none +resharper_incorrect_constant_expected_annotation_highlighting = error +resharper_indexing_by_invalid_range_highlighting = warning +resharper_inheritdoc_consider_usage_highlighting = none +resharper_inheritdoc_invalid_usage_highlighting = warning +resharper_inline_out_variable_declaration_highlighting = suggestion +resharper_inline_temporary_variable_highlighting = hint +resharper_internal_or_private_member_not_documented_highlighting = none +resharper_interpolated_string_expression_is_not_i_formattable_highlighting = warning +resharper_introduce_optional_parameters_global_highlighting = suggestion +resharper_introduce_optional_parameters_local_highlighting = suggestion +resharper_int_division_by_zero_highlighting = warning +resharper_int_variable_overflow_highlighting = warning +resharper_int_variable_overflow_in_checked_context_highlighting = warning +resharper_int_variable_overflow_in_unchecked_context_highlighting = warning +resharper_invalid_value_type_highlighting = warning +resharper_invalid_xml_doc_comment_highlighting = warning +resharper_invert_condition_1_highlighting = hint +resharper_invert_if_highlighting = hint +resharper_invocation_is_skipped_highlighting = hint +resharper_invoke_as_extension_method_highlighting = suggestion +resharper_in_parameter_with_must_dispose_resource_attribute_highlighting = warning +resharper_is_expression_always_false_highlighting = warning +resharper_is_expression_always_true_highlighting = warning +resharper_iterator_method_result_is_ignored_highlighting = warning +resharper_iterator_never_returns_highlighting = warning +resharper_join_declaration_and_initializer_highlighting = suggestion +resharper_join_null_check_with_usage_highlighting = suggestion +resharper_lambda_expression_can_be_made_static_highlighting = none +resharper_lambda_expression_must_be_static_highlighting = suggestion +resharper_lambda_should_not_capture_context_highlighting = warning +resharper_localizable_element_highlighting = warning +resharper_local_function_can_be_made_static_highlighting = none +resharper_local_function_hides_method_highlighting = warning +resharper_local_variable_hides_member_highlighting = warning +resharper_local_variable_hides_primary_constructor_parameter_highlighting = warning +resharper_long_literal_ending_lower_l_highlighting = warning +resharper_loop_can_be_converted_to_query_highlighting = hint +resharper_loop_can_be_partly_converted_to_query_highlighting = none +resharper_loop_variable_is_never_changed_inside_loop_highlighting = warning +resharper_markup_attribute_typo_highlighting = suggestion +resharper_markup_text_typo_highlighting = suggestion +resharper_math_abs_method_is_redundant_highlighting = warning +resharper_math_clamp_min_greater_than_max_highlighting = warning +resharper_meaningless_default_parameter_value_highlighting = warning +resharper_member_can_be_file_local_highlighting = none +resharper_member_can_be_internal_highlighting = none +resharper_member_can_be_made_static_global_highlighting = hint +resharper_member_can_be_made_static_local_highlighting = hint +resharper_member_can_be_private_global_highlighting = suggestion +resharper_member_can_be_private_local_highlighting = suggestion +resharper_member_can_be_protected_global_highlighting = suggestion +resharper_member_can_be_protected_local_highlighting = suggestion +resharper_member_hides_interface_member_with_default_implementation_highlighting = warning +resharper_member_hides_static_from_outer_class_highlighting = warning +resharper_member_initializer_value_ignored_highlighting = warning +resharper_merge_and_pattern_highlighting = suggestion +resharper_merge_cast_with_type_check_highlighting = suggestion +resharper_merge_conditional_expression_highlighting = suggestion +resharper_merge_into_logical_pattern_highlighting = hint +resharper_merge_into_negated_pattern_highlighting = hint +resharper_merge_into_pattern_highlighting = suggestion +resharper_merge_nested_property_patterns_highlighting = suggestion +resharper_merge_sequential_checks_highlighting = hint +resharper_method_has_async_overload_highlighting = suggestion +resharper_method_has_async_overload_with_cancellation_highlighting = suggestion +resharper_method_overload_with_optional_parameter_highlighting = warning +resharper_method_supports_cancellation_highlighting = suggestion +resharper_misleading_body_like_statement_highlighting = warning +resharper_missing_alt_attribute_in_img_tag_highlighting = hint +resharper_missing_attribute_highlighting = warning +resharper_missing_blank_lines_highlighting = none +resharper_missing_body_tag_highlighting = warning +resharper_missing_head_and_body_tags_highlighting = warning +resharper_missing_head_tag_highlighting = warning +resharper_missing_indent_highlighting = none +resharper_missing_linebreak_highlighting = none +resharper_missing_space_highlighting = none +resharper_more_specific_foreach_variable_type_available_highlighting = suggestion +resharper_move_local_function_after_jump_statement_highlighting = hint +resharper_move_to_existing_positional_deconstruction_pattern_highlighting = hint +resharper_move_to_extension_block_highlighting = hint +resharper_move_variable_declaration_inside_loop_condition_highlighting = suggestion +resharper_ms_builtin_inspection_highlighting = warning +resharper_ms_order_by_inspection_highlighting = error +resharper_multiple_cqrs_entity_highlighting = warning +resharper_multiple_nullable_attributes_usage_highlighting = warning +resharper_multiple_order_by_highlighting = warning +resharper_multiple_output_tags_highlighting = warning +resharper_multiple_resolve_candidates_in_text_highlighting = warning +resharper_multiple_spaces_highlighting = none +resharper_multiple_statements_on_one_line_highlighting = none +resharper_multiple_type_members_on_one_line_highlighting = none +resharper_must_use_return_value_highlighting = warning +resharper_mvc_action_not_resolved_highlighting = error +resharper_mvc_area_not_resolved_highlighting = error +resharper_mvc_controller_not_resolved_highlighting = error +resharper_mvc_invalid_model_type_highlighting = error +resharper_mvc_masterpage_not_resolved_highlighting = error +resharper_mvc_partial_view_not_resolved_highlighting = error +resharper_mvc_template_not_resolved_highlighting = error +resharper_mvc_view_component_not_resolved_highlighting = error +resharper_mvc_view_component_view_not_resolved_highlighting = error +resharper_mvc_view_not_resolved_highlighting = error +resharper_mysql_load_data_path_inspection_highlighting = warning +resharper_mysql_parsing_inspection_highlighting = warning +resharper_mysql_space_after_function_name_inspection_highlighting = error +resharper_negation_of_relational_pattern_highlighting = suggestion +resharper_negative_equality_expression_highlighting = suggestion +resharper_negative_index_highlighting = warning +resharper_nested_string_interpolation_highlighting = suggestion +resharper_non_atomic_compound_operator_highlighting = warning +resharper_non_constant_equality_expression_has_constant_result_highlighting = warning +resharper_non_parsable_element_highlighting = warning +resharper_non_readonly_member_in_get_hash_code_highlighting = warning +resharper_non_volatile_field_in_double_check_locking_highlighting = warning +resharper_not_accessed_field_global_highlighting = suggestion +resharper_not_accessed_field_local_highlighting = warning +resharper_not_accessed_out_parameter_variable_highlighting = warning +resharper_not_accessed_positional_property_global_highlighting = warning +resharper_not_accessed_positional_property_local_highlighting = warning +resharper_not_accessed_variable_highlighting = warning +resharper_not_assigned_out_parameter_highlighting = warning +resharper_not_declared_in_parent_culture_highlighting = warning +resharper_not_disposed_resource_highlighting = warning +resharper_not_disposed_resource_is_returned_by_property_highlighting = warning +resharper_not_disposed_resource_is_returned_highlighting = suggestion +resharper_not_null_or_required_member_is_not_initialized_highlighting = warning +resharper_not_observable_annotation_redundancy_highlighting = warning +resharper_not_overridden_in_specific_culture_highlighting = warning +resharper_not_resolved_in_text_highlighting = warning +resharper_nullable_warning_suppression_is_used_highlighting = none +resharper_nullness_annotation_conflict_with_jet_brains_annotations_highlighting = warning +resharper_null_coalescing_condition_is_always_not_null_according_to_api_contract_highlighting = warning +resharper_n_unit_async_method_must_be_task_highlighting = warning +resharper_n_unit_attribute_produces_too_many_tests_highlighting = none +resharper_n_unit_auto_fixture_incorrect_argument_type_highlighting = warning +resharper_n_unit_auto_fixture_missed_test_attribute_highlighting = warning +resharper_n_unit_auto_fixture_missed_test_or_test_fixture_attribute_highlighting = warning +resharper_n_unit_auto_fixture_redundant_argument_in_inline_auto_data_attribute_highlighting = warning +resharper_n_unit_duplicate_values_highlighting = warning +resharper_n_unit_ignored_parameter_attribute_highlighting = warning +resharper_n_unit_implicit_unspecified_null_values_highlighting = warning +resharper_n_unit_incorrect_argument_type_highlighting = warning +resharper_n_unit_incorrect_expected_result_type_highlighting = warning +resharper_n_unit_incorrect_range_bounds_highlighting = warning +resharper_n_unit_method_with_parameters_and_test_attribute_highlighting = warning +resharper_n_unit_missing_arguments_in_test_case_attribute_highlighting = warning +resharper_n_unit_missing_cancel_after_attribute_highlighting = warning +resharper_n_unit_non_public_method_with_test_attribute_highlighting = warning +resharper_n_unit_no_values_provided_highlighting = warning +resharper_n_unit_parameter_type_is_not_compatible_with_attribute_highlighting = warning +resharper_n_unit_range_attribute_bounds_are_out_of_range_highlighting = warning +resharper_n_unit_range_step_sign_mismatch_highlighting = warning +resharper_n_unit_range_step_value_must_not_be_zero_highlighting = warning +resharper_n_unit_range_to_value_is_not_reachable_highlighting = warning +resharper_n_unit_redundant_argument_instead_of_expected_result_highlighting = warning +resharper_n_unit_redundant_argument_in_test_case_attribute_highlighting = warning +resharper_n_unit_redundant_expected_result_in_test_case_attribute_highlighting = warning +resharper_n_unit_test_case_attribute_requires_expected_result_highlighting = warning +resharper_n_unit_test_case_result_property_duplicates_expected_result_highlighting = warning +resharper_n_unit_test_case_result_property_is_obsolete_highlighting = warning +resharper_n_unit_test_case_source_must_be_field_property_method_highlighting = warning +resharper_n_unit_test_case_source_must_be_static_highlighting = warning +resharper_n_unit_test_case_source_should_implement_i_enumerable_highlighting = warning +resharper_object_creation_as_statement_highlighting = warning +resharper_obsolete_element_error_highlighting = error +resharper_obsolete_element_highlighting = warning +resharper_one_way_operation_contract_with_return_type_highlighting = warning +resharper_operation_contract_without_service_contract_highlighting = warning +resharper_operator_is_can_be_used_highlighting = warning +resharper_operator_without_matched_checked_operator_highlighting = warning +resharper_optional_parameter_hierarchy_mismatch_highlighting = warning +resharper_optional_parameter_ref_out_highlighting = warning +resharper_ora_missing_body_inspection_highlighting = warning +resharper_ora_overload_inspection_highlighting = warning +resharper_ora_unmatched_forward_declaration_inspection_highlighting = error +resharper_other_tags_inside_script1_highlighting = error +resharper_other_tags_inside_script2_highlighting = error +resharper_other_tags_inside_unclosed_script_highlighting = error +resharper_outdent_is_off_prev_level_highlighting = none +resharper_output_tag_required_highlighting = warning +resharper_out_parameter_value_is_always_discarded_global_highlighting = suggestion +resharper_out_parameter_value_is_always_discarded_local_highlighting = warning +resharper_out_parameter_with_handles_resource_disposal_attribute_highlighting = warning +resharper_overridden_with_empty_value_highlighting = warning +resharper_overridden_with_same_value_highlighting = suggestion +resharper_parameter_hides_member_highlighting = warning +resharper_parameter_hides_primary_constructor_parameter_highlighting = warning +resharper_parameter_only_used_for_precondition_check_global_highlighting = suggestion +resharper_parameter_only_used_for_precondition_check_local_highlighting = warning +resharper_parameter_type_can_be_enumerable_global_highlighting = none +resharper_parameter_type_can_be_enumerable_local_highlighting = none +resharper_partial_method_parameter_name_mismatch_highlighting = warning +resharper_partial_method_with_single_part_highlighting = warning +resharper_partial_type_with_single_part_highlighting = warning +resharper_pass_string_interpolation_highlighting = hint +resharper_pattern_always_matches_highlighting = warning +resharper_pattern_is_always_true_or_false_highlighting = warning +resharper_pattern_is_redundant_highlighting = warning +resharper_pattern_never_matches_highlighting = warning +resharper_pg_select_from_procedure_inspection_highlighting = warning +resharper_place_assignment_expression_into_block_highlighting = none +resharper_polymorphic_field_like_event_invocation_highlighting = warning +resharper_possible_infinite_inheritance_highlighting = warning +resharper_possible_intended_rethrow_highlighting = warning +resharper_possible_interface_member_ambiguity_highlighting = warning +resharper_possible_invalid_cast_exception_highlighting = warning +resharper_possible_invalid_cast_exception_in_foreach_loop_highlighting = warning +resharper_possible_invalid_operation_exception_collection_was_modified_highlighting = warning +resharper_possible_invalid_operation_exception_highlighting = warning +resharper_possible_loss_of_fraction_highlighting = warning +resharper_possible_mistaken_call_to_get_type_highlighting = warning +resharper_possible_mistaken_system_type_argument_highlighting = warning +resharper_possible_multiple_enumeration_highlighting = warning +resharper_possible_multiple_write_access_in_double_check_locking_highlighting = warning +resharper_possible_null_reference_exception_highlighting = warning +resharper_possible_struct_member_modification_of_non_variable_struct_highlighting = warning +resharper_possible_unintended_linear_search_in_set_highlighting = warning +resharper_possible_unintended_queryable_as_enumerable_highlighting = suggestion +resharper_possible_unintended_reference_comparison_highlighting = warning +resharper_possible_write_to_me_highlighting = warning +resharper_possibly_impure_method_call_on_readonly_variable_highlighting = warning +resharper_possibly_missing_indexer_initializer_comma_highlighting = warning +resharper_possibly_mistaken_use_of_cancellation_token_highlighting = warning +resharper_possibly_mistaken_use_of_interpolated_string_insert_highlighting = warning +resharper_possibly_unintended_side_effects_inside_conditional_invocation_highlighting = warning +resharper_possibly_unintended_usage_parameterless_get_expression_type_highlighting = error +resharper_prefer_concrete_value_over_default_highlighting = suggestion +resharper_prefer_explicitly_provided_tuple_component_name_highlighting = hint +resharper_primary_constructor_parameter_capture_disallowed_highlighting = none +resharper_private_field_can_be_converted_to_local_variable_highlighting = warning +resharper_property_can_be_made_init_only_global_highlighting = suggestion +resharper_property_can_be_made_init_only_local_highlighting = suggestion +resharper_property_field_keyword_is_never_assigned_highlighting = warning +resharper_property_field_keyword_is_never_used_highlighting = warning +resharper_property_not_resolved_highlighting = error +resharper_public_constructor_in_abstract_class_highlighting = suggestion +resharper_pure_attribute_on_void_method_highlighting = warning +resharper_query_invasion_declaration_global_highlighting = warning +resharper_query_invasion_usage_global_highlighting = warning +resharper_raw_string_can_be_simplified_highlighting = hint +resharper_razor_assembly_not_resolved_highlighting = error +resharper_razor_layout_not_resolved_highlighting = error +resharper_razor_null_conditional_operator_highlighting_highlighting = warning +resharper_razor_section_not_resolved_highlighting = error +resharper_razor_unresolved_component_highlighting = warning +resharper_read_access_in_double_check_locking_highlighting = warning +resharper_redundant_abstract_modifier_highlighting = warning +resharper_redundant_accessor_body_highlighting = suggestion +resharper_redundant_always_match_subpattern_highlighting = suggestion +resharper_redundant_anonymous_type_property_name_highlighting = warning +resharper_redundant_argument_default_value_highlighting = warning +resharper_redundant_array_creation_expression_highlighting = hint +resharper_redundant_array_lower_bound_specification_highlighting = warning +resharper_redundant_assignment_highlighting = warning +resharper_redundant_attribute_parentheses_highlighting = hint +resharper_redundant_attribute_suffix_highlighting = warning +resharper_redundant_attribute_usage_property_highlighting = suggestion +resharper_redundant_base_constructor_call_highlighting = warning +resharper_redundant_base_qualifier_highlighting = warning +resharper_redundant_blank_lines_highlighting = none +resharper_redundant_bool_compare_highlighting = warning +resharper_redundant_caller_argument_expression_default_value_highlighting = warning +resharper_redundant_case_label_highlighting = warning +resharper_redundant_cast_highlighting = warning +resharper_redundant_catch_clause_highlighting = warning +resharper_redundant_check_before_assignment_highlighting = warning +resharper_redundant_collection_copy_call_highlighting = warning +resharper_redundant_collection_initializer_element_braces_highlighting = hint +resharper_redundant_configure_await_highlighting = suggestion +resharper_redundant_cqrs_attribute_highlighting = warning +resharper_redundant_declaration_semicolon_highlighting = hint +resharper_redundant_default_member_initializer_highlighting = warning +resharper_redundant_delegate_creation_highlighting = warning +resharper_redundant_dictionary_contains_key_before_adding_highlighting = warning +resharper_redundant_disable_warning_comment_highlighting = warning +resharper_redundant_discard_designation_highlighting = suggestion +resharper_redundant_empty_case_else_highlighting = warning +resharper_redundant_empty_finally_block_highlighting = warning +resharper_redundant_empty_object_creation_argument_list_highlighting = hint +resharper_redundant_empty_object_or_collection_initializer_highlighting = warning +resharper_redundant_empty_switch_section_highlighting = warning +resharper_redundant_enumerable_cast_call_highlighting = warning +resharper_redundant_enum_case_label_for_default_section_highlighting = none +resharper_redundant_explicit_array_creation_highlighting = warning +resharper_redundant_explicit_array_size_highlighting = warning +resharper_redundant_explicit_nullable_creation_highlighting = warning +resharper_redundant_explicit_params_array_creation_highlighting = suggestion +resharper_redundant_explicit_positional_property_declaration_highlighting = warning +resharper_redundant_explicit_tuple_component_name_highlighting = warning +resharper_redundant_extends_list_entry_highlighting = warning +resharper_redundant_fixed_pointer_declaration_highlighting = suggestion +resharper_redundant_if_else_block_highlighting = hint +resharper_redundant_if_statement_then_keyword_highlighting = none +resharper_redundant_immediate_delegate_invocation_highlighting = suggestion +resharper_redundant_is_before_relational_pattern_highlighting = suggestion +resharper_redundant_iterator_keyword_highlighting = warning +resharper_redundant_jump_statement_highlighting = warning +resharper_redundant_lambda_parameter_type_highlighting = warning +resharper_redundant_lambda_signature_parentheses_highlighting = hint +resharper_redundant_linebreak_highlighting = none +resharper_redundant_logical_conditional_expression_operand_highlighting = warning +resharper_redundant_me_qualifier_highlighting = warning +resharper_redundant_my_base_qualifier_highlighting = warning +resharper_redundant_my_class_qualifier_highlighting = warning +resharper_redundant_name_qualifier_highlighting = warning +resharper_redundant_not_null_constraint_highlighting = warning +resharper_redundant_nullable_annotation_on_reference_type_constraint_highlighting = warning +resharper_redundant_nullable_annotation_on_type_constraint_has_non_nullable_base_type_highlighting = warning +resharper_redundant_nullable_annotation_on_type_constraint_has_non_nullable_type_kind_highlighting = warning +resharper_redundant_nullable_directive_highlighting = warning +resharper_redundant_nullable_flow_attribute_highlighting = warning +resharper_redundant_nullable_type_mark_highlighting = warning +resharper_redundant_nullness_attribute_with_nullable_reference_types_highlighting = warning +resharper_redundant_overflow_checking_context_highlighting = warning +resharper_redundant_overload_global_highlighting = suggestion +resharper_redundant_overload_local_highlighting = suggestion +resharper_redundant_overridden_member_highlighting = warning +resharper_redundant_params_highlighting = warning +resharper_redundant_parentheses_highlighting = none +resharper_redundant_partial_method_empty_implementation_highlighting = warning +resharper_redundant_pattern_parentheses_highlighting = hint +resharper_redundant_property_parentheses_highlighting = hint +resharper_redundant_property_pattern_clause_highlighting = suggestion +resharper_redundant_qualifier_highlighting = warning +resharper_redundant_query_order_by_ascending_keyword_highlighting = hint +resharper_redundant_range_bound_highlighting = suggestion +resharper_redundant_readonly_modifier_highlighting = suggestion +resharper_redundant_record_class_keyword_highlighting = warning +resharper_redundant_scoped_parameter_modifier_highlighting = warning +resharper_redundant_sets_required_members_attribute_highlighting = warning +resharper_redundant_setter_value_parameter_declaration_highlighting = hint +resharper_redundant_space_highlighting = none +resharper_redundant_spread_element_highlighting = suggestion +resharper_redundant_string_format_call_highlighting = warning +resharper_redundant_string_interpolation_highlighting = suggestion +resharper_redundant_string_to_char_array_call_highlighting = warning +resharper_redundant_string_type_highlighting = suggestion +resharper_redundant_suppress_nullable_warning_expression_highlighting = warning +resharper_redundant_switch_expression_arms_highlighting = warning +resharper_redundant_ternary_expression_highlighting = warning +resharper_redundant_to_string_call_for_value_type_highlighting = hint +resharper_redundant_to_string_call_highlighting = warning +resharper_redundant_type_arguments_inside_nameof_highlighting = suggestion +resharper_redundant_type_arguments_of_method_highlighting = warning +resharper_redundant_type_check_in_pattern_highlighting = warning +resharper_redundant_type_declaration_body_highlighting = suggestion +resharper_redundant_unsafe_context_highlighting = warning +resharper_redundant_using_directive_global_highlighting = warning +resharper_redundant_using_directive_highlighting = warning +resharper_redundant_verbatim_prefix_highlighting = suggestion +resharper_redundant_verbatim_string_prefix_highlighting = suggestion +resharper_redundant_virtual_modifier_highlighting = warning +resharper_redundant_with_cancellation_highlighting = warning +resharper_redundant_with_expression_highlighting = suggestion +resharper_reference_equals_with_value_type_highlighting = warning +resharper_reg_exp_inspections_highlighting = warning +resharper_remove_constructor_invocation_highlighting = none +resharper_remove_redundant_braces_highlighting = none +resharper_remove_redundant_or_statement_false_highlighting = suggestion +resharper_remove_redundant_or_statement_true_highlighting = suggestion +resharper_remove_to_list_1_highlighting = suggestion +resharper_remove_to_list_2_highlighting = suggestion +resharper_replace_async_with_task_return_highlighting = none +resharper_replace_auto_property_with_computed_property_highlighting = hint +resharper_replace_conditional_expression_with_null_coalescing_highlighting = suggestion +resharper_replace_object_pattern_with_var_pattern_highlighting = suggestion +resharper_replace_sequence_equal_with_constant_pattern_highlighting = suggestion +resharper_replace_slice_with_range_indexer_highlighting = hint +resharper_replace_substring_with_range_indexer_highlighting = hint +resharper_replace_with_field_keyword_highlighting = suggestion +resharper_replace_with_first_or_default_1_highlighting = suggestion +resharper_replace_with_first_or_default_2_highlighting = suggestion +resharper_replace_with_first_or_default_3_highlighting = suggestion +resharper_replace_with_first_or_default_4_highlighting = suggestion +resharper_replace_with_last_or_default_1_highlighting = suggestion +resharper_replace_with_last_or_default_2_highlighting = suggestion +resharper_replace_with_last_or_default_3_highlighting = suggestion +resharper_replace_with_last_or_default_4_highlighting = suggestion +resharper_replace_with_of_type_1_highlighting = suggestion +resharper_replace_with_of_type_2_highlighting = suggestion +resharper_replace_with_of_type_3_highlighting = suggestion +resharper_replace_with_of_type_any_1_highlighting = suggestion +resharper_replace_with_of_type_any_2_highlighting = suggestion +resharper_replace_with_of_type_count_1_highlighting = suggestion +resharper_replace_with_of_type_count_2_highlighting = suggestion +resharper_replace_with_of_type_first_1_highlighting = suggestion +resharper_replace_with_of_type_first_2_highlighting = suggestion +resharper_replace_with_of_type_first_or_default_1_highlighting = suggestion +resharper_replace_with_of_type_first_or_default_2_highlighting = suggestion +resharper_replace_with_of_type_last_1_highlighting = suggestion +resharper_replace_with_of_type_last_2_highlighting = suggestion +resharper_replace_with_of_type_last_or_default_1_highlighting = suggestion +resharper_replace_with_of_type_last_or_default_2_highlighting = suggestion +resharper_replace_with_of_type_long_count_highlighting = suggestion +resharper_replace_with_of_type_single_1_highlighting = suggestion +resharper_replace_with_of_type_single_2_highlighting = suggestion +resharper_replace_with_of_type_single_or_default_1_highlighting = suggestion +resharper_replace_with_of_type_single_or_default_2_highlighting = suggestion +resharper_replace_with_of_type_where_highlighting = suggestion +resharper_replace_with_primary_constructor_parameter_highlighting = suggestion +resharper_replace_with_simple_assignment_false_highlighting = suggestion +resharper_replace_with_simple_assignment_true_highlighting = suggestion +resharper_replace_with_single_assignment_false_highlighting = suggestion +resharper_replace_with_single_assignment_true_highlighting = suggestion +resharper_replace_with_single_call_to_any_highlighting = suggestion +resharper_replace_with_single_call_to_count_highlighting = suggestion +resharper_replace_with_single_call_to_first_highlighting = suggestion +resharper_replace_with_single_call_to_first_or_default_highlighting = suggestion +resharper_replace_with_single_call_to_last_highlighting = suggestion +resharper_replace_with_single_call_to_last_or_default_highlighting = suggestion +resharper_replace_with_single_call_to_single_highlighting = suggestion +resharper_replace_with_single_call_to_single_or_default_highlighting = suggestion +resharper_replace_with_single_or_default_1_highlighting = suggestion +resharper_replace_with_single_or_default_2_highlighting = suggestion +resharper_replace_with_single_or_default_3_highlighting = suggestion +resharper_replace_with_single_or_default_4_highlighting = suggestion +resharper_replace_with_string_is_null_or_empty_highlighting = suggestion +resharper_required_base_types_conflict_highlighting = warning +resharper_required_base_types_direct_conflict_highlighting = warning +resharper_required_base_types_is_not_inherited_highlighting = warning +resharper_resource_item_not_resolved_highlighting = error +resharper_resource_not_resolved_highlighting = error +resharper_resx_not_resolved_highlighting = warning +resharper_return_of_task_produced_by_using_variable_highlighting = warning +resharper_return_of_using_variable_highlighting = warning +resharper_return_type_can_be_enumerable_global_highlighting = none +resharper_return_type_can_be_enumerable_local_highlighting = none +resharper_return_type_can_be_not_nullable_highlighting = warning +resharper_return_value_of_pure_method_is_not_used_highlighting = warning +resharper_route_templates_action_route_prefix_can_be_extracted_to_controller_route_highlighting = hint +resharper_route_templates_ambiguous_matching_constraint_constructor_highlighting = warning +resharper_route_templates_constraint_argument_cannot_be_converted_highlighting = warning +resharper_route_templates_controller_route_parameter_is_not_passed_to_methods_highlighting = hint +resharper_route_templates_duplicated_parameter_highlighting = warning +resharper_route_templates_matching_constraint_constructor_not_resolved_highlighting = warning +resharper_route_templates_method_missing_route_parameters_highlighting = hint +resharper_route_templates_optional_parameter_can_be_preceded_only_by_single_period_highlighting = warning +resharper_route_templates_optional_parameter_must_be_at_the_end_of_segment_highlighting = warning +resharper_route_templates_parameter_constraint_can_be_specified_highlighting = hint +resharper_route_templates_parameter_type_and_constraints_mismatch_highlighting = warning +resharper_route_templates_parameter_type_can_be_made_stricter_highlighting = suggestion +resharper_route_templates_route_parameter_constraint_not_resolved_highlighting = warning +resharper_route_templates_route_parameter_is_not_passed_to_method_highlighting = hint +resharper_route_templates_route_token_not_resolved_highlighting = warning +resharper_route_templates_symbol_not_resolved_highlighting = warning +resharper_route_templates_syntax_error_highlighting = warning +resharper_safe_cast_is_used_as_type_check_highlighting = suggestion +resharper_script_tag_has_both_src_and_content_attributes_highlighting = error +resharper_sealed_member_in_sealed_class_highlighting = warning +resharper_separate_control_transfer_statement_highlighting = none +resharper_separate_local_functions_with_jump_statement_highlighting = hint +resharper_service_contract_without_operations_highlighting = warning +resharper_shebang_directive_bad_placement_highlighting = warning +resharper_shift_expression_real_shift_count_is_zero_highlighting = warning +resharper_shift_expression_result_equals_zero_highlighting = warning +resharper_shift_expression_right_operand_not_equal_real_count_highlighting = warning +resharper_shift_expression_zero_left_operand_highlighting = warning +resharper_similar_anonymous_type_nearby_highlighting = hint +resharper_simplify_conditional_operator_highlighting = suggestion +resharper_simplify_conditional_ternary_expression_highlighting = suggestion +resharper_simplify_i_if_highlighting = suggestion +resharper_simplify_linq_expression_use_all_highlighting = suggestion +resharper_simplify_linq_expression_use_any_highlighting = suggestion +resharper_simplify_string_interpolation_highlighting = suggestion +resharper_specify_a_culture_in_string_conversion_explicitly_highlighting = warning +resharper_specify_string_comparison_highlighting = hint +resharper_spin_lock_in_readonly_field_highlighting = warning +resharper_sql_add_not_null_column_inspection_highlighting = warning +resharper_sql_aggregates_inspection_highlighting = warning +resharper_sql_ambiguous_column_inspection_highlighting = warning +resharper_sql_auto_increment_duplicate_inspection_highlighting = warning +resharper_sql_call_notation_inspection_highlighting = error +resharper_sql_case_vs_coalesce_inspection_highlighting = warning +resharper_sql_case_vs_if_inspection_highlighting = warning +resharper_sql_check_using_columns_inspection_highlighting = warning +resharper_sql_constant_expression_inspection_highlighting = warning +resharper_sql_deprecate_type_inspection_highlighting = warning +resharper_sql_derived_table_alias_inspection_highlighting = warning +resharper_sql_drop_indexed_column_inspection_highlighting = warning +resharper_sql_dt_inspection_highlighting = warning +resharper_sql_duplicate_column_inspection_highlighting = warning +resharper_sql_goto_inspection_highlighting = none +resharper_sql_identifier_inspection_highlighting = warning +resharper_sql_illegal_cursor_state_inspection_highlighting = warning +resharper_sql_insert_into_generated_column_inspection_highlighting = warning +resharper_sql_insert_null_into_not_null_inspection_highlighting = warning +resharper_sql_insert_values_inspection_highlighting = warning +resharper_sql_join_count_inspection_highlighting = none +resharper_sql_join_without_on_inspection_highlighting = warning +resharper_sql_misleading_reference_inspection_highlighting = warning +resharper_sql_missing_column_aliases_inspection_highlighting = none +resharper_sql_missing_return_inspection_highlighting = error +resharper_sql_multiple_limit_clauses_inspection_highlighting = warning +resharper_sql_named_arguments_inspection_highlighting = none +resharper_sql_redundant_alias_inspection_highlighting = warning +resharper_sql_redundant_code_in_coalesce_inspection_highlighting = warning +resharper_sql_redundant_else_null_inspection_highlighting = warning +resharper_sql_redundant_limit_inspection_highlighting = warning +resharper_sql_redundant_ordering_direction_inspection_highlighting = warning +resharper_sql_shadowing_alias_inspection_highlighting = warning +resharper_sql_should_be_in_group_by_inspection_highlighting = warning +resharper_sql_side_effects_inspection_highlighting = warning +resharper_sql_signature_inspection_highlighting = warning +resharper_sql_single_session_mode_inspection_highlighting = warning +resharper_sql_string_length_exceeded_inspection_highlighting = warning +resharper_sql_transaction_statement_in_trigger_inspection_highlighting = warning +resharper_sql_trigger_transition_inspection_highlighting = warning +resharper_sql_type_inspection_highlighting = warning +resharper_sql_unicode_string_literal_inspection_highlighting = warning +resharper_sql_unreachable_code_inspection_highlighting = warning +resharper_sql_unused_cte_inspection_highlighting = warning +resharper_sql_unused_subquery_item_inspection_highlighting = warning +resharper_sql_unused_variable_inspection_highlighting = warning +resharper_sql_without_where_inspection_highlighting = warning +resharper_stack_alloc_inside_loop_highlighting = warning +resharper_static_member_initializer_referes_to_member_below_highlighting = warning +resharper_static_member_in_generic_type_highlighting = warning +resharper_static_problem_in_text_highlighting = warning +resharper_std_is_constant_evaluated_will_always_evaluate_to_constant_highlighting = warning +resharper_stream_read_return_value_ignored_highlighting = warning +resharper_string_compare_is_culture_specific_1_highlighting = warning +resharper_string_compare_is_culture_specific_2_highlighting = warning +resharper_string_compare_is_culture_specific_3_highlighting = warning +resharper_string_compare_is_culture_specific_4_highlighting = warning +resharper_string_compare_is_culture_specific_5_highlighting = warning +resharper_string_compare_is_culture_specific_6_highlighting = warning +resharper_string_compare_to_is_culture_specific_highlighting = warning +resharper_string_ends_with_is_culture_specific_highlighting = none +resharper_string_index_of_is_culture_specific_1_highlighting = warning +resharper_string_index_of_is_culture_specific_2_highlighting = warning +resharper_string_index_of_is_culture_specific_3_highlighting = warning +resharper_string_last_index_of_is_culture_specific_1_highlighting = warning +resharper_string_last_index_of_is_culture_specific_2_highlighting = warning +resharper_string_last_index_of_is_culture_specific_3_highlighting = warning +resharper_string_literal_as_interpolation_argument_highlighting = suggestion +resharper_string_literal_typo_highlighting = suggestion +resharper_string_span_comparison_highlighting = warning +resharper_string_starts_with_is_culture_specific_highlighting = none +resharper_structured_message_template_problem_highlighting = warning +resharper_struct_can_be_made_read_only_highlighting = suggestion +resharper_struct_lacks_i_equatable_global_highlighting = warning +resharper_struct_lacks_i_equatable_local_highlighting = warning +resharper_struct_member_can_be_made_read_only_highlighting = none +resharper_suggest_base_type_for_parameter_highlighting = none +resharper_suggest_base_type_for_parameter_in_constructor_highlighting = none +resharper_suggest_discard_declaration_var_style_highlighting = hint +resharper_suggest_var_or_type_built_in_types_highlighting = hint +resharper_suggest_var_or_type_deconstruction_declarations_highlighting = hint +resharper_suggest_var_or_type_elsewhere_highlighting = hint +resharper_suggest_var_or_type_simple_types_highlighting = hint +resharper_suppress_nullable_warning_expression_as_inverted_is_expression_highlighting = warning +resharper_suspicious_lock_over_synchronization_primitive_highlighting = warning +resharper_suspicious_math_sign_method_highlighting = warning +resharper_suspicious_parameter_name_in_argument_null_exception_highlighting = warning +resharper_suspicious_type_conversion_global_highlighting = warning +resharper_swap_via_deconstruction_highlighting = suggestion +resharper_switch_expression_handles_some_known_enum_values_with_exception_in_default_highlighting = hint +resharper_switch_statement_for_enum_misses_default_section_highlighting = hint +resharper_switch_statement_handles_some_known_enum_values_with_default_highlighting = hint +resharper_switch_statement_missing_some_enum_cases_no_default_highlighting = hint +resharper_symbol_from_not_copied_locally_reference_used_warning_highlighting = warning +resharper_tabs_and_spaces_mismatch_highlighting = none +resharper_tabs_are_disallowed_highlighting = none +resharper_tabs_outside_indent_highlighting = none +resharper_tail_recursive_call_highlighting = hint +resharper_thread_static_at_instance_field_highlighting = warning +resharper_thread_static_field_has_initializer_highlighting = warning +resharper_too_wide_local_variable_scope_highlighting = suggestion +resharper_try_cast_always_succeeds_highlighting = suggestion +resharper_try_statements_can_be_merged_highlighting = hint +resharper_type_parameter_can_be_variant_highlighting = suggestion +resharper_type_with_suspicious_equality_is_used_in_record_global_highlighting = warning +resharper_type_with_suspicious_equality_is_used_in_record_local_highlighting = warning +resharper_unassigned_field_global_highlighting = suggestion +resharper_unassigned_field_local_highlighting = warning +resharper_unassigned_get_only_auto_property_highlighting = warning +resharper_unassigned_readonly_field_highlighting = warning +resharper_unclosed_script_highlighting = error +resharper_unknown_item_group_highlighting = suggestion +resharper_unknown_metadata_highlighting = suggestion +resharper_unknown_output_parameter_highlighting = warning +resharper_unknown_property_highlighting = none +resharper_unknown_target_highlighting = suggestion +resharper_unknown_task_attribute_highlighting = suggestion +resharper_unknown_task_highlighting = warning +resharper_unnecessary_whitespace_highlighting = none +resharper_unreachable_switch_arm_due_to_integer_analysis_highlighting = warning +resharper_unreachable_switch_case_due_to_integer_analysis_highlighting = warning +resharper_unreal_header_tool_error_highlighting = error +resharper_unreal_header_tool_warning_highlighting = warning +resharper_unsupported_required_base_type_highlighting = warning +resharper_unused_anonymous_method_signature_highlighting = warning +resharper_unused_auto_property_accessor_global_highlighting = warning +resharper_unused_auto_property_accessor_local_highlighting = warning +resharper_unused_import_clause_highlighting = warning +resharper_unused_local_function_highlighting = warning +resharper_unused_local_function_parameter_highlighting = warning +resharper_unused_local_function_return_value_highlighting = warning +resharper_unused_member_global_highlighting = suggestion +resharper_unused_member_hierarchy_global_highlighting = suggestion +resharper_unused_member_hierarchy_local_highlighting = warning +resharper_unused_member_in_super_global_highlighting = suggestion +resharper_unused_member_in_super_local_highlighting = warning +resharper_unused_member_local_highlighting = warning +resharper_unused_method_return_value_global_highlighting = suggestion +resharper_unused_method_return_value_local_highlighting = warning +resharper_unused_nullable_directive_highlighting = warning +resharper_unused_parameter_global_highlighting = suggestion +resharper_unused_parameter_in_partial_method_highlighting = warning +resharper_unused_parameter_local_highlighting = warning +resharper_unused_tuple_component_in_return_value_highlighting = warning +resharper_unused_type_global_highlighting = suggestion +resharper_unused_type_local_highlighting = warning +resharper_unused_type_parameter_highlighting = warning +resharper_unused_variable_highlighting = warning +resharper_usage_of_default_struct_equality_highlighting = warning +resharper_useless_binary_operation_highlighting = warning +resharper_useless_comparison_to_integral_constant_highlighting = warning +resharper_use_array_creation_expression_1_highlighting = suggestion +resharper_use_array_creation_expression_2_highlighting = suggestion +resharper_use_array_empty_method_highlighting = suggestion +resharper_use_await_using_highlighting = suggestion +resharper_use_cancellation_token_for_i_async_enumerable_highlighting = suggestion +resharper_use_collection_count_property_highlighting = suggestion +resharper_use_configure_await_false_for_async_disposable_highlighting = none +resharper_use_configure_await_false_highlighting = suggestion +resharper_use_deconstruction_highlighting = hint +resharper_use_discard_assignment_highlighting = suggestion +resharper_use_empty_types_field_highlighting = suggestion +resharper_use_event_args_empty_field_highlighting = suggestion +resharper_use_format_specifier_in_format_string_highlighting = suggestion +resharper_use_implicitly_typed_variable_evident_highlighting = hint +resharper_use_implicitly_typed_variable_highlighting = none +resharper_use_implicit_by_val_modifier_highlighting = hint +resharper_use_indexed_property_highlighting = suggestion +resharper_use_index_from_end_expression_highlighting = suggestion +resharper_use_method_any_0_highlighting = suggestion +resharper_use_method_any_1_highlighting = suggestion +resharper_use_method_any_2_highlighting = suggestion +resharper_use_method_any_3_highlighting = suggestion +resharper_use_method_any_4_highlighting = suggestion +resharper_use_nameof_expression_for_part_of_the_string_highlighting = none +resharper_use_nameof_expression_highlighting = suggestion +resharper_use_nameof_for_dependency_property_highlighting = suggestion +resharper_use_name_of_instead_of_to_string_highlighting = suggestion +resharper_use_name_of_instead_of_type_of_highlighting = suggestion +resharper_use_negated_pattern_in_is_expression_highlighting = hint +resharper_use_negated_pattern_matching_highlighting = hint +resharper_use_nullable_annotation_instead_of_attribute_highlighting = suggestion +resharper_use_nullable_attributes_supported_by_compiler_highlighting = suggestion +resharper_use_nullable_reference_types_annotation_syntax_highlighting = warning +resharper_use_null_propagation_highlighting = hint +resharper_use_object_or_collection_initializer_highlighting = suggestion +resharper_use_pattern_matching_highlighting = suggestion +resharper_use_positional_deconstruction_pattern_highlighting = none +resharper_use_raw_string_highlighting = hint +resharper_use_string_interpolation_highlighting = suggestion +resharper_use_string_interpolation_when_possible_highlighting = hint +resharper_use_switch_case_pattern_variable_highlighting = suggestion +resharper_use_symbol_alias_highlighting = hint +resharper_use_throw_if_null_method_highlighting = none +resharper_use_unsigned_right_shift_operator_highlighting = suggestion +resharper_use_verbatim_string_highlighting = hint +resharper_use_with_expression_to_copy_anonymous_object_highlighting = suggestion +resharper_use_with_expression_to_copy_record_highlighting = suggestion +resharper_use_with_expression_to_copy_struct_highlighting = suggestion +resharper_use_with_expression_to_copy_tuple_highlighting = suggestion +resharper_using_statement_resource_initialization_expression_highlighting = hint +resharper_using_statement_resource_initialization_highlighting = warning +resharper_value_parameter_not_used_highlighting = warning +resharper_value_range_attribute_violation_highlighting = warning +resharper_variable_can_be_not_nullable_highlighting = warning +resharper_variable_hides_outer_variable_highlighting = warning +resharper_variable_length_string_hex_escape_sequence_highlighting = warning +resharper_vb_check_for_reference_equality_instead_1_highlighting = suggestion +resharper_vb_check_for_reference_equality_instead_2_highlighting = suggestion +resharper_vb_possible_mistaken_argument_highlighting = warning +resharper_vb_possible_mistaken_call_to_get_type_1_highlighting = warning +resharper_vb_possible_mistaken_call_to_get_type_2_highlighting = warning +resharper_vb_remove_to_list_1_highlighting = suggestion +resharper_vb_remove_to_list_2_highlighting = suggestion +resharper_vb_replace_with_first_or_default_highlighting = suggestion +resharper_vb_replace_with_last_or_default_highlighting = suggestion +resharper_vb_replace_with_of_type_1_highlighting = suggestion +resharper_vb_replace_with_of_type_2_highlighting = suggestion +resharper_vb_replace_with_of_type_any_1_highlighting = suggestion +resharper_vb_replace_with_of_type_any_2_highlighting = suggestion +resharper_vb_replace_with_of_type_count_1_highlighting = suggestion +resharper_vb_replace_with_of_type_count_2_highlighting = suggestion +resharper_vb_replace_with_of_type_first_1_highlighting = suggestion +resharper_vb_replace_with_of_type_first_2_highlighting = suggestion +resharper_vb_replace_with_of_type_first_or_default_1_highlighting = suggestion +resharper_vb_replace_with_of_type_first_or_default_2_highlighting = suggestion +resharper_vb_replace_with_of_type_last_1_highlighting = suggestion +resharper_vb_replace_with_of_type_last_2_highlighting = suggestion +resharper_vb_replace_with_of_type_last_or_default_1_highlighting = suggestion +resharper_vb_replace_with_of_type_last_or_default_2_highlighting = suggestion +resharper_vb_replace_with_of_type_single_1_highlighting = suggestion +resharper_vb_replace_with_of_type_single_2_highlighting = suggestion +resharper_vb_replace_with_of_type_single_or_default_1_highlighting = suggestion +resharper_vb_replace_with_of_type_single_or_default_2_highlighting = suggestion +resharper_vb_replace_with_of_type_where_highlighting = suggestion +resharper_vb_replace_with_single_assignment_1_highlighting = suggestion +resharper_vb_replace_with_single_assignment_2_highlighting = suggestion +resharper_vb_replace_with_single_call_to_any_highlighting = suggestion +resharper_vb_replace_with_single_call_to_count_highlighting = suggestion +resharper_vb_replace_with_single_call_to_first_highlighting = suggestion +resharper_vb_replace_with_single_call_to_first_or_default_highlighting = suggestion +resharper_vb_replace_with_single_call_to_last_highlighting = suggestion +resharper_vb_replace_with_single_call_to_last_or_default_highlighting = suggestion +resharper_vb_replace_with_single_call_to_single_highlighting = suggestion +resharper_vb_replace_with_single_call_to_single_or_default_highlighting = suggestion +resharper_vb_replace_with_single_or_default_highlighting = suggestion +resharper_vb_simplify_linq_expression_10_highlighting = hint +resharper_vb_simplify_linq_expression_1_highlighting = suggestion +resharper_vb_simplify_linq_expression_2_highlighting = suggestion +resharper_vb_simplify_linq_expression_3_highlighting = suggestion +resharper_vb_simplify_linq_expression_4_highlighting = suggestion +resharper_vb_simplify_linq_expression_5_highlighting = suggestion +resharper_vb_simplify_linq_expression_6_highlighting = suggestion +resharper_vb_simplify_linq_expression_7_highlighting = hint +resharper_vb_simplify_linq_expression_8_highlighting = hint +resharper_vb_simplify_linq_expression_9_highlighting = hint +resharper_vb_string_compare_is_culture_specific_1_highlighting = warning +resharper_vb_string_compare_is_culture_specific_2_highlighting = warning +resharper_vb_string_compare_is_culture_specific_3_highlighting = warning +resharper_vb_string_compare_is_culture_specific_4_highlighting = warning +resharper_vb_string_compare_is_culture_specific_5_highlighting = warning +resharper_vb_string_compare_is_culture_specific_6_highlighting = warning +resharper_vb_string_compare_to_is_culture_specific_highlighting = warning +resharper_vb_string_ends_with_is_culture_specific_highlighting = none +resharper_vb_string_index_of_is_culture_specific_1_highlighting = warning +resharper_vb_string_index_of_is_culture_specific_2_highlighting = warning +resharper_vb_string_index_of_is_culture_specific_3_highlighting = warning +resharper_vb_string_last_index_of_is_culture_specific_1_highlighting = warning +resharper_vb_string_last_index_of_is_culture_specific_2_highlighting = warning +resharper_vb_string_last_index_of_is_culture_specific_3_highlighting = warning +resharper_vb_string_starts_with_is_culture_specific_highlighting = none +resharper_vb_unreachable_code_highlighting = warning +resharper_vb_use_array_creation_expression_1_highlighting = suggestion +resharper_vb_use_array_creation_expression_2_highlighting = suggestion +resharper_vb_use_first_instead_highlighting = warning +resharper_vb_use_method_any_1_highlighting = suggestion +resharper_vb_use_method_any_2_highlighting = suggestion +resharper_vb_use_method_any_3_highlighting = suggestion +resharper_vb_use_method_any_4_highlighting = suggestion +resharper_vb_use_method_any_5_highlighting = suggestion +resharper_vb_use_method_is_instance_of_type_highlighting = suggestion +resharper_vb_use_type_of_is_operator_1_highlighting = suggestion +resharper_vb_use_type_of_is_operator_2_highlighting = suggestion +resharper_virtual_member_call_in_constructor_highlighting = warning +resharper_virtual_member_never_overridden_global_highlighting = suggestion +resharper_virtual_member_never_overridden_local_highlighting = suggestion +resharper_void_method_with_must_dispose_resource_attribute_highlighting = warning +resharper_void_method_with_must_use_return_value_attribute_highlighting = warning +resharper_vulnerable_api_highlighting = warning +resharper_vulnerable_package_highlighting = warning +resharper_web_config_module_not_resolved_highlighting = error +resharper_web_config_module_qualification_resolve_highlighting = warning +resharper_web_config_redundant_add_namespace_tag_highlighting = warning +resharper_web_config_redundant_location_tag_highlighting = warning +resharper_web_config_tag_prefix_redundand_highlighting = warning +resharper_web_config_type_not_resolved_highlighting = error +resharper_web_config_unused_add_tag_highlighting = warning +resharper_web_config_unused_element_due_to_config_source_attribute_highlighting = warning +resharper_web_config_unused_remove_or_clear_tag_highlighting = warning +resharper_web_config_web_config_path_warning_highlighting = warning +resharper_web_config_wrong_module_highlighting = error +resharper_web_ignored_path_highlighting = none +resharper_web_mapped_path_highlighting = hint +resharper_with_expression_instead_of_initializer_highlighting = suggestion +resharper_with_expression_modifies_all_members_highlighting = warning +resharper_wrong_indent_size_highlighting = none +resharper_wrong_metadata_use_highlighting = none +resharper_xaml_assign_null_to_not_null_attribute_highlighting = warning +resharper_xaml_avalonia_wrong_binding_mode_for_stream_binding_operator_highlighting = warning +resharper_xaml_binding_without_context_not_resolved_highlighting = hint +resharper_xaml_binding_with_context_not_resolved_highlighting = warning +resharper_xaml_compiled_binding_missing_data_type_error_highlighting_highlighting = error +resharper_xaml_constructor_warning_highlighting = warning +resharper_xaml_decimal_parsing_is_culture_dependent_highlighting = warning +resharper_xaml_dependency_property_resolve_error_highlighting = warning +resharper_xaml_duplicate_style_setter_highlighting = warning +resharper_xaml_dynamic_resource_error_highlighting = error +resharper_xaml_element_name_reference_not_resolved_highlighting = error +resharper_xaml_empty_grid_length_definition_highlighting = error +resharper_xaml_field_modifier_requires_name_attribute_highlighting = warning +resharper_xaml_grid_definitions_can_be_converted_to_attribute_highlighting = hint +resharper_xaml_ignored_path_highlighting_highlighting = none +resharper_xaml_index_out_of_grid_definition_highlighting = warning +resharper_xaml_invalid_dynamic_resource_type_highlighting = suggestion +resharper_xaml_invalid_member_type_highlighting = error +resharper_xaml_invalid_resource_target_type_highlighting = error +resharper_xaml_invalid_resource_type_highlighting = error +resharper_xaml_invalid_type_highlighting = error +resharper_xaml_language_level_highlighting = error +resharper_xaml_mapped_path_highlighting_highlighting = hint +resharper_xaml_method_arguments_will_be_ignored_highlighting = warning +resharper_xaml_missing_grid_index_highlighting = warning +resharper_xaml_overloads_collision_highlighting = warning +resharper_xaml_parent_is_out_of_current_component_tree_highlighting = warning +resharper_xaml_path_error_highlighting = warning +resharper_xaml_possible_null_reference_exception_highlighting = suggestion +resharper_xaml_redundant_attached_property_highlighting = warning +resharper_xaml_redundant_binding_mode_attribute_highlighting = warning +resharper_xaml_redundant_collection_property_highlighting = warning +resharper_xaml_redundant_freeze_attribute_highlighting = warning +resharper_xaml_redundant_grid_definitions_highlighting = warning +resharper_xaml_redundant_grid_span_highlighting = warning +resharper_xaml_redundant_modifiers_attribute_highlighting = warning +resharper_xaml_redundant_namespace_alias_highlighting = warning +resharper_xaml_redundant_name_attribute_highlighting = warning +resharper_xaml_redundant_property_type_qualifier_highlighting = warning +resharper_xaml_redundant_resource_highlighting = warning +resharper_xaml_redundant_styled_value_highlighting = warning +resharper_xaml_redundant_update_source_trigger_attribute_highlighting = warning +resharper_xaml_redundant_xamarin_forms_class_declaration_highlighting = warning +resharper_xaml_resource_file_path_case_mismatch_highlighting = warning +resharper_xaml_routed_event_resolve_error_highlighting = warning +resharper_xaml_static_resource_not_resolved_highlighting = warning +resharper_xaml_style_class_not_found_highlighting = warning +resharper_xaml_style_invalid_target_type_highlighting = error +resharper_xaml_unexpected_element_highlighting = error +resharper_xaml_unexpected_text_token_highlighting = error +resharper_xaml_xaml_duplicate_device_family_type_view_highlighting_highlighting = error +resharper_xaml_xaml_mismatched_device_family_view_clr_name_highlighting_highlighting = warning +resharper_xaml_xaml_relative_source_default_mode_warning_highlighting_highlighting = warning +resharper_xaml_xaml_unknown_device_family_type_highlighting_highlighting = warning +resharper_xaml_xaml_xamarin_forms_data_type_and_binding_context_type_mismatched_highlighting_highlighting = warning +resharper_xaml_x_key_attribute_disallowed_highlighting = error +resharper_xunit_xunit_test_with_console_output_highlighting = warning +resharper_zero_index_from_end_highlighting = warning diff --git a/LinqToXsdCore.sln b/LinqToXsdCore.sln index f642744..d457828 100644 --- a/LinqToXsdCore.sln +++ b/LinqToXsdCore.sln @@ -11,10 +11,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XObjectsTests", "XObjectsTe EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{7E2B0371-0473-46A8-B096-ADF655B9D526}" ProjectSection(SolutionItems) = preProject + .editorconfig = .editorconfig .gitignore = .gitignore azure-pipelines.yml = azure-pipelines.yml - global.json = global.json .github\agents\copilot-instructions.md = .github\agents\copilot-instructions.md + global.json = global.json RELEASENOTES.md = RELEASENOTES.md Version.props = Version.props _config.yml = _config.yml From d1bbe2828448482e18253af8e31f7c12fe36004a Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Thu, 11 Dec 2025 11:40:50 +1000 Subject: [PATCH 036/107] Pack on build. --- LinqToXsd/LinqToXsd.csproj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/LinqToXsd/LinqToXsd.csproj b/LinqToXsd/LinqToXsd.csproj index 1a812f1..ca5823f 100644 --- a/LinqToXsd/LinqToXsd.csproj +++ b/LinqToXsd/LinqToXsd.csproj @@ -12,7 +12,8 @@ $(PackageId)Core $(MSBuildProjectName) true - false + true + true embedded LinqToXsd From b93c02e7bdb56d69b1106a918150dca7df4454da Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Thu, 11 Dec 2025 12:12:18 +1000 Subject: [PATCH 037/107] Updated nullables. --- XObjectsTests/Utilities.cs | 17 ++++++++--------- XObjectsTests/XObjectsTests.csproj | 1 + 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/XObjectsTests/Utilities.cs b/XObjectsTests/Utilities.cs index e9ae892..cbd1c52 100644 --- a/XObjectsTests/Utilities.cs +++ b/XObjectsTests/Utilities.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Diagnostics; using System.IO; using System.IO.Abstractions; using System.IO.Abstractions.TestingHelpers; @@ -212,8 +211,7 @@ public static SourceText GenerateSourceText(string xsdFileName, IMockFileDataAcc // This method assumes SplitCodeFile is not used, so there's only a single writer per file. var writer = codeWriters.Single().writer; - - return SourceText.From(writer.ToString()); + return SourceText.From(writer.ToString()!); } /// @@ -267,9 +265,9 @@ public static SourceText GenerateSourceText(XmlSchemaSet xmlSchemaSet, string xs /// /// Required for loading any configuration files. Accepts relative and absolute. /// + /// /// - public static SourceText GenerateSourceText(XmlSchemaSet xmlSchemaSet, string xsdFileName, - IMockFileDataAccessor mfs) + public static SourceText GenerateSourceText(XmlSchemaSet xmlSchemaSet, string xsdFileName, IMockFileDataAccessor mfs, LinqToXsdSettings? settings = null) { var possibleSettingsFile = $"{xsdFileName}.config"; var fileExists = mfs.FileExists(possibleSettingsFile); @@ -279,7 +277,7 @@ public static SourceText GenerateSourceText(XmlSchemaSet xmlSchemaSet, string xs var ns = config.Namespaces.Untyped; - var settings = config.ToLinqToXsdSettings(); + settings ??= config.ToLinqToXsdSettings(); var code = XObjectsCoreGenerator.Generate(xmlSchemaSet, settings); var writerText = code.Select(t => t.writer.ToString()); var delimitedByNewLines = writerText.ToDelimitedString(Environment.NewLine); @@ -304,9 +302,10 @@ public static CSharpSyntaxTree GenerateSyntaxTree(string xsdFile, IMockFileDataA return GenerateSyntaxTree(new MockFileInfo(fs, xsdFile), fs); } - public static XmlSchemaSet GetXmlSchemaSet(IFileInfo xsdFile, IMockFileDataAccessor fs = null) + public static XmlSchemaSet GetXmlSchemaSet(IFileInfo xsdFile, IMockFileDataAccessor fs) { if (xsdFile == null) throw new ArgumentNullException(nameof(xsdFile)); + if (fs == null) throw new ArgumentNullException(nameof(fs)); var folderWithAdditionalXsdFiles = xsdFile.DirectoryName; MockDirectoryInfo directoryInfo = new MockDirectoryInfo(fs, folderWithAdditionalXsdFiles); @@ -333,7 +332,7 @@ public static XmlSchemaSet GetXmlSchemaSet(IFileInfo xsdFile, IMockFileDataAcces /// Generates C# code from a given and then returns the of /// the generated code. /// - public static CSharpSyntaxTree GenerateSyntaxTree(IFileInfo xsdFile, IMockFileDataAccessor mfs = null) + public static CSharpSyntaxTree GenerateSyntaxTree(IFileInfo xsdFile, IMockFileDataAccessor mfs) { var schemaSet = GetXmlSchemaSet(xsdFile, mfs); @@ -344,7 +343,7 @@ public static CSharpSyntaxTree GenerateSyntaxTree(IFileInfo xsdFile, IMockFileDa var tree = CSharpSyntaxTree.ParseText(sourceText, CSharpParseOptions.Default); - return tree as CSharpSyntaxTree; + return (CSharpSyntaxTree)tree; } public static OneOf GenerateSyntaxTreeOrError(IFileInfo xsdFile, IMockFileDataAccessor mfs) diff --git a/XObjectsTests/XObjectsTests.csproj b/XObjectsTests/XObjectsTests.csproj index 3aabea8..dff11ed 100644 --- a/XObjectsTests/XObjectsTests.csproj +++ b/XObjectsTests/XObjectsTests.csproj @@ -5,6 +5,7 @@ $(RootNamespace).Tests false preview + enable From 3ae639448cb6ea2c12d0dc17437fd42bd90f31f7 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Thu, 11 Dec 2025 12:12:50 +1000 Subject: [PATCH 038/107] Converted to extension methods. --- XObjectsTests/CodeGenerationTests.cs | 2 +- .../Extensions/CodeDomExtensionTests.cs | 2 +- .../Extensions/MockFileSystemExtensions.cs | 115 ++++++++++++++++++ XObjectsTests/Utilities.cs | 85 ------------- 4 files changed, 117 insertions(+), 87 deletions(-) create mode 100644 XObjectsTests/Extensions/MockFileSystemExtensions.cs diff --git a/XObjectsTests/CodeGenerationTests.cs b/XObjectsTests/CodeGenerationTests.cs index b3cd5d2..9079114 100644 --- a/XObjectsTests/CodeGenerationTests.cs +++ b/XObjectsTests/CodeGenerationTests.cs @@ -117,7 +117,7 @@ public void NoVoidTypeOfExpressionsInGeneratedCode(string assemblyName) private void CheckTypeOfVoidExpressionsInGeneratedCode(IEnumerable xsdsToProcess, int randomSubset = -1) { var allProcessableXsds = - Utilities.ResolvePossibleFileAndFolderPathsToProcessableSchemas(AllTestFiles, xsdsToProcess); + AllTestFiles.ResolvePossibleFileAndFolderPathsToProcessableSchemas(xsdsToProcess); var failingXsds = new List<(IFileInfo file, Exception exception)>(allProcessableXsds.Capacity); diff --git a/XObjectsTests/Extensions/CodeDomExtensionTests.cs b/XObjectsTests/Extensions/CodeDomExtensionTests.cs index 6c16c5a..659054d 100644 --- a/XObjectsTests/Extensions/CodeDomExtensionTests.cs +++ b/XObjectsTests/Extensions/CodeDomExtensionTests.cs @@ -82,7 +82,7 @@ public void ToClassStringWritersTest() var xmlSpecXsd = @"XMLSpec\xmlspec.xsd"; var xmlSpecXsdConfigFile = @"XMLSpec\xmlspec.xsd.config"; var xmlSpecXsdConfig = Configuration.Load(GetFileStreamReader(xmlSpecXsdConfigFile)); - var xmlSpecSchemaSet = Utilities.PreLoadXmlSchemas(xmlSpecXsd, Utilities.GetAssemblyFileSystem(typeof(W3C.XMLSpec.listclass).Assembly)); + var xmlSpecSchemaSet = Utilities.GetAssemblyFileSystem(typeof(W3C.XMLSpec.listclass).Assembly).PreLoadXmlSchemas(xmlSpecXsd); Assert.IsNotNull(xmlSpecSchemaSet); Assert.IsTrue(xmlSpecSchemaSet.IsCompiled); diff --git a/XObjectsTests/Extensions/MockFileSystemExtensions.cs b/XObjectsTests/Extensions/MockFileSystemExtensions.cs new file mode 100644 index 0000000..27b2e2e --- /dev/null +++ b/XObjectsTests/Extensions/MockFileSystemExtensions.cs @@ -0,0 +1,115 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.IO.Abstractions; +using System.IO.Abstractions.TestingHelpers; +using System.Linq; +using System.Xml; +using System.Xml.Linq; +using System.Xml.Resolvers; +using System.Xml.Schema; +using NUnit.Framework; +using Xml.Schema.Linq.Extensions; + +namespace Xml.Schema.Linq.Tests.Extensions; + +public static class MockFileSystemExtensions +{ + extension(MockFileSystem mfs) + { + public MockFileInfo GetMockFileInfo(Func searchForASingleFilePath) + { + var filePath = mfs.AllPaths.SingleOrDefault(searchForASingleFilePath); + if (filePath is null) throw new InvalidOperationException(); + + return new MockFileInfo(mfs, filePath); + } + + public MockFileInfo GetMockFileInfo(string mockFilePath) + { + return new MockFileInfo(mfs, mockFilePath); + } + + public List ResolveFileAndFolderPathsToMockFileInfos(IEnumerable sequenceOfFileAndOrFolderPaths, string filter = "*.*") + { + if (sequenceOfFileAndOrFolderPaths == null) throw new ArgumentNullException(nameof(sequenceOfFileAndOrFolderPaths)); + + var enumeratedFileAndOrFolderPaths = sequenceOfFileAndOrFolderPaths.ToList(); + + if (!enumeratedFileAndOrFolderPaths.Any()) + throw new InvalidOperationException("There are no file or folder paths present in the enumerable!"); + + var dirs = enumeratedFileAndOrFolderPaths.Where(sf => mfs.GetFile(sf).Attributes.HasFlag(FileAttributes.Directory)).ToArray(); + var files = enumeratedFileAndOrFolderPaths.Except(dirs).Select(f => mfs.FileInfo.New(f)).ToList(); + var filteredFiles = dirs.SelectMany(d => + new MockDirectoryInfo(mfs, d).GetFiles(filter, SearchOption.AllDirectories).Select(f => f)).ToList(); + files.AddRange(filteredFiles); + return files; + } + + public List ResolvePossibleFileAndFolderPathsToProcessableSchemas(IEnumerable filesOrFolders) + { + var files = mfs.ResolveFileAndFolderPathsToMockFileInfos(filesOrFolders, "*.xsd"); + var filesComparisonList = files.Select(f => f.FullName); + + // convert files to XDocuments and check if they are proper W3C schemas + var pairs = files.Select(f => (file: f, schema: XDocument.Parse(mfs.GetFile(f).TextContents))); + var xDocs = pairs.Where(kvp => kvp.schema.IsAnXmlSchema()) + .ToDictionary(kvp => kvp.file, kvp => kvp.schema); + + var filteredIncludeAndImportRefs = xDocs.FilterOutSchemasThatAreIncludedOrImported().Select(kvp => kvp.Key).ToList(); + var filteredIncludeAndImportRefsComparisonList = filteredIncludeAndImportRefs.Select(f => f.FullName); + + var resolvedSchemaFilesFilteredList = filesComparisonList.Except(filteredIncludeAndImportRefsComparisonList).Distinct().ToList(); + var resolvedSchemaFiles = resolvedSchemaFilesFilteredList.Select(fn => mfs.FileInfo.New(fn)).ToList(); + + if (filteredIncludeAndImportRefs.Count == files.Count && !resolvedSchemaFilesFilteredList.Any()) { + throw new LinqToXsdException("Cannot decide which XSD files to process as the specified " + + "XSD files or folder of XSD files recursively import and/or " + + "include each other! In this case you must explicitly provide" + + "a file path and not a folder path."); + } + + return resolvedSchemaFiles; + } + + /// + /// Assuming that other XSDs exist in the same directory as the given , this will pre-load those + /// additional XSDs into an and use them if they are referenced by the file. + /// + /// + /// + /// Returns a compiled + public XmlSchemaSet PreLoadXmlSchemas(string fileName) + { + if (fileName.IsEmpty()) throw new ArgumentNullException(nameof(fileName)); + + var xsdFile = mfs.FileInfo.New(fileName); + var directoryInfo = mfs.DirectoryInfo.New(xsdFile.DirectoryName!); + var additionalXsds = directoryInfo.GetFiles("*.xsd") + .Where(f => f.FullName != xsdFile.FullName); + + var xmlPreloadedResolver = new MockXmlUrlResolver(mfs); + + foreach (var xsd in additionalXsds) { + var pathRoot = Path.GetPathRoot(xsd.FullName) ?? ""; + var unrooted = xsd.FullName.Replace(pathRoot, ""); + + var xsdText = new StreamReader(xsd.OpenRead()).ReadToEnd(); + Assert.IsNotNull(xsdText); + Assert.IsFalse(string.IsNullOrWhiteSpace(xsdText)); + xmlPreloadedResolver.Add(new Uri($"file://{xsd.FullName}", UriKind.Absolute), xsd); + } + + var xmlReaderSettings = new XmlReaderSettings() { + DtdProcessing = DtdProcessing.Ignore, + CloseInput = true + }; + + var xmlReader = XmlReader.Create(xsdFile.OpenRead(), xmlReaderSettings); + XmlSchemaSet xmlSchemaSet = xmlReader.ToXmlSchemaSet(xmlPreloadedResolver); + + return xmlSchemaSet; + } + } +} \ No newline at end of file diff --git a/XObjectsTests/Utilities.cs b/XObjectsTests/Utilities.cs index cbd1c52..12065fd 100644 --- a/XObjectsTests/Utilities.cs +++ b/XObjectsTests/Utilities.cs @@ -16,7 +16,6 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Text; -using NUnit.Framework; using OneOf; using Xml.Schema.Linq.Extensions; @@ -24,45 +23,6 @@ namespace Xml.Schema.Linq.Tests { public static class Utilities { - /// - /// Assuming that other XSDs exist in the same directory as the given , this will pre-load those - /// additional XSDs into an and use them if they are referenced by the file. - /// - /// - /// - /// Returns a compiled - public static XmlSchemaSet PreLoadXmlSchemas(string fileName, MockFileSystem mfs) - { - if (fileName.IsEmpty()) throw new ArgumentNullException(nameof(fileName)); - - var xsdFile = mfs.FileInfo.New(fileName); - var directoryInfo = mfs.DirectoryInfo.New(xsdFile.DirectoryName!); - var additionalXsds = directoryInfo.GetFiles("*.xsd") - .Where(f => f.FullName != xsdFile.FullName); - - var xmlPreloadedResolver = new MockXmlUrlResolver(mfs); - - foreach (var xsd in additionalXsds) { - var pathRoot = Path.GetPathRoot(xsd.FullName) ?? ""; - var unrooted = xsd.FullName.Replace(pathRoot, ""); - - var xsdText = new StreamReader(xsd.OpenRead()).ReadToEnd(); - Assert.IsNotNull(xsdText); - Assert.IsFalse(string.IsNullOrWhiteSpace(xsdText)); - xmlPreloadedResolver.Add(new Uri($"file://{xsd.FullName}", UriKind.Absolute), xsd); - } - - var xmlReaderSettings = new XmlReaderSettings() { - DtdProcessing = DtdProcessing.Ignore, - CloseInput = true - }; - - var xmlReader = XmlReader.Create(xsdFile.OpenRead(), xmlReaderSettings); - XmlSchemaSet xmlSchemaSet = xmlReader.ToXmlSchemaSet(xmlPreloadedResolver); - - return xmlSchemaSet; - } - public static Dictionary FilterOutSchemasThatAreIncludedOrImported(this Dictionary xDocs) { var actualSchemas = xDocs.Where(kvp => kvp.Value.IsAnXmlSchema()).ToList(); @@ -85,51 +45,6 @@ where filesReferredToInImportAndIncludeElements.Any(file => { return theXDocsReferencedByImportOrInclude.ToDictionary(key => key.Key, kvp => kvp.Value); } - - public static List ResolveFileAndFolderPathsToMockFileInfos(MockFileSystem mfs, - IEnumerable sequenceOfFileAndOrFolderPaths, string filter = "*.*") - { - if (sequenceOfFileAndOrFolderPaths == null) throw new ArgumentNullException(nameof(sequenceOfFileAndOrFolderPaths)); - - var enumeratedFileAndOrFolderPaths = sequenceOfFileAndOrFolderPaths.ToList(); - - if (!enumeratedFileAndOrFolderPaths.Any()) - throw new InvalidOperationException("There are no file or folder paths present in the enumerable!"); - - var dirs = enumeratedFileAndOrFolderPaths.Where(sf => mfs.GetFile(sf).Attributes.HasFlag(FileAttributes.Directory)).ToArray(); - var files = enumeratedFileAndOrFolderPaths.Except(dirs).Select(f => mfs.FileInfo.New(f)).ToList(); - var filteredFiles = dirs.SelectMany(d => - new MockDirectoryInfo(mfs, d).GetFiles(filter, SearchOption.AllDirectories).Select(f => f)).ToList(); - files.AddRange(filteredFiles); - return files; - } - - public static List ResolvePossibleFileAndFolderPathsToProcessableSchemas(MockFileSystem mfs, - IEnumerable filesOrFolders) - { - var files = ResolveFileAndFolderPathsToMockFileInfos(mfs, filesOrFolders, "*.xsd"); - var filesComparisonList = files.Select(f => f.FullName); - - // convert files to XDocuments and check if they are proper W3C schemas - var pairs = files.Select(f => (file: f, schema: XDocument.Parse(mfs.GetFile(f).TextContents))); - var xDocs = pairs.Where(kvp => kvp.schema.IsAnXmlSchema()) - .ToDictionary(kvp => kvp.file, kvp => kvp.schema); - - var filteredIncludeAndImportRefs = xDocs.FilterOutSchemasThatAreIncludedOrImported().Select(kvp => kvp.Key).ToList(); - var filteredIncludeAndImportRefsComparisonList = filteredIncludeAndImportRefs.Select(f => f.FullName); - - var resolvedSchemaFilesFilteredList = filesComparisonList.Except(filteredIncludeAndImportRefsComparisonList).Distinct().ToList(); - var resolvedSchemaFiles = resolvedSchemaFilesFilteredList.Select(fn => mfs.FileInfo.New(fn)).ToList(); - - if (filteredIncludeAndImportRefs.Count == files.Count && !resolvedSchemaFilesFilteredList.Any()) { - throw new LinqToXsdException("Cannot decide which XSD files to process as the specified " + - "XSD files or folder of XSD files recursively import and/or " + - "include each other! In this case you must explicitly provide" + - "a file path and not a folder path."); - } - - return resolvedSchemaFiles; - } public static MockFileSystem GetAggregateMockFileSystem(IEnumerable assemblies) { From 1bd3f9541dcd362b41ff7ddfe304d695601189f4 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Thu, 11 Dec 2025 12:27:18 +1000 Subject: [PATCH 039/107] Configuration class is now public. --- XObjectsCode/Configuration/LinqToXsdConfiguration.Custom.cs | 2 +- XObjectsCode/Configuration/LinqToXsdConfiguration.xsd.config | 2 +- XObjectsCode/Configuration/LinqToXsdConfiguration.xsd.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/XObjectsCode/Configuration/LinqToXsdConfiguration.Custom.cs b/XObjectsCode/Configuration/LinqToXsdConfiguration.Custom.cs index 4f1c983..9b2f393 100644 --- a/XObjectsCode/Configuration/LinqToXsdConfiguration.Custom.cs +++ b/XObjectsCode/Configuration/LinqToXsdConfiguration.Custom.cs @@ -10,7 +10,7 @@ // ReSharper disable once CheckNamespace namespace Xml.Schema.Linq { - internal partial class Configuration + public partial class Configuration { /// /// Adds helpful XML comments if there are and elements present, diff --git a/XObjectsCode/Configuration/LinqToXsdConfiguration.xsd.config b/XObjectsCode/Configuration/LinqToXsdConfiguration.xsd.config index 5beb416..9cb04ad 100644 --- a/XObjectsCode/Configuration/LinqToXsdConfiguration.xsd.config +++ b/XObjectsCode/Configuration/LinqToXsdConfiguration.xsd.config @@ -1,7 +1,7 @@  - + false diff --git a/XObjectsCode/Configuration/LinqToXsdConfiguration.xsd.cs b/XObjectsCode/Configuration/LinqToXsdConfiguration.xsd.cs index 82a5ac9..f8853d5 100644 --- a/XObjectsCode/Configuration/LinqToXsdConfiguration.xsd.cs +++ b/XObjectsCode/Configuration/LinqToXsdConfiguration.xsd.cs @@ -26,7 +26,7 @@ namespace Xml.Schema.Linq { /// Regular expression: (CodeGeneration, Namespaces, NullableReferences?, Validation?, Transformation?) /// /// - internal partial class Configuration : XTypedElement, IXMetaData { + public partial class Configuration : XTypedElement, IXMetaData { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [EditorBrowsable(EditorBrowsableState.Never)] From 3347eca18b490952afe82fc74313612ae8db8857 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Thu, 11 Dec 2025 13:11:14 +1000 Subject: [PATCH 040/107] Added more utility methods for generating/reading default Config instances from XMl Schemas. --- .../Configuration/ConfigurationProvider.cs | 5 ++- .../LinqToXsdConfiguration.Custom.cs | 10 +++++ .../Extensions/XmlSchemaExtensions.cs | 44 +++++++++++++++++++ XObjectsTests/Extensions/FileExtensions.cs | 6 +++ 4 files changed, 63 insertions(+), 2 deletions(-) diff --git a/XObjectsCode/Configuration/ConfigurationProvider.cs b/XObjectsCode/Configuration/ConfigurationProvider.cs index 57ec5d6..84804c9 100644 --- a/XObjectsCode/Configuration/ConfigurationProvider.cs +++ b/XObjectsCode/Configuration/ConfigurationProvider.cs @@ -5,6 +5,7 @@ using System.Xml; using System.Xml.Linq; using Xml.Schema.Linq.Extensions; +// ReSharper disable CheckNamespace namespace Xml.Schema.Linq { @@ -35,7 +36,7 @@ public static XDocument ProvideExampleConfigurationXml() public static void GenerateConfigurationFiles(string possibleOutputFile, string[] inputFiles, bool foldersWereGiven, Dictionary schemaReaders, IProgress progress = null) { - var egConfig = Configuration.GetBlankConfigurationInstance(); + Configuration egConfig = Configuration.GetBlankConfigurationInstance(); var outputWasGiven = possibleOutputFile.IsNotEmpty(); if (foldersWereGiven) { @@ -74,7 +75,7 @@ public static void GenerateConfigurationFiles(string possibleOutputFile, string[ return; } - var mergedOutput = schemaReaders.Aggregate(egConfig, (theEgConfig, pair) => { + Configuration mergedOutput = schemaReaders.Aggregate(egConfig, (theEgConfig, pair) => { var loadedForXsd = Configuration.LoadForSchema(XDocument.Load(pair.Value)); return theEgConfig.MergeNamespaces(loadedForXsd); }); diff --git a/XObjectsCode/Configuration/LinqToXsdConfiguration.Custom.cs b/XObjectsCode/Configuration/LinqToXsdConfiguration.Custom.cs index 9b2f393..c57787b 100644 --- a/XObjectsCode/Configuration/LinqToXsdConfiguration.Custom.cs +++ b/XObjectsCode/Configuration/LinqToXsdConfiguration.Custom.cs @@ -171,5 +171,15 @@ public static Configuration GetExampleConfigurationInstance() return blank; } + + public static implicit operator Configuration(XDocument doc) + { + return Configuration.Parse(doc.ToString(SaveOptions.None)); + } + + public static implicit operator XDocument(Configuration config) + { + return new XDocument(config.Untyped); + } } } \ No newline at end of file diff --git a/XObjectsCode/Extensions/XmlSchemaExtensions.cs b/XObjectsCode/Extensions/XmlSchemaExtensions.cs index c4ec14b..ed4da79 100644 --- a/XObjectsCode/Extensions/XmlSchemaExtensions.cs +++ b/XObjectsCode/Extensions/XmlSchemaExtensions.cs @@ -1,7 +1,12 @@ using System; +using System.Collections.Generic; +using System.IO; using System.Linq; using System.Reflection; +using System.Xml.Linq; using System.Xml.Schema; +using Xml.Fxt; +using Xml.Schema.Linq; using Xml.Schema.Linq.CodeGen; namespace XObjects @@ -161,5 +166,44 @@ public static string GetPotentialName(this XmlSchemaObject @object) return Convert.ToString(possibleNameValue); } + + public static XDocument ToXDocument(this XmlSchema xs) + { + var stringWriter = new StringWriter(); + xs.Write(stringWriter); + var xDocument = XDocument.Parse(stringWriter.ToString()); + return xDocument; + } + + public static List ToXDocuments(this XmlSchemaSet xs) + { + return xs.Schemas().Cast().Select(x => x.ToXDocument()).ToList(); + } + + /// + /// Merges the configurations of all schemas in the provided into a single configuration. + /// + /// The containing the schemas to merge configurations for. + /// + /// An optional starting to merge into. If not provided, an example configuration is used. + /// + /// + /// A merged that combines namespace configurations from all schemas in the set. + /// + /// + /// This method processes each schema in the , converts it to an , + /// loads its configuration, and merges it into the starting configuration. + /// + public static Configuration ToDefaultMergedConfiguration(this XmlSchemaSet xs, Configuration startingConfig = null) + { + var egConfig = startingConfig ?? (Configuration)ConfigurationProvider.ProvideExampleConfigurationXml(); + var docs = xs.Schemas().Cast().Select(x => x.ToXDocument()).ToList(); + var configs = docs.Select(d => Configuration.LoadForSchema(d)); + + Configuration mergedConfigOutput = configs.Aggregate(egConfig, + (theEgConfig, loadedConfig) => theEgConfig.MergeNamespaces(loadedConfig)); + + return mergedConfigOutput; + } } } \ No newline at end of file diff --git a/XObjectsTests/Extensions/FileExtensions.cs b/XObjectsTests/Extensions/FileExtensions.cs index 67bc0c8..3bd8f55 100644 --- a/XObjectsTests/Extensions/FileExtensions.cs +++ b/XObjectsTests/Extensions/FileExtensions.cs @@ -1,5 +1,6 @@ using System.IO; using System.IO.Abstractions; +using System.Xml.Linq; namespace Xml.Schema.Linq.Tests.Extensions; @@ -9,4 +10,9 @@ public static StreamReader ToStreamReader(this IFileInfo fileInfo) { return new StreamReader(fileInfo.OpenRead()); } + + public static XDocument ToXDocument(this IFileInfo fileInfo) + { + return XDocument.Load(fileInfo.ToStreamReader()); + } } \ No newline at end of file From d45505cd831401354e5c4cf1f5e77a3af69031d2 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Thu, 11 Dec 2025 16:20:15 +1000 Subject: [PATCH 041/107] Work on a new test. --- XObjectsCode/Extensions/CodeDomExtensions.cs | 40 ++++++++++++++++++++ XObjectsTests/BaseTester.cs | 6 +++ XObjectsTests/CodeGen/ClrPropertyTests.cs | 33 ++++++++++++++++ 3 files changed, 79 insertions(+) create mode 100644 XObjectsTests/CodeGen/ClrPropertyTests.cs diff --git a/XObjectsCode/Extensions/CodeDomExtensions.cs b/XObjectsCode/Extensions/CodeDomExtensions.cs index 079b79c..151e167 100644 --- a/XObjectsCode/Extensions/CodeDomExtensions.cs +++ b/XObjectsCode/Extensions/CodeDomExtensions.cs @@ -451,5 +451,45 @@ CodeTypeDeclaration ToTypeDeclaration(CodeTypeReference typeRef) return null; } } + + extension(CodeObject co) where TCodeObject: CodeObject + { + public string GetStringUserValueForKey(string key) + { + var value = co.UserData[key]; + return value as string; + } + + public void SetStringUserValueForKey(string key, string value) + { + co.UserData[key] = value; + } + + public void SetParentInUserData(TCodeObject parent) + { + co.UserData["Parent"] = parent; + } + + public TCodeObject GetParentInUserData() + { + return co.UserData["Parent"] as TCodeObject; + } + } + + extension(CodeTypeDeclaration type) + { + public CodeNamespace Parent + { + get => type.GetParentInUserData(); + set => type.SetParentInUserData(value); + } + + public IEnumerable ChildProperties + { + get { + return type.Members.OfType(); + } + } + } } } \ No newline at end of file diff --git a/XObjectsTests/BaseTester.cs b/XObjectsTests/BaseTester.cs index 50b0040..a0f5013 100644 --- a/XObjectsTests/BaseTester.cs +++ b/XObjectsTests/BaseTester.cs @@ -5,6 +5,7 @@ using System.IO.Abstractions.TestingHelpers; using System.Linq; using System.Reflection; +using Microsoft.CodeAnalysis.CSharp; using NUnit.Framework; using Xml.Schema.Linq.Tests.Extensions; @@ -34,6 +35,11 @@ public void Setup() AllTestFiles = Utilities.GetAggregateMockFileSystem(TestAssembliesLoaded); } + public CSharpSyntaxTree GenerateSyntaxTree(MockFileInfo mfi) + { + return Utilities.GenerateSyntaxTree(mfi, AllTestFiles); + } + public IEnumerable GetFileSystemForAssemblyNames(IEnumerable assemblyNames) { foreach (var assemblyName in assemblyNames) { diff --git a/XObjectsTests/CodeGen/ClrPropertyTests.cs b/XObjectsTests/CodeGen/ClrPropertyTests.cs new file mode 100644 index 0000000..2c7b17d --- /dev/null +++ b/XObjectsTests/CodeGen/ClrPropertyTests.cs @@ -0,0 +1,33 @@ +using System.IO.Abstractions.TestingHelpers; +using System.Linq; +using NUnit.Framework; +using Xml.Schema.Linq.CodeGen; +using Xml.Schema.Linq.Tests.Extensions; +using XObjects; + +namespace Xml.Schema.Linq.Tests.CodeGen; + +public class ClrPropertyTests: BaseTester +{ + [Test] + public void T1() + { + MockFileInfo abstractTestXsd = AllTestFiles.GetMockFileInfo(f => f.EndsWith("abstracttest.xsd")); + MockFileInfo abstractTestXsdConfig = AllTestFiles.GetMockFileInfo(f => f.EndsWith("abstracttest.xsd.config")); + var config = Configuration.Load(abstractTestXsdConfig.ToStreamReader()); + + var schemaSet = Utilities.GetXmlSchemaSet(abstractTestXsd, AllTestFiles); + var defaultSettings = schemaSet.ToDefaultMergedConfiguration(config).ToLinqToXsdSettings(); + var xsdConverter = new XsdToTypesConverter(defaultSettings); + var mapping = xsdConverter.GenerateMapping(schemaSet); + + var codeGenerator = new CodeDomTypesGenerator(defaultSettings); + var namespaces = codeGenerator.GenerateTypes(mapping).ToList(); + + Assert.NotNull(mapping); + + foreach (var type in mapping.Types) { + + } + } +} \ No newline at end of file From d3c48ce0e4f53437de8108e6d9b1a3a78d70e7e9 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Thu, 11 Dec 2025 16:20:43 +1000 Subject: [PATCH 042/107] WIP on fixing newly discovred regressoin. --- XObjectsCode/Src/ClrPropertyInfo.cs | 10 ++++++++-- XObjectsCode/Src/TypeBuilder.cs | 3 +++ XObjectsCode/Src/TypesToCodeDom.cs | 3 ++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/XObjectsCode/Src/ClrPropertyInfo.cs b/XObjectsCode/Src/ClrPropertyInfo.cs index d432c64..b9fab84 100644 --- a/XObjectsCode/Src/ClrPropertyInfo.cs +++ b/XObjectsCode/Src/ClrPropertyInfo.cs @@ -24,7 +24,7 @@ public partial class ClrPropertyInfo : ClrBasePropertyInfo string clrTypeName; string clrNamespace; string fixedDefaultValue; - string simpleTypeClrTypeName; + internal string simpleTypeClrTypeName; ArrayList substitutionMembers; @@ -1164,7 +1164,7 @@ protected CodeExpression GetFullyQualifiedSimpleTypeClassExpression(string names protected CodeExpression GetSimpleTypeClassExpression(bool disambiguateWhenPropertyAndTypeNameAreTheSame = false) { - Debug.Assert(this.simpleTypeClrTypeName != null); + //Debug.Assert(this.simpleTypeClrTypeName != null); var areTheSameAndShouldDisambiguate = false; if (disambiguateWhenPropertyAndTypeNameAreTheSame) { @@ -1176,6 +1176,12 @@ protected CodeExpression GetSimpleTypeClassExpression(bool disambiguateWhenPrope var typeName = areTheSameAndShouldDisambiguate ? $"global::{this.settings.GetClrNamespace(PropertyNs)}.{this.simpleTypeClrTypeName}" : this.simpleTypeClrTypeName; + + if (typeName.IsEmpty()) { + //Debugger.Break(); + typeName = this.ReturnType.fullTypeName; + } + var codeFieldReferenceExpression = CodeDomHelper.CreateFieldReference(typeName, Constants.SimpleTypeDefInnerType); #if DEBUG diff --git a/XObjectsCode/Src/TypeBuilder.cs b/XObjectsCode/Src/TypeBuilder.cs index 73c1f86..5de9092 100644 --- a/XObjectsCode/Src/TypeBuilder.cs +++ b/XObjectsCode/Src/TypeBuilder.cs @@ -399,6 +399,8 @@ internal static CodeTypeDeclaration CreateSimpleType(ClrSimpleTypeInfo typeInfo, // inconsistency w/ the wasy ApplyAnnotations are us ApplyAnnotations(simpleTypeDecl, typeInfo); + + simpleTypeDecl.UserData.Add("", ""); return simpleTypeDecl; } @@ -821,6 +823,7 @@ internal override void CreateAttributeProperty(ClrBasePropertyInfo propertyInfo, List annotations) { propertyBuilder = TypePropertyBuilder.Create(decl, declItemsInfo, DefaultVisibility); + var d = propertyInfo as ClrPropertyInfo; propertyBuilder.GenerateCode(propertyInfo, annotations); } diff --git a/XObjectsCode/Src/TypesToCodeDom.cs b/XObjectsCode/Src/TypesToCodeDom.cs index 2369f97..badb10e 100644 --- a/XObjectsCode/Src/TypesToCodeDom.cs +++ b/XObjectsCode/Src/TypesToCodeDom.cs @@ -188,8 +188,9 @@ private void ProcessProperties(IEnumerable properties, List Date: Thu, 11 Dec 2025 20:01:55 +1000 Subject: [PATCH 043/107] Revert "WIP on fixing newly discovred regressoin." This reverts commit d3c48ce0e4f53437de8108e6d9b1a3a78d70e7e9. --- XObjectsCode/Src/ClrPropertyInfo.cs | 10 ++-------- XObjectsCode/Src/TypeBuilder.cs | 3 --- XObjectsCode/Src/TypesToCodeDom.cs | 3 +-- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/XObjectsCode/Src/ClrPropertyInfo.cs b/XObjectsCode/Src/ClrPropertyInfo.cs index b9fab84..d432c64 100644 --- a/XObjectsCode/Src/ClrPropertyInfo.cs +++ b/XObjectsCode/Src/ClrPropertyInfo.cs @@ -24,7 +24,7 @@ public partial class ClrPropertyInfo : ClrBasePropertyInfo string clrTypeName; string clrNamespace; string fixedDefaultValue; - internal string simpleTypeClrTypeName; + string simpleTypeClrTypeName; ArrayList substitutionMembers; @@ -1164,7 +1164,7 @@ protected CodeExpression GetFullyQualifiedSimpleTypeClassExpression(string names protected CodeExpression GetSimpleTypeClassExpression(bool disambiguateWhenPropertyAndTypeNameAreTheSame = false) { - //Debug.Assert(this.simpleTypeClrTypeName != null); + Debug.Assert(this.simpleTypeClrTypeName != null); var areTheSameAndShouldDisambiguate = false; if (disambiguateWhenPropertyAndTypeNameAreTheSame) { @@ -1176,12 +1176,6 @@ protected CodeExpression GetSimpleTypeClassExpression(bool disambiguateWhenPrope var typeName = areTheSameAndShouldDisambiguate ? $"global::{this.settings.GetClrNamespace(PropertyNs)}.{this.simpleTypeClrTypeName}" : this.simpleTypeClrTypeName; - - if (typeName.IsEmpty()) { - //Debugger.Break(); - typeName = this.ReturnType.fullTypeName; - } - var codeFieldReferenceExpression = CodeDomHelper.CreateFieldReference(typeName, Constants.SimpleTypeDefInnerType); #if DEBUG diff --git a/XObjectsCode/Src/TypeBuilder.cs b/XObjectsCode/Src/TypeBuilder.cs index 5de9092..73c1f86 100644 --- a/XObjectsCode/Src/TypeBuilder.cs +++ b/XObjectsCode/Src/TypeBuilder.cs @@ -399,8 +399,6 @@ internal static CodeTypeDeclaration CreateSimpleType(ClrSimpleTypeInfo typeInfo, // inconsistency w/ the wasy ApplyAnnotations are us ApplyAnnotations(simpleTypeDecl, typeInfo); - - simpleTypeDecl.UserData.Add("", ""); return simpleTypeDecl; } @@ -823,7 +821,6 @@ internal override void CreateAttributeProperty(ClrBasePropertyInfo propertyInfo, List annotations) { propertyBuilder = TypePropertyBuilder.Create(decl, declItemsInfo, DefaultVisibility); - var d = propertyInfo as ClrPropertyInfo; propertyBuilder.GenerateCode(propertyInfo, annotations); } diff --git a/XObjectsCode/Src/TypesToCodeDom.cs b/XObjectsCode/Src/TypesToCodeDom.cs index badb10e..2369f97 100644 --- a/XObjectsCode/Src/TypesToCodeDom.cs +++ b/XObjectsCode/Src/TypesToCodeDom.cs @@ -188,9 +188,8 @@ private void ProcessProperties(IEnumerable properties, List Date: Mon, 15 Dec 2025 10:49:39 +1000 Subject: [PATCH 044/107] ContentInfo now tracks its parent when invoking AddChild(). --- XObjectsCode/Src/ContentInfo.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/XObjectsCode/Src/ContentInfo.cs b/XObjectsCode/Src/ContentInfo.cs index 48847e6..f47fdcd 100644 --- a/XObjectsCode/Src/ContentInfo.cs +++ b/XObjectsCode/Src/ContentInfo.cs @@ -41,7 +41,9 @@ public ContentType ContentType get { return contentType; } } - +#nullable enable + public ContentInfo? Parent { get; set; } +#nullable disable public IEnumerable Children { get @@ -72,6 +74,7 @@ public void AddChild(ContentInfo content) } lastChild = content; + content.Parent ??= this; } public string OccurenceString From a7b6bf6d5a351b1e636cd238af5db9bb891b4f47 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Mon, 15 Dec 2025 13:19:24 +1000 Subject: [PATCH 045/107] ClrPropertyInfo now tracks the parent type declaration it's in. --- XObjectsCode/Src/ClrPropertyInfo.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/XObjectsCode/Src/ClrPropertyInfo.cs b/XObjectsCode/Src/ClrPropertyInfo.cs index d432c64..a7caa03 100644 --- a/XObjectsCode/Src/ClrPropertyInfo.cs +++ b/XObjectsCode/Src/ClrPropertyInfo.cs @@ -5,6 +5,7 @@ using System.Collections; using System.Collections.Generic; using System.Diagnostics; +using System.Linq; using System.Xml.Schema; using Xml.Schema.Linq.Extensions; using XObjects; @@ -28,6 +29,13 @@ public partial class ClrPropertyInfo : ClrBasePropertyInfo ArrayList substitutionMembers; +#nullable enable + /// + /// The enclosing that this instance is a part of. + /// + public CodeTypeDeclaration? ParentTypeDeclaration { get; set; } +#nullable disable + public ClrPropertyInfo(string propertyName, string propertyNs, string schemaName, Occurs occursInSchema, LinqToXsdSettings settings) { this.settings = settings; @@ -386,11 +394,14 @@ public void SetPropertyAttributes(CodeMemberProperty clrProperty, MemberAttribut public override CodeMemberProperty AddToType(CodeTypeDeclaration parentTypeDecl, List annotations, GeneratedTypesVisibility visibility = GeneratedTypesVisibility.Public) { + if (parentTypeDecl == null) throw new ArgumentNullException(nameof(parentTypeDecl)); if (!ShouldGenerate) { return null; } + ParentTypeDeclaration ??= parentTypeDecl; + CreateXNameField(parentTypeDecl); CreateFixedDefaultValue(parentTypeDecl); CodeMemberProperty clrProperty = CodeDomHelper.CreateProperty(ReturnType, hasSet, visibility.ToMemberAttribute()); @@ -1164,7 +1175,7 @@ protected CodeExpression GetFullyQualifiedSimpleTypeClassExpression(string names protected CodeExpression GetSimpleTypeClassExpression(bool disambiguateWhenPropertyAndTypeNameAreTheSame = false) { - Debug.Assert(this.simpleTypeClrTypeName != null); + // Debug.Assert(this.simpleTypeClrTypeName != null); var areTheSameAndShouldDisambiguate = false; if (disambiguateWhenPropertyAndTypeNameAreTheSame) { From f4f3b30a8efd429539610e5513a9ac52e809f6a9 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Mon, 15 Dec 2025 13:19:47 +1000 Subject: [PATCH 046/107] Added more codeDom extensions for tracking parents (using UserData as a crutch). --- XObjectsCode/Extensions/CodeDomExtensions.cs | 70 +++++++++++++++++--- 1 file changed, 61 insertions(+), 9 deletions(-) diff --git a/XObjectsCode/Extensions/CodeDomExtensions.cs b/XObjectsCode/Extensions/CodeDomExtensions.cs index 151e167..fad144a 100644 --- a/XObjectsCode/Extensions/CodeDomExtensions.cs +++ b/XObjectsCode/Extensions/CodeDomExtensions.cs @@ -1,4 +1,5 @@ -using Microsoft.CSharp; +#nullable enable +using Microsoft.CSharp; using OneOf; @@ -452,9 +453,22 @@ CodeTypeDeclaration ToTypeDeclaration(CodeTypeReference typeRef) } } + /// + /// Adds a new to the current namespace and also retain a reference to the parent in the given + /// . This is set in the dictionary; can be set with + /// and retrieved with . + /// + /// + /// + public static void AddTypeWithParentNamespace(this CodeNamespace codeNs, CodeTypeDeclaration type) + { + codeNs.Types.Add(type); + type.SetParent(codeNs); + } + extension(CodeObject co) where TCodeObject: CodeObject { - public string GetStringUserValueForKey(string key) + public string? GetStringUserValueForKey(string key) { var value = co.UserData[key]; return value as string; @@ -462,15 +476,29 @@ public string GetStringUserValueForKey(string key) public void SetStringUserValueForKey(string key, string value) { - co.UserData[key] = value; + if (key == null) throw new ArgumentNullException(nameof(key)); + co.UserData[key] = value ?? throw new ArgumentNullException(nameof(value)); } - public void SetParentInUserData(TCodeObject parent) + /// + /// This is a strongly-typed convenience method to allow setting a parent for the current . + /// For things like s, you can use this to retain a reference + /// to the parent for instance. + /// + /// + /// + public void SetParent(TCodeObject parent) { - co.UserData["Parent"] = parent; + co.UserData["Parent"] = parent ?? throw new ArgumentNullException(nameof(parent)); } - public TCodeObject GetParentInUserData() + /// + /// This is a strongly-typed convenience method to allow getting a parent for the current . + /// For things like s, you can use this to retain a reference + /// to the parent for instance. + /// + /// + public TCodeObject? GetParent() { return co.UserData["Parent"] as TCodeObject; } @@ -478,10 +506,13 @@ public TCodeObject GetParentInUserData() extension(CodeTypeDeclaration type) { - public CodeNamespace Parent + /// + /// Retain a reference to the parent this type is meant to be enclosed in. + /// + public CodeNamespace? ParentNamespace { - get => type.GetParentInUserData(); - set => type.SetParentInUserData(value); + get => type.GetParent(); + set => type.SetParent(value!); } public IEnumerable ChildProperties @@ -490,6 +521,27 @@ public IEnumerable ChildProperties return type.Members.OfType(); } } + + public IEnumerable ChildTypes + { + get { + return type.Members.OfType(); + } + } + + public IEnumerable ChildEnumDeclarations + { + get { + return type.Members.OfType().Where(e => e.IsEnum); + } + } + + public IEnumerable ChildClassDeclarations + { + get { + return type.Members.OfType().Where(e => e.IsClass); + } + } } } } \ No newline at end of file From 6955666dd4760bb78b5b88582a479f48d6676445 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Mon, 15 Dec 2025 14:31:45 +1000 Subject: [PATCH 047/107] Replaced uses of Types.Add with new codeDom extension method, AddTypeWithParentNamespace() to track the parent namespace for CodeTypeDeclaration instances. --- XObjectsCode/Src/TypesToCodeDom.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/XObjectsCode/Src/TypesToCodeDom.cs b/XObjectsCode/Src/TypesToCodeDom.cs index 2369f97..7d0e8f4 100644 --- a/XObjectsCode/Src/TypesToCodeDom.cs +++ b/XObjectsCode/Src/TypesToCodeDom.cs @@ -77,12 +77,13 @@ public IEnumerable GenerateTypes(ClrMappingInfo binding) else { codeNamespace = GetCodeNamespace(type.clrtypeNs); + Debug.Assert(codeNamespace != null); ClrSimpleTypeInfo stInfo = type as ClrSimpleTypeInfo; if (stInfo != null) { if (stInfo is EnumSimpleTypeInfo enumTypeInfo) { var enumType = TypeBuilder.CreateEnumType(enumTypeInfo, settings, stInfo); - codeNamespace.Types.Add(enumType); + codeNamespace.AddTypeWithParentNamespace(enumType); var enumsInOtherTypes = codeNamespace.DescendentTypeScopedEnumDeclarations(); // if an enum is defined in another type, remove it, if it is the same as the global (namespace scoped type) if (enumsInOtherTypes.EqualEnumDeclarationExists(enumType)) { @@ -92,13 +93,13 @@ public IEnumerable GenerateTypes(ClrMappingInfo binding) typeWithDuplicateEnum.Members.Remove(duplicateEnum); } } - codeNamespace.Types.Add(TypeBuilder.CreateSimpleType(stInfo, nameMappings, settings)); + codeNamespace.AddTypeWithParentNamespace(TypeBuilder.CreateSimpleType(stInfo, nameMappings, settings)); } else { CodeTypeDeclaration decl = ProcessType(type as ClrContentTypeInfo, null, true); //Sets current codeNamespace - codeNamespace.Types.Add(decl); + codeNamespace.AddTypeWithParentNamespace(decl); if (type.IsRootElement) { @@ -468,7 +469,7 @@ private void CreateXRoot(CodeNamespace codeNamespace, string rootName, List types; codeNamespace = GetCodeNamespace(typeInfo.clrtypeNs); @@ -598,7 +599,7 @@ private void CreateTypeManager() wrapperDictionaryStatements: wrapperDictionaryAddStatements, visibility: typeVisibility); - rootCodeNamespace.Types.Add(typeManagerDeclaration); + rootCodeNamespace.AddTypeWithParentNamespace(typeManagerDeclaration); //Add using statements in the rest of the namespaces for the root namespace to avoid error on TypeManager reference //Add using statements in the root namespace for the rest of the namespaces to avoid errors while building type dictionaries CodeNamespaceImport rootImport = new CodeNamespaceImport(rootCodeNamespace.Name); From 4ecc970cb21c3645ceeb63e8e668611591296fa8 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Mon, 15 Dec 2025 15:22:59 +1000 Subject: [PATCH 048/107] Updated .editorconfig. --- .editorconfig | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.editorconfig b/.editorconfig index 8dad22a..9a207e0 100644 --- a/.editorconfig +++ b/.editorconfig @@ -53,9 +53,9 @@ csharp_space_between_parentheses = false csharp_space_between_square_brackets = false csharp_style_namespace_declarations = file_scoped:suggestion csharp_style_prefer_utf8_string_literals = true:suggestion -csharp_style_var_elsewhere = true:suggestion -csharp_style_var_for_built_in_types = true:suggestion -csharp_style_var_when_type_is_apparent = true:suggestion +csharp_style_var_elsewhere = false:none +csharp_style_var_for_built_in_types = false:suggestion +csharp_style_var_when_type_is_apparent = true:none csharp_using_directive_placement = outside_namespace:silent dotnet_diagnostic.bc40000.severity = warning dotnet_diagnostic.bc400005.severity = warning @@ -739,6 +739,7 @@ resharper_formatter_on_tag = resharper_formatter_tags_accept_regexp = false resharper_formatter_tags_enabled = false resharper_format_leading_spaces_decl = false +resharper_for_built_in_types = use_var_when_evident resharper_free_block_braces = next_line resharper_from_clause_place_comma = as_in_common resharper_from_clause_place_elements_on = as_in_common From e49405ae9b004f9f747482d5f79309b14c30769e Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Mon, 15 Dec 2025 15:23:14 +1000 Subject: [PATCH 049/107] More CodeDom extensions. --- XObjectsCode/Extensions/CodeDomExtensions.cs | 70 +++++++++++++++++--- 1 file changed, 61 insertions(+), 9 deletions(-) diff --git a/XObjectsCode/Extensions/CodeDomExtensions.cs b/XObjectsCode/Extensions/CodeDomExtensions.cs index fad144a..c58bd85 100644 --- a/XObjectsCode/Extensions/CodeDomExtensions.cs +++ b/XObjectsCode/Extensions/CodeDomExtensions.cs @@ -466,20 +466,67 @@ public static void AddTypeWithParentNamespace(this CodeNamespace codeNs, CodeTyp type.SetParent(codeNs); } - extension(CodeObject co) where TCodeObject: CodeObject + public static List FlattenAllNestedTypesRecursively(this CodeTypeDeclaration type, List? typesList = null) { - public string? GetStringUserValueForKey(string key) - { - var value = co.UserData[key]; - return value as string; + typesList ??= new List(); + List nestedTypes = type.Members.OfType().ToList(); + if (nestedTypes.Count > 0) { + typesList.AddRange(nestedTypes); + foreach (var nestedType in nestedTypes) { + nestedType.FlattenAllNestedTypesRecursively(typesList); + } } - public void SetStringUserValueForKey(string key, string value) - { - if (key == null) throw new ArgumentNullException(nameof(key)); - co.UserData[key] = value ?? throw new ArgumentNullException(nameof(value)); + return typesList; + } + + /// + /// Searches for a nested type with the specified name within the current + /// and all its nested types recursively. + /// + /// The current type. + /// A searching predicate + /// + /// The representing the nested type with the specified name, + /// or null if no such type is found. + /// + public static CodeTypeMember? SearchAllNestedTypesRecursively(this CodeTypeDeclaration type, Func predicate) + { + if (predicate == null) throw new ArgumentNullException(nameof(predicate)); + + var thePossibleType = type.Members.Cast().SingleOrDefault(predicate); + if (thePossibleType is null) { + IEnumerable nestedTypes = type.Members.OfType(); + foreach (var nestedType in nestedTypes) { + thePossibleType = nestedType.SearchAllNestedTypesRecursively(predicate); + } } + return thePossibleType; + } + + public static CodeTypeMember? SearchAllNestedTypesRecursively(this CodeNamespace ns, Func predicate) + { + if (predicate == null) throw new ArgumentNullException(nameof(predicate)); + + foreach (var type in ns.Types.Cast()) { + var thePossibleType = type.Members.Cast().SingleOrDefault(predicate); + if (thePossibleType is null) { + IEnumerable nestedTypes = type.Members.OfType(); + foreach (var nestedType in nestedTypes) { + thePossibleType = nestedType.SearchAllNestedTypesRecursively(predicate); + } + } + else { + return thePossibleType; + } + } + + return null; + } + + extension(CodeObject co) where TCodeObject: CodeObject + { /// /// This is a strongly-typed convenience method to allow setting a parent for the current . /// For things like s, you can use this to retain a reference @@ -502,6 +549,11 @@ public void SetParent(TCodeObject parent) { return co.UserData["Parent"] as TCodeObject; } + + public bool HasParent() + { + return co.UserData["Parent"] is TCodeObject; + } } extension(CodeTypeDeclaration type) From 027e4257a38c223f6cedc3e0a3e24c7778e5dc5f Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Mon, 15 Dec 2025 16:21:01 +1000 Subject: [PATCH 050/107] Passed the namespace of the enclosing type being generated. --- XObjectsCode/Src/CodeDomHelper.cs | 3 ++- XObjectsCode/Src/PropertyBuilder.cs | 38 +++++++++++++++++------------ XObjectsCode/Src/TypeBuilder.cs | 15 ++++++++---- XObjectsCode/Src/TypesToCodeDom.cs | 2 +- 4 files changed, 35 insertions(+), 23 deletions(-) diff --git a/XObjectsCode/Src/CodeDomHelper.cs b/XObjectsCode/Src/CodeDomHelper.cs index 142a31e..04f993a 100644 --- a/XObjectsCode/Src/CodeDomHelper.cs +++ b/XObjectsCode/Src/CodeDomHelper.cs @@ -45,11 +45,12 @@ public static CodeIndexerExpression CreateIndexerExpression(string target, strin } public static CodeTypeDeclaration CreateTypeDeclaration(string clrTypeName, string innerType, - GeneratedTypesVisibility generatedTypesVisibility = GeneratedTypesVisibility.Public) + GeneratedTypesVisibility generatedTypesVisibility = GeneratedTypesVisibility.Public, CodeNamespace parentNamespace = null) { CodeTypeDeclaration typeDecl = new CodeTypeDeclaration(clrTypeName); typeDecl.TypeAttributes = generatedTypesVisibility.ToTypeAttribute(); typeDecl.IsPartial = true; + if (parentNamespace is not null) typeDecl.ParentNamespace = parentNamespace; return typeDecl; } diff --git a/XObjectsCode/Src/PropertyBuilder.cs b/XObjectsCode/Src/PropertyBuilder.cs index b23019c..48e61e5 100644 --- a/XObjectsCode/Src/PropertyBuilder.cs +++ b/XObjectsCode/Src/PropertyBuilder.cs @@ -15,12 +15,16 @@ internal abstract class TypePropertyBuilder protected CodeTypeDeclaration decl; protected GeneratedTypesVisibility visibility; + + protected CodeNamespace ParentNamespace { get; } - public TypePropertyBuilder(CodeTypeDeclaration decl, CodeTypeDeclItems declItems, GeneratedTypesVisibility visibility) + public TypePropertyBuilder(CodeTypeDeclaration decl, CodeTypeDeclItems declItems, GeneratedTypesVisibility visibility, + CodeNamespace parentNamespace = null) { this.decl = decl; this.declItems = declItems; this.visibility = visibility; + ParentNamespace = parentNamespace; } public virtual void StartCodeGen() @@ -43,19 +47,19 @@ public virtual bool IsRepeating } public static TypePropertyBuilder Create(ContentModelPropertyBuilder parentBuilder, GroupingInfo groupingInfo, CodeTypeDeclaration decl, - CodeTypeDeclItems declItems, GeneratedTypesVisibility visibility = GeneratedTypesVisibility.Public) + CodeTypeDeclItems declItems, GeneratedTypesVisibility visibility = GeneratedTypesVisibility.Public, CodeNamespace parentNs = null) { switch (groupingInfo.ContentModelType) { case ContentModelType.None: case ContentModelType.All: - return new DefaultPropertyBuilder(decl, declItems, visibility); + return new DefaultPropertyBuilder(decl, declItems, visibility, parentNs); case ContentModelType.Sequence: - return new SequencePropertyBuilder(parentBuilder, groupingInfo, decl, declItems, visibility); + return new SequencePropertyBuilder(parentBuilder, groupingInfo, decl, declItems, visibility, parentNs); case ContentModelType.Choice: - return new ChoicePropertyBuilder(parentBuilder, groupingInfo, decl, declItems, visibility); + return new ChoicePropertyBuilder(parentBuilder, groupingInfo, decl, declItems, visibility, parentNs); default: throw new InvalidOperationException(); @@ -63,9 +67,9 @@ public static TypePropertyBuilder Create(ContentModelPropertyBuilder parentBuild } public static TypePropertyBuilder Create(CodeTypeDeclaration decl, CodeTypeDeclItems declItems, - GeneratedTypesVisibility visibility = GeneratedTypesVisibility.Public) + GeneratedTypesVisibility visibility = GeneratedTypesVisibility.Public, CodeNamespace parentNs = null) { - return new DefaultPropertyBuilder(decl, declItems, visibility); + return new DefaultPropertyBuilder(decl, declItems, visibility, parentNs); } } @@ -75,8 +79,8 @@ internal abstract class ContentModelPropertyBuilder : TypePropertyBuilder protected CodeObjectCreateExpression contentModelExpression; public ContentModelPropertyBuilder(ContentModelPropertyBuilder parentBuilder, GroupingInfo grouping, CodeTypeDeclaration decl, CodeTypeDeclItems declItems, - GeneratedTypesVisibility visibility) - : base(decl, declItems, visibility) + GeneratedTypesVisibility visibility, CodeNamespace parentNs) + : base(decl, declItems, visibility, parentNs) { this.ParentBuilder = parentBuilder; this.grouping = grouping; //The grouping the contentmodelbuilder works on @@ -144,9 +148,10 @@ private void AddToContentModel() internal class SequencePropertyBuilder : ContentModelPropertyBuilder { - public SequencePropertyBuilder(ContentModelPropertyBuilder parentBuilder, GroupingInfo grouping, CodeTypeDeclaration decl, CodeTypeDeclItems declItems, - GeneratedTypesVisibility visibility = GeneratedTypesVisibility.Public) : - base(parentBuilder, grouping, decl, declItems, visibility) + public SequencePropertyBuilder(ContentModelPropertyBuilder parentBuilder, GroupingInfo grouping, + CodeTypeDeclaration decl, CodeTypeDeclItems declItems, + GeneratedTypesVisibility visibility = GeneratedTypesVisibility.Public, CodeNamespace parentNs = null) : + base(parentBuilder, grouping, decl, declItems, visibility, parentNs) { } @@ -163,9 +168,10 @@ internal class ChoicePropertyBuilder : ContentModelPropertyBuilder bool hasDuplicateType; Dictionary propertyTypeNameTable; - public ChoicePropertyBuilder(ContentModelPropertyBuilder parentBuilder, GroupingInfo grouping, CodeTypeDeclaration decl, CodeTypeDeclItems declItems, - GeneratedTypesVisibility visibility = GeneratedTypesVisibility.Public) : - base(parentBuilder, grouping, decl, declItems, visibility) + public ChoicePropertyBuilder(ContentModelPropertyBuilder parentBuilder, GroupingInfo grouping, + CodeTypeDeclaration decl, CodeTypeDeclItems declItems, + GeneratedTypesVisibility visibility = GeneratedTypesVisibility.Public, CodeNamespace parentNs = null) : + base(parentBuilder, grouping, decl, declItems, visibility, parentNs) { flatChoice = !grouping.IsNested && !grouping.IsRepeating && !grouping.HasChildGroups; hasDuplicateType = false; @@ -223,7 +229,7 @@ public override CodeObjectCreateExpression CreateContentModelExpression() internal class DefaultPropertyBuilder : TypePropertyBuilder { internal DefaultPropertyBuilder(CodeTypeDeclaration decl, CodeTypeDeclItems declItems, - GeneratedTypesVisibility visibility = GeneratedTypesVisibility.Public) : base(decl, declItems, visibility) + GeneratedTypesVisibility visibility = GeneratedTypesVisibility.Public, CodeNamespace parentNs = null) : base(decl, declItems, visibility, parentNs) { } } diff --git a/XObjectsCode/Src/TypeBuilder.cs b/XObjectsCode/Src/TypeBuilder.cs index 73c1f86..6c54068 100644 --- a/XObjectsCode/Src/TypeBuilder.cs +++ b/XObjectsCode/Src/TypeBuilder.cs @@ -153,7 +153,7 @@ protected virtual string InnerType get { return null; } } - internal void CreateTypeDeclaration(ClrTypeInfo clrTypeInfo) + internal void CreateTypeDeclaration(ClrTypeInfo clrTypeInfo, CodeNamespace parentNamespace = null) { this.clrTypeInfo = clrTypeInfo; SetElementWildCardFlag(clrTypeInfo.HasElementWildCard); @@ -163,7 +163,7 @@ internal void CreateTypeDeclaration(ClrTypeInfo clrTypeInfo) string clrTypeName = clrTypeInfo.clrtypeName; SchemaOrigin typeOrigin = clrTypeInfo.typeOrigin; - CodeTypeDeclaration typeDecl = CodeDomHelper.CreateTypeDeclaration(clrTypeName, InnerType, DefaultVisibility); + CodeTypeDeclaration typeDecl = CodeDomHelper.CreateTypeDeclaration(clrTypeName, InnerType, DefaultVisibility, parentNamespace); if (clrTypeInfo.IsAbstract) { @@ -737,9 +737,14 @@ internal class XTypedElementBuilder : TypeBuilder TypePropertyBuilder propertyBuilder; CodeStatementCollection propertyDictionaryAddStatements; + /// + /// Allows logic to query adjacent types in the same namespace for the existence of other types. + /// + protected CodeNamespace ParentNamespace { get; } - internal XTypedElementBuilder(LinqToXsdSettings settings): base(settings) + internal XTypedElementBuilder(LinqToXsdSettings settings, CodeNamespace parentNamespace): base(settings) { + ParentNamespace = parentNamespace; InnerInit(); } @@ -783,7 +788,7 @@ protected override void SetElementWildCardFlag(bool hasAny) internal override void StartGrouping(GroupingInfo groupingInfo) { InitializeTables(); - propertyBuilder = TypePropertyBuilder.Create(propertyBuilder as ContentModelPropertyBuilder, groupingInfo, decl, declItemsInfo, DefaultVisibility); + propertyBuilder = TypePropertyBuilder.Create(propertyBuilder as ContentModelPropertyBuilder, groupingInfo, decl, declItemsInfo, DefaultVisibility, ParentNamespace); propertyBuilder.StartCodeGen(); //Start the group's code gen, like setting up functional const etc propertyBuilderStack.Push(propertyBuilder); } @@ -820,7 +825,7 @@ internal override void EndGrouping() internal override void CreateAttributeProperty(ClrBasePropertyInfo propertyInfo, List annotations) { - propertyBuilder = TypePropertyBuilder.Create(decl, declItemsInfo, DefaultVisibility); + propertyBuilder = TypePropertyBuilder.Create(decl, declItemsInfo, DefaultVisibility, ParentNamespace); propertyBuilder.GenerateCode(propertyInfo, annotations); } diff --git a/XObjectsCode/Src/TypesToCodeDom.cs b/XObjectsCode/Src/TypesToCodeDom.cs index 7d0e8f4..6a71b06 100644 --- a/XObjectsCode/Src/TypesToCodeDom.cs +++ b/XObjectsCode/Src/TypesToCodeDom.cs @@ -669,7 +669,7 @@ private TypeBuilder GetTypeBuilder() { if (typeBuilder == null) { - typeBuilder = new XTypedElementBuilder(settings); + typeBuilder = new XTypedElementBuilder(settings, codeNamespace); } else { From 568d400815f5c443546fec18ac53b38a154b1b5d Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Mon, 15 Dec 2025 16:30:47 +1000 Subject: [PATCH 051/107] WIP. --- XObjectsCode/Src/ClrPropertyInfo.cs | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/XObjectsCode/Src/ClrPropertyInfo.cs b/XObjectsCode/Src/ClrPropertyInfo.cs index a7caa03..4d47448 100644 --- a/XObjectsCode/Src/ClrPropertyInfo.cs +++ b/XObjectsCode/Src/ClrPropertyInfo.cs @@ -401,6 +401,10 @@ public override CodeMemberProperty AddToType(CodeTypeDeclaration parentTypeDecl, } ParentTypeDeclaration ??= parentTypeDecl; + if (parentTypeDecl.HasParent()) { + Debugger.Break(); + // why? + } CreateXNameField(parentTypeDecl); CreateFixedDefaultValue(parentTypeDecl); @@ -1184,9 +1188,30 @@ protected CodeExpression GetSimpleTypeClassExpression(bool disambiguateWhenPrope } } - var typeName = areTheSameAndShouldDisambiguate + string typeName = null; + if (simpleTypeClrTypeName.IsEmpty()) { + Debugger.Break(); + + if (this.IsEnum) { + if (this.ParentTypeDeclaration != null && this.ParentTypeDeclaration.HasParent()) { + var thisNamespace = this.ParentTypeDeclaration.GetParent(); + if (thisNamespace is not null) { + var possibleTypeValidatorClass = thisNamespace.SearchAllNestedTypesRecursively(e => + e is CodeTypeDeclaration ec && ec.Name.Contains(this.TypeReference.Name)); + + if (possibleTypeValidatorClass is not null) { + simpleTypeClrTypeName = possibleTypeValidatorClass.Name; + } + } + } + } + typeName = this.ReturnType.fullTypeName; + } + + typeName = areTheSameAndShouldDisambiguate ? $"global::{this.settings.GetClrNamespace(PropertyNs)}.{this.simpleTypeClrTypeName}" : this.simpleTypeClrTypeName; + var codeFieldReferenceExpression = CodeDomHelper.CreateFieldReference(typeName, Constants.SimpleTypeDefInnerType); #if DEBUG From 71b87fecdf66400144f291beb25812b7be1d75d8 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Wed, 17 Dec 2025 12:21:48 +1000 Subject: [PATCH 052/107] parentNamespace arg in typeBuilder.CreateTypeDeclaration() no longer optional. --- XObjectsCode/Src/TypeBuilder.cs | 2 +- XObjectsCode/Src/TypesToCodeDom.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/XObjectsCode/Src/TypeBuilder.cs b/XObjectsCode/Src/TypeBuilder.cs index 6c54068..da52b9e 100644 --- a/XObjectsCode/Src/TypeBuilder.cs +++ b/XObjectsCode/Src/TypeBuilder.cs @@ -153,7 +153,7 @@ protected virtual string InnerType get { return null; } } - internal void CreateTypeDeclaration(ClrTypeInfo clrTypeInfo, CodeNamespace parentNamespace = null) + internal void CreateTypeDeclaration(ClrTypeInfo clrTypeInfo, CodeNamespace parentNamespace) { this.clrTypeInfo = clrTypeInfo; SetElementWildCardFlag(clrTypeInfo.HasElementWildCard); diff --git a/XObjectsCode/Src/TypesToCodeDom.cs b/XObjectsCode/Src/TypesToCodeDom.cs index 6a71b06..825862a 100644 --- a/XObjectsCode/Src/TypesToCodeDom.cs +++ b/XObjectsCode/Src/TypesToCodeDom.cs @@ -134,7 +134,7 @@ private CodeTypeDeclaration ProcessType(ClrContentTypeInfo typeInfo, string pare //Build type using TypeBuilder typeBuilder = GetTypeBuilder(); - typeBuilder.CreateTypeDeclaration(typeInfo); + typeBuilder.CreateTypeDeclaration(typeInfo, this.codeNamespace); ProcessProperties(typeInfo.Content, typeInfo.Annotations); typeBuilder.CreateFunctionalConstructor(typeInfo.Annotations); typeBuilder.ImplementInterfaces(settings.EnableServiceReference); @@ -493,7 +493,7 @@ private void ProcessWrapperTypes() { typedValPropertyInfo = InitializeTypedValuePropertyInfo(typeInfo, typedValPropertyInfo, innerType); simpleTypeBuilder.Init(typedValPropertyInfo.ClrTypeName, innerType.IsSchemaList); - simpleTypeBuilder.CreateTypeDeclaration(typeInfo); + simpleTypeBuilder.CreateTypeDeclaration(typeInfo, this.codeNamespace); simpleTypeBuilder.CreateFunctionalConstructor(typeInfo.Annotations); typedValPropertyInfo.SetFixedDefaultValue(typeInfo); simpleTypeBuilder.CreateProperty(typedValPropertyInfo, typeInfo.Annotations); @@ -523,7 +523,7 @@ private void ProcessWrapperTypes() currentNamespace = typeInfo.clrtypeNs; wrapperBuilder.Init(innerTypeFullName, innerTypeNs, innerTypeAttributes); - wrapperBuilder.CreateTypeDeclaration(typeInfo); + wrapperBuilder.CreateTypeDeclaration(typeInfo, this.codeNamespace); wrapperBuilder.CreateFunctionalConstructor(typeInfo.Annotations); wrapperBuilder.ApplyAnnotations(typeInfo); wrapperBuilder.AddTypeToTypeManager(elementDictionaryAddStatements, wrapperDictionaryAddStatements); From 9e55fb8ef32ff43abffc7e7f95e7badc040d15f0 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Wed, 17 Dec 2025 12:23:42 +1000 Subject: [PATCH 053/107] Trying to pass parentNamespace to as many places as possible. --- XObjectsCode/Src/TypesToCodeDom.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/XObjectsCode/Src/TypesToCodeDom.cs b/XObjectsCode/Src/TypesToCodeDom.cs index 825862a..bfd9ede 100644 --- a/XObjectsCode/Src/TypesToCodeDom.cs +++ b/XObjectsCode/Src/TypesToCodeDom.cs @@ -363,7 +363,7 @@ private void CreateXRoot(CodeNamespace codeNamespace, string rootName, List Date: Wed, 17 Dec 2025 13:05:06 +1000 Subject: [PATCH 054/107] Converted to for loop for deubgging the current index. --- XObjectsCode/Src/TypesToCodeDom.cs | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/XObjectsCode/Src/TypesToCodeDom.cs b/XObjectsCode/Src/TypesToCodeDom.cs index bfd9ede..1ada811 100644 --- a/XObjectsCode/Src/TypesToCodeDom.cs +++ b/XObjectsCode/Src/TypesToCodeDom.cs @@ -63,12 +63,10 @@ public IEnumerable GenerateTypes(ClrMappingInfo binding) nameMappings = binding.NameMappings; Debug.Assert(nameMappings != null); - foreach (ClrTypeInfo type in binding.Types) - { - if (type.IsWrapper) - { - if (wrapperRootElements == null) - { + for (int index = 0; index < binding.Types.Count; index++) { + ClrTypeInfo type = binding.Types[index]; + if (type.IsWrapper) { + if (wrapperRootElements == null) { wrapperRootElements = new List(); } @@ -93,20 +91,18 @@ public IEnumerable GenerateTypes(ClrMappingInfo binding) typeWithDuplicateEnum.Members.Remove(duplicateEnum); } } + codeNamespace.AddTypeWithParentNamespace(TypeBuilder.CreateSimpleType(stInfo, nameMappings, settings)); } - else - { + else { CodeTypeDeclaration decl = ProcessType(type as ClrContentTypeInfo, null, true); //Sets current codeNamespace codeNamespace.AddTypeWithParentNamespace(decl); - if (type.IsRootElement) - { + if (type.IsRootElement) { List types; - if (!xroots.TryGetValue(codeNamespace, out types)) - { + if (!xroots.TryGetValue(codeNamespace, out types)) { types = new List(); xroots.Add(codeNamespace, types); } From e92c5cab28650bde778662537d6ed743207aa4f3 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Wed, 17 Dec 2025 14:03:46 +1000 Subject: [PATCH 055/107] cleanup. --- XObjectsCode/Src/ClrPropertyInfo.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/XObjectsCode/Src/ClrPropertyInfo.cs b/XObjectsCode/Src/ClrPropertyInfo.cs index 4d47448..c693dd3 100644 --- a/XObjectsCode/Src/ClrPropertyInfo.cs +++ b/XObjectsCode/Src/ClrPropertyInfo.cs @@ -401,11 +401,7 @@ public override CodeMemberProperty AddToType(CodeTypeDeclaration parentTypeDecl, } ParentTypeDeclaration ??= parentTypeDecl; - if (parentTypeDecl.HasParent()) { - Debugger.Break(); - // why? - } - + CreateXNameField(parentTypeDecl); CreateFixedDefaultValue(parentTypeDecl); CodeMemberProperty clrProperty = CodeDomHelper.CreateProperty(ReturnType, hasSet, visibility.ToMemberAttribute()); From 86c4d5031516f77991df5edd8dbcd66a8eb7e280 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Wed, 17 Dec 2025 14:08:44 +1000 Subject: [PATCH 056/107] Added debug assert, simplified. --- XObjectsCode/Src/TypesToCodeDom.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/XObjectsCode/Src/TypesToCodeDom.cs b/XObjectsCode/Src/TypesToCodeDom.cs index 1ada811..cd51c3e 100644 --- a/XObjectsCode/Src/TypesToCodeDom.cs +++ b/XObjectsCode/Src/TypesToCodeDom.cs @@ -185,8 +185,9 @@ private void ProcessProperties(IEnumerable properties, List Date: Wed, 17 Dec 2025 14:10:31 +1000 Subject: [PATCH 057/107] Cleanup; temporary debug only function. --- XObjectsCode/Src/ClrPropertyInfo.cs | 52 ++++++++++++++++------------- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/XObjectsCode/Src/ClrPropertyInfo.cs b/XObjectsCode/Src/ClrPropertyInfo.cs index c693dd3..07dec9a 100644 --- a/XObjectsCode/Src/ClrPropertyInfo.cs +++ b/XObjectsCode/Src/ClrPropertyInfo.cs @@ -1175,8 +1175,8 @@ protected CodeExpression GetFullyQualifiedSimpleTypeClassExpression(string names protected CodeExpression GetSimpleTypeClassExpression(bool disambiguateWhenPropertyAndTypeNameAreTheSame = false) { - // Debug.Assert(this.simpleTypeClrTypeName != null); - + Debug.Assert(this.simpleTypeClrTypeName.IsNotEmpty()); + var areTheSameAndShouldDisambiguate = false; if (disambiguateWhenPropertyAndTypeNameAreTheSame) { if (this.propertyName == this.simpleTypeClrTypeName) { @@ -1184,27 +1184,7 @@ protected CodeExpression GetSimpleTypeClassExpression(bool disambiguateWhenPrope } } - string typeName = null; - if (simpleTypeClrTypeName.IsEmpty()) { - Debugger.Break(); - - if (this.IsEnum) { - if (this.ParentTypeDeclaration != null && this.ParentTypeDeclaration.HasParent()) { - var thisNamespace = this.ParentTypeDeclaration.GetParent(); - if (thisNamespace is not null) { - var possibleTypeValidatorClass = thisNamespace.SearchAllNestedTypesRecursively(e => - e is CodeTypeDeclaration ec && ec.Name.Contains(this.TypeReference.Name)); - - if (possibleTypeValidatorClass is not null) { - simpleTypeClrTypeName = possibleTypeValidatorClass.Name; - } - } - } - } - typeName = this.ReturnType.fullTypeName; - } - - typeName = areTheSameAndShouldDisambiguate + string typeName = areTheSameAndShouldDisambiguate ? $"global::{this.settings.GetClrNamespace(PropertyNs)}.{this.simpleTypeClrTypeName}" : this.simpleTypeClrTypeName; @@ -1218,6 +1198,32 @@ protected CodeExpression GetSimpleTypeClassExpression(bool disambiguateWhenPrope return codeFieldReferenceExpression; } +#if DEBUG + /// + /// unfortuntely, this is a hack to fix a regression that left the field unset for certain enums. + /// examples of this error occuring: 'W3C XMLSchema v1.xsd' -> schema element -> attributeFormDefault attribute of type formChoice + /// + /// + private bool SetSimpleTypeClrNameForEnum() + { + bool wasSet = false; + if (this.ParentTypeDeclaration != null && this.ParentTypeDeclaration.HasParent()) { + var thisNamespace = this.ParentTypeDeclaration.GetParent(); + if (thisNamespace is not null) { + var possibleTypeValidatorClass = thisNamespace.SearchAllNestedTypesRecursively(e => + e is CodeTypeDeclaration ec && ec.Name.Contains(this.TypeReference.Name)); + + if (possibleTypeValidatorClass is not null) { + simpleTypeClrTypeName = possibleTypeValidatorClass.Name; + wasSet = true; + } + } + } + + return wasSet; + } +#endif + public void CreateXNameField(CodeTypeDeclaration typeDecl) { // HACK: CodeDom doesn't model readonly fields... but it doesn't check the type either! From 9579089cf685ba35bad332bdc96c38f1a8cac21c Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Wed, 17 Dec 2025 14:11:05 +1000 Subject: [PATCH 058/107] Fixed an issue with the simpleTypeClrTypeName not being inserted for certain schema attributes of enum types. --- XObjectsCode/Src/ClrPropertyInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/XObjectsCode/Src/ClrPropertyInfo.cs b/XObjectsCode/Src/ClrPropertyInfo.cs index 07dec9a..d233e80 100644 --- a/XObjectsCode/Src/ClrPropertyInfo.cs +++ b/XObjectsCode/Src/ClrPropertyInfo.cs @@ -367,7 +367,7 @@ public void UpdateTypeReference( this.clrTypeName = typeRef.GetClrFullTypeName(currentNamespaceScope, nameMappings, settings, out string refTypeName); - if (Validation || IsUnion) + if ((Validation || IsUnion) || (this.IsEnum && typeRef.IsEnum)) { this.simpleTypeClrTypeName = typeRef.GetSimpleTypeClrTypeDefName(currentNamespaceScope, nameMappings); } From 276cdebc576819ba57b50feb41ab4f1648b111a2 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Wed, 17 Dec 2025 14:15:10 +1000 Subject: [PATCH 059/107] powershell scripts for installing and uninstalling linqtoxsd prerelease as a dotnet global tool. --- GeneratedSchemaLibraries/installLinqToXsd_dotnetTool.ps1 | 1 + GeneratedSchemaLibraries/uninstallLinqToXsd_dotnetTool.ps1 | 1 + 2 files changed, 2 insertions(+) create mode 100644 GeneratedSchemaLibraries/installLinqToXsd_dotnetTool.ps1 create mode 100644 GeneratedSchemaLibraries/uninstallLinqToXsd_dotnetTool.ps1 diff --git a/GeneratedSchemaLibraries/installLinqToXsd_dotnetTool.ps1 b/GeneratedSchemaLibraries/installLinqToXsd_dotnetTool.ps1 new file mode 100644 index 0000000..fe2b2b1 --- /dev/null +++ b/GeneratedSchemaLibraries/installLinqToXsd_dotnetTool.ps1 @@ -0,0 +1 @@ +dotnet tool install linqtoxsdcore --add-source https://pkgs.dev.azure.com/mamift1/LinqToXsdCore/_packaging/LinqToXsdCore-Release/nuget/v3/index.json --prerelease --tool-path C:\Development\dotnet-tools\ \ No newline at end of file diff --git a/GeneratedSchemaLibraries/uninstallLinqToXsd_dotnetTool.ps1 b/GeneratedSchemaLibraries/uninstallLinqToXsd_dotnetTool.ps1 new file mode 100644 index 0000000..740dd0b --- /dev/null +++ b/GeneratedSchemaLibraries/uninstallLinqToXsd_dotnetTool.ps1 @@ -0,0 +1 @@ +dotnet tool uninstall linqtoxsdcore --tool-path C:\Development\dotnet-tools\ \ No newline at end of file From a4fec3a0cb007c1f6a3572fc649238dc08d3bb11 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Wed, 17 Dec 2025 16:34:15 +1000 Subject: [PATCH 060/107] added build script --- GeneratedSchemaLibraries/buildAll.ps1 | 63 +++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 GeneratedSchemaLibraries/buildAll.ps1 diff --git a/GeneratedSchemaLibraries/buildAll.ps1 b/GeneratedSchemaLibraries/buildAll.ps1 new file mode 100644 index 0000000..1772a36 --- /dev/null +++ b/GeneratedSchemaLibraries/buildAll.ps1 @@ -0,0 +1,63 @@ +# rebuild + +function start($path, $args) { + if ([System.IO.File]::Exists($path) -eq $false) { + throw new Exception("Erorr, path does not exist!"); + } + + $pinfo = New-Object System.Diagnostics.ProcessStartInfo + $pinfo.FileName = $path; + $pinfo.RedirectStandardError = $true + $pinfo.RedirectStandardOutput = $true + $pinfo.UseShellExecute = $false + $pinfo.Arguments = "localhost" + + $p = New-Object System.Diagnostics.Process + $p.StartInfo = $pinfo + $p.Start() | Out-Null + $p.WaitForExit() + $stdout = $p.StandardOutput.ReadToEnd() + $stderr = $p.StandardError.ReadToEnd() + Write-Host "stdout: $stdout" + Write-Host "stderr: $stderr" + Write-Host "exit code: " + $p.ExitCode + + return $p; +} + +class BuildResult { + [string]$Name; + [string]$Output; + [int]$ReturnCode; + + [string] ToString() { + + return "Name = $($this.Name), ReturnCode = $($this.ReturnCode)"; + } +} + +$buildResults = New-Object System.Collections.Generic.List[BuildResult]; +$dnb = Get-Command dotnet + +Get-ChildItem -Attributes Directory | % { + if ($_ -eq "Microsoft Project 2007") { return; } + $projects = [System.IO.Directory]::GetFiles($_.FullName, "*.csproj"); + $first = $projects[0]; + + if ($first -ne $null) { + $rc = start -path $dnb.Path -args "$($first) -c DEBUG -v:minimal"; + + $result = [BuildResult]::new(); + $result.ReturnCode = $rc.ExitCode; + $result.Name = $first; + write-host $result.ToString(); + + $result.Output = $rc.StandardOutput.ReadToEnd(); + $buildResults.Add($result); + } else { + Write-Error "Unable to find CSPROJ inside folder $($_.Name)"; + } +} + + +echo $buildResults; \ No newline at end of file From 15f7621f7012ec3e0321c1c8f45fd36da39f0acc Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Thu, 18 Dec 2025 11:58:28 +1000 Subject: [PATCH 061/107] Added program observer for outputting warning and error messages using red and yellow colored text. --- LinqToXsd/LinqToXsdProgramObserver.cs | 43 +++++++++++++++++++++ LinqToXsd/Program.cs | 9 ++++- XObjectsCode/Extensions/ReportExtensions.cs | 25 ++++++++++++ XObjectsCode/IWarnableObserver.cs | 9 +++++ XObjectsCode/Src/XObjectsCoreGenerator.cs | 22 ++++++++--- 5 files changed, 100 insertions(+), 8 deletions(-) create mode 100644 LinqToXsd/LinqToXsdProgramObserver.cs create mode 100644 XObjectsCode/Extensions/ReportExtensions.cs create mode 100644 XObjectsCode/IWarnableObserver.cs diff --git a/LinqToXsd/LinqToXsdProgramObserver.cs b/LinqToXsd/LinqToXsdProgramObserver.cs new file mode 100644 index 0000000..09d3a9c --- /dev/null +++ b/LinqToXsd/LinqToXsdProgramObserver.cs @@ -0,0 +1,43 @@ +using System; +using System.Text; +using Xml.Schema.Linq.CodeGen; + +namespace LinqToXsd; + +public class LinqToXsdProgramObserver: IWarnableObserver +{ + private int errorCount = 0; + private int warningCount = 0; + + public void OnNext(string value) + { + Console.WriteLine(value); + } + + public void OnError(Exception error) + { + var original = Console.ForegroundColor; + Console.ForegroundColor = ConsoleColor.Red; + Console.WriteLine(error.ToString()); + Console.BackgroundColor = original; + errorCount++; + } + + public void OnCompleted() + { + var msg = new StringBuilder("Completed generation process;"); + if (errorCount > 0) { + msg.AppendFormat($"There were {errorCount} errors."); + } + Console.WriteLine(msg.ToString()); + } + + public void OnWarn(string value, string message = null) + { + var original = Console.ForegroundColor; + Console.ForegroundColor = ConsoleColor.Yellow; + Console.WriteLine(value); + Console.BackgroundColor = original; + warningCount++; + } +} \ No newline at end of file diff --git a/LinqToXsd/Program.cs b/LinqToXsd/Program.cs index 8a29321..a608a39 100644 --- a/LinqToXsd/Program.cs +++ b/LinqToXsd/Program.cs @@ -6,6 +6,7 @@ using Alba.CsConsoleFormat.Fluent; using CommandLine; using Xml.Schema.Linq; +using Xml.Schema.Linq.CodeGen; using Xml.Schema.Linq.Extensions; namespace LinqToXsd @@ -19,6 +20,8 @@ public static partial class Program Console.WriteLine(s); }); + public static IWarnableObserver ProgramObserver { get; } = new LinqToXsdProgramObserver(); + public static bool IsConsolePresent { get @@ -157,9 +160,11 @@ internal static void HandleGenerateCode(GenerateOptions generateOptions) settings.EnableServiceReference = generateOptions.EnableServiceReference; + var schemaFilesList = generateOptions.SchemaFiles.ToList(); + var textWriters = generateOptions.AutoConfig - ? XObjectsCoreGenerator.Generate(generateOptions.SchemaFiles) - : XObjectsCoreGenerator.Generate(generateOptions.SchemaFiles, settings); + ? XObjectsCoreGenerator.Generate(schemaFilesList, ProgramObserver) + : XObjectsCoreGenerator.Generate(schemaFilesList, settings, ProgramObserver); if (generateOptions.Output.IsEmpty()) { PrintLn("No output directory given: defaulting to same directory as XSD file(s).".Gray()); diff --git a/XObjectsCode/Extensions/ReportExtensions.cs b/XObjectsCode/Extensions/ReportExtensions.cs new file mode 100644 index 0000000..4959fa3 --- /dev/null +++ b/XObjectsCode/Extensions/ReportExtensions.cs @@ -0,0 +1,25 @@ +#nullable enable +using System; + +namespace Xml.Schema.Linq.CodeGen; + +public static class ReportExtensions +{ + public static void ReportError(this IProgress progress, string message) + { + if (message == null) throw new ArgumentNullException(nameof(message)); + var original = Console.ForegroundColor; + Console.ForegroundColor = ConsoleColor.Red; + Console.WriteLine(message); + Console.ForegroundColor = original; + } + + public static void ReportWarning(this IProgress progress, string message) + { + if (message == null) throw new ArgumentNullException(nameof(message)); + var original = Console.ForegroundColor; + Console.ForegroundColor = ConsoleColor.Yellow; + Console.WriteLine(message); + Console.ForegroundColor = original; + } +} \ No newline at end of file diff --git a/XObjectsCode/IWarnableObserver.cs b/XObjectsCode/IWarnableObserver.cs new file mode 100644 index 0000000..4ba85aa --- /dev/null +++ b/XObjectsCode/IWarnableObserver.cs @@ -0,0 +1,9 @@ +#nullable enable +using System; + +namespace Xml.Schema.Linq.CodeGen; + +public interface IWarnableObserver: IObserver +{ + void OnWarn(T value, string? message = null); +} \ No newline at end of file diff --git a/XObjectsCode/Src/XObjectsCoreGenerator.cs b/XObjectsCode/Src/XObjectsCoreGenerator.cs index 0070f4b..ea5bdc0 100644 --- a/XObjectsCode/Src/XObjectsCoreGenerator.cs +++ b/XObjectsCode/Src/XObjectsCoreGenerator.cs @@ -1,4 +1,5 @@ -using System; +#nullable enable +using System; using System.CodeDom; using System.Collections.Generic; using System.IO; @@ -47,8 +48,10 @@ public static LinqToXsdSettings LoadLinqToXsdSettings(XDocument xdoc) /// /// /// + /// /// - public static Dictionary Generate(IEnumerable xsdFilePaths, LinqToXsdSettings settings) + public static Dictionary Generate(IEnumerable xsdFilePaths, + LinqToXsdSettings settings, IWarnableObserver? programObserver = null) { if (xsdFilePaths == null) throw new ArgumentNullException(nameof(xsdFilePaths)); @@ -67,7 +70,7 @@ public static Dictionary Generate(IEnumerable xsdFil /// /// /// is - public static IEnumerable<(string filename, TextWriter writer)> Generate(string xsdFilePath, string linqToXsdSettingsFilePath = null) + public static IEnumerable<(string filename, TextWriter writer)> Generate(string xsdFilePath, string? linqToXsdSettingsFilePath = null) { if (xsdFilePath.IsEmpty()) throw new ArgumentNullException(nameof(xsdFilePath)); var settings = LoadLinqToXsdSettings(linqToXsdSettingsFilePath); @@ -196,18 +199,25 @@ static CodeCompileUnit BuildUnit(IEnumerable namespaces) /// .config extension (i.e. schemaFileName.xsd.config). Will skip over XSDs that have no accompanying .config file. /// /// + /// /// - public static Dictionary Generate(IEnumerable schemaFiles) + public static Dictionary Generate(IEnumerable schemaFiles, + IWarnableObserver? observer = null) { // xsd file paths are keys, the FileInfo's to their config files are values var dictOfSchemasAndTheirConfigs = schemaFiles.Select(xsdFilePath => new KeyValuePair(xsdFilePath, new FileInfo($"{xsdFilePath}.config"))) .ToDictionary(k => k.Key, v => v.Value); - - + var excludeV11Xsds = dictOfSchemasAndTheirConfigs .Where(kvp => kvp.Value.Exists && new FileInfo(kvp.Key).GetXmlSchemaVersion() != XmlSchemaVersion.Version1_1).ToList(); + if (excludeV11Xsds.Count != dictOfSchemasAndTheirConfigs.Count) { + observer?.OnWarn("Found some XSD v1.1 schemas: this tool does not support XSD v1.1. and will ignore those."); + } + + observer?.OnNext($"Schemas to process: {excludeV11Xsds.ToDelimitedString(e => Path.GetFileName(e.Key), ';')}"); + return excludeV11Xsds .SelectMany(kvp => Generate(kvp.Key, kvp.Value.FullName)) // Multiple XSD files may import the same namespace, e.g. in case of a shared schema. From dce06e0560ae652199f589f8d56568706d26bf20 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Thu, 18 Dec 2025 11:58:45 +1000 Subject: [PATCH 062/107] Updated biuld and regen scripts. --- GeneratedSchemaLibraries/buildAll.ps1 | 101 ++++++++++++++---- .../installLinqToXsd_dotnetTool.ps1 | 2 +- GeneratedSchemaLibraries/regenDebug.ps1 | 3 + 3 files changed, 85 insertions(+), 21 deletions(-) create mode 100644 GeneratedSchemaLibraries/regenDebug.ps1 diff --git a/GeneratedSchemaLibraries/buildAll.ps1 b/GeneratedSchemaLibraries/buildAll.ps1 index 1772a36..ac98c8b 100644 --- a/GeneratedSchemaLibraries/buildAll.ps1 +++ b/GeneratedSchemaLibraries/buildAll.ps1 @@ -1,28 +1,81 @@ + # rebuild -function start($path, $args) { +class ProcessResult { + [System.Diagnostics.Process] $Process; + [string] $Output; + [string] $Errors; + [int] $ReturnCode; +} + +function build { + [OutputType([ProcessResult])] + param( + [string]$path, + [string]$args + ) + $dnb = (Get-Command dotnet) + if ([System.IO.File]::Exists($path) -eq $false) { - throw new Exception("Erorr, path does not exist!"); + throw new Exception("path does not exist!"); } + #write-host $dnb.Path + $pinfo = New-Object System.Diagnostics.ProcessStartInfo - $pinfo.FileName = $path; + $pinfo.FileName = $dnb.Path; $pinfo.RedirectStandardError = $true $pinfo.RedirectStandardOutput = $true $pinfo.UseShellExecute = $false - $pinfo.Arguments = "localhost" + $theArgs = "build $($path) -c DEBUG -v:normal"; + if ([string]::IsNullOrWhiteSpace($args) -eq $false) { + $theArgs = "$($theArgs) $($args)"; + } + + #write-host $theArgs; + $pinfo.Arguments = $theArgs $p = New-Object System.Diagnostics.Process $p.StartInfo = $pinfo - $p.Start() | Out-Null - $p.WaitForExit() - $stdout = $p.StandardOutput.ReadToEnd() - $stderr = $p.StandardError.ReadToEnd() - Write-Host "stdout: $stdout" - Write-Host "stderr: $stderr" - Write-Host "exit code: " + $p.ExitCode - - return $p; + + [string]$stdout = [string]::Empty; + [string]$stderr = [string]::Empty; + $outputCopy = { + params([object]$sender, [System.Diagnostics.DataReceivedEventArgs]$eventArgs) + + write-host $eventArgs.Data; + $stdout += $eventArgs.Data; + }; + + Register-ObjectEvent -InputObject $p -EventName "OutputDataReceived" -Action $outputCopy; + + $errorCopy = { + params([object]$sender, [System.Diagnostics.DataReceivedEventArgs]$eventArgs) + + write-host $eventArgs.Data; + $stderr += $eventArgs.Data; + }; + + Register-ObjectEvent -InputObject $p -EventName "ErrorDataReceived" -Action $errorCopy; + + $p.Start(); + $p.BeginErrorReadLine(); + $p.BeginOutputReadLine(); + + $didExit = $p.WaitForExit(); + if ($didExit -eq $false) { + write-error "error"; + return; + } + + #write-host $stdout; + + return [ProcessResult]@{ + Process = $p + Output = $stdout + Errors = $stderr + ReturnCode = $p.ExitCode + }; } class BuildResult { @@ -40,24 +93,32 @@ $buildResults = New-Object System.Collections.Generic.List[BuildResult]; $dnb = Get-Command dotnet Get-ChildItem -Attributes Directory | % { - if ($_ -eq "Microsoft Project 2007") { return; } + if ($_ -contains "Microsoft Project 2007") { return; } $projects = [System.IO.Directory]::GetFiles($_.FullName, "*.csproj"); $first = $projects[0]; + write-host "Building $first..."; + if ($first -ne $null) { - $rc = start -path $dnb.Path -args "$($first) -c DEBUG -v:minimal"; + $rc = build -path $first $result = [BuildResult]::new(); - $result.ReturnCode = $rc.ExitCode; + $result.ReturnCode = $rc.ReturnCode; $result.Name = $first; - write-host $result.ToString(); - $result.Output = $rc.StandardOutput.ReadToEnd(); + if ($rc.ReturnCode -eq 1) { + write-host $rc.Errors; + return; + } else { + write-host $result.ToString(); + } + + $result.Output = $rc.Output; + $buildResults.Add($result); } else { Write-Error "Unable to find CSPROJ inside folder $($_.Name)"; } } - -echo $buildResults; \ No newline at end of file +echo $buildResults | select Name,ReturnCode; diff --git a/GeneratedSchemaLibraries/installLinqToXsd_dotnetTool.ps1 b/GeneratedSchemaLibraries/installLinqToXsd_dotnetTool.ps1 index fe2b2b1..7ca10e1 100644 --- a/GeneratedSchemaLibraries/installLinqToXsd_dotnetTool.ps1 +++ b/GeneratedSchemaLibraries/installLinqToXsd_dotnetTool.ps1 @@ -1 +1 @@ -dotnet tool install linqtoxsdcore --add-source https://pkgs.dev.azure.com/mamift1/LinqToXsdCore/_packaging/LinqToXsdCore-Release/nuget/v3/index.json --prerelease --tool-path C:\Development\dotnet-tools\ \ No newline at end of file +dotnet tool install linqtoxsdcore --add-source https://pkgs.dev.azure.com/mamift1/LinqToXsdCore/_packaging/LinqToXsdCore-AlphaBuilds/nuget/v3/index.json --prerelease --tool-path C:\Development\dotnet-tools\ \ No newline at end of file diff --git a/GeneratedSchemaLibraries/regenDebug.ps1 b/GeneratedSchemaLibraries/regenDebug.ps1 new file mode 100644 index 0000000..8c2cf7d --- /dev/null +++ b/GeneratedSchemaLibraries/regenDebug.ps1 @@ -0,0 +1,3 @@ +$linqtoxsd = "C:\Projects\GitHub\LinqToXsdCore\LinqToXsd\bin\Debug\net10.0\LinqToXsd.exe"; +# regenerate all CS code with this one command +Get-ChildItem -Attributes Directory | %{ & $linqtoxsd gen $_ -a } \ No newline at end of file From 99f13ca2fd45faae0e0fe49fcdcd3287711405e4 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Thu, 18 Dec 2025 12:00:13 +1000 Subject: [PATCH 063/107] Wrong color setting. --- LinqToXsd/LinqToXsdProgramObserver.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LinqToXsd/LinqToXsdProgramObserver.cs b/LinqToXsd/LinqToXsdProgramObserver.cs index 09d3a9c..db9397b 100644 --- a/LinqToXsd/LinqToXsdProgramObserver.cs +++ b/LinqToXsd/LinqToXsdProgramObserver.cs @@ -19,7 +19,7 @@ public void OnError(Exception error) var original = Console.ForegroundColor; Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine(error.ToString()); - Console.BackgroundColor = original; + Console.ForegroundColor = original; errorCount++; } @@ -37,7 +37,7 @@ public void OnWarn(string value, string message = null) var original = Console.ForegroundColor; Console.ForegroundColor = ConsoleColor.Yellow; Console.WriteLine(value); - Console.BackgroundColor = original; + Console.ForegroundColor = original; warningCount++; } } \ No newline at end of file From 89f3113fad088eed28d31f34272404d73cf9f151 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Thu, 18 Dec 2025 12:55:32 +1000 Subject: [PATCH 064/107] Added debug.assert for presence of `void.TypeDefinition` code during code gen. --- LinqToXsd/Properties/launchSettings.json | 6 ++++++ XObjectsCode/Src/ClrPropertyInfo.cs | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/LinqToXsd/Properties/launchSettings.json b/LinqToXsd/Properties/launchSettings.json index 96ebed1..1a1fafa 100644 --- a/LinqToXsd/Properties/launchSettings.json +++ b/LinqToXsd/Properties/launchSettings.json @@ -56,6 +56,12 @@ "commandLineArgs": "gen \"windowsTaskSched.xsd\" -a", "workingDirectory": "..\\GeneratedSchemaLibraries\\Windows", "hotReloadEnabled": false + }, + "akomantoso30": { + "commandName": "Project", + "commandLineArgs": "gen \"akomantoso30.xsd\" -a", + "workingDirectory": "..\\GeneratedSchemaLibraries\\AkomaNtoso", + "hotReloadEnabled": false } } } \ No newline at end of file diff --git a/XObjectsCode/Src/ClrPropertyInfo.cs b/XObjectsCode/Src/ClrPropertyInfo.cs index d233e80..a1f6ace 100644 --- a/XObjectsCode/Src/ClrPropertyInfo.cs +++ b/XObjectsCode/Src/ClrPropertyInfo.cs @@ -1192,7 +1192,8 @@ protected CodeExpression GetSimpleTypeClassExpression(bool disambiguateWhenPrope #if DEBUG var str = codeFieldReferenceExpression.ToCodeString(); - Debug.Assert(str != null); + Debug.Assert(str.IsNotEmpty()); + Debug.Assert(str.Contains("void.") == false, $"A void. type reference indicates that the mapping failed to generate a suitable {nameof(simpleTypeClrTypeName)} for the current {nameof(ClrPropertyInfo)}. This can happen due to the XSD type of the current property might be anonymous AND a union of multiple types. There are a few XSD type configurations that are not yet supported."); #endif return codeFieldReferenceExpression; From 5f7377683f775995a4ba7b8057470c20e399d83a Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Thu, 18 Dec 2025 16:17:33 +1000 Subject: [PATCH 065/107] Prototype xml serializatoin of clr mapping info class. --- XObjectsTests/CodeGen/ClrPropertyTests.cs | 27 +++++++++++- XObjectsTests/Extensions/GeneralExtensions.cs | 44 +++++++++++++++++++ XObjectsTests/XObjectsTests.csproj | 1 + 3 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 XObjectsTests/Extensions/GeneralExtensions.cs diff --git a/XObjectsTests/CodeGen/ClrPropertyTests.cs b/XObjectsTests/CodeGen/ClrPropertyTests.cs index 2c7b17d..84acf77 100644 --- a/XObjectsTests/CodeGen/ClrPropertyTests.cs +++ b/XObjectsTests/CodeGen/ClrPropertyTests.cs @@ -19,7 +19,7 @@ public void T1() var schemaSet = Utilities.GetXmlSchemaSet(abstractTestXsd, AllTestFiles); var defaultSettings = schemaSet.ToDefaultMergedConfiguration(config).ToLinqToXsdSettings(); var xsdConverter = new XsdToTypesConverter(defaultSettings); - var mapping = xsdConverter.GenerateMapping(schemaSet); + ClrMappingInfo? mapping = xsdConverter.GenerateMapping(schemaSet); var codeGenerator = new CodeDomTypesGenerator(defaultSettings); var namespaces = codeGenerator.GenerateTypes(mapping).ToList(); @@ -30,4 +30,29 @@ public void T1() } } + + [Test] + public void T2() + { + MockFileInfo akk = AllTestFiles.GetMockFileInfo(f => f.EndsWith("AkomaNtoso\\akomantoso30.xsd")); + MockFileInfo akkConfig = AllTestFiles.GetMockFileInfo(f => f.EndsWith("AkomaNtoso\\akomantoso30.xsd.config")); + var config = Configuration.Load(akkConfig.ToStreamReader()); + + var schemaSet = Utilities.GetXmlSchemaSet(akk, AllTestFiles); + var defaultSettings = schemaSet.ToDefaultMergedConfiguration(config).ToLinqToXsdSettings(); + var xsdConverter = new XsdToTypesConverter(defaultSettings); + var mapping = xsdConverter.GenerateMapping(schemaSet); + + var mappingXml = mapping.ToXml(); + + Assert.NotNull(mappingXml); + + var date = mapping.Types.Find(e => e.schemaName == "date"); + + var typeRefs = from t in mapping.Types + select t; + + var codeGenerator = new CodeDomTypesGenerator(defaultSettings); + var namespaces = codeGenerator.GenerateTypes(mapping).ToList(); + } } \ No newline at end of file diff --git a/XObjectsTests/Extensions/GeneralExtensions.cs b/XObjectsTests/Extensions/GeneralExtensions.cs new file mode 100644 index 0000000..5ecae5d --- /dev/null +++ b/XObjectsTests/Extensions/GeneralExtensions.cs @@ -0,0 +1,44 @@ +using System; +using System.IO; +using System.Xml.Linq; +using System.Xml.XPath; +using ExtendedXmlSerializer; +using ExtendedXmlSerializer.Configuration; +using ExtendedXmlSerializer.ContentModel; +using ExtendedXmlSerializer.ContentModel.Format; +using Fasterflect; +using Xml.Schema.Linq.CodeGen; + +namespace Xml.Schema.Linq.Tests.Extensions; + +public static class GeneralExtensions +{ + public static string ToXml(this ClrMappingInfo mapping) + { + IExtendedXmlSerializer serializer = new ConfigurationContainer() + .EnableAllConstructors() + .EnableParameterizedContent() + .Create(); + + var stringWriter = new StringWriter(); + serializer.Serialize(stringWriter, mapping); + + return stringWriter.ToString(); + } + + // clrTypeReference + + public class ClrTypeRefSerializer : ISerializer + { + public ClrTypeReference Get(IFormatReader parameter) + { + throw new NotImplementedException(); + } + + public void Write(IFormatWriter writer, ClrTypeReference instance) + { + var xml = instance.ToXml(); + writer.Content(xml); + } + } +} \ No newline at end of file diff --git a/XObjectsTests/XObjectsTests.csproj b/XObjectsTests/XObjectsTests.csproj index dff11ed..0fd56c9 100644 --- a/XObjectsTests/XObjectsTests.csproj +++ b/XObjectsTests/XObjectsTests.csproj @@ -9,6 +9,7 @@ + From 056af55f9b9b25251a71406f7db3b8a90d431039 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Fri, 19 Dec 2025 14:35:22 +1000 Subject: [PATCH 066/107] More nullable awarenes in ClrPropertyInfo. --- XObjectsCode/Src/ClrPropertyInfo.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/XObjectsCode/Src/ClrPropertyInfo.cs b/XObjectsCode/Src/ClrPropertyInfo.cs index a1f6ace..7988705 100644 --- a/XObjectsCode/Src/ClrPropertyInfo.cs +++ b/XObjectsCode/Src/ClrPropertyInfo.cs @@ -34,7 +34,6 @@ public partial class ClrPropertyInfo : ClrBasePropertyInfo /// The enclosing that this instance is a part of. /// public CodeTypeDeclaration? ParentTypeDeclaration { get; set; } -#nullable disable public ClrPropertyInfo(string propertyName, string propertyNs, string schemaName, Occurs occursInSchema, LinqToXsdSettings settings) { @@ -211,22 +210,22 @@ public bool IsNillable public override bool IsSchemaList { - get { return this.typeRef.IsSchemaList; } + get { return (this.typeRef?.IsSchemaList).GetValueOrDefault(); } } public override bool IsUnion { - get { return this.typeRef.IsUnion; } + get { return (this.typeRef?.IsUnion).GetValueOrDefault(); } } public override bool IsEnum { - get { return this.typeRef.IsEnum; } + get { return (this.typeRef?.IsEnum).GetValueOrDefault(); } } public bool Validation { - get { return this.typeRef.Validate && !IsRef; } + get { return (this.typeRef?.Validate).GetValueOrDefault() && !IsRef; } } public override bool FromBaseType From c09a3b79de314be924f2266742fcf922cbdf74c7 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Fri, 19 Dec 2025 21:08:29 +1000 Subject: [PATCH 067/107] Groundwork for future testing. --- XObjectsCode/Src/ClrTypeReference.cs | 26 +++++++++++++ XObjectsCode/Src/SOMQueryExtensions.cs | 38 +++++++++++++++++-- XObjectsCode/Src/StringExtensions.cs | 27 +++++++++++++ XObjectsTests/Extensions/GeneralExtensions.cs | 27 ++++++++++++- 4 files changed, 113 insertions(+), 5 deletions(-) diff --git a/XObjectsCode/Src/ClrTypeReference.cs b/XObjectsCode/Src/ClrTypeReference.cs index e32dc8f..3b0648a 100644 --- a/XObjectsCode/Src/ClrTypeReference.cs +++ b/XObjectsCode/Src/ClrTypeReference.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.Linq; +using System.Xml.Linq; using System.Xml.Schema; using Xml.Schema.Linq.Extensions; @@ -317,4 +318,29 @@ string EnsureNamespace() return this.Namespace; } } + + public XDocument ToXDoc() + { + return new XDocument( + new XElement(nameof(ClrTypeReference), + new XElement(nameof(Origin), Origin), + new XElement(nameof(Name), Name), + new XElement(nameof(ClrName), ClrName), + new XElement(nameof(Namespace), Namespace), + new XElement(nameof(ClrFullTypeName), ClrFullTypeName), + new XElement(nameof(TypeCodeString), TypeCodeString), + new XElement(nameof(IsValueType), IsValueType), + new XElement(nameof(IsLocalType), IsLocalType), + new XElement(nameof(IsSimpleType), IsSimpleType), + new XElement(nameof(Validate), Validate), + new XElement(nameof(IsTypeRef), IsTypeRef), + new XElement(nameof(IsSchemaList), IsSchemaList), + new XElement(nameof(IsUnion), IsUnion), + new XElement(nameof(IsEnum), IsEnum), + new XElement(nameof(IsAnyType), IsAnyType), + new XElement(nameof(IsNamedComplexType), IsNamedComplexType), + new XElement(nameof(SchemaObject), SchemaObject?.ToString()), + new XElement(nameof(LocalSuffix), LocalSuffix) + )); + } } \ No newline at end of file diff --git a/XObjectsCode/Src/SOMQueryExtensions.cs b/XObjectsCode/Src/SOMQueryExtensions.cs index 789fe97..17f7c51 100644 --- a/XObjectsCode/Src/SOMQueryExtensions.cs +++ b/XObjectsCode/Src/SOMQueryExtensions.cs @@ -1,11 +1,13 @@ //Copyright (c) Microsoft Corporation. All rights reserved. - +#nullable enable using System; -using System.Xml; -using System.Xml.Schema; +using System.Collections.Generic; using System.Diagnostics; using System.Linq; -using System.Collections.Generic; +using System.Xml; +using System.Xml.Schema; +using Xml.Schema.Linq.Extensions; +using XObjects; namespace Xml.Schema.Linq.CodeGen { @@ -120,6 +122,8 @@ public static XmlSchemaSimpleType GetListItemType(this XmlSchemaSimpleType type) public static bool IsOrHasUnion(this XmlSchemaSimpleType type) { + Debug.Assert(type.Datatype != null, $"This current simpleType has no dataTyoe! Possible name: ${type.Name}"); + switch (type.Datatype.Variety) { case XmlSchemaDatatypeVariety.Atomic: return false; @@ -598,5 +602,31 @@ public static string TypeCodeString(this XmlSchemaDatatype datatype) return typeCode.ToString(); } } + + public static string ResolveTypeNameOrBaseTypeName(this XmlSchemaSimpleType st) + { + return st.Name.Coalesce(st.TypeCode.ToString(), st.BaseXmlSchemaType?.Name, st.BaseXmlSchemaType?.TypeCode.ToString()); + } + + public static string ResolveTypeNameOrBaseTypeNameTree(this XmlSchemaSimpleType st) + { + var possibleNameOrTypecode = st.Name.Coalesce(st.TypeCode.ToString()); + throw new NotImplementedException(); + } + + public static string? GetFullUnionTypeName(this XmlSchemaObject schemaObject) + { + string? typeName = null; + // handle union of simple types. + if (schemaObject is XmlSchemaSimpleType simpleType && simpleType.IsOrHasUnion()) { + var memberTypes = simpleType.GetUnionMemberTypes(); + Debug.Assert(memberTypes is { Length: > 0 }, nameof(memberTypes) + " != null. Incorrectly defined union type."); + string typesStr = string.Join("And", memberTypes.Select(o => o.Name?.ToUpperFirstInvariant())); + Debug.Assert(typesStr.IsNotEmpty() && typesStr != "And"); + typeName = "unionOf" + typesStr; + } + + return typeName; + } } } \ No newline at end of file diff --git a/XObjectsCode/Src/StringExtensions.cs b/XObjectsCode/Src/StringExtensions.cs index 2b1594e..877b56e 100644 --- a/XObjectsCode/Src/StringExtensions.cs +++ b/XObjectsCode/Src/StringExtensions.cs @@ -1,9 +1,36 @@ //Copyright (c) Microsoft Corporation. All rights reserved. +#nullable enable + +using System.Linq; +using Xml.Schema.Linq.Extensions; namespace Xml.Schema.Linq.CodeGen { public static class StringExtensions { + /// + /// Equivalent to T-SQL COALESCE function for strings. + /// + /// Unlike the T-SQL function, this will use for checking emptiness. + /// + /// + /// + /// + public static string? Coalesce(this string? str, params string?[] others) + { + var list = others.Concat([str]).ToList(); + + foreach (var item in list) { + if (item.IsEmpty()) { + continue; + } + + return item; + } + + return null; + } + /// /// Converts the first character of the given Unicode string to its uppercase equivalent using the casing rules of the invariant culture. /// diff --git a/XObjectsTests/Extensions/GeneralExtensions.cs b/XObjectsTests/Extensions/GeneralExtensions.cs index 5ecae5d..1b8f39e 100644 --- a/XObjectsTests/Extensions/GeneralExtensions.cs +++ b/XObjectsTests/Extensions/GeneralExtensions.cs @@ -1,6 +1,7 @@ using System; using System.IO; using System.Xml.Linq; +using System.Xml.Serialization; using System.Xml.XPath; using ExtendedXmlSerializer; using ExtendedXmlSerializer.Configuration; @@ -13,11 +14,22 @@ namespace Xml.Schema.Linq.Tests.Extensions; public static class GeneralExtensions { + public static string SerializeToXml(this T thing) + { + var serializer = new XmlSerializer(typeof(T)); + using var writer = new StringWriter(); + serializer.Serialize(writer, thing); + + return writer.ToString(); + } + public static string ToXml(this ClrMappingInfo mapping) { IExtendedXmlSerializer serializer = new ConfigurationContainer() .EnableAllConstructors() .EnableParameterizedContent() + .Type().Register().Serializer().Using(new ClrTypeRefSerializer()) + .Type().Register().Serializer().Using(new ClrPropertyInfoSerializer()) .Create(); var stringWriter = new StringWriter(); @@ -37,7 +49,20 @@ public ClrTypeReference Get(IFormatReader parameter) public void Write(IFormatWriter writer, ClrTypeReference instance) { - var xml = instance.ToXml(); + var xml = instance.ToXDoc(); + writer.Content(xml.ToString(SaveOptions.DisableFormatting)); + } + } + + public class ClrPropertyInfoSerializer : ISerializer + { + public ClrPropertyInfo Get(IFormatReader parameter) + { + throw new NotImplementedException(); + } + public void Write(IFormatWriter writer, ClrPropertyInfo instance) + { + var xml = instance.ToXml(FormatOptions.None); writer.Content(xml); } } From 10302ce2a96452deb2eafe81b32e43aadfaef67d Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Fri, 26 Dec 2025 20:59:12 +1000 Subject: [PATCH 068/107] Added test for union of simple types defect. --- LinqToXsd.Schemas/LinqToXsd.Schemas.csproj | 3 +++ .../SimpleTypeUnion/StuDateAndTime.xsd | 23 +++++++++++++++++++ LinqToXsd/Properties/launchSettings.json | 6 +++++ 3 files changed, 32 insertions(+) create mode 100644 LinqToXsd.Schemas/XsdFeatureTests/SimpleTypeUnion/StuDateAndTime.xsd diff --git a/LinqToXsd.Schemas/LinqToXsd.Schemas.csproj b/LinqToXsd.Schemas/LinqToXsd.Schemas.csproj index 19f3e67..fd046c5 100644 --- a/LinqToXsd.Schemas/LinqToXsd.Schemas.csproj +++ b/LinqToXsd.Schemas/LinqToXsd.Schemas.csproj @@ -217,4 +217,7 @@ PreserveNewest + + + \ No newline at end of file diff --git a/LinqToXsd.Schemas/XsdFeatureTests/SimpleTypeUnion/StuDateAndTime.xsd b/LinqToXsd.Schemas/XsdFeatureTests/SimpleTypeUnion/StuDateAndTime.xsd new file mode 100644 index 0000000..7ec3fdd --- /dev/null +++ b/LinqToXsd.Schemas/XsdFeatureTests/SimpleTypeUnion/StuDateAndTime.xsd @@ -0,0 +1,23 @@ + + + + + + Attlist + date + + The attribute date is used to give a normalized value for a date according to the XSD syntax YYYY-MM-DD or a normalized value for a dateTime according to the XSD syntax YYYY-MM-DDThh:mm:ss(zzzz) + + + + + + + + + + + + + + diff --git a/LinqToXsd/Properties/launchSettings.json b/LinqToXsd/Properties/launchSettings.json index 1a1fafa..4cdd6f2 100644 --- a/LinqToXsd/Properties/launchSettings.json +++ b/LinqToXsd/Properties/launchSettings.json @@ -62,6 +62,12 @@ "commandLineArgs": "gen \"akomantoso30.xsd\" -a", "workingDirectory": "..\\GeneratedSchemaLibraries\\AkomaNtoso", "hotReloadEnabled": false + }, + "StuDateTime": { + "commandName": "Project", + "commandLineArgs": "gen \"StuDateAndTime.xsd\" -a", + "workingDirectory": "..\\LinqToXsd.Schemas\\XsdFeatureTests\\SimpleTypeUnion", + "hotReloadEnabled": false } } } \ No newline at end of file From a416cb2f8bfe486a80698b9191690c920835f15b Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Fri, 26 Dec 2025 21:00:13 +1000 Subject: [PATCH 069/107] Resolved issue with checking for XSD v1.1 schemas; fixed bug where the Generate() method was checking for configs if they were XSD v1.1 and not the actual XSD schema file. --- XObjectsCode/Src/XObjectsCoreGenerator.cs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/XObjectsCode/Src/XObjectsCoreGenerator.cs b/XObjectsCode/Src/XObjectsCoreGenerator.cs index ea5bdc0..c0a9d51 100644 --- a/XObjectsCode/Src/XObjectsCoreGenerator.cs +++ b/XObjectsCode/Src/XObjectsCoreGenerator.cs @@ -205,21 +205,26 @@ public static Dictionary Generate(IEnumerable schema IWarnableObserver? observer = null) { // xsd file paths are keys, the FileInfo's to their config files are values - var dictOfSchemasAndTheirConfigs = schemaFiles.Select(xsdFilePath => new KeyValuePair(xsdFilePath, - new FileInfo($"{xsdFilePath}.config"))) - .ToDictionary(k => k.Key, v => v.Value); + List<(FileInfo xsdFile, FileInfo configFile)> dictOfSchemasAndTheirConfigs = schemaFiles + .Select(xsdFilePath => { + var configFile = new FileInfo($"{xsdFilePath}.config"); + var xsdFile = new FileInfo(xsdFilePath); + return (xsdFile, configFile); + }) + .ToList(); var excludeV11Xsds = dictOfSchemasAndTheirConfigs - .Where(kvp => kvp.Value.Exists && new FileInfo(kvp.Key).GetXmlSchemaVersion() != XmlSchemaVersion.Version1_1).ToList(); + .Where(filePairs => filePairs.xsdFile.Exists && filePairs.xsdFile.GetXmlSchemaVersion() != XmlSchemaVersion.Version1_1) + .ToList(); if (excludeV11Xsds.Count != dictOfSchemasAndTheirConfigs.Count) { observer?.OnWarn("Found some XSD v1.1 schemas: this tool does not support XSD v1.1. and will ignore those."); } - observer?.OnNext($"Schemas to process: {excludeV11Xsds.ToDelimitedString(e => Path.GetFileName(e.Key), ';')}"); + observer?.OnNext($"Schemas to process: {excludeV11Xsds.ToDelimitedString(e => Path.GetFileName(e.xsdFile.Name), ';')}"); return excludeV11Xsds - .SelectMany(kvp => Generate(kvp.Key, kvp.Value.FullName)) + .SelectMany(pair => Generate(pair.xsdFile.FullName, pair.xsdFile.FullName)) // Multiple XSD files may import the same namespace, e.g. in case of a shared schema. // In this case we arbitrary keep the first occurence. .Distinct(new FileNameComparer()) From ec3905773e1d6a1d26f65cdddfe9452a0254dd94 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Mon, 12 Jan 2026 13:25:22 +1000 Subject: [PATCH 070/107] Fixed bug with GetSimpleTypeClrTypeDefName() when it couldn't handle simple type unions. Defaulted to system.object. --- XObjectsCode/Src/ClrTypeReference.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/XObjectsCode/Src/ClrTypeReference.cs b/XObjectsCode/Src/ClrTypeReference.cs index 3b0648a..767f6ab 100644 --- a/XObjectsCode/Src/ClrTypeReference.cs +++ b/XObjectsCode/Src/ClrTypeReference.cs @@ -207,8 +207,7 @@ public XmlSchemaObject SchemaObject public string LocalSuffix => this.IsEnum ? Constants.LocalEnumSuffix : Constants.LocalTypeSuffix; - public string GetSimpleTypeClrTypeDefName(string parentTypeClrNs, - Dictionary nameMappings) + public string GetSimpleTypeClrTypeDefName(string parentTypeClrNs, Dictionary nameMappings) { Debug.Assert(this.IsSimpleType); string clrTypeName = null; @@ -243,6 +242,11 @@ public string GetSimpleTypeClrTypeDefName(string parentTypeClrNs, clrTypeName = "global::" + typeNs + "." + clrTypeName; } + // unfortunately this doesn't handle simple type unions + if (clrTypeName.IsEmpty() && key is XmlSchemaSimpleType { Content: XmlSchemaSimpleTypeUnion union }) { + clrTypeName = typeof(object).FullName; + } + return clrTypeName; } From 0bc8538ecd3325314356292110342556a7df32e0 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Mon, 12 Jan 2026 13:25:23 +1000 Subject: [PATCH 071/107] Added test for previous bug fix. --- XObjectsTests/CodeGen/ClrPropertyTests.cs | 31 +++++++++++++++++------ 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/XObjectsTests/CodeGen/ClrPropertyTests.cs b/XObjectsTests/CodeGen/ClrPropertyTests.cs index 84acf77..ffc6b60 100644 --- a/XObjectsTests/CodeGen/ClrPropertyTests.cs +++ b/XObjectsTests/CodeGen/ClrPropertyTests.cs @@ -1,5 +1,6 @@ using System.IO.Abstractions.TestingHelpers; using System.Linq; +using System.Xml.Schema; using NUnit.Framework; using Xml.Schema.Linq.CodeGen; using Xml.Schema.Linq.Tests.Extensions; @@ -32,7 +33,7 @@ public void T1() } [Test] - public void T2() + public void TestSimpleTypeUnionMappingNames() { MockFileInfo akk = AllTestFiles.GetMockFileInfo(f => f.EndsWith("AkomaNtoso\\akomantoso30.xsd")); MockFileInfo akkConfig = AllTestFiles.GetMockFileInfo(f => f.EndsWith("AkomaNtoso\\akomantoso30.xsd.config")); @@ -43,16 +44,30 @@ public void T2() var xsdConverter = new XsdToTypesConverter(defaultSettings); var mapping = xsdConverter.GenerateMapping(schemaSet); - var mappingXml = mapping.ToXml(); + // the docDate has an attribute that is a simple type union of xsd:date & xsd:dateTime + ClrTypeInfo? docDateElMapping = mapping.Types.Single(t => t.schemaName == "docDate"); + Assert.IsInstanceOf(docDateElMapping); - Assert.NotNull(mappingXml); + var docDateElMappingContentInfo = (ClrContentTypeInfo)docDateElMapping; - var date = mapping.Types.Find(e => e.schemaName == "date"); + var date1Attr = docDateElMappingContentInfo.Content.OfType() + .Single(a => a.Origin == SchemaOrigin.Attribute && a.PropertyName == "date1"); + + Assert.True(date1Attr.IsUnion); + Assert.True(date1Attr.TypeReference.IsUnion); + var fullClrTypeName = date1Attr.TypeReference.GetClrFullTypeName("global::", mapping.NameMappings, defaultSettings, out var typeName); - var typeRefs = from t in mapping.Types - select t; + Assert.True(fullClrTypeName == typeof(object).FullName); + + var simpleTypeClrDefName = date1Attr.TypeReference.GetSimpleTypeClrTypeDefName("global::", mapping.NameMappings); + + Assert.True(simpleTypeClrDefName == "System.Object"); + + Assert.True(date1Attr.TypeReference.SchemaObject is XmlSchemaSimpleType); - var codeGenerator = new CodeDomTypesGenerator(defaultSettings); - var namespaces = codeGenerator.GenerateTypes(mapping).ToList(); + var union = date1Attr.TypeReference.SchemaObject as XmlSchemaSimpleType; + Assert.IsNotNull(union); + Assert.IsTrue(union!.Datatype!.Variety == XmlSchemaDatatypeVariety.Union); + Assert.IsTrue(union.Content is XmlSchemaSimpleTypeUnion); } } \ No newline at end of file From 047adff12e4aa51ca066534b7a1f2fcff4230e83 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Mon, 12 Jan 2026 13:25:23 +1000 Subject: [PATCH 072/107] Test cleanup. --- XObjectsTests/CodeGen/ClrPropertyTests.cs | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/XObjectsTests/CodeGen/ClrPropertyTests.cs b/XObjectsTests/CodeGen/ClrPropertyTests.cs index ffc6b60..b442151 100644 --- a/XObjectsTests/CodeGen/ClrPropertyTests.cs +++ b/XObjectsTests/CodeGen/ClrPropertyTests.cs @@ -10,28 +10,6 @@ namespace Xml.Schema.Linq.Tests.CodeGen; public class ClrPropertyTests: BaseTester { - [Test] - public void T1() - { - MockFileInfo abstractTestXsd = AllTestFiles.GetMockFileInfo(f => f.EndsWith("abstracttest.xsd")); - MockFileInfo abstractTestXsdConfig = AllTestFiles.GetMockFileInfo(f => f.EndsWith("abstracttest.xsd.config")); - var config = Configuration.Load(abstractTestXsdConfig.ToStreamReader()); - - var schemaSet = Utilities.GetXmlSchemaSet(abstractTestXsd, AllTestFiles); - var defaultSettings = schemaSet.ToDefaultMergedConfiguration(config).ToLinqToXsdSettings(); - var xsdConverter = new XsdToTypesConverter(defaultSettings); - ClrMappingInfo? mapping = xsdConverter.GenerateMapping(schemaSet); - - var codeGenerator = new CodeDomTypesGenerator(defaultSettings); - var namespaces = codeGenerator.GenerateTypes(mapping).ToList(); - - Assert.NotNull(mapping); - - foreach (var type in mapping.Types) { - - } - } - [Test] public void TestSimpleTypeUnionMappingNames() { From ec675a019a744ecf49a6af45bbd14ed2f7a47ea3 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Mon, 12 Jan 2026 13:25:24 +1000 Subject: [PATCH 073/107] WIP creating foundation code to traverse a schema and grab all anonymous simple union types. --- LinqToXsd.Schemas/LinqToXsd.Schemas.csproj | 9 +- LinqToXsd/Properties/launchSettings.json | 7 +- XObjectsCode/Extensions/GeneralExtensions.cs | 9 ++ .../Extensions/XmlSchemaExtensions.cs | 113 +++++++++++++++++- .../Extensions/StringExtensionMethods.cs | 2 +- XObjectsTests/BaseTester.cs | 10 +- XObjectsTests/Extensions/FileExtensions.cs | 21 +++- .../Extensions/XmlSchemaExtensionsTests.cs | 53 ++++++++ XObjectsTests/MockXmlUrlResolver.cs | 2 +- 9 files changed, 215 insertions(+), 11 deletions(-) diff --git a/LinqToXsd.Schemas/LinqToXsd.Schemas.csproj b/LinqToXsd.Schemas/LinqToXsd.Schemas.csproj index fd046c5..7c22985 100644 --- a/LinqToXsd.Schemas/LinqToXsd.Schemas.csproj +++ b/LinqToXsd.Schemas/LinqToXsd.Schemas.csproj @@ -34,6 +34,12 @@ TargetFramework=netstandard2.0 + + + + + + all @@ -217,7 +223,4 @@ PreserveNewest - - - \ No newline at end of file diff --git a/LinqToXsd/Properties/launchSettings.json b/LinqToXsd/Properties/launchSettings.json index 4cdd6f2..cd51c9c 100644 --- a/LinqToXsd/Properties/launchSettings.json +++ b/LinqToXsd/Properties/launchSettings.json @@ -68,6 +68,11 @@ "commandLineArgs": "gen \"StuDateAndTime.xsd\" -a", "workingDirectory": "..\\LinqToXsd.Schemas\\XsdFeatureTests\\SimpleTypeUnion", "hotReloadEnabled": false + }, + "OPML": { + "commandName": "Project", + "commandLineArgs": "gen . -a", + "workingDirectory": "C:\\Projects\\GitHub\\LinqToXsdCore\\GeneratedSchemaLibraries\\Opml" } } -} \ No newline at end of file +} diff --git a/XObjectsCode/Extensions/GeneralExtensions.cs b/XObjectsCode/Extensions/GeneralExtensions.cs index 5db3f80..e3f5243 100644 --- a/XObjectsCode/Extensions/GeneralExtensions.cs +++ b/XObjectsCode/Extensions/GeneralExtensions.cs @@ -1,4 +1,5 @@ using System.CodeDom; +using System.Collections.Generic; using System.Reflection; using Xml.Schema.Linq; @@ -42,5 +43,13 @@ public static GeneratedTypesVisibility ToGeneratedTypesVisibility(this MemberAtt return GeneratedTypesVisibility.Public; } + + public static bool AddIfNotAlreadyExists(this IDictionary dictionary, TKey key, TVal val) + { + var contains = dictionary.ContainsKey(key); + if (contains) return false; + dictionary.Add(key, val); + return true; + } } } diff --git a/XObjectsCode/Extensions/XmlSchemaExtensions.cs b/XObjectsCode/Extensions/XmlSchemaExtensions.cs index ed4da79..9aecf13 100644 --- a/XObjectsCode/Extensions/XmlSchemaExtensions.cs +++ b/XObjectsCode/Extensions/XmlSchemaExtensions.cs @@ -3,16 +3,127 @@ using System.IO; using System.Linq; using System.Reflection; +using System.Xml; using System.Xml.Linq; using System.Xml.Schema; using Xml.Fxt; using Xml.Schema.Linq; using Xml.Schema.Linq.CodeGen; +using Xml.Schema.Linq.Extensions; +using OneOf; namespace XObjects { + using XElementOrAttrOrQName = OneOf; + public static class XmlSchemaExtensions { + /// + /// Goes through the current and retrieves from all element and attribute definitions, any anonymously defined simple types. + /// Because these types are anonymous this method traverses the entire schema from top to bottom, inspecting the type of all elements and attributes. + /// + /// + /// + public static Dictionary RetrieveAllAnonymousSimpleTypes(this XmlSchemaSet schemaSet) + { + var simpleTypes = schemaSet.RetrieveAllSimpleTypes(); + + return simpleTypes.Where(st => st.Value.Name.IsEmpty()) + .ToDictionary(k => k.Key, v => v.Value); + } + + public static Dictionary RetrieveAllAnonymousSimpleUnionTypes(this XmlSchemaSet schemaSet) + { + var simpleTypes = schemaSet.RetrieveAllAnonymousSimpleTypes(); + + return simpleTypes.Where(st => st.Value.Content is XmlSchemaSimpleTypeUnion || st.Value.Datatype.Variety == XmlSchemaDatatypeVariety.Union) + .ToDictionary(k => k.Key, v => v.Value); + } + + public static Dictionary RetrieveAllSimpleTypes(this XmlSchemaSet schemaset) + { + var simpleTypesDictionary = new Dictionary(); + + IEnumerable allAttrsAndElements = schemaset.GlobalElements.Values.Cast() + .Concat(schemaset.GlobalAttributes.Values.Cast()) + .Concat(schemaset.GlobalTypes.Values.Cast()); + + foreach (var item in allAttrsAndElements) { + TraverseAllSimpleTypes(item, ref simpleTypesDictionary, out _); + } + + return simpleTypesDictionary; + } + + private static void TraverseAllSimpleTypes(XmlSchemaObject schemaObject, ref Dictionary simpleTypes, out bool breakOutOfLoop) + { + if (simpleTypes == null) throw new ArgumentNullException(nameof(simpleTypes)); + + bool didAdd = true; + switch (schemaObject) { + case XmlSchemaElement element: { + if (element.ElementSchemaType is XmlSchemaSimpleType simpleType) { + didAdd = simpleTypes.AddIfNotAlreadyExists(element, simpleType); + } + else if (element.ElementSchemaType is XmlSchemaComplexType complexType) { + foreach (var attr in complexType.AttributeUses.Values.Cast()) { + TraverseAllSimpleTypes(attr, ref simpleTypes, out breakOutOfLoop); + if (breakOutOfLoop) return; + } + + var childElements = complexType.LocalXsdElements() + .Where(e => !ReferenceEquals(e, schemaObject)) + .ToList(); + + foreach (var el in childElements) { + TraverseAllSimpleTypes(el, ref simpleTypes, out breakOutOfLoop); + if (breakOutOfLoop) return; + } + } + else { + if (element.ElementSchemaType is XmlSchemaComplexType { Particle: XmlSchemaGroupBase gb }) { + foreach (var particle in gb.Items) { + TraverseAllSimpleTypes(particle, ref simpleTypes, out breakOutOfLoop); + if (breakOutOfLoop) return; + } + } + } + + break; + } + + case XmlSchemaAttribute attribute: { + didAdd = simpleTypes.AddIfNotAlreadyExists(attribute, attribute.AttributeSchemaType); + break; + } + + case XmlSchemaComplexType complexType: + foreach (var attribute in complexType.AttributeUses.Values.OfType()) { + if (attribute.AttributeSchemaType is { } simpleType) { + didAdd = simpleTypes.AddIfNotAlreadyExists(attribute, simpleType); + } + } + + if (complexType.ContentTypeParticle != null) { + TraverseAllSimpleTypes(complexType.ContentTypeParticle, ref simpleTypes, out breakOutOfLoop); + if (breakOutOfLoop) return; + } + + break; + + case XmlSchemaGroupBase groupBase when groupBase is XmlSchemaAll all: + foreach (var item in all.Items) { + TraverseAllSimpleTypes(item, ref simpleTypes, out breakOutOfLoop); + if (breakOutOfLoop) return; + } + + break; + + } + + breakOutOfLoop = !didAdd; + } + /// /// Returns true or false if the current defines an inline enumeration of values. /// @@ -206,4 +317,4 @@ public static Configuration ToDefaultMergedConfiguration(this XmlSchemaSet xs, C return mergedConfigOutput; } } -} \ No newline at end of file +} diff --git a/XObjectsCore/Extensions/StringExtensionMethods.cs b/XObjectsCore/Extensions/StringExtensionMethods.cs index 8721f0d..d8ea7d6 100644 --- a/XObjectsCore/Extensions/StringExtensionMethods.cs +++ b/XObjectsCore/Extensions/StringExtensionMethods.cs @@ -11,7 +11,7 @@ public static class StringExtensionMethods /// /// [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool IsEmpty(this string theString) => string.IsNullOrWhiteSpace(theString); + public static bool IsEmpty(this string? theString) => string.IsNullOrWhiteSpace(theString); /// /// Determines if a string is NOT null, empty or all whitespace. The inverse of . diff --git a/XObjectsTests/BaseTester.cs b/XObjectsTests/BaseTester.cs index a0f5013..8937a80 100644 --- a/XObjectsTests/BaseTester.cs +++ b/XObjectsTests/BaseTester.cs @@ -15,6 +15,7 @@ public class BaseTester { public List TestAssembliesLoaded { get; protected set; } = null!; public MockFileSystem AllTestFiles { get; protected set; } = null!; + public MockXmlUrlResolver MockXmlFileResolver { get; protected set; } = null!; /// /// This setup method will tee-up some helpful reference data that are used in testing the code gen output. @@ -26,13 +27,18 @@ public void Setup() var current = Assembly.GetExecutingAssembly(); var location = new DirectoryInfo(Path.GetDirectoryName(current.Location)!); var allDlls = location.GetFileSystemInfos("*.dll", SearchOption.AllDirectories); - var testDlls = allDlls.Where(a => !(a.Name.Contains("System.") || a.Name.Contains("Microsoft.") || a.Name.Contains("MoreLinq") || a.Name.Contains("LinqToXsd") || - a.Name.Contains("nunit") || a.Name.Contains("Fasterflect"))).ToList(); + var testDlls = allDlls.Where(a => + !( + a.Name.Contains("System.") || a.Name.Contains("Microsoft.") || a.Name.Contains("MoreLinq") || a.Name.Contains("nunit") || a.Name.Contains("Fasterflect") || + a.Name.Equals("LinqToXsd") || a.Name.Contains("XObjects") + ) + ).ToList(); var referencedAssemblies = testDlls.OrderBy(a => a.FullName).ToList(); TestAssembliesLoaded = referencedAssemblies.Select(name => Assembly.LoadFile(name.FullName)).ToList(); AllTestFiles = Utilities.GetAggregateMockFileSystem(TestAssembliesLoaded); + MockXmlFileResolver = new MockXmlUrlResolver(AllTestFiles); } public CSharpSyntaxTree GenerateSyntaxTree(MockFileInfo mfi) diff --git a/XObjectsTests/Extensions/FileExtensions.cs b/XObjectsTests/Extensions/FileExtensions.cs index 3bd8f55..9deb14f 100644 --- a/XObjectsTests/Extensions/FileExtensions.cs +++ b/XObjectsTests/Extensions/FileExtensions.cs @@ -1,6 +1,10 @@ -using System.IO; +using System; +using System.IO; using System.IO.Abstractions; +using System.Xml; using System.Xml.Linq; +using System.Xml.Schema; +using Xml.Schema.Linq.Extensions; namespace Xml.Schema.Linq.Tests.Extensions; @@ -15,4 +19,17 @@ public static XDocument ToXDocument(this IFileInfo fileInfo) { return XDocument.Load(fileInfo.ToStreamReader()); } -} \ No newline at end of file + + public static XmlSchemaSet ReadAsXmlSchemaInstance(this IFileInfo fileInfo, XmlResolver resolver) + { + if (resolver == null) throw new ArgumentNullException(nameof(resolver)); + + using var sr = new StreamReader(fileInfo.OpenRead()); + XmlReaderSettings defaultXmlReaderSettings = Defaults.DefaultXmlReaderSettings; + defaultXmlReaderSettings.XmlResolver = resolver; + var reader = XmlReader.Create(sr, defaultXmlReaderSettings); + var xsd = reader.ToXmlSchemaSet(resolver); + + return xsd; + } +} diff --git a/XObjectsTests/Extensions/XmlSchemaExtensionsTests.cs b/XObjectsTests/Extensions/XmlSchemaExtensionsTests.cs index 6acbcae..d738a10 100644 --- a/XObjectsTests/Extensions/XmlSchemaExtensionsTests.cs +++ b/XObjectsTests/Extensions/XmlSchemaExtensionsTests.cs @@ -3,6 +3,7 @@ using System.Xml.Schema; using MoreLinq; using NUnit.Framework; +using Xml.Schema.Linq.Extensions; using XObjects; namespace Xml.Schema.Linq.Tests.Extensions @@ -81,5 +82,57 @@ public void TestGetClosestNamedParent3() Assert.IsTrue(namedParentOfRandomFacet is XmlSchemaAttribute); Assert.IsTrue(((XmlSchemaAttribute) namedParentOfRandomFacet).Name == "PubModel"); } + + [Test] + public void TestRetrieveAllAnonymousSimpleTypes_OPML() + { + var opmlFile = AllTestFiles.AllFiles.SingleOrDefault(f => f.EndsWith("Opml\\opml2.xsd")); + Assert.NotNull(opmlFile); + var opmlXsd = AllTestFiles.FileInfo.New(opmlFile).ReadAsXmlSchemaInstance(MockXmlFileResolver); + + var anonTypes = opmlXsd.RetrieveAllAnonymousSimpleTypes(); + + Assert.NotNull(anonTypes); + Assert.IsEmpty(anonTypes); + } + + [Test] + public void TestRetrieveAllAnonymousSimpleTypes_StuDateAndTime() + { + var file = AllTestFiles.AllFiles.SingleOrDefault(f => f.EndsWith("StuDateAndTime.xsd")); + Assert.NotNull(file); + var xsd = AllTestFiles.FileInfo.New(file).ReadAsXmlSchemaInstance(MockXmlFileResolver); + + var anonTypes = xsd.RetrieveAllAnonymousSimpleTypes(); + + Assert.NotNull(anonTypes); + Assert.IsEmpty(anonTypes); + } + + [Test] + public void TestRetrieveAllAnonymousSimpleUnionTypes_AkomaNtoso() + { + var opmlFile = AllTestFiles.AllFiles.SingleOrDefault(f => f.EndsWith("\\AkomaNtoso\\akomantoso30.xsd")); + Assert.NotNull(opmlFile); + var opmlXsd = AllTestFiles.FileInfo.New(opmlFile).ReadAsXmlSchemaInstance(MockXmlFileResolver); + + var anonUnionTypes = opmlXsd.RetrieveAllAnonymousSimpleUnionTypes(); + + Assert.NotNull(anonUnionTypes); + Assert.IsNotEmpty(anonUnionTypes); + } + + [Test] + public void TestRetrieveAllSimpleTypes_AkomaNtoso() + { + var opmlFile = AllTestFiles.AllFiles.SingleOrDefault(f => f.EndsWith("\\AkomaNtoso\\akomantoso30.xsd")); + Assert.NotNull(opmlFile); + var opmlXsd = AllTestFiles.FileInfo.New(opmlFile).ReadAsXmlSchemaInstance(MockXmlFileResolver); + + var anonUnionTypes = opmlXsd.RetrieveAllSimpleTypes(); + + Assert.NotNull(anonUnionTypes); + Assert.IsNotEmpty(anonUnionTypes); + } } } \ No newline at end of file diff --git a/XObjectsTests/MockXmlUrlResolver.cs b/XObjectsTests/MockXmlUrlResolver.cs index 8362c5d..361c538 100644 --- a/XObjectsTests/MockXmlUrlResolver.cs +++ b/XObjectsTests/MockXmlUrlResolver.cs @@ -16,7 +16,7 @@ internal class ReflexiveXmlSchemaSet : XmlSchemaSet } -internal class MockXmlUrlResolver : XmlResolver +public class MockXmlUrlResolver : XmlResolver { private readonly IMockFileDataAccessor fs; private readonly Dictionary mappings = new(); From 4b1aeea4043466e37dddb3b38a0f138c6a4289fa Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Mon, 12 Jan 2026 13:25:25 +1000 Subject: [PATCH 074/107] More work on extension methods to traverse an entire XSD graph for simple types and unions. --- .../Extensions/XmlSchemaExtensions.cs | 43 ++++++++++++++----- XObjectsCode/Src/SOMQueryExtensions.cs | 7 +++ XObjectsTests/Extensions/FileExtensions.cs | 11 ++++- .../Extensions/XmlSchemaExtensionsTests.cs | 12 +++--- 4 files changed, 56 insertions(+), 17 deletions(-) diff --git a/XObjectsCode/Extensions/XmlSchemaExtensions.cs b/XObjectsCode/Extensions/XmlSchemaExtensions.cs index 9aecf13..b4c4974 100644 --- a/XObjectsCode/Extensions/XmlSchemaExtensions.cs +++ b/XObjectsCode/Extensions/XmlSchemaExtensions.cs @@ -1,4 +1,5 @@ -using System; +#nullable enable +using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -61,6 +62,11 @@ private static void TraverseAllSimpleTypes(XmlSchemaObject schemaObject, ref Dic bool didAdd = true; switch (schemaObject) { + case XmlSchemaAttribute attribute: { + didAdd = simpleTypes.AddIfNotAlreadyExists(attribute, attribute.AttributeSchemaType); + break; + } + case XmlSchemaElement element: { if (element.ElementSchemaType is XmlSchemaSimpleType simpleType) { didAdd = simpleTypes.AddIfNotAlreadyExists(element, simpleType); @@ -92,12 +98,7 @@ private static void TraverseAllSimpleTypes(XmlSchemaObject schemaObject, ref Dic break; } - case XmlSchemaAttribute attribute: { - didAdd = simpleTypes.AddIfNotAlreadyExists(attribute, attribute.AttributeSchemaType); - break; - } - - case XmlSchemaComplexType complexType: + case XmlSchemaComplexType complexType: { foreach (var attribute in complexType.AttributeUses.Values.OfType()) { if (attribute.AttributeSchemaType is { } simpleType) { didAdd = simpleTypes.AddIfNotAlreadyExists(attribute, simpleType); @@ -110,20 +111,42 @@ private static void TraverseAllSimpleTypes(XmlSchemaObject schemaObject, ref Dic } break; + } + + case XmlSchemaGroupBase groupBase: { + OneOf matchModel = default; + if (groupBase is XmlSchemaAll all) { matchModel = all; } + else if (groupBase is XmlSchemaSequence seq) { matchModel = seq; } + else if (groupBase is XmlSchemaChoice choice) { matchModel = choice; } - case XmlSchemaGroupBase groupBase when groupBase is XmlSchemaAll all: - foreach (var item in all.Items) { + foreach (var item in matchModel.Match(a => a.Items, s => s.Items, c => c.Items)) { TraverseAllSimpleTypes(item, ref simpleTypes, out breakOutOfLoop); if (breakOutOfLoop) return; } break; - + } } breakOutOfLoop = !didAdd; } + public static bool IsOfAnonymousType(this XmlSchemaAttribute attr) + { + return attr.SchemaType != null && !( + (attr.AttributeSchemaType?.IsGlobal()).GetValueOrDefault() && + (attr.AttributeSchemaType?.IsBuiltInSimpleType()).GetValueOrDefault() + ); + } + + public static bool IsOfAnonymousType(this XmlSchemaElement el) + { + return el.SchemaType != null && !( + (el.ElementSchemaType?.IsGlobal()).GetValueOrDefault() && + (el.ElementSchemaType?.IsBuiltInSimpleType()).GetValueOrDefault() + ); + } + /// /// Returns true or false if the current defines an inline enumeration of values. /// diff --git a/XObjectsCode/Src/SOMQueryExtensions.cs b/XObjectsCode/Src/SOMQueryExtensions.cs index 17f7c51..54b933c 100644 --- a/XObjectsCode/Src/SOMQueryExtensions.cs +++ b/XObjectsCode/Src/SOMQueryExtensions.cs @@ -99,6 +99,13 @@ public static bool IsBuiltInSimpleType(this XmlSchemaSimpleType derivedType) } } + public static bool IsBuiltInSimpleType(this XmlSchemaType type) + { + if (type is XmlSchemaSimpleType a) return a.IsBuiltInSimpleType(); + + return false; + } + public static XmlSchemaSimpleType GetListItemType(this XmlSchemaSimpleType type) { Debug.Assert(type != null); diff --git a/XObjectsTests/Extensions/FileExtensions.cs b/XObjectsTests/Extensions/FileExtensions.cs index 9deb14f..72500ac 100644 --- a/XObjectsTests/Extensions/FileExtensions.cs +++ b/XObjectsTests/Extensions/FileExtensions.cs @@ -20,7 +20,7 @@ public static XDocument ToXDocument(this IFileInfo fileInfo) return XDocument.Load(fileInfo.ToStreamReader()); } - public static XmlSchemaSet ReadAsXmlSchemaInstance(this IFileInfo fileInfo, XmlResolver resolver) + public static XmlSchemaSet ReadAsXmlSchemaSet(this IFileInfo fileInfo, XmlResolver resolver) { if (resolver == null) throw new ArgumentNullException(nameof(resolver)); @@ -32,4 +32,13 @@ public static XmlSchemaSet ReadAsXmlSchemaInstance(this IFileInfo fileInfo, XmlR return xsd; } + + public static XmlSchemaSet ReadAsXmlSchemaDefinition(this IFileInfo fileInfo) + { + using var sr = new StreamReader(fileInfo.OpenRead()); + var reader = XmlReader.Create(sr, Defaults.DefaultXmlReaderSettings); + var xsd = reader.ToXmlSchemaSet(); + + return xsd; + } } diff --git a/XObjectsTests/Extensions/XmlSchemaExtensionsTests.cs b/XObjectsTests/Extensions/XmlSchemaExtensionsTests.cs index d738a10..81e9b9b 100644 --- a/XObjectsTests/Extensions/XmlSchemaExtensionsTests.cs +++ b/XObjectsTests/Extensions/XmlSchemaExtensionsTests.cs @@ -88,12 +88,12 @@ public void TestRetrieveAllAnonymousSimpleTypes_OPML() { var opmlFile = AllTestFiles.AllFiles.SingleOrDefault(f => f.EndsWith("Opml\\opml2.xsd")); Assert.NotNull(opmlFile); - var opmlXsd = AllTestFiles.FileInfo.New(opmlFile).ReadAsXmlSchemaInstance(MockXmlFileResolver); + var opmlXsd = AllTestFiles.FileInfo.New(opmlFile).ReadAsXmlSchemaSet(MockXmlFileResolver); var anonTypes = opmlXsd.RetrieveAllAnonymousSimpleTypes(); Assert.NotNull(anonTypes); - Assert.IsEmpty(anonTypes); + Assert.IsNotEmpty(anonTypes); } [Test] @@ -101,12 +101,12 @@ public void TestRetrieveAllAnonymousSimpleTypes_StuDateAndTime() { var file = AllTestFiles.AllFiles.SingleOrDefault(f => f.EndsWith("StuDateAndTime.xsd")); Assert.NotNull(file); - var xsd = AllTestFiles.FileInfo.New(file).ReadAsXmlSchemaInstance(MockXmlFileResolver); + var xsd = AllTestFiles.FileInfo.New(file).ReadAsXmlSchemaSet(MockXmlFileResolver); var anonTypes = xsd.RetrieveAllAnonymousSimpleTypes(); Assert.NotNull(anonTypes); - Assert.IsEmpty(anonTypes); + Assert.IsNotEmpty(anonTypes); } [Test] @@ -114,7 +114,7 @@ public void TestRetrieveAllAnonymousSimpleUnionTypes_AkomaNtoso() { var opmlFile = AllTestFiles.AllFiles.SingleOrDefault(f => f.EndsWith("\\AkomaNtoso\\akomantoso30.xsd")); Assert.NotNull(opmlFile); - var opmlXsd = AllTestFiles.FileInfo.New(opmlFile).ReadAsXmlSchemaInstance(MockXmlFileResolver); + var opmlXsd = AllTestFiles.FileInfo.New(opmlFile).ReadAsXmlSchemaSet(MockXmlFileResolver); var anonUnionTypes = opmlXsd.RetrieveAllAnonymousSimpleUnionTypes(); @@ -127,7 +127,7 @@ public void TestRetrieveAllSimpleTypes_AkomaNtoso() { var opmlFile = AllTestFiles.AllFiles.SingleOrDefault(f => f.EndsWith("\\AkomaNtoso\\akomantoso30.xsd")); Assert.NotNull(opmlFile); - var opmlXsd = AllTestFiles.FileInfo.New(opmlFile).ReadAsXmlSchemaInstance(MockXmlFileResolver); + var opmlXsd = AllTestFiles.FileInfo.New(opmlFile).ReadAsXmlSchemaSet(MockXmlFileResolver); var anonUnionTypes = opmlXsd.RetrieveAllSimpleTypes(); From 989079f1f54605682c57c7341ebd93a920180da7 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Mon, 12 Jan 2026 13:25:26 +1000 Subject: [PATCH 075/107] test case cleanup. --- .../Extensions/XmlSchemaExtensions.cs | 21 ++++-- XObjectsTests/BaseTester.cs | 12 ++++ .../Extensions/XmlSchemaExtensionsTests.cs | 65 ++++++++----------- 3 files changed, 55 insertions(+), 43 deletions(-) diff --git a/XObjectsCode/Extensions/XmlSchemaExtensions.cs b/XObjectsCode/Extensions/XmlSchemaExtensions.cs index b4c4974..1ecd938 100644 --- a/XObjectsCode/Extensions/XmlSchemaExtensions.cs +++ b/XObjectsCode/Extensions/XmlSchemaExtensions.cs @@ -21,10 +21,9 @@ public static class XmlSchemaExtensions { /// /// Goes through the current and retrieves from all element and attribute definitions, any anonymously defined simple types. - /// Because these types are anonymous this method traverses the entire schema from top to bottom, inspecting the type of all elements and attributes. + /// Because these types are anonymous this method traverses the entire schema from top to bottom, inspecting the type of all elements and attributes. Causes memory spikes for some larger schemas. /// /// - /// public static Dictionary RetrieveAllAnonymousSimpleTypes(this XmlSchemaSet schemaSet) { var simpleTypes = schemaSet.RetrieveAllSimpleTypes(); @@ -33,6 +32,11 @@ public static Dictionary RetrieveAll .ToDictionary(k => k.Key, v => v.Value); } + /// + /// Goes through the current and retrieves from all element and attribute definitions, any anonymously defined simple union types. + /// Because these types are anonymous this method traverses the entire schema from top to bottom, inspecting the type of all elements and attributes. Causes memory spikes for some larger schemas. + /// + /// public static Dictionary RetrieveAllAnonymousSimpleUnionTypes(this XmlSchemaSet schemaSet) { var simpleTypes = schemaSet.RetrieveAllAnonymousSimpleTypes(); @@ -41,13 +45,18 @@ public static Dictionary RetrieveAll .ToDictionary(k => k.Key, v => v.Value); } - public static Dictionary RetrieveAllSimpleTypes(this XmlSchemaSet schemaset) + /// + /// Goes through the current and retrieves from all element and attribute definitions, all defined simple types. + /// Because these types are anonymous this method traverses the entire schema from top to bottom, inspecting the type of all elements and attributes. Causes memory spikes for some larger schemas. + /// + /// + public static Dictionary RetrieveAllSimpleTypes(this XmlSchemaSet schemaSet) { var simpleTypesDictionary = new Dictionary(); - IEnumerable allAttrsAndElements = schemaset.GlobalElements.Values.Cast() - .Concat(schemaset.GlobalAttributes.Values.Cast()) - .Concat(schemaset.GlobalTypes.Values.Cast()); + IEnumerable allAttrsAndElements = schemaSet.GlobalElements.Values.Cast() + .Concat(schemaSet.GlobalAttributes.Values.Cast()) + .Concat(schemaSet.GlobalTypes.Values.Cast()); foreach (var item in allAttrsAndElements) { TraverseAllSimpleTypes(item, ref simpleTypesDictionary, out _); diff --git a/XObjectsTests/BaseTester.cs b/XObjectsTests/BaseTester.cs index 8937a80..8be7556 100644 --- a/XObjectsTests/BaseTester.cs +++ b/XObjectsTests/BaseTester.cs @@ -1,10 +1,13 @@ #nullable enable +using System; using System.Collections.Generic; +using System.Diagnostics; using System.IO; using System.IO.Abstractions; using System.IO.Abstractions.TestingHelpers; using System.Linq; using System.Reflection; +using System.Xml.Schema; using Microsoft.CodeAnalysis.CSharp; using NUnit.Framework; using Xml.Schema.Linq.Tests.Extensions; @@ -68,4 +71,13 @@ public IFileInfo GetFile(string nonRootedPath) { return AllTestFiles.AllFiles.Where(f => f.EndsWith(nonRootedPath)).Select(f => AllTestFiles.FileInfo.New(f)).First(); } + + public XmlSchemaSet GetTestFileAsXmlSchemaSet(string endsWithFilePattern) + { + if (endsWithFilePattern == null) throw new ArgumentNullException(nameof(endsWithFilePattern)); + + var file = AllTestFiles.AllFiles.SingleOrDefault(f => f.EndsWith(endsWithFilePattern)); + Assert.NotNull(file); + return AllTestFiles.FileInfo.New(file).ReadAsXmlSchemaSet(MockXmlFileResolver); + } } \ No newline at end of file diff --git a/XObjectsTests/Extensions/XmlSchemaExtensionsTests.cs b/XObjectsTests/Extensions/XmlSchemaExtensionsTests.cs index 81e9b9b..9e73ae6 100644 --- a/XObjectsTests/Extensions/XmlSchemaExtensionsTests.cs +++ b/XObjectsTests/Extensions/XmlSchemaExtensionsTests.cs @@ -1,8 +1,11 @@ -using System.IO; +using System.Collections.Generic; +using System.IO; using System.Linq; +using System.Xml; using System.Xml.Schema; using MoreLinq; using NUnit.Framework; +using OneOf; using Xml.Schema.Linq.Extensions; using XObjects; @@ -54,7 +57,6 @@ public void TestGetClosestNamedParent2() .OfType() .First(e => e.Name == "URL"); - var namedParent = urlElement.GetClosestNamedParent(); Assert.IsNull(namedParent); Assert.IsTrue(urlElement.Parent is XmlSchema); @@ -83,56 +85,45 @@ public void TestGetClosestNamedParent3() Assert.IsTrue(((XmlSchemaAttribute) namedParentOfRandomFacet).Name == "PubModel"); } - [Test] - public void TestRetrieveAllAnonymousSimpleTypes_OPML() + [Test, TestCase("StuDateAndTime.xsd"), TestCase("\\AkomaNtoso\\akomantoso30.xsd"), TestCase("Opml\\opml2.xsd")] + public void TestRetrieveAllAnonymousSimpleTypes(string endsWithFilePattern) { - var opmlFile = AllTestFiles.AllFiles.SingleOrDefault(f => f.EndsWith("Opml\\opml2.xsd")); - Assert.NotNull(opmlFile); - var opmlXsd = AllTestFiles.FileInfo.New(opmlFile).ReadAsXmlSchemaSet(MockXmlFileResolver); - - var anonTypes = opmlXsd.RetrieveAllAnonymousSimpleTypes(); - - Assert.NotNull(anonTypes); - Assert.IsNotEmpty(anonTypes); - } - - [Test] - public void TestRetrieveAllAnonymousSimpleTypes_StuDateAndTime() - { - var file = AllTestFiles.AllFiles.SingleOrDefault(f => f.EndsWith("StuDateAndTime.xsd")); - Assert.NotNull(file); - var xsd = AllTestFiles.FileInfo.New(file).ReadAsXmlSchemaSet(MockXmlFileResolver); + var xsd = GetTestFileAsXmlSchemaSet(endsWithFilePattern); var anonTypes = xsd.RetrieveAllAnonymousSimpleTypes(); - + Assert.NotNull(anonTypes); Assert.IsNotEmpty(anonTypes); } - [Test] - public void TestRetrieveAllAnonymousSimpleUnionTypes_AkomaNtoso() + [Test, TestCase("\\AkomaNtoso\\akomantoso30.xsd")] + [TestCase("StuDateAndTime.xsd")] + public void TestRetrieveAllAnonymousSimpleUnionTypes(string endsWithFilePattern) { - var opmlFile = AllTestFiles.AllFiles.SingleOrDefault(f => f.EndsWith("\\AkomaNtoso\\akomantoso30.xsd")); - Assert.NotNull(opmlFile); - var opmlXsd = AllTestFiles.FileInfo.New(opmlFile).ReadAsXmlSchemaSet(MockXmlFileResolver); + var xsd = GetTestFileAsXmlSchemaSet(endsWithFilePattern); + + var anonUnionTypes = xsd.RetrieveAllAnonymousSimpleUnionTypes(); - var anonUnionTypes = opmlXsd.RetrieveAllAnonymousSimpleUnionTypes(); - Assert.NotNull(anonUnionTypes); Assert.IsNotEmpty(anonUnionTypes); } - [Test] - public void TestRetrieveAllSimpleTypes_AkomaNtoso() + [Test, TestCase("\\AkomaNtoso\\akomantoso30.xsd")] + public void TestRetrieveAllSimpleTypes(string endsWithFilePattern) { - var opmlFile = AllTestFiles.AllFiles.SingleOrDefault(f => f.EndsWith("\\AkomaNtoso\\akomantoso30.xsd")); - Assert.NotNull(opmlFile); - var opmlXsd = AllTestFiles.FileInfo.New(opmlFile).ReadAsXmlSchemaSet(MockXmlFileResolver); + var xsd = GetTestFileAsXmlSchemaSet(endsWithFilePattern); - var anonUnionTypes = opmlXsd.RetrieveAllSimpleTypes(); - - Assert.NotNull(anonUnionTypes); - Assert.IsNotEmpty(anonUnionTypes); + Dictionary, XmlSchemaSimpleType> simpleTypes = xsd.RetrieveAllSimpleTypes(); + + Assert.NotNull(simpleTypes); + Assert.IsNotEmpty(simpleTypes); + + var elementTypes = simpleTypes.Where(e => e.Key.IsT0).ToList(); + var attrTypes = simpleTypes.Where(e => e.Key.IsT1).ToList(); + + if (!(attrTypes.Count > elementTypes.Count)) { + Assert.Warn("That's weird, a schema with more elements whose type is simple than attributes?!"); + } } } } \ No newline at end of file From bba2e7f6d8ad8cb58f5af25f4c0b6477f69076ff Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Mon, 12 Jan 2026 13:25:27 +1000 Subject: [PATCH 076/107] wip. --- XObjectsTests/CodeGen/ClrTypeInfoTests.cs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 XObjectsTests/CodeGen/ClrTypeInfoTests.cs diff --git a/XObjectsTests/CodeGen/ClrTypeInfoTests.cs b/XObjectsTests/CodeGen/ClrTypeInfoTests.cs new file mode 100644 index 0000000..b99d12b --- /dev/null +++ b/XObjectsTests/CodeGen/ClrTypeInfoTests.cs @@ -0,0 +1,22 @@ +using NUnit.Framework; +using Xml.Schema.Linq.CodeGen; +using XObjects; + +namespace Xml.Schema.Linq.Tests.CodeGen; + +public class ClrTypeInfoTests: BaseTester +{ + [Test, TestCase("StuDateAndTime.xsd")] + public void CreateSimpleTypeForAnonymousSimpleTypeUnion(string endsWithFilePattern) + { + var xsd = GetTestFileAsXmlSchemaSet(endsWithFilePattern); + + var anonUnionTypes = xsd.RetrieveAllAnonymousSimpleUnionTypes(); + + Assert.NotNull(anonUnionTypes); + + foreach (var simpleType in anonUnionTypes) { + var type = ClrSimpleTypeInfo.CreateSimpleTypeInfo(simpleType.Value); + } + } +} \ No newline at end of file From 551a1d4a5efb976557ad4108763f3b8438bc1453 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Mon, 12 Jan 2026 13:25:29 +1000 Subject: [PATCH 077/107] nullables and comments. --- XObjectsCode/Extensions/XmlSchemaExtensions.cs | 2 +- XObjectsCode/Src/SOMQueryExtensions.cs | 2 +- XObjectsCode/Src/XsdToTypesConverter.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/XObjectsCode/Extensions/XmlSchemaExtensions.cs b/XObjectsCode/Extensions/XmlSchemaExtensions.cs index 1ecd938..b45c785 100644 --- a/XObjectsCode/Extensions/XmlSchemaExtensions.cs +++ b/XObjectsCode/Extensions/XmlSchemaExtensions.cs @@ -181,7 +181,7 @@ public static bool DefinesInlineEnum(this XmlSchemaAttribute attribute) /// themselves unnamed, and it is the named ones that are helpful to know. /// /// - public static XmlSchemaObject GetClosestNamedParent(this XmlSchemaObject @object) + public static XmlSchemaObject? GetClosestNamedParent(this XmlSchemaObject @object) { if (@object.Parent is XmlSchemaXPath xmlSchemaXPath) { return null; } if (@object.Parent is XmlSchema xmlSchema) { return null; } diff --git a/XObjectsCode/Src/SOMQueryExtensions.cs b/XObjectsCode/Src/SOMQueryExtensions.cs index 54b933c..70f1927 100644 --- a/XObjectsCode/Src/SOMQueryExtensions.cs +++ b/XObjectsCode/Src/SOMQueryExtensions.cs @@ -14,7 +14,7 @@ namespace Xml.Schema.Linq.CodeGen internal static class SOMQueryExtensions { //XmlSchemaType helpers - public static XmlSchemaContentType GetContentType(this XmlSchemaType schemaType) + public static XmlSchemaContentType GetContentType(this XmlSchemaType? schemaType) { if (schemaType == null) { diff --git a/XObjectsCode/Src/XsdToTypesConverter.cs b/XObjectsCode/Src/XsdToTypesConverter.cs index da9af5c..a3a9639 100644 --- a/XObjectsCode/Src/XsdToTypesConverter.cs +++ b/XObjectsCode/Src/XsdToTypesConverter.cs @@ -951,7 +951,7 @@ private ClrPropertyInfo BuildPropertyForElement(XmlSchemaElement elem, bool from SchemaOrigin typeRefOrigin = SchemaOrigin.Fragment; bool isTypeRef = false; - //Anonymous types have a non null XmlSchemaElement.SchemaType value + //Anonymous element types have a non null XmlSchemaElement.SchemaType value bool isAnonymous = elem.SchemaType != null; XmlSchemaObject schemaObject = schemaType; From 71a75245f5ec1ee458dad606de6e0460600f4640 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Mon, 12 Jan 2026 13:25:31 +1000 Subject: [PATCH 078/107] extracted to new extension method. --- XObjectsCode/Src/XsdToTypesConverter.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/XObjectsCode/Src/XsdToTypesConverter.cs b/XObjectsCode/Src/XsdToTypesConverter.cs index a3a9639..8c98022 100644 --- a/XObjectsCode/Src/XsdToTypesConverter.cs +++ b/XObjectsCode/Src/XsdToTypesConverter.cs @@ -1020,8 +1020,7 @@ private ClrPropertyInfo BuildPropertyForAttribute(XmlSchemaAttribute attribute, SchemaOrigin typeRefOrigin = SchemaOrigin.Fragment; bool isTypeRef = false; - bool isAnonymous = attribute.SchemaType != null || (!attribute.AttributeSchemaType.IsGlobal() && - !attribute.AttributeSchemaType.IsBuiltInSimpleType()); + bool isAnonymous = attribute.IsOfAnonymousType(); XmlSchemaObject schemaObject = schemaType; From e382d8b485bd8b55519dd5eecf742e43dc76de8e Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Mon, 12 Jan 2026 13:25:32 +1000 Subject: [PATCH 079/107] updated test files. --- LinqToXsd.Schemas/LinqToXsd.Schemas.csproj | 8 ++++++++ .../XsdFeatureTests/SimpleTypeUnion/StuDateAndTime.xsd | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/LinqToXsd.Schemas/LinqToXsd.Schemas.csproj b/LinqToXsd.Schemas/LinqToXsd.Schemas.csproj index 7c22985..4626c2c 100644 --- a/LinqToXsd.Schemas/LinqToXsd.Schemas.csproj +++ b/LinqToXsd.Schemas/LinqToXsd.Schemas.csproj @@ -35,9 +35,17 @@ + + + + + + + + diff --git a/LinqToXsd.Schemas/XsdFeatureTests/SimpleTypeUnion/StuDateAndTime.xsd b/LinqToXsd.Schemas/XsdFeatureTests/SimpleTypeUnion/StuDateAndTime.xsd index 7ec3fdd..3108382 100644 --- a/LinqToXsd.Schemas/XsdFeatureTests/SimpleTypeUnion/StuDateAndTime.xsd +++ b/LinqToXsd.Schemas/XsdFeatureTests/SimpleTypeUnion/StuDateAndTime.xsd @@ -20,4 +20,11 @@ + + + + + + + From 5196668199de8a612e6595e2decff86b24d4b6a2 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Mon, 12 Jan 2026 13:25:33 +1000 Subject: [PATCH 080/107] Added new method for retrieving all xml elements in a schema and a basic test. --- XObjectsCode/Extensions/GeneralExtensions.cs | 8 ++ .../Extensions/XmlSchemaExtensions.cs | 117 ++++++++++++++---- XObjectsTests/BaseTester.cs | 2 +- .../Extensions/XmlSchemaExtensionsTests.cs | 15 +++ XObjectsTests/Utilities.cs | 21 +++- 5 files changed, 133 insertions(+), 30 deletions(-) diff --git a/XObjectsCode/Extensions/GeneralExtensions.cs b/XObjectsCode/Extensions/GeneralExtensions.cs index e3f5243..2228943 100644 --- a/XObjectsCode/Extensions/GeneralExtensions.cs +++ b/XObjectsCode/Extensions/GeneralExtensions.cs @@ -51,5 +51,13 @@ public static bool AddIfNotAlreadyExists(this IDictionary(this List list, TVal val) + { + bool contains = list.Contains(val); + if (contains) return false; + list.Add(val); + return true; + } } } diff --git a/XObjectsCode/Extensions/XmlSchemaExtensions.cs b/XObjectsCode/Extensions/XmlSchemaExtensions.cs index b45c785..979cfff 100644 --- a/XObjectsCode/Extensions/XmlSchemaExtensions.cs +++ b/XObjectsCode/Extensions/XmlSchemaExtensions.cs @@ -77,36 +77,36 @@ private static void TraverseAllSimpleTypes(XmlSchemaObject schemaObject, ref Dic } case XmlSchemaElement element: { - if (element.ElementSchemaType is XmlSchemaSimpleType simpleType) { - didAdd = simpleTypes.AddIfNotAlreadyExists(element, simpleType); - } - else if (element.ElementSchemaType is XmlSchemaComplexType complexType) { - foreach (var attr in complexType.AttributeUses.Values.Cast()) { - TraverseAllSimpleTypes(attr, ref simpleTypes, out breakOutOfLoop); - if (breakOutOfLoop) return; - } + if (element.ElementSchemaType is XmlSchemaSimpleType simpleType) { + didAdd = simpleTypes.AddIfNotAlreadyExists(element, simpleType); + } + else if (element.ElementSchemaType is XmlSchemaComplexType complexType) { + foreach (var attr in complexType.AttributeUses.Values.Cast()) { + TraverseAllSimpleTypes(attr, ref simpleTypes, out breakOutOfLoop); + if (breakOutOfLoop) return; + } - var childElements = complexType.LocalXsdElements() - .Where(e => !ReferenceEquals(e, schemaObject)) - .ToList(); - - foreach (var el in childElements) { - TraverseAllSimpleTypes(el, ref simpleTypes, out breakOutOfLoop); - if (breakOutOfLoop) return; - } + var childElements = complexType.LocalXsdElements() + .Where(e => !ReferenceEquals(e, schemaObject)) + .ToList(); + + foreach (var el in childElements) { + TraverseAllSimpleTypes(el, ref simpleTypes, out breakOutOfLoop); + if (breakOutOfLoop) return; } - else { - if (element.ElementSchemaType is XmlSchemaComplexType { Particle: XmlSchemaGroupBase gb }) { - foreach (var particle in gb.Items) { - TraverseAllSimpleTypes(particle, ref simpleTypes, out breakOutOfLoop); - if (breakOutOfLoop) return; - } + } + else { + if (element.ElementSchemaType is XmlSchemaComplexType { Particle: XmlSchemaGroupBase gb }) { + foreach (var particle in gb.Items) { + TraverseAllSimpleTypes(particle, ref simpleTypes, out breakOutOfLoop); + if (breakOutOfLoop) return; } } - - break; } + break; + } + case XmlSchemaComplexType complexType: { foreach (var attribute in complexType.AttributeUses.Values.OfType()) { if (attribute.AttributeSchemaType is { } simpleType) { @@ -140,6 +140,75 @@ private static void TraverseAllSimpleTypes(XmlSchemaObject schemaObject, ref Dic breakOutOfLoop = !didAdd; } + /// + /// Retrieves all instances from the provided , + /// including both global elements and recursively discovered child elements. + /// + /// This method traverses the schema hierarchy to ensure all elements are collected, + /// avoiding duplicates by using distinct filtering. + /// + /// + /// The from which to retrieve all elements. + /// A list of all instances found in the schema set. + public static List RetrieveAllElements(this XmlSchemaSet set) + { + var globalElements = set.GlobalElements.Values.Cast().ToList(); + var containerList = new List(); + + var allChildElements = from gEl in globalElements + let children = gEl.RetrieveChildElements(containerList) + from child in children + select child; + + // due to the object graph in XSD, there seems to be no way to grab all elements recursively without using distinct() + return globalElements.Concat(allChildElements).Distinct().ToList(); + } + + + /// + /// Recursively retrieves all child elements of the specified . + /// + /// The whose child elements are to be retrieved. + /// + /// An optional list of to store the retrieved child elements. + /// If not provided, a new list will be created. + /// + /// A list of representing the child elements of the specified element. + /// + /// This method traverses the content model of the specified element, including complex types with particles + /// such as , , and . + /// It ensures that each child element is added only once to the list. + /// + /// + /// Thrown if the particle type of the complex type is not one of the supported types + /// (, , or ). + /// + public static List RetrieveChildElements(this XmlSchemaElement el, List? elements = null) + { + elements ??= new List(); + + // elements.AddIfNotAlreadyExists(el); + var contentType = el.ElementSchemaType.GetContentType(); + + if (contentType != XmlSchemaContentType.TextOnly && contentType != XmlSchemaContentType.Empty) { + if (el.ElementSchemaType is not XmlSchemaComplexType ct) return elements; + + XmlSchemaObjectCollection items = ct.Particle switch { + XmlSchemaAll all => all.Items, + XmlSchemaChoice choice => choice.Items, + XmlSchemaSequence sequence => sequence.Items, + _ => throw new InvalidOperationException() + }; + + foreach (var childEl in items.OfType()) { + elements.AddIfNotAlreadyExists(childEl); + childEl.RetrieveChildElements(elements); + } + } + + return elements; + } + public static bool IsOfAnonymousType(this XmlSchemaAttribute attr) { return attr.SchemaType != null && !( diff --git a/XObjectsTests/BaseTester.cs b/XObjectsTests/BaseTester.cs index 8be7556..1632971 100644 --- a/XObjectsTests/BaseTester.cs +++ b/XObjectsTests/BaseTester.cs @@ -33,7 +33,7 @@ public void Setup() var testDlls = allDlls.Where(a => !( a.Name.Contains("System.") || a.Name.Contains("Microsoft.") || a.Name.Contains("MoreLinq") || a.Name.Contains("nunit") || a.Name.Contains("Fasterflect") || - a.Name.Equals("LinqToXsd") || a.Name.Contains("XObjects") + a.Name.Equals("LinqToXsd.dll") || a.Name.Contains("XObjects") ) ).ToList(); var referencedAssemblies = testDlls.OrderBy(a => a.FullName).ToList(); diff --git a/XObjectsTests/Extensions/XmlSchemaExtensionsTests.cs b/XObjectsTests/Extensions/XmlSchemaExtensionsTests.cs index 9e73ae6..4879901 100644 --- a/XObjectsTests/Extensions/XmlSchemaExtensionsTests.cs +++ b/XObjectsTests/Extensions/XmlSchemaExtensionsTests.cs @@ -85,6 +85,21 @@ public void TestGetClosestNamedParent3() Assert.IsTrue(((XmlSchemaAttribute) namedParentOfRandomFacet).Name == "PubModel"); } + [Test, TestCase("StuDateAndTime.xsd")] + [TestCase("Elements.ElementsTests.xsd")] + [TestCase("Elements.ElementsWithComplexTypes.xsd")] + [TestCase("Elements.ElementsWithTypes.xsd")] + [TestCase("Elements.ElementsWithTypesSimpleDerived.xsd")] + public void RetrieveChildElementsTest(string endsWithFilePattern) + { + var xsd = GetTestFileAsXmlSchemaSet(endsWithFilePattern); + + var allElements = xsd.RetrieveAllElements(); + + Assert.NotNull(allElements); + Assert.IsNotEmpty(allElements); + } + [Test, TestCase("StuDateAndTime.xsd"), TestCase("\\AkomaNtoso\\akomantoso30.xsd"), TestCase("Opml\\opml2.xsd")] public void TestRetrieveAllAnonymousSimpleTypes(string endsWithFilePattern) { diff --git a/XObjectsTests/Utilities.cs b/XObjectsTests/Utilities.cs index 12065fd..1c8d156 100644 --- a/XObjectsTests/Utilities.cs +++ b/XObjectsTests/Utilities.cs @@ -50,10 +50,19 @@ public static MockFileSystem GetAggregateMockFileSystem(IEnumerable as { var mockFs = new MockFileSystem(); foreach (var assembly in assemblies) { - if (assembly.GetName().Name!.Contains("GelML")) { + string? name = assembly.GetName().Name; + if (name!.Contains("GelML")) { //Debugger.Break(); } - var fileData = GetAssemblyTextFilesDictionary(assembly); + Dictionary fileData; + // the assembly name doens't match the namespace for this one + if (assembly.FullName!.Contains("LinqToXsd.Schemas")) { + fileData = GetAssemblyTextFilesDictionary(assembly, "Xml.Schema.Linq"); + } + else { + fileData = GetAssemblyTextFilesDictionary(assembly); + } + foreach (var kvp in fileData) { var possibleExistingPath = kvp.Key; @@ -77,18 +86,20 @@ public static MockFileSystem GetAssemblyFileSystem(Assembly assembly) return new MockFileSystem(GetAssemblyTextFilesDictionary(assembly)); } - public static Dictionary GetAssemblyTextFilesDictionary(Assembly assembly) + public static Dictionary GetAssemblyTextFilesDictionary(Assembly assembly, string? customRootName = null) { var names = assembly.GetManifestResourceNames(); + var info = names.Select(n => assembly.GetManifestResourceInfo(n)).ToList(); - var rootName = assembly.GetName().Name + "."; + var rootName = (customRootName ?? assembly.GetName().Name) + "."; var replacementRegex = new Regex(rootName); var streams = names.Select(n => { var rootNameReplaced = replacementRegex.Replace(n, rootName.Replace(".", "\\"), 1); return ( name: rootNameReplaced, - stream: assembly.GetManifestResourceStream(n)); + stream: assembly.GetManifestResourceStream(n) + ); }).ToList(); var contents = streams.Select(tu => (tu.name, data: new MockFileData(tu.stream.ReadAsString(dispose: true)))) From 8962ec18571f94126d2df354d37bbedff26744d7 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Mon, 12 Jan 2026 13:25:35 +1000 Subject: [PATCH 081/107] Added new method RetrieveAllComplexTypeElements and test. --- .../Extensions/XmlSchemaExtensions.cs | 50 ++++++++++++++++--- .../Extensions/XmlSchemaExtensionsTests.cs | 15 ++++++ 2 files changed, 57 insertions(+), 8 deletions(-) diff --git a/XObjectsCode/Extensions/XmlSchemaExtensions.cs b/XObjectsCode/Extensions/XmlSchemaExtensions.cs index 979cfff..a10d1b8 100644 --- a/XObjectsCode/Extensions/XmlSchemaExtensions.cs +++ b/XObjectsCode/Extensions/XmlSchemaExtensions.cs @@ -160,10 +160,19 @@ public static List RetrieveAllElements(this XmlSchemaSet set) from child in children select child; - // due to the object graph in XSD, there seems to be no way to grab all elements recursively without using distinct() + // due to the object graph in XSD, there seems to be no way to grab all unique elements recursively without using distinct() return globalElements.Concat(allChildElements).Distinct().ToList(); } + public static List RetrieveAllComplexTypeElements(this XmlSchemaSet set) + { + var allElements = set.RetrieveAllElements(); + + return allElements.Where(e => e.SchemaType is XmlSchemaComplexType || + (e.ElementSchemaType is XmlSchemaComplexType && + (!e.ElementSchemaType.IsBuiltIn() && e.ElementSchemaType.QualifiedName.Name != "anyType"))).ToList(); + } + /// /// Recursively retrieves all child elements of the specified . @@ -193,19 +202,31 @@ public static List RetrieveChildElements(this XmlSchemaElement if (contentType != XmlSchemaContentType.TextOnly && contentType != XmlSchemaContentType.Empty) { if (el.ElementSchemaType is not XmlSchemaComplexType ct) return elements; - XmlSchemaObjectCollection items = ct.Particle switch { - XmlSchemaAll all => all.Items, - XmlSchemaChoice choice => choice.Items, - XmlSchemaSequence sequence => sequence.Items, - _ => throw new InvalidOperationException() - }; + XmlSchemaObjectCollection items; + switch (ct.Particle) { + case XmlSchemaAll all: + items = all.Items; + break; + case XmlSchemaChoice choice: + items = choice.Items; + break; + case XmlSchemaSequence sequence: + items = sequence.Items; + break; + default: + if (ct.QualifiedName is { Namespace: Constants.XSD, Name: "anyType" }) { + goto exit; + } + + throw new NotSupportedException(); + } foreach (var childEl in items.OfType()) { elements.AddIfNotAlreadyExists(childEl); childEl.RetrieveChildElements(elements); } } - + exit: return elements; } @@ -217,6 +238,14 @@ public static bool IsOfAnonymousType(this XmlSchemaAttribute attr) ); } + /// + /// Determines whether the specified is of an anonymous . + /// Works for both simple and complex types. + /// + /// The to evaluate. + /// + /// true if the element's schema type is not null and is not a global or built-in simple type; otherwise, false. + /// public static bool IsOfAnonymousType(this XmlSchemaElement el) { return el.SchemaType != null && !( @@ -225,6 +254,11 @@ public static bool IsOfAnonymousType(this XmlSchemaElement el) ); } + public static bool IsBuiltIn(this XmlSchemaType type) + { + return type.QualifiedName.Namespace == Constants.XSD; + } + /// /// Returns true or false if the current defines an inline enumeration of values. /// diff --git a/XObjectsTests/Extensions/XmlSchemaExtensionsTests.cs b/XObjectsTests/Extensions/XmlSchemaExtensionsTests.cs index 4879901..c7cba85 100644 --- a/XObjectsTests/Extensions/XmlSchemaExtensionsTests.cs +++ b/XObjectsTests/Extensions/XmlSchemaExtensionsTests.cs @@ -100,6 +100,21 @@ public void RetrieveChildElementsTest(string endsWithFilePattern) Assert.IsNotEmpty(allElements); } + [Test, TestCase("StuDateAndTime.xsd")] + [TestCase("Elements.ElementsTests.xsd")] + [TestCase("Elements.ElementsWithComplexTypes.xsd")] + [TestCase("Elements.ElementsWithTypes.xsd")] + [TestCase("Elements.ElementsWithTypesSimpleDerived.xsd")] + public void RetrieveAllComplexTypeElementsTest(string endsWithFilePattern) + { + var xsd = GetTestFileAsXmlSchemaSet(endsWithFilePattern); + + var allElements = xsd.RetrieveAllComplexTypeElements(); + + Assert.NotNull(allElements); + Assert.IsNotEmpty(allElements); + } + [Test, TestCase("StuDateAndTime.xsd"), TestCase("\\AkomaNtoso\\akomantoso30.xsd"), TestCase("Opml\\opml2.xsd")] public void TestRetrieveAllAnonymousSimpleTypes(string endsWithFilePattern) { From c695a76c19fa83d2047854b76c985b11aba46c74 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Mon, 12 Jan 2026 13:25:36 +1000 Subject: [PATCH 082/107] Simplified. --- XObjectsTests/BaseTester.cs | 9 ++++++ XObjectsTests/Extensions/FileExtensions.cs | 4 +-- .../Extensions/XmlSchemaExtensionsTests.cs | 28 ++++++++----------- 3 files changed, 23 insertions(+), 18 deletions(-) diff --git a/XObjectsTests/BaseTester.cs b/XObjectsTests/BaseTester.cs index 1632971..5e0b8a3 100644 --- a/XObjectsTests/BaseTester.cs +++ b/XObjectsTests/BaseTester.cs @@ -80,4 +80,13 @@ public XmlSchemaSet GetTestFileAsXmlSchemaSet(string endsWithFilePattern) Assert.NotNull(file); return AllTestFiles.FileInfo.New(file).ReadAsXmlSchemaSet(MockXmlFileResolver); } + + public XmlSchema GetTestFileAsXmlSchema(string endsWithFilePattern) + { + if (endsWithFilePattern == null) throw new ArgumentNullException(nameof(endsWithFilePattern)); + + var file = AllTestFiles.AllFiles.SingleOrDefault(f => f.EndsWith(endsWithFilePattern)); + Assert.NotNull(file); + return AllTestFiles.FileInfo.New(file).ReadAsXmlSchema(); + } } \ No newline at end of file diff --git a/XObjectsTests/Extensions/FileExtensions.cs b/XObjectsTests/Extensions/FileExtensions.cs index 72500ac..f29ace1 100644 --- a/XObjectsTests/Extensions/FileExtensions.cs +++ b/XObjectsTests/Extensions/FileExtensions.cs @@ -33,11 +33,11 @@ public static XmlSchemaSet ReadAsXmlSchemaSet(this IFileInfo fileInfo, XmlResolv return xsd; } - public static XmlSchemaSet ReadAsXmlSchemaDefinition(this IFileInfo fileInfo) + public static XmlSchema ReadAsXmlSchema(this IFileInfo fileInfo) { using var sr = new StreamReader(fileInfo.OpenRead()); var reader = XmlReader.Create(sr, Defaults.DefaultXmlReaderSettings); - var xsd = reader.ToXmlSchemaSet(); + var xsd = reader.ToXmlSchema(); return xsd; } diff --git a/XObjectsTests/Extensions/XmlSchemaExtensionsTests.cs b/XObjectsTests/Extensions/XmlSchemaExtensionsTests.cs index c7cba85..c11e17d 100644 --- a/XObjectsTests/Extensions/XmlSchemaExtensionsTests.cs +++ b/XObjectsTests/Extensions/XmlSchemaExtensionsTests.cs @@ -14,13 +14,12 @@ namespace Xml.Schema.Linq.Tests.Extensions [TestFixture] public class XmlSchemaExtensionsTests: BaseTester { - private string xsdFilePathPubmed = @"Pubmed\efetch-pubmed.xsd"; + private const string PubMedEFetchXsd = @"Pubmed\efetch-pubmed.xsd"; - [Test] - public void TestGetClosestNamedParent1() + [Test, TestCase(PubMedEFetchXsd)] + public void TestGetClosestNamedParent1(string endsWithFilePattern) { - using var streamReader = GetFileStreamReader(xsdFilePathPubmed); - var xsd = XmlSchema.Read(streamReader, (sender, args) => { }); + var xsd = GetTestFileAsXmlSchema(endsWithFilePattern); var urlElement = xsd.Items.Cast() .OfType() @@ -47,11 +46,10 @@ public void TestGetClosestNamedParent1() Assert.IsTrue(parentElement.Name == "URL"); } - [Test] - public void TestGetClosestNamedParent2() + [Test, TestCase(PubMedEFetchXsd)] + public void TestGetClosestNamedParent2(string endsWithFilePattern) { - using var streamReader = GetFileStreamReader(xsdFilePathPubmed); - var xsd = XmlSchema.Read(streamReader, (sender, args) => { }); + var xsd = GetTestFileAsXmlSchema(endsWithFilePattern); var urlElement = xsd.Items.Cast() .OfType() @@ -62,11 +60,10 @@ public void TestGetClosestNamedParent2() Assert.IsTrue(urlElement.Parent is XmlSchema); } - [Test] - public void TestGetClosestNamedParent3() + [Test, TestCase(PubMedEFetchXsd)] + public void TestGetClosestNamedParent3(string endsWithFilePattern) { - using var streamReader = GetFileStreamReader(xsdFilePathPubmed); - var xsd = XmlSchema.Read(streamReader, (sender, args) => { }); + var xsd = GetTestFileAsXmlSchema(endsWithFilePattern); var articleType = xsd.Items.Cast() .OfType() @@ -126,8 +123,7 @@ public void TestRetrieveAllAnonymousSimpleTypes(string endsWithFilePattern) Assert.IsNotEmpty(anonTypes); } - [Test, TestCase("\\AkomaNtoso\\akomantoso30.xsd")] - [TestCase("StuDateAndTime.xsd")] + [Test, TestCase("\\AkomaNtoso\\akomantoso30.xsd"), TestCase("StuDateAndTime.xsd")] public void TestRetrieveAllAnonymousSimpleUnionTypes(string endsWithFilePattern) { var xsd = GetTestFileAsXmlSchemaSet(endsWithFilePattern); @@ -156,4 +152,4 @@ public void TestRetrieveAllSimpleTypes(string endsWithFilePattern) } } } -} \ No newline at end of file +} From a9701169d1b8852aad867a5922fa090a6553c304 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Mon, 12 Jan 2026 13:25:37 +1000 Subject: [PATCH 083/107] Disabled ns warning. --- XObjectsCore/Constants.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/XObjectsCore/Constants.cs b/XObjectsCore/Constants.cs index 89dfa86..161a98e 100644 --- a/XObjectsCore/Constants.cs +++ b/XObjectsCore/Constants.cs @@ -1,6 +1,8 @@ //Copyright (c) Microsoft Corporation. All rights reserved. +#pragma warning disable IDE0130 namespace Xml.Schema.Linq.CodeGen +#pragma warning restore IDE0130 { internal static class Constants { From 251b7d6587a138d7925256f62da79db48e1563d0 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Mon, 12 Jan 2026 13:25:38 +1000 Subject: [PATCH 084/107] SimpleTypeCodeDomHelper is now public. --- XObjectsCode/Extensions/XmlSchemaExtensions.cs | 2 +- XObjectsCode/Src/SimpleTypeCodeDomHelper.cs | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/XObjectsCode/Extensions/XmlSchemaExtensions.cs b/XObjectsCode/Extensions/XmlSchemaExtensions.cs index a10d1b8..a0c7c1e 100644 --- a/XObjectsCode/Extensions/XmlSchemaExtensions.cs +++ b/XObjectsCode/Extensions/XmlSchemaExtensions.cs @@ -160,7 +160,7 @@ public static List RetrieveAllElements(this XmlSchemaSet set) from child in children select child; - // due to the object graph in XSD, there seems to be no way to grab all unique elements recursively without using distinct() + // due to the object graph in XSD, there seems to be no way to grab all unique elements recursively in one go, necessitating using Distinct() return globalElements.Concat(allChildElements).Distinct().ToList(); } diff --git a/XObjectsCode/Src/SimpleTypeCodeDomHelper.cs b/XObjectsCode/Src/SimpleTypeCodeDomHelper.cs index 49c7b82..7345cde 100644 --- a/XObjectsCode/Src/SimpleTypeCodeDomHelper.cs +++ b/XObjectsCode/Src/SimpleTypeCodeDomHelper.cs @@ -12,9 +12,9 @@ namespace Xml.Schema.Linq.CodeGen { - class SimpleTypeCodeDomHelper + public class SimpleTypeCodeDomHelper { - internal static CodeExpression CreateSimpleTypeDef(ClrSimpleTypeInfo typeInfo, + public static CodeExpression CreateSimpleTypeDef(ClrSimpleTypeInfo typeInfo, Dictionary nameMappings, LinqToXsdSettings settings, bool memberOrItemType) { @@ -34,7 +34,7 @@ internal static CodeExpression CreateSimpleTypeDef(ClrSimpleTypeInfo typeInfo, } } - internal static CodeExpression MaterializeSimpleTypeDef(ClrSimpleTypeInfo typeInfo, + public static CodeExpression MaterializeSimpleTypeDef(ClrSimpleTypeInfo typeInfo, Dictionary nameMappings, LinqToXsdSettings settings) { @@ -82,7 +82,7 @@ internal static CodeExpression MaterializeSimpleTypeDef(ClrSimpleTypeInfo typeIn } - internal static CodeExpression CreateGetBuiltInSimpleType(XmlTypeCode typeCode) + public static CodeExpression CreateGetBuiltInSimpleType(XmlTypeCode typeCode) { return CodeDomHelper.CreateMethodCall( new CodeTypeReferenceExpression("XmlSchemaType"), @@ -406,7 +406,7 @@ private static CodeExpression CreateTypeConversionExpr(string typeName, object v new CodePrimitiveExpression(value.ToString())); } - internal static CodeExpression CreateValueExpression(string builtInType, string strValue, bool isEnum) + public static CodeExpression CreateValueExpression(string builtInType, string strValue, bool isEnum) { int dot = builtInType.LastIndexOf('.'); @@ -432,7 +432,7 @@ internal static CodeExpression CreateValueExpression(string builtInType, string } } - internal static CodeArrayCreateExpression CreateFixedDefaultArrayValueInit(string baseType, string value, bool isEnum) + public static CodeArrayCreateExpression CreateFixedDefaultArrayValueInit(string baseType, string value, bool isEnum) { var array = new CodeArrayCreateExpression(baseType); foreach (string s in value.Split(' ')) @@ -443,7 +443,7 @@ internal static CodeArrayCreateExpression CreateFixedDefaultArrayValueInit(strin return array; } - internal static CodeExpression CreateFixedDefaultValueExpression(CodeTypeReference type, string value, bool isEnum) + public static CodeExpression CreateFixedDefaultValueExpression(CodeTypeReference type, string value, bool isEnum) { string baseType = type.BaseType; if (Regex.IsMatch(baseType, @"\bNullable`1")) From 6b598540034375f5c49c93e579d3f8529e4e52eb Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Mon, 12 Jan 2026 13:25:39 +1000 Subject: [PATCH 085/107] nullables. --- XObjectsCode/Src/SOMQueryExtensions.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/XObjectsCode/Src/SOMQueryExtensions.cs b/XObjectsCode/Src/SOMQueryExtensions.cs index 70f1927..d485692 100644 --- a/XObjectsCode/Src/SOMQueryExtensions.cs +++ b/XObjectsCode/Src/SOMQueryExtensions.cs @@ -246,9 +246,9 @@ public static bool IsOrHasList(this XmlSchemaSimpleType type) public static XmlSchemaSimpleType[] GetUnionMemberTypes(this XmlSchemaSimpleType type) { Debug.Assert(type != null); - Debug.Assert(type.Datatype.Variety == XmlSchemaDatatypeVariety.Union); + Debug.Assert(type.Datatype?.Variety == XmlSchemaDatatypeVariety.Union); - XmlSchemaSimpleTypeUnion unionContent = type.Content as XmlSchemaSimpleTypeUnion; + XmlSchemaSimpleTypeUnion? unionContent = type.Content as XmlSchemaSimpleTypeUnion; if (unionContent != null) { From 864bffb3ebe716ce9f835e70a37f3cc83d31370f Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Mon, 12 Jan 2026 13:25:40 +1000 Subject: [PATCH 086/107] Create new method GenerateProTemporeNameForSimpleUnionType to generate a name for a simple type union type. --- .../Extensions/XmlSchemaExtensions.cs | 22 ++++++++++++++++++- XObjectsCode/Src/SOMQueryExtensions.cs | 5 +++++ XObjectsCore/Constants.cs | 2 ++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/XObjectsCode/Extensions/XmlSchemaExtensions.cs b/XObjectsCode/Extensions/XmlSchemaExtensions.cs index a0c7c1e..5bfd851 100644 --- a/XObjectsCode/Extensions/XmlSchemaExtensions.cs +++ b/XObjectsCode/Extensions/XmlSchemaExtensions.cs @@ -1,6 +1,7 @@ #nullable enable using System; using System.Collections.Generic; +using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; @@ -440,7 +441,7 @@ public static List ToXDocuments(this XmlSchemaSet xs) /// This method processes each schema in the , converts it to an , /// loads its configuration, and merges it into the starting configuration. /// - public static Configuration ToDefaultMergedConfiguration(this XmlSchemaSet xs, Configuration startingConfig = null) + public static Configuration ToDefaultMergedConfiguration(this XmlSchemaSet xs, Configuration? startingConfig = null) { var egConfig = startingConfig ?? (Configuration)ConfigurationProvider.ProvideExampleConfigurationXml(); var docs = xs.Schemas().Cast().Select(x => x.ToXDocument()).ToList(); @@ -451,5 +452,24 @@ public static Configuration ToDefaultMergedConfiguration(this XmlSchemaSet xs, C return mergedConfigOutput; } + + public static string? GenerateAdHocNameForSimpleUnionType(this XmlSchemaSimpleType type) + { + if (!type.IsOrHasUnion()) return null; + + if (type.Content is XmlSchemaSimpleTypeUnion union) { + string name = Constants.SimpleTypeUnionOfPrefix; + + foreach (var memberType in union.GetUnionMemberTypes()) { + name += memberType.Name; + } + + Debug.Assert(name != Constants.SimpleTypeUnionOfPrefix); + + return name; + } + + return null; + } } } diff --git a/XObjectsCode/Src/SOMQueryExtensions.cs b/XObjectsCode/Src/SOMQueryExtensions.cs index d485692..00530bf 100644 --- a/XObjectsCode/Src/SOMQueryExtensions.cs +++ b/XObjectsCode/Src/SOMQueryExtensions.cs @@ -263,6 +263,11 @@ public static XmlSchemaSimpleType[] GetUnionMemberTypes(this XmlSchemaSimpleType } } + public static XmlSchemaSimpleType[] GetUnionMemberTypes(this XmlSchemaSimpleTypeUnion? unionContent) + { + return unionContent?.BaseMemberTypes ?? []; + } + public static bool HasFacetRestrictions(this XmlSchemaSimpleType sst) { if (sst.IsDerivedByRestriction()) diff --git a/XObjectsCore/Constants.cs b/XObjectsCore/Constants.cs index 161a98e..3919234 100644 --- a/XObjectsCore/Constants.cs +++ b/XObjectsCore/Constants.cs @@ -13,6 +13,8 @@ internal static class Constants public static readonly string SystemTypeName = $"{nameof(System)}.{nameof(System.Type)}"; public static readonly string SystemXmlLinqNamespaceQualifer = $"{nameof(System)}.{nameof(System.Xml)}.{nameof(System.Xml.Linq)}"; + public const string SimpleTypeUnionOfPrefix = "SimpleUnionTypeOf"; + //Custom Attribute names public const string XElement = "XElement"; From c79f35d7145849e372f7cb6186631d219590466d Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Mon, 12 Jan 2026 13:25:40 +1000 Subject: [PATCH 087/107] Test WIP. --- XObjectsTests/CodeGen/ClrTypeInfoTests.cs | 32 +++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/XObjectsTests/CodeGen/ClrTypeInfoTests.cs b/XObjectsTests/CodeGen/ClrTypeInfoTests.cs index b99d12b..b153909 100644 --- a/XObjectsTests/CodeGen/ClrTypeInfoTests.cs +++ b/XObjectsTests/CodeGen/ClrTypeInfoTests.cs @@ -1,5 +1,9 @@ -using NUnit.Framework; +using System.CodeDom; +using System.Collections.Generic; +using System.Xml.Schema; +using NUnit.Framework; using Xml.Schema.Linq.CodeGen; +using Xml.Schema.Linq.Extensions; using XObjects; namespace Xml.Schema.Linq.Tests.CodeGen; @@ -16,7 +20,31 @@ public void CreateSimpleTypeForAnonymousSimpleTypeUnion(string endsWithFilePatte Assert.NotNull(anonUnionTypes); foreach (var simpleType in anonUnionTypes) { - var type = ClrSimpleTypeInfo.CreateSimpleTypeInfo(simpleType.Value); + Assert.IsInstanceOf(simpleType.Value); + + ClrSimpleTypeInfo? type = ClrSimpleTypeInfo.CreateSimpleTypeInfo(simpleType.Value); + + Assert.NotNull(type); + var unionTypeInfo = type as UnionSimpleTypeInfo; + unionTypeInfo.clrtypeName = simpleType.Value.Name; + Assert.True(unionTypeInfo != null); + + var typeDef = TypeBuilder.CreateSimpleType(unionTypeInfo, new Dictionary(), + new LinqToXsdSettings()); + + string typeDefCodeStr = typeDef.ToCodeString(); + Assert.NotNull(typeDefCodeStr); + + CodeExpression? code1 = SimpleTypeCodeDomHelper.CreateSimpleTypeDef(unionTypeInfo, new Dictionary(), new LinqToXsdSettings(), false); + CodeExpression? code2 = SimpleTypeCodeDomHelper.CreateSimpleTypeDef(unionTypeInfo, new Dictionary(), new LinqToXsdSettings(), true); + + string codeString1 = code1.ToCodeString(); + string codeString2 = code2.ToCodeString(); + + Assert.NotNull(codeString1); + Assert.NotNull(codeString2); + + Assert.IsTrue(codeString1 == codeString2); } } } \ No newline at end of file From 1366948e62a775b750b1e928734739c3ac3e4bf5 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Mon, 12 Jan 2026 13:52:48 +1000 Subject: [PATCH 088/107] Added extension method for changing type visiblity. --- XObjectsCode/Extensions/CodeDomExtensions.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/XObjectsCode/Extensions/CodeDomExtensions.cs b/XObjectsCode/Extensions/CodeDomExtensions.cs index c58bd85..6a580e2 100644 --- a/XObjectsCode/Extensions/CodeDomExtensions.cs +++ b/XObjectsCode/Extensions/CodeDomExtensions.cs @@ -11,7 +11,7 @@ using System.Diagnostics; using System.IO; using System.Linq; - +using System.Reflection; using Xml.Schema.Linq.CodeGen; namespace Xml.Schema.Linq.Extensions @@ -594,6 +594,17 @@ public IEnumerable ChildClassDeclarations return type.Members.OfType().Where(e => e.IsClass); } } + + public void ChangeVisibility(TypeAttributes visibility) + { + if (!visibility.HasFlag(TypeAttributes.VisibilityMask)) { + throw new InvalidOperationException("Requires the use of an enum value that affects type visibility!"); + } + + if (type.TypeAttributes.HasFlag(TypeAttributes.VisibilityMask)) { + type.TypeAttributes = (type.TypeAttributes & ~TypeAttributes.VisibilityMask) | visibility; + } + } } } } \ No newline at end of file From 6dad257cd81af06af5d136208b3af64f9ca16cb2 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Mon, 12 Jan 2026 13:53:07 +1000 Subject: [PATCH 089/107] Properly implemented name generation. --- XObjectsCode/Extensions/XmlSchemaExtensions.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/XObjectsCode/Extensions/XmlSchemaExtensions.cs b/XObjectsCode/Extensions/XmlSchemaExtensions.cs index 5bfd851..aff6ef6 100644 --- a/XObjectsCode/Extensions/XmlSchemaExtensions.cs +++ b/XObjectsCode/Extensions/XmlSchemaExtensions.cs @@ -460,11 +460,19 @@ public static Configuration ToDefaultMergedConfiguration(this XmlSchemaSet xs, C if (type.Content is XmlSchemaSimpleTypeUnion union) { string name = Constants.SimpleTypeUnionOfPrefix; - foreach (var memberType in union.GetUnionMemberTypes()) { - name += memberType.Name; + XmlSchemaSimpleType[] types = union.GetUnionMemberTypes(); + + for (var i = 0; i < types.Length; i++) { + string titleCasedTypeName = (types[i].Name ?? types[i].QualifiedName.Name).ToUpperFirstInvariant(); + if (i == 0) { + name += $"{titleCasedTypeName}"; + } + else { + name += $"And{titleCasedTypeName}"; + } } - Debug.Assert(name != Constants.SimpleTypeUnionOfPrefix); + Debug.Assert(name != Constants.SimpleTypeUnionOfPrefix, "Union had no member types!"); return name; } From 40566f2cbab9971d2e781d7b00e64e7d131974e6 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Mon, 12 Jan 2026 14:15:04 +1000 Subject: [PATCH 090/107] Properly wrote test! --- XObjectsCode/Extensions/CodeDomExtensions.cs | 24 +++++++++-- XObjectsTests/CodeGen/ClrTypeInfoTests.cs | 43 ++++++++++++++------ 2 files changed, 50 insertions(+), 17 deletions(-) diff --git a/XObjectsCode/Extensions/CodeDomExtensions.cs b/XObjectsCode/Extensions/CodeDomExtensions.cs index 6a580e2..d30e56f 100644 --- a/XObjectsCode/Extensions/CodeDomExtensions.cs +++ b/XObjectsCode/Extensions/CodeDomExtensions.cs @@ -597,13 +597,29 @@ public IEnumerable ChildClassDeclarations public void ChangeVisibility(TypeAttributes visibility) { - if (!visibility.HasFlag(TypeAttributes.VisibilityMask)) { + if (!visibility.HasVisibilityMask()) { throw new InvalidOperationException("Requires the use of an enum value that affects type visibility!"); } - if (type.TypeAttributes.HasFlag(TypeAttributes.VisibilityMask)) { - type.TypeAttributes = (type.TypeAttributes & ~TypeAttributes.VisibilityMask) | visibility; - } + type.TypeAttributes = (type.TypeAttributes & ~TypeAttributes.VisibilityMask) | visibility; + } + } + + public static bool HasVisibilityMask(this TypeAttributes ta) + { + TypeAttributes visibility = ta & TypeAttributes.VisibilityMask; + switch (visibility) { + case TypeAttributes.NotPublic: + case TypeAttributes.Public: + case TypeAttributes.NestedPublic: + case TypeAttributes.NestedPrivate: + case TypeAttributes.NestedFamANDAssem: + case TypeAttributes.NestedAssembly: + case TypeAttributes.NestedFamily: + case TypeAttributes.NestedFamORAssem: + return true; + + default: return false; } } } diff --git a/XObjectsTests/CodeGen/ClrTypeInfoTests.cs b/XObjectsTests/CodeGen/ClrTypeInfoTests.cs index b153909..f906c90 100644 --- a/XObjectsTests/CodeGen/ClrTypeInfoTests.cs +++ b/XObjectsTests/CodeGen/ClrTypeInfoTests.cs @@ -1,6 +1,12 @@ using System.CodeDom; using System.Collections.Generic; +using System.Linq; +using System.Reflection; using System.Xml.Schema; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.CodeAnalysis.Text; using NUnit.Framework; using Xml.Schema.Linq.CodeGen; using Xml.Schema.Linq.Extensions; @@ -10,6 +16,13 @@ namespace Xml.Schema.Linq.Tests.CodeGen; public class ClrTypeInfoTests: BaseTester { + /// + /// Tests the required methods for generating a type definition and type validator for a simple type that is a union of other simple types. + /// + /// Used for anonymous simple type unions that are declared inline in an attribute or element (i.e. not defined with a name in the global scope of a compiled ). + /// + /// + /// [Test, TestCase("StuDateAndTime.xsd")] public void CreateSimpleTypeForAnonymousSimpleTypeUnion(string endsWithFilePattern) { @@ -20,31 +33,35 @@ public void CreateSimpleTypeForAnonymousSimpleTypeUnion(string endsWithFilePatte Assert.NotNull(anonUnionTypes); foreach (var simpleType in anonUnionTypes) { - Assert.IsInstanceOf(simpleType.Value); + //Assert.IsInstanceOf(simpleType.Value); ClrSimpleTypeInfo? type = ClrSimpleTypeInfo.CreateSimpleTypeInfo(simpleType.Value); - Assert.NotNull(type); + var unionTypeInfo = type as UnionSimpleTypeInfo; - unionTypeInfo.clrtypeName = simpleType.Value.Name; + Assert.IsInstanceOf(type); Assert.True(unionTypeInfo != null); - var typeDef = TypeBuilder.CreateSimpleType(unionTypeInfo, new Dictionary(), + unionTypeInfo!.clrtypeName = simpleType.Value.GenerateAdHocNameForSimpleUnionType(); + Assert.IsNotNull(unionTypeInfo.clrtypeName); + Assert.IsNotEmpty(unionTypeInfo.clrtypeName); + + CodeTypeDeclaration? typeDef = TypeBuilder.CreateSimpleType(unionTypeInfo, new Dictionary(), new LinqToXsdSettings()); + typeDef.ChangeVisibility(TypeAttributes.NestedPrivate); + Assert.AreEqual(typeDef.Name, unionTypeInfo.clrtypeName); string typeDefCodeStr = typeDef.ToCodeString(); Assert.NotNull(typeDefCodeStr); - CodeExpression? code1 = SimpleTypeCodeDomHelper.CreateSimpleTypeDef(unionTypeInfo, new Dictionary(), new LinqToXsdSettings(), false); - CodeExpression? code2 = SimpleTypeCodeDomHelper.CreateSimpleTypeDef(unionTypeInfo, new Dictionary(), new LinqToXsdSettings(), true); - - string codeString1 = code1.ToCodeString(); - string codeString2 = code2.ToCodeString(); - - Assert.NotNull(codeString1); - Assert.NotNull(codeString2); + SourceText text = SourceText.From(typeDefCodeStr); + CSharpSyntaxTree tree = (CSharpSyntaxTree)CSharpSyntaxTree.ParseText(text); + var root = tree.GetRoot() as CompilationUnitSyntax; - Assert.IsTrue(codeString1 == codeString2); + Assert.NotNull(root); + Assert.True(root!.Members.Count == 1); + var classDef = root!.Members.Single() as ClassDeclarationSyntax; + Assert.NotNull(classDef); } } } \ No newline at end of file From 4b9ad45b893b039642899470ff059e159a3e629d Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Mon, 12 Jan 2026 14:46:53 +1000 Subject: [PATCH 091/107] Merged duplicate classes. --- XObjectsTests/CodeDomExtensionsTests.cs | 34 ------------------- .../Extensions/CodeDomExtensionTests.cs | 23 +++++++++++++ 2 files changed, 23 insertions(+), 34 deletions(-) delete mode 100644 XObjectsTests/CodeDomExtensionsTests.cs diff --git a/XObjectsTests/CodeDomExtensionsTests.cs b/XObjectsTests/CodeDomExtensionsTests.cs deleted file mode 100644 index 986e179..0000000 --- a/XObjectsTests/CodeDomExtensionsTests.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.CodeDom; -using System.Xml.Schema; -using Fasterflect; -using NUnit.Framework; -using Xml.Schema.Linq.CodeGen; -using Xml.Schema.Linq.Extensions; - -namespace Xml.Schema.Linq.Tests; - -[TestFixture] -public class CodeDomExtensionsTests -{ - [Test] - public void TestIsEquivalentTypeReference() - { - var xmlSchemaElement = new XmlSchemaType() { - Name = "test" - }; - - var exampleClrTypeRef = new ClrTypeReference(nameof(String), typeof(string).Namespace, - xmlSchemaElement, false, false); - - exampleClrTypeRef.SetFieldValue("clrName", "String"); - exampleClrTypeRef.SetFieldValue("typeNs", "System"); - exampleClrTypeRef.SetFieldValue("clrFullTypeName", typeof(string).FullName); - - var codeTypeRef = new CodeTypeReference(typeof(string)); - - var isEquivalent = exampleClrTypeRef.IsEquivalentTypeReference(codeTypeRef); - - Assert.True(isEquivalent); - } -} \ No newline at end of file diff --git a/XObjectsTests/Extensions/CodeDomExtensionTests.cs b/XObjectsTests/Extensions/CodeDomExtensionTests.cs index 659054d..3237025 100644 --- a/XObjectsTests/Extensions/CodeDomExtensionTests.cs +++ b/XObjectsTests/Extensions/CodeDomExtensionTests.cs @@ -5,7 +5,9 @@ using System.Xml; using System.Xml.Resolvers; using System.Xml.Schema; +using Fasterflect; using NUnit.Framework; +using Xml.Schema.Linq.CodeGen; using Xml.Schema.Linq.Extensions; namespace Xml.Schema.Linq.Tests.Extensions @@ -13,6 +15,27 @@ namespace Xml.Schema.Linq.Tests.Extensions [TestFixture] public class CodeDomExtensionTests: BaseTester { + [Test] + public void TestIsEquivalentTypeReference() + { + var xmlSchemaElement = new XmlSchemaType() { + Name = "test" + }; + + var exampleClrTypeRef = new ClrTypeReference(nameof(String), typeof(string).Namespace, + xmlSchemaElement, false, false); + + exampleClrTypeRef.SetFieldValue("clrName", "String"); + exampleClrTypeRef.SetFieldValue("typeNs", "System"); + exampleClrTypeRef.SetFieldValue("clrFullTypeName", typeof(string).FullName); + + var codeTypeRef = new CodeTypeReference(typeof(string)); + + var isEquivalent = exampleClrTypeRef.IsEquivalentTypeReference(codeTypeRef); + + Assert.True(isEquivalent); + } + [Test] public void IsEquivalentEnumDeclarationTestTrue() { From a8016b79697318345c9ef281636dab9cda6721a3 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Mon, 26 Jan 2026 14:19:27 +1000 Subject: [PATCH 092/107] Added Portable.System.DateTimeOnly as a direct dependency on linqtoxsd so its includedin pack/publish. --- LinqToXsd/LinqToXsd.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/LinqToXsd/LinqToXsd.csproj b/LinqToXsd/LinqToXsd.csproj index ca5823f..901b344 100644 --- a/LinqToXsd/LinqToXsd.csproj +++ b/LinqToXsd/LinqToXsd.csproj @@ -25,6 +25,7 @@ + From e683edadebc831769c5a4ef2a06d90482be9a491 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Mon, 26 Jan 2026 14:19:59 +1000 Subject: [PATCH 093/107] testing facilities. --- XObjectsCore/XsdQualifiedNames.cs | 6 ++++++ XObjectsTests/MockXmlUrlResolver.cs | 5 ++--- 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 XObjectsCore/XsdQualifiedNames.cs diff --git a/XObjectsCore/XsdQualifiedNames.cs b/XObjectsCore/XsdQualifiedNames.cs new file mode 100644 index 0000000..ed08244 --- /dev/null +++ b/XObjectsCore/XsdQualifiedNames.cs @@ -0,0 +1,6 @@ +namespace Xml.Schema.Linq; + +public class XsdQualifiedNames +{ + +} \ No newline at end of file diff --git a/XObjectsTests/MockXmlUrlResolver.cs b/XObjectsTests/MockXmlUrlResolver.cs index 361c538..4259dd8 100644 --- a/XObjectsTests/MockXmlUrlResolver.cs +++ b/XObjectsTests/MockXmlUrlResolver.cs @@ -46,10 +46,9 @@ public override Task GetEntityAsync(Uri absoluteUri, string role, Type o return base.GetEntityAsync(absoluteUri, role, ofObjectToReturn); } - public override Uri ResolveUri(Uri baseUri, string relativeUri) + public override Uri ResolveUri(Uri? baseUri, string? relativeUri) { - var str = baseUri.ToString(); - var justTheFileName = Path.GetFileName(relativeUri); + var justTheFileName = Path.GetFileName(relativeUri) ?? throw new InvalidOperationException("Unable to find file name for relativeUri: " + relativeUri); var fsSearch = fs.AllFiles.Where(f => f.EndsWith(justTheFileName, StringComparison.CurrentCultureIgnoreCase)); var mappingsSearch = mappings.Where(k => k.Key.OriginalString.EndsWith(relativeUri)); var possibleMappingResult = mappingsSearch.FirstOrDefault(); From 0e7d4b73873ff353f93dd5f68f34851a6ebc50a9 Mon Sep 17 00:00:00 2001 From: Muhammad Miftah Date: Tue, 27 Jan 2026 08:52:52 +1000 Subject: [PATCH 094/107] New testing lib (Microsoft.Expression.Media.Catalog). --- .../Microsoft.Expression.Media.Catalog.csproj | 19 + .../expression.xsd | 489 + .../expression.xsd.config | 13 + .../expression.xsd.cs | 18716 ++++++++++++++++ LinqToXsd/Properties/launchSettings.json | 9 +- LinqToXsdCore.sln | 11 +- 6 files changed, 19253 insertions(+), 4 deletions(-) create mode 100644 GeneratedSchemaLibraries/Microsoft.Expression.Media.Catalog/Microsoft.Expression.Media.Catalog.csproj create mode 100644 GeneratedSchemaLibraries/Microsoft.Expression.Media.Catalog/expression.xsd create mode 100644 GeneratedSchemaLibraries/Microsoft.Expression.Media.Catalog/expression.xsd.config create mode 100644 GeneratedSchemaLibraries/Microsoft.Expression.Media.Catalog/expression.xsd.cs diff --git a/GeneratedSchemaLibraries/Microsoft.Expression.Media.Catalog/Microsoft.Expression.Media.Catalog.csproj b/GeneratedSchemaLibraries/Microsoft.Expression.Media.Catalog/Microsoft.Expression.Media.Catalog.csproj new file mode 100644 index 0000000..af057e3 --- /dev/null +++ b/GeneratedSchemaLibraries/Microsoft.Expression.Media.Catalog/Microsoft.Expression.Media.Catalog.csproj @@ -0,0 +1,19 @@ + + + + netstandard2.0 + + + + + + + + + + + + TargetFramework=netstandard2.0 + + + \ No newline at end of file diff --git a/GeneratedSchemaLibraries/Microsoft.Expression.Media.Catalog/expression.xsd b/GeneratedSchemaLibraries/Microsoft.Expression.Media.Catalog/expression.xsd new file mode 100644 index 0000000..814f1ce --- /dev/null +++ b/GeneratedSchemaLibraries/Microsoft.Expression.Media.Catalog/expression.xsd @@ -0,0 +1,489 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/GeneratedSchemaLibraries/Microsoft.Expression.Media.Catalog/expression.xsd.config b/GeneratedSchemaLibraries/Microsoft.Expression.Media.Catalog/expression.xsd.config new file mode 100644 index 0000000..e81a3a3 --- /dev/null +++ b/GeneratedSchemaLibraries/Microsoft.Expression.Media.Catalog/expression.xsd.config @@ -0,0 +1,13 @@ + + + + + + false + + false + + + + + \ No newline at end of file diff --git a/GeneratedSchemaLibraries/Microsoft.Expression.Media.Catalog/expression.xsd.cs b/GeneratedSchemaLibraries/Microsoft.Expression.Media.Catalog/expression.xsd.cs new file mode 100644 index 0000000..193e5c8 --- /dev/null +++ b/GeneratedSchemaLibraries/Microsoft.Expression.Media.Catalog/expression.xsd.cs @@ -0,0 +1,18716 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.Expression.Media.Catalog { + using System; + using System.Collections; + using System.Collections.Generic; + using System.ComponentModel; + using System.IO; + using System.Linq; + using System.Diagnostics; + using System.Xml; + using System.Xml.Schema; + using System.Xml.Linq; + using Xml.Schema.Linq; + + + /// + /// + /// Regular expression: (Catalog, CatalogComment?, UserFieldList?, MediaItemList?, SetList?) + /// + /// + public partial class CatalogType : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static CatalogType Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static CatalogType Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static CatalogType Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator CatalogType(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + /// + /// + /// Regular expression: (Catalog, CatalogComment?, UserFieldList?, MediaItemList?, SetList?) + /// + /// + public CatalogType() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName CatalogXName = System.Xml.Linq.XName.Get("Catalog", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (Catalog, CatalogComment?, UserFieldList?, MediaItemList?, SetList?) + /// + /// + public virtual Catalog Catalog { + get { + XElement x = this.GetElement(CatalogXName); + return ((Catalog)(x)); + } + set { + this.SetElement(CatalogXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName CatalogCommentXName = System.Xml.Linq.XName.Get("CatalogComment", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Catalog, CatalogComment?, UserFieldList?, MediaItemList?, SetList?) + /// + /// + public virtual CatalogComment CatalogComment { + get { + XElement x = this.GetElement(CatalogCommentXName); + if ((x == null)) { + return null; + } + return ((CatalogComment)(x)); + } + set { + this.SetElement(CatalogCommentXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName UserFieldListXName = System.Xml.Linq.XName.Get("UserFieldList", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Catalog, CatalogComment?, UserFieldList?, MediaItemList?, SetList?) + /// + /// + public virtual UserFieldList UserFieldList { + get { + XElement x = this.GetElement(UserFieldListXName); + if ((x == null)) { + return null; + } + return ((UserFieldList)(x)); + } + set { + this.SetElement(UserFieldListXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName MediaItemListXName = System.Xml.Linq.XName.Get("MediaItemList", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Catalog, CatalogComment?, UserFieldList?, MediaItemList?, SetList?) + /// + /// + public virtual MediaItemList MediaItemList { + get { + XElement x = this.GetElement(MediaItemListXName); + if ((x == null)) { + return null; + } + return ((MediaItemList)(x)); + } + set { + this.SetElement(MediaItemListXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName SetListXName = System.Xml.Linq.XName.Get("SetList", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Catalog, CatalogComment?, UserFieldList?, MediaItemList?, SetList?) + /// + /// + public virtual SetList SetList { + get { + XElement x = this.GetElement(SetListXName); + if ((x == null)) { + return null; + } + return ((SetList)(x)); + } + set { + this.SetElement(SetListXName, value); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("CatalogType", "urn:Microsoft.Expression.Media.Catalog"); + + static CatalogType() { + BuildElementDictionary(); + contentModel = new SequenceContentModelEntity(new NamedContentModelEntity(CatalogXName), new NamedContentModelEntity(CatalogCommentXName), new NamedContentModelEntity(UserFieldListXName), new NamedContentModelEntity(MediaItemListXName), new NamedContentModelEntity(SetListXName)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static Dictionary localElementDictionary = new Dictionary(); + + private static void BuildElementDictionary() { + localElementDictionary.Add(CatalogXName, typeof(Catalog)); + localElementDictionary.Add(CatalogCommentXName, typeof(CatalogComment)); + localElementDictionary.Add(UserFieldListXName, typeof(UserFieldList)); + localElementDictionary.Add(MediaItemListXName, typeof(MediaItemList)); + localElementDictionary.Add(SetListXName, typeof(SetList)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + Dictionary IXMetaData.LocalElementsDictionary { + get { + return localElementDictionary; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static ContentModelEntity contentModel; + + ContentModelEntity IXMetaData.GetContentModel() { + return contentModel; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + public partial class Catalog : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static Catalog Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static Catalog Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static Catalog Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator Catalog(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + public Catalog() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName pathTypeXName = System.Xml.Linq.XName.Get("pathType", ""); + + /// + /// + /// Occurrence: required + /// + /// + public virtual string pathType { + get { + XAttribute x = this.Attribute(pathTypeXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + set { + this.SetAttribute(pathTypeXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("Catalog", "urn:Microsoft.Expression.Media.Catalog"); + + ContentModelEntity IXMetaData.GetContentModel() { + return ContentModelEntity.Default; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + /// + /// + /// Regular expression: (UserFieldDefinition+) + /// + /// + public partial class UserFieldList : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static UserFieldList Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static UserFieldList Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static UserFieldList Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator UserFieldList(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + /// + /// + /// Regular expression: (UserFieldDefinition+) + /// + /// + public UserFieldList() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName UserFieldDefinitionXName = System.Xml.Linq.XName.Get("UserFieldDefinition", "urn:Microsoft.Expression.Media.Catalog"); + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private XSimpleList UserFieldDefinitionField; + + /// + /// + /// Occurrence: required, repeating + /// + /// + /// Regular expression: (UserFieldDefinition+) + /// + /// + public virtual IList UserFieldDefinition { + get { + if ((this.UserFieldDefinitionField == null)) { + this.UserFieldDefinitionField = new XSimpleList(this, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype, UserFieldDefinitionXName); + } + return this.UserFieldDefinitionField; + } + set { + if ((value == null)) { + this.UserFieldDefinitionField = null; + } + else { + if ((this.UserFieldDefinitionField == null)) { + this.UserFieldDefinitionField = XSimpleList.Initialize(this, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype, value, UserFieldDefinitionXName); + } + else { + XTypedServices.SetList(this.UserFieldDefinitionField, value); + } + } + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("UserFieldList", "urn:Microsoft.Expression.Media.Catalog"); + + static UserFieldList() { + BuildElementDictionary(); + contentModel = new SequenceContentModelEntity(new NamedContentModelEntity(UserFieldDefinitionXName)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static Dictionary localElementDictionary = new Dictionary(); + + private static void BuildElementDictionary() { + localElementDictionary.Add(UserFieldDefinitionXName, typeof(UserFieldDefinition)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + Dictionary IXMetaData.LocalElementsDictionary { + get { + return localElementDictionary; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static ContentModelEntity contentModel; + + ContentModelEntity IXMetaData.GetContentModel() { + return contentModel; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + /// + /// + /// Regular expression: (MediaItem+) + /// + /// + public partial class MediaItemList : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static MediaItemList Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static MediaItemList Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static MediaItemList Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator MediaItemList(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + /// + /// + /// Regular expression: (MediaItem+) + /// + /// + public MediaItemList() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName MediaItemXName = System.Xml.Linq.XName.Get("MediaItem", "urn:Microsoft.Expression.Media.Catalog"); + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private XTypedList MediaItemField; + + /// + /// + /// Occurrence: required, repeating + /// + /// + /// Regular expression: (MediaItem+) + /// + /// + public virtual IList MediaItem { + get { + if ((this.MediaItemField == null)) { + this.MediaItemField = new XTypedList(this, LinqToXsdTypeManager.Instance, MediaItemXName); + } + return this.MediaItemField; + } + set { + if ((value == null)) { + this.MediaItemField = null; + } + else { + if ((this.MediaItemField == null)) { + this.MediaItemField = XTypedList.Initialize(this, LinqToXsdTypeManager.Instance, value, MediaItemXName); + } + else { + XTypedServices.SetList(this.MediaItemField, value); + } + } + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("MediaItemList", "urn:Microsoft.Expression.Media.Catalog"); + + static MediaItemList() { + BuildElementDictionary(); + contentModel = new SequenceContentModelEntity(new NamedContentModelEntity(MediaItemXName)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static Dictionary localElementDictionary = new Dictionary(); + + private static void BuildElementDictionary() { + localElementDictionary.Add(MediaItemXName, typeof(MediaItem)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + Dictionary IXMetaData.LocalElementsDictionary { + get { + return localElementDictionary; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static ContentModelEntity contentModel; + + ContentModelEntity IXMetaData.GetContentModel() { + return contentModel; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + /// + /// + /// Regular expression: (AssetProperties, MediaProperties?, AnnotationFields?, UserFields?, MetaDataFields?, MovieTracks?, MovieChapterTracks?) + /// + /// + public partial class MediaItem : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static MediaItem Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static MediaItem Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static MediaItem Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator MediaItem(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + /// + /// + /// Regular expression: (AssetProperties, MediaProperties?, AnnotationFields?, UserFields?, MetaDataFields?, MovieTracks?, MovieChapterTracks?) + /// + /// + public MediaItem() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName AssetPropertiesXName = System.Xml.Linq.XName.Get("AssetProperties", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (AssetProperties, MediaProperties?, AnnotationFields?, UserFields?, MetaDataFields?, MovieTracks?, MovieChapterTracks?) + /// + /// + public virtual AssetProperties AssetProperties { + get { + XElement x = this.GetElement(AssetPropertiesXName); + return ((AssetProperties)(x)); + } + set { + this.SetElement(AssetPropertiesXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName MediaPropertiesXName = System.Xml.Linq.XName.Get("MediaProperties", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (AssetProperties, MediaProperties?, AnnotationFields?, UserFields?, MetaDataFields?, MovieTracks?, MovieChapterTracks?) + /// + /// + public virtual MediaProperties MediaProperties { + get { + XElement x = this.GetElement(MediaPropertiesXName); + if ((x == null)) { + return null; + } + return ((MediaProperties)(x)); + } + set { + this.SetElement(MediaPropertiesXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName AnnotationFieldsXName = System.Xml.Linq.XName.Get("AnnotationFields", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (AssetProperties, MediaProperties?, AnnotationFields?, UserFields?, MetaDataFields?, MovieTracks?, MovieChapterTracks?) + /// + /// + public virtual AnnotationFields AnnotationFields { + get { + XElement x = this.GetElement(AnnotationFieldsXName); + if ((x == null)) { + return null; + } + return ((AnnotationFields)(x)); + } + set { + this.SetElement(AnnotationFieldsXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName UserFieldsXName = System.Xml.Linq.XName.Get("UserFields", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (AssetProperties, MediaProperties?, AnnotationFields?, UserFields?, MetaDataFields?, MovieTracks?, MovieChapterTracks?) + /// + /// + public virtual UserFields UserFields { + get { + XElement x = this.GetElement(UserFieldsXName); + if ((x == null)) { + return null; + } + return ((UserFields)(x)); + } + set { + this.SetElement(UserFieldsXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName MetaDataFieldsXName = System.Xml.Linq.XName.Get("MetaDataFields", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (AssetProperties, MediaProperties?, AnnotationFields?, UserFields?, MetaDataFields?, MovieTracks?, MovieChapterTracks?) + /// + /// + public virtual MetaDataFields MetaDataFields { + get { + XElement x = this.GetElement(MetaDataFieldsXName); + if ((x == null)) { + return null; + } + return ((MetaDataFields)(x)); + } + set { + this.SetElement(MetaDataFieldsXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName MovieTracksXName = System.Xml.Linq.XName.Get("MovieTracks", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (AssetProperties, MediaProperties?, AnnotationFields?, UserFields?, MetaDataFields?, MovieTracks?, MovieChapterTracks?) + /// + /// + public virtual MovieTracks MovieTracks { + get { + XElement x = this.GetElement(MovieTracksXName); + if ((x == null)) { + return null; + } + return ((MovieTracks)(x)); + } + set { + this.SetElement(MovieTracksXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName MovieChapterTracksXName = System.Xml.Linq.XName.Get("MovieChapterTracks", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (AssetProperties, MediaProperties?, AnnotationFields?, UserFields?, MetaDataFields?, MovieTracks?, MovieChapterTracks?) + /// + /// + public virtual MovieChapterTracks MovieChapterTracks { + get { + XElement x = this.GetElement(MovieChapterTracksXName); + if ((x == null)) { + return null; + } + return ((MovieChapterTracks)(x)); + } + set { + this.SetElement(MovieChapterTracksXName, value); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("MediaItem", "urn:Microsoft.Expression.Media.Catalog"); + + static MediaItem() { + BuildElementDictionary(); + contentModel = new SequenceContentModelEntity(new NamedContentModelEntity(AssetPropertiesXName), new NamedContentModelEntity(MediaPropertiesXName), new NamedContentModelEntity(AnnotationFieldsXName), new NamedContentModelEntity(UserFieldsXName), new NamedContentModelEntity(MetaDataFieldsXName), new NamedContentModelEntity(MovieTracksXName), new NamedContentModelEntity(MovieChapterTracksXName)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static Dictionary localElementDictionary = new Dictionary(); + + private static void BuildElementDictionary() { + localElementDictionary.Add(AssetPropertiesXName, typeof(AssetProperties)); + localElementDictionary.Add(MediaPropertiesXName, typeof(MediaProperties)); + localElementDictionary.Add(AnnotationFieldsXName, typeof(AnnotationFields)); + localElementDictionary.Add(UserFieldsXName, typeof(UserFields)); + localElementDictionary.Add(MetaDataFieldsXName, typeof(MetaDataFields)); + localElementDictionary.Add(MovieTracksXName, typeof(MovieTracks)); + localElementDictionary.Add(MovieChapterTracksXName, typeof(MovieChapterTracks)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + Dictionary IXMetaData.LocalElementsDictionary { + get { + return localElementDictionary; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static ContentModelEntity contentModel; + + ContentModelEntity IXMetaData.GetContentModel() { + return contentModel; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + /// + /// + /// Regular expression: (Filename, Filepath, UniqueID, Label, Rating, MediaType, FileSize, Created, Modified, Added, Annotated?, ThumbnailSource?, VoiceRecordingSource?) + /// + /// + public partial class AssetProperties : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static AssetProperties Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static AssetProperties Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static AssetProperties Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator AssetProperties(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + /// + /// + /// Regular expression: (Filename, Filepath, UniqueID, Label, Rating, MediaType, FileSize, Created, Modified, Added, Annotated?, ThumbnailSource?, VoiceRecordingSource?) + /// + /// + public AssetProperties() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName FilenameXName = System.Xml.Linq.XName.Get("Filename", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (Filename, Filepath, UniqueID, Label, Rating, MediaType, FileSize, Created, Modified, Added, Annotated?, ThumbnailSource?, VoiceRecordingSource?) + /// + /// + public virtual Filename Filename { + get { + XElement x = this.GetElement(FilenameXName); + return ((Filename)(x)); + } + set { + this.SetElement(FilenameXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName FilepathXName = System.Xml.Linq.XName.Get("Filepath", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (Filename, Filepath, UniqueID, Label, Rating, MediaType, FileSize, Created, Modified, Added, Annotated?, ThumbnailSource?, VoiceRecordingSource?) + /// + /// + public virtual Filepath Filepath { + get { + XElement x = this.GetElement(FilepathXName); + return ((Filepath)(x)); + } + set { + this.SetElement(FilepathXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName UniqueIDXName = System.Xml.Linq.XName.Get("UniqueID", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (Filename, Filepath, UniqueID, Label, Rating, MediaType, FileSize, Created, Modified, Added, Annotated?, ThumbnailSource?, VoiceRecordingSource?) + /// + /// + public virtual UniqueID UniqueID { + get { + XElement x = this.GetElement(UniqueIDXName); + return ((UniqueID)(x)); + } + set { + this.SetElement(UniqueIDXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName LabelXName = System.Xml.Linq.XName.Get("Label", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (Filename, Filepath, UniqueID, Label, Rating, MediaType, FileSize, Created, Modified, Added, Annotated?, ThumbnailSource?, VoiceRecordingSource?) + /// + /// + public virtual Label Label { + get { + XElement x = this.GetElement(LabelXName); + return ((Label)(x)); + } + set { + this.SetElement(LabelXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName RatingXName = System.Xml.Linq.XName.Get("Rating", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (Filename, Filepath, UniqueID, Label, Rating, MediaType, FileSize, Created, Modified, Added, Annotated?, ThumbnailSource?, VoiceRecordingSource?) + /// + /// + public virtual Rating Rating { + get { + XElement x = this.GetElement(RatingXName); + return ((Rating)(x)); + } + set { + this.SetElement(RatingXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName MediaTypeXName = System.Xml.Linq.XName.Get("MediaType", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (Filename, Filepath, UniqueID, Label, Rating, MediaType, FileSize, Created, Modified, Added, Annotated?, ThumbnailSource?, VoiceRecordingSource?) + /// + /// + public virtual MediaType MediaType { + get { + XElement x = this.GetElement(MediaTypeXName); + return ((MediaType)(x)); + } + set { + this.SetElement(MediaTypeXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName FileSizeXName = System.Xml.Linq.XName.Get("FileSize", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (Filename, Filepath, UniqueID, Label, Rating, MediaType, FileSize, Created, Modified, Added, Annotated?, ThumbnailSource?, VoiceRecordingSource?) + /// + /// + public virtual FileSize FileSize { + get { + XElement x = this.GetElement(FileSizeXName); + return ((FileSize)(x)); + } + set { + this.SetElement(FileSizeXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName CreatedXName = System.Xml.Linq.XName.Get("Created", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (Filename, Filepath, UniqueID, Label, Rating, MediaType, FileSize, Created, Modified, Added, Annotated?, ThumbnailSource?, VoiceRecordingSource?) + /// + /// + public virtual Created Created { + get { + XElement x = this.GetElement(CreatedXName); + return ((Created)(x)); + } + set { + this.SetElement(CreatedXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName ModifiedXName = System.Xml.Linq.XName.Get("Modified", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (Filename, Filepath, UniqueID, Label, Rating, MediaType, FileSize, Created, Modified, Added, Annotated?, ThumbnailSource?, VoiceRecordingSource?) + /// + /// + public virtual Modified Modified { + get { + XElement x = this.GetElement(ModifiedXName); + return ((Modified)(x)); + } + set { + this.SetElement(ModifiedXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName AddedXName = System.Xml.Linq.XName.Get("Added", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (Filename, Filepath, UniqueID, Label, Rating, MediaType, FileSize, Created, Modified, Added, Annotated?, ThumbnailSource?, VoiceRecordingSource?) + /// + /// + public virtual Added Added { + get { + XElement x = this.GetElement(AddedXName); + return ((Added)(x)); + } + set { + this.SetElement(AddedXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName AnnotatedXName = System.Xml.Linq.XName.Get("Annotated", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Filename, Filepath, UniqueID, Label, Rating, MediaType, FileSize, Created, Modified, Added, Annotated?, ThumbnailSource?, VoiceRecordingSource?) + /// + /// + public virtual Annotated Annotated { + get { + XElement x = this.GetElement(AnnotatedXName); + if ((x == null)) { + return null; + } + return ((Annotated)(x)); + } + set { + this.SetElement(AnnotatedXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName ThumbnailSourceXName = System.Xml.Linq.XName.Get("ThumbnailSource", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Filename, Filepath, UniqueID, Label, Rating, MediaType, FileSize, Created, Modified, Added, Annotated?, ThumbnailSource?, VoiceRecordingSource?) + /// + /// + public virtual ThumbnailSource ThumbnailSource { + get { + XElement x = this.GetElement(ThumbnailSourceXName); + if ((x == null)) { + return null; + } + return ((ThumbnailSource)(x)); + } + set { + this.SetElement(ThumbnailSourceXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName VoiceRecordingSourceXName = System.Xml.Linq.XName.Get("VoiceRecordingSource", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Filename, Filepath, UniqueID, Label, Rating, MediaType, FileSize, Created, Modified, Added, Annotated?, ThumbnailSource?, VoiceRecordingSource?) + /// + /// + public virtual VoiceRecordingSource VoiceRecordingSource { + get { + XElement x = this.GetElement(VoiceRecordingSourceXName); + if ((x == null)) { + return null; + } + return ((VoiceRecordingSource)(x)); + } + set { + this.SetElement(VoiceRecordingSourceXName, value); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("AssetProperties", "urn:Microsoft.Expression.Media.Catalog"); + + static AssetProperties() { + BuildElementDictionary(); + contentModel = new SequenceContentModelEntity(new NamedContentModelEntity(FilenameXName), new NamedContentModelEntity(FilepathXName), new NamedContentModelEntity(UniqueIDXName), new NamedContentModelEntity(LabelXName), new NamedContentModelEntity(RatingXName), new NamedContentModelEntity(MediaTypeXName), new NamedContentModelEntity(FileSizeXName), new NamedContentModelEntity(CreatedXName), new NamedContentModelEntity(ModifiedXName), new NamedContentModelEntity(AddedXName), new NamedContentModelEntity(AnnotatedXName), new NamedContentModelEntity(ThumbnailSourceXName), new NamedContentModelEntity(VoiceRecordingSourceXName)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static Dictionary localElementDictionary = new Dictionary(); + + private static void BuildElementDictionary() { + localElementDictionary.Add(FilenameXName, typeof(Filename)); + localElementDictionary.Add(FilepathXName, typeof(Filepath)); + localElementDictionary.Add(UniqueIDXName, typeof(UniqueID)); + localElementDictionary.Add(LabelXName, typeof(Label)); + localElementDictionary.Add(RatingXName, typeof(Rating)); + localElementDictionary.Add(MediaTypeXName, typeof(MediaType)); + localElementDictionary.Add(FileSizeXName, typeof(FileSize)); + localElementDictionary.Add(CreatedXName, typeof(Created)); + localElementDictionary.Add(ModifiedXName, typeof(Modified)); + localElementDictionary.Add(AddedXName, typeof(Added)); + localElementDictionary.Add(AnnotatedXName, typeof(Annotated)); + localElementDictionary.Add(ThumbnailSourceXName, typeof(ThumbnailSource)); + localElementDictionary.Add(VoiceRecordingSourceXName, typeof(VoiceRecordingSource)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + Dictionary IXMetaData.LocalElementsDictionary { + get { + return localElementDictionary; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static ContentModelEntity contentModel; + + ContentModelEntity IXMetaData.GetContentModel() { + return contentModel; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + public partial class FileSize : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static FileSize Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static FileSize Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static FileSize Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator FileSize(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + public FileSize() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName unitXName = System.Xml.Linq.XName.Get("unit", ""); + + /// + /// + /// Occurrence: required + /// + /// + public virtual string unit { + get { + XAttribute x = this.Attribute(unitXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + set { + this.SetAttribute(unitXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("FileSize", "urn:Microsoft.Expression.Media.Catalog"); + + ContentModelEntity IXMetaData.GetContentModel() { + return ContentModelEntity.Default; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + /// + /// + /// Regular expression: (Width?, Height?, Resolution?, Depth?, ViewRotation?, SampleColor?, Pages?, Tracks?, Duration?, Channels?, SampleRate?, SampleSize?, AverageDataRate?, AverageFrameRate?, SpatialQuality?, ColorSpace?, Compression?, PrimaryEncoding?, ColorProfile?, CharacterCount?, ParagraphCount?) + /// + /// + public partial class MediaProperties : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static MediaProperties Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static MediaProperties Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static MediaProperties Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator MediaProperties(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + /// + /// + /// Regular expression: (Width?, Height?, Resolution?, Depth?, ViewRotation?, SampleColor?, Pages?, Tracks?, Duration?, Channels?, SampleRate?, SampleSize?, AverageDataRate?, AverageFrameRate?, SpatialQuality?, ColorSpace?, Compression?, PrimaryEncoding?, ColorProfile?, CharacterCount?, ParagraphCount?) + /// + /// + public MediaProperties() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName WidthXName = System.Xml.Linq.XName.Get("Width", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Width?, Height?, Resolution?, Depth?, ViewRotation?, SampleColor?, Pages?, Tracks?, Duration?, Channels?, SampleRate?, SampleSize?, AverageDataRate?, AverageFrameRate?, SpatialQuality?, ColorSpace?, Compression?, PrimaryEncoding?, ColorProfile?, CharacterCount?, ParagraphCount?) + /// + /// + public virtual Width Width { + get { + XElement x = this.GetElement(WidthXName); + if ((x == null)) { + return null; + } + return ((Width)(x)); + } + set { + this.SetElement(WidthXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName HeightXName = System.Xml.Linq.XName.Get("Height", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Width?, Height?, Resolution?, Depth?, ViewRotation?, SampleColor?, Pages?, Tracks?, Duration?, Channels?, SampleRate?, SampleSize?, AverageDataRate?, AverageFrameRate?, SpatialQuality?, ColorSpace?, Compression?, PrimaryEncoding?, ColorProfile?, CharacterCount?, ParagraphCount?) + /// + /// + public virtual Height Height { + get { + XElement x = this.GetElement(HeightXName); + if ((x == null)) { + return null; + } + return ((Height)(x)); + } + set { + this.SetElement(HeightXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName ResolutionXName = System.Xml.Linq.XName.Get("Resolution", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Width?, Height?, Resolution?, Depth?, ViewRotation?, SampleColor?, Pages?, Tracks?, Duration?, Channels?, SampleRate?, SampleSize?, AverageDataRate?, AverageFrameRate?, SpatialQuality?, ColorSpace?, Compression?, PrimaryEncoding?, ColorProfile?, CharacterCount?, ParagraphCount?) + /// + /// + public virtual Resolution Resolution { + get { + XElement x = this.GetElement(ResolutionXName); + if ((x == null)) { + return null; + } + return ((Resolution)(x)); + } + set { + this.SetElement(ResolutionXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName DepthXName = System.Xml.Linq.XName.Get("Depth", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Width?, Height?, Resolution?, Depth?, ViewRotation?, SampleColor?, Pages?, Tracks?, Duration?, Channels?, SampleRate?, SampleSize?, AverageDataRate?, AverageFrameRate?, SpatialQuality?, ColorSpace?, Compression?, PrimaryEncoding?, ColorProfile?, CharacterCount?, ParagraphCount?) + /// + /// + public virtual Depth Depth { + get { + XElement x = this.GetElement(DepthXName); + if ((x == null)) { + return null; + } + return ((Depth)(x)); + } + set { + this.SetElement(DepthXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName ViewRotationXName = System.Xml.Linq.XName.Get("ViewRotation", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Width?, Height?, Resolution?, Depth?, ViewRotation?, SampleColor?, Pages?, Tracks?, Duration?, Channels?, SampleRate?, SampleSize?, AverageDataRate?, AverageFrameRate?, SpatialQuality?, ColorSpace?, Compression?, PrimaryEncoding?, ColorProfile?, CharacterCount?, ParagraphCount?) + /// + /// + public virtual ViewRotation ViewRotation { + get { + XElement x = this.GetElement(ViewRotationXName); + if ((x == null)) { + return null; + } + return ((ViewRotation)(x)); + } + set { + this.SetElement(ViewRotationXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName SampleColorXName = System.Xml.Linq.XName.Get("SampleColor", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Width?, Height?, Resolution?, Depth?, ViewRotation?, SampleColor?, Pages?, Tracks?, Duration?, Channels?, SampleRate?, SampleSize?, AverageDataRate?, AverageFrameRate?, SpatialQuality?, ColorSpace?, Compression?, PrimaryEncoding?, ColorProfile?, CharacterCount?, ParagraphCount?) + /// + /// + public virtual SampleColor SampleColor { + get { + XElement x = this.GetElement(SampleColorXName); + if ((x == null)) { + return null; + } + return ((SampleColor)(x)); + } + set { + this.SetElement(SampleColorXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName PagesXName = System.Xml.Linq.XName.Get("Pages", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Width?, Height?, Resolution?, Depth?, ViewRotation?, SampleColor?, Pages?, Tracks?, Duration?, Channels?, SampleRate?, SampleSize?, AverageDataRate?, AverageFrameRate?, SpatialQuality?, ColorSpace?, Compression?, PrimaryEncoding?, ColorProfile?, CharacterCount?, ParagraphCount?) + /// + /// + public virtual Pages Pages { + get { + XElement x = this.GetElement(PagesXName); + if ((x == null)) { + return null; + } + return ((Pages)(x)); + } + set { + this.SetElement(PagesXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName TracksXName = System.Xml.Linq.XName.Get("Tracks", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Width?, Height?, Resolution?, Depth?, ViewRotation?, SampleColor?, Pages?, Tracks?, Duration?, Channels?, SampleRate?, SampleSize?, AverageDataRate?, AverageFrameRate?, SpatialQuality?, ColorSpace?, Compression?, PrimaryEncoding?, ColorProfile?, CharacterCount?, ParagraphCount?) + /// + /// + public virtual Tracks Tracks { + get { + XElement x = this.GetElement(TracksXName); + if ((x == null)) { + return null; + } + return ((Tracks)(x)); + } + set { + this.SetElement(TracksXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName DurationXName = System.Xml.Linq.XName.Get("Duration", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Width?, Height?, Resolution?, Depth?, ViewRotation?, SampleColor?, Pages?, Tracks?, Duration?, Channels?, SampleRate?, SampleSize?, AverageDataRate?, AverageFrameRate?, SpatialQuality?, ColorSpace?, Compression?, PrimaryEncoding?, ColorProfile?, CharacterCount?, ParagraphCount?) + /// + /// + public virtual Duration Duration { + get { + XElement x = this.GetElement(DurationXName); + if ((x == null)) { + return null; + } + return ((Duration)(x)); + } + set { + this.SetElement(DurationXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName ChannelsXName = System.Xml.Linq.XName.Get("Channels", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Width?, Height?, Resolution?, Depth?, ViewRotation?, SampleColor?, Pages?, Tracks?, Duration?, Channels?, SampleRate?, SampleSize?, AverageDataRate?, AverageFrameRate?, SpatialQuality?, ColorSpace?, Compression?, PrimaryEncoding?, ColorProfile?, CharacterCount?, ParagraphCount?) + /// + /// + public virtual Channels Channels { + get { + XElement x = this.GetElement(ChannelsXName); + if ((x == null)) { + return null; + } + return ((Channels)(x)); + } + set { + this.SetElement(ChannelsXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName SampleRateXName = System.Xml.Linq.XName.Get("SampleRate", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Width?, Height?, Resolution?, Depth?, ViewRotation?, SampleColor?, Pages?, Tracks?, Duration?, Channels?, SampleRate?, SampleSize?, AverageDataRate?, AverageFrameRate?, SpatialQuality?, ColorSpace?, Compression?, PrimaryEncoding?, ColorProfile?, CharacterCount?, ParagraphCount?) + /// + /// + public virtual SampleRate SampleRate { + get { + XElement x = this.GetElement(SampleRateXName); + if ((x == null)) { + return null; + } + return ((SampleRate)(x)); + } + set { + this.SetElement(SampleRateXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName SampleSizeXName = System.Xml.Linq.XName.Get("SampleSize", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Width?, Height?, Resolution?, Depth?, ViewRotation?, SampleColor?, Pages?, Tracks?, Duration?, Channels?, SampleRate?, SampleSize?, AverageDataRate?, AverageFrameRate?, SpatialQuality?, ColorSpace?, Compression?, PrimaryEncoding?, ColorProfile?, CharacterCount?, ParagraphCount?) + /// + /// + public virtual SampleSize SampleSize { + get { + XElement x = this.GetElement(SampleSizeXName); + if ((x == null)) { + return null; + } + return ((SampleSize)(x)); + } + set { + this.SetElement(SampleSizeXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName AverageDataRateXName = System.Xml.Linq.XName.Get("AverageDataRate", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Width?, Height?, Resolution?, Depth?, ViewRotation?, SampleColor?, Pages?, Tracks?, Duration?, Channels?, SampleRate?, SampleSize?, AverageDataRate?, AverageFrameRate?, SpatialQuality?, ColorSpace?, Compression?, PrimaryEncoding?, ColorProfile?, CharacterCount?, ParagraphCount?) + /// + /// + public virtual AverageDataRate AverageDataRate { + get { + XElement x = this.GetElement(AverageDataRateXName); + if ((x == null)) { + return null; + } + return ((AverageDataRate)(x)); + } + set { + this.SetElement(AverageDataRateXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName AverageFrameRateXName = System.Xml.Linq.XName.Get("AverageFrameRate", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Width?, Height?, Resolution?, Depth?, ViewRotation?, SampleColor?, Pages?, Tracks?, Duration?, Channels?, SampleRate?, SampleSize?, AverageDataRate?, AverageFrameRate?, SpatialQuality?, ColorSpace?, Compression?, PrimaryEncoding?, ColorProfile?, CharacterCount?, ParagraphCount?) + /// + /// + public virtual AverageFrameRate AverageFrameRate { + get { + XElement x = this.GetElement(AverageFrameRateXName); + if ((x == null)) { + return null; + } + return ((AverageFrameRate)(x)); + } + set { + this.SetElement(AverageFrameRateXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName SpatialQualityXName = System.Xml.Linq.XName.Get("SpatialQuality", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Width?, Height?, Resolution?, Depth?, ViewRotation?, SampleColor?, Pages?, Tracks?, Duration?, Channels?, SampleRate?, SampleSize?, AverageDataRate?, AverageFrameRate?, SpatialQuality?, ColorSpace?, Compression?, PrimaryEncoding?, ColorProfile?, CharacterCount?, ParagraphCount?) + /// + /// + public virtual SpatialQuality SpatialQuality { + get { + XElement x = this.GetElement(SpatialQualityXName); + if ((x == null)) { + return null; + } + return ((SpatialQuality)(x)); + } + set { + this.SetElement(SpatialQualityXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName ColorSpaceXName = System.Xml.Linq.XName.Get("ColorSpace", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Width?, Height?, Resolution?, Depth?, ViewRotation?, SampleColor?, Pages?, Tracks?, Duration?, Channels?, SampleRate?, SampleSize?, AverageDataRate?, AverageFrameRate?, SpatialQuality?, ColorSpace?, Compression?, PrimaryEncoding?, ColorProfile?, CharacterCount?, ParagraphCount?) + /// + /// + public virtual ColorSpace ColorSpace { + get { + XElement x = this.GetElement(ColorSpaceXName); + if ((x == null)) { + return null; + } + return ((ColorSpace)(x)); + } + set { + this.SetElement(ColorSpaceXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName CompressionXName = System.Xml.Linq.XName.Get("Compression", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Width?, Height?, Resolution?, Depth?, ViewRotation?, SampleColor?, Pages?, Tracks?, Duration?, Channels?, SampleRate?, SampleSize?, AverageDataRate?, AverageFrameRate?, SpatialQuality?, ColorSpace?, Compression?, PrimaryEncoding?, ColorProfile?, CharacterCount?, ParagraphCount?) + /// + /// + public virtual Compression Compression { + get { + XElement x = this.GetElement(CompressionXName); + if ((x == null)) { + return null; + } + return ((Compression)(x)); + } + set { + this.SetElement(CompressionXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName PrimaryEncodingXName = System.Xml.Linq.XName.Get("PrimaryEncoding", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Width?, Height?, Resolution?, Depth?, ViewRotation?, SampleColor?, Pages?, Tracks?, Duration?, Channels?, SampleRate?, SampleSize?, AverageDataRate?, AverageFrameRate?, SpatialQuality?, ColorSpace?, Compression?, PrimaryEncoding?, ColorProfile?, CharacterCount?, ParagraphCount?) + /// + /// + public virtual PrimaryEncoding PrimaryEncoding { + get { + XElement x = this.GetElement(PrimaryEncodingXName); + if ((x == null)) { + return null; + } + return ((PrimaryEncoding)(x)); + } + set { + this.SetElement(PrimaryEncodingXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName ColorProfileXName = System.Xml.Linq.XName.Get("ColorProfile", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Width?, Height?, Resolution?, Depth?, ViewRotation?, SampleColor?, Pages?, Tracks?, Duration?, Channels?, SampleRate?, SampleSize?, AverageDataRate?, AverageFrameRate?, SpatialQuality?, ColorSpace?, Compression?, PrimaryEncoding?, ColorProfile?, CharacterCount?, ParagraphCount?) + /// + /// + public virtual ColorProfile ColorProfile { + get { + XElement x = this.GetElement(ColorProfileXName); + if ((x == null)) { + return null; + } + return ((ColorProfile)(x)); + } + set { + this.SetElement(ColorProfileXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName CharacterCountXName = System.Xml.Linq.XName.Get("CharacterCount", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Width?, Height?, Resolution?, Depth?, ViewRotation?, SampleColor?, Pages?, Tracks?, Duration?, Channels?, SampleRate?, SampleSize?, AverageDataRate?, AverageFrameRate?, SpatialQuality?, ColorSpace?, Compression?, PrimaryEncoding?, ColorProfile?, CharacterCount?, ParagraphCount?) + /// + /// + public virtual CharacterCount CharacterCount { + get { + XElement x = this.GetElement(CharacterCountXName); + if ((x == null)) { + return null; + } + return ((CharacterCount)(x)); + } + set { + this.SetElement(CharacterCountXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName ParagraphCountXName = System.Xml.Linq.XName.Get("ParagraphCount", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Width?, Height?, Resolution?, Depth?, ViewRotation?, SampleColor?, Pages?, Tracks?, Duration?, Channels?, SampleRate?, SampleSize?, AverageDataRate?, AverageFrameRate?, SpatialQuality?, ColorSpace?, Compression?, PrimaryEncoding?, ColorProfile?, CharacterCount?, ParagraphCount?) + /// + /// + public virtual ParagraphCount ParagraphCount { + get { + XElement x = this.GetElement(ParagraphCountXName); + if ((x == null)) { + return null; + } + return ((ParagraphCount)(x)); + } + set { + this.SetElement(ParagraphCountXName, value); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("MediaProperties", "urn:Microsoft.Expression.Media.Catalog"); + + static MediaProperties() { + BuildElementDictionary(); + contentModel = new SequenceContentModelEntity(new NamedContentModelEntity(WidthXName), new NamedContentModelEntity(HeightXName), new NamedContentModelEntity(ResolutionXName), new NamedContentModelEntity(DepthXName), new NamedContentModelEntity(ViewRotationXName), new NamedContentModelEntity(SampleColorXName), new NamedContentModelEntity(PagesXName), new NamedContentModelEntity(TracksXName), new NamedContentModelEntity(DurationXName), new NamedContentModelEntity(ChannelsXName), new NamedContentModelEntity(SampleRateXName), new NamedContentModelEntity(SampleSizeXName), new NamedContentModelEntity(AverageDataRateXName), new NamedContentModelEntity(AverageFrameRateXName), new NamedContentModelEntity(SpatialQualityXName), new NamedContentModelEntity(ColorSpaceXName), new NamedContentModelEntity(CompressionXName), new NamedContentModelEntity(PrimaryEncodingXName), new NamedContentModelEntity(ColorProfileXName), new NamedContentModelEntity(CharacterCountXName), new NamedContentModelEntity(ParagraphCountXName)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static Dictionary localElementDictionary = new Dictionary(); + + private static void BuildElementDictionary() { + localElementDictionary.Add(WidthXName, typeof(Width)); + localElementDictionary.Add(HeightXName, typeof(Height)); + localElementDictionary.Add(ResolutionXName, typeof(Resolution)); + localElementDictionary.Add(DepthXName, typeof(Depth)); + localElementDictionary.Add(ViewRotationXName, typeof(ViewRotation)); + localElementDictionary.Add(SampleColorXName, typeof(SampleColor)); + localElementDictionary.Add(PagesXName, typeof(Pages)); + localElementDictionary.Add(TracksXName, typeof(Tracks)); + localElementDictionary.Add(DurationXName, typeof(Duration)); + localElementDictionary.Add(ChannelsXName, typeof(Channels)); + localElementDictionary.Add(SampleRateXName, typeof(SampleRate)); + localElementDictionary.Add(SampleSizeXName, typeof(SampleSize)); + localElementDictionary.Add(AverageDataRateXName, typeof(AverageDataRate)); + localElementDictionary.Add(AverageFrameRateXName, typeof(AverageFrameRate)); + localElementDictionary.Add(SpatialQualityXName, typeof(SpatialQuality)); + localElementDictionary.Add(ColorSpaceXName, typeof(ColorSpace)); + localElementDictionary.Add(CompressionXName, typeof(Compression)); + localElementDictionary.Add(PrimaryEncodingXName, typeof(PrimaryEncoding)); + localElementDictionary.Add(ColorProfileXName, typeof(ColorProfile)); + localElementDictionary.Add(CharacterCountXName, typeof(CharacterCount)); + localElementDictionary.Add(ParagraphCountXName, typeof(ParagraphCount)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + Dictionary IXMetaData.LocalElementsDictionary { + get { + return localElementDictionary; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static ContentModelEntity contentModel; + + ContentModelEntity IXMetaData.GetContentModel() { + return contentModel; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + public partial class Width : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static Width Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static Width Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static Width Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator Width(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + public Width() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName unitXName = System.Xml.Linq.XName.Get("unit", ""); + + /// + /// + /// Occurrence: required + /// + /// + public virtual string unit { + get { + XAttribute x = this.Attribute(unitXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + set { + this.SetAttribute(unitXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("Width", "urn:Microsoft.Expression.Media.Catalog"); + + ContentModelEntity IXMetaData.GetContentModel() { + return ContentModelEntity.Default; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + public partial class Height : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static Height Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static Height Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static Height Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator Height(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + public Height() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName unitXName = System.Xml.Linq.XName.Get("unit", ""); + + /// + /// + /// Occurrence: required + /// + /// + public virtual string unit { + get { + XAttribute x = this.Attribute(unitXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + set { + this.SetAttribute(unitXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("Height", "urn:Microsoft.Expression.Media.Catalog"); + + ContentModelEntity IXMetaData.GetContentModel() { + return ContentModelEntity.Default; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + public partial class Resolution : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static Resolution Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static Resolution Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static Resolution Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator Resolution(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + public Resolution() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName unitXName = System.Xml.Linq.XName.Get("unit", ""); + + /// + /// + /// Occurrence: required + /// + /// + public virtual string unit { + get { + XAttribute x = this.Attribute(unitXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + set { + this.SetAttribute(unitXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("Resolution", "urn:Microsoft.Expression.Media.Catalog"); + + ContentModelEntity IXMetaData.GetContentModel() { + return ContentModelEntity.Default; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + public partial class Depth : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static Depth Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static Depth Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static Depth Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator Depth(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + public Depth() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName unitXName = System.Xml.Linq.XName.Get("unit", ""); + + /// + /// + /// Occurrence: required + /// + /// + public virtual string unit { + get { + XAttribute x = this.Attribute(unitXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + set { + this.SetAttribute(unitXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("Depth", "urn:Microsoft.Expression.Media.Catalog"); + + ContentModelEntity IXMetaData.GetContentModel() { + return ContentModelEntity.Default; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + /// + /// + /// Regular expression: (Headline?, Product?, Classification?, IntellectualGenre?, Fixture?, EventDate?, Author?, AuthorTitle?, CreatorAddress?, CreatorCity?, CreatorState?, CreatorPostcode?, CreatorCountry?, CreatorPhone?, CreatorEmail?, CreatorURL?, Credit?, Source?, Copyright?, Transmission?, Rights?, URL?, Location?, City?, State?, Country?, CountryCode?, Instructions?, Status?, Writer?, Caption?, People*, Keyword*, Category*, Scene*, SubjectReference*) + /// + /// + public partial class AnnotationFields : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static AnnotationFields Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static AnnotationFields Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static AnnotationFields Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator AnnotationFields(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + /// + /// + /// Regular expression: (Headline?, Product?, Classification?, IntellectualGenre?, Fixture?, EventDate?, Author?, AuthorTitle?, CreatorAddress?, CreatorCity?, CreatorState?, CreatorPostcode?, CreatorCountry?, CreatorPhone?, CreatorEmail?, CreatorURL?, Credit?, Source?, Copyright?, Transmission?, Rights?, URL?, Location?, City?, State?, Country?, CountryCode?, Instructions?, Status?, Writer?, Caption?, People*, Keyword*, Category*, Scene*, SubjectReference*) + /// + /// + public AnnotationFields() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName HeadlineXName = System.Xml.Linq.XName.Get("Headline", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Headline?, Product?, Classification?, IntellectualGenre?, Fixture?, EventDate?, Author?, AuthorTitle?, CreatorAddress?, CreatorCity?, CreatorState?, CreatorPostcode?, CreatorCountry?, CreatorPhone?, CreatorEmail?, CreatorURL?, Credit?, Source?, Copyright?, Transmission?, Rights?, URL?, Location?, City?, State?, Country?, CountryCode?, Instructions?, Status?, Writer?, Caption?, People*, Keyword*, Category*, Scene*, SubjectReference*) + /// + /// + public virtual Headline Headline { + get { + XElement x = this.GetElement(HeadlineXName); + if ((x == null)) { + return null; + } + return ((Headline)(x)); + } + set { + this.SetElement(HeadlineXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName ProductXName = System.Xml.Linq.XName.Get("Product", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Headline?, Product?, Classification?, IntellectualGenre?, Fixture?, EventDate?, Author?, AuthorTitle?, CreatorAddress?, CreatorCity?, CreatorState?, CreatorPostcode?, CreatorCountry?, CreatorPhone?, CreatorEmail?, CreatorURL?, Credit?, Source?, Copyright?, Transmission?, Rights?, URL?, Location?, City?, State?, Country?, CountryCode?, Instructions?, Status?, Writer?, Caption?, People*, Keyword*, Category*, Scene*, SubjectReference*) + /// + /// + public virtual Product Product { + get { + XElement x = this.GetElement(ProductXName); + if ((x == null)) { + return null; + } + return ((Product)(x)); + } + set { + this.SetElement(ProductXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName ClassificationXName = System.Xml.Linq.XName.Get("Classification", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Headline?, Product?, Classification?, IntellectualGenre?, Fixture?, EventDate?, Author?, AuthorTitle?, CreatorAddress?, CreatorCity?, CreatorState?, CreatorPostcode?, CreatorCountry?, CreatorPhone?, CreatorEmail?, CreatorURL?, Credit?, Source?, Copyright?, Transmission?, Rights?, URL?, Location?, City?, State?, Country?, CountryCode?, Instructions?, Status?, Writer?, Caption?, People*, Keyword*, Category*, Scene*, SubjectReference*) + /// + /// + public virtual Classification Classification { + get { + XElement x = this.GetElement(ClassificationXName); + if ((x == null)) { + return null; + } + return ((Classification)(x)); + } + set { + this.SetElement(ClassificationXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName IntellectualGenreXName = System.Xml.Linq.XName.Get("IntellectualGenre", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Headline?, Product?, Classification?, IntellectualGenre?, Fixture?, EventDate?, Author?, AuthorTitle?, CreatorAddress?, CreatorCity?, CreatorState?, CreatorPostcode?, CreatorCountry?, CreatorPhone?, CreatorEmail?, CreatorURL?, Credit?, Source?, Copyright?, Transmission?, Rights?, URL?, Location?, City?, State?, Country?, CountryCode?, Instructions?, Status?, Writer?, Caption?, People*, Keyword*, Category*, Scene*, SubjectReference*) + /// + /// + public virtual IntellectualGenre IntellectualGenre { + get { + XElement x = this.GetElement(IntellectualGenreXName); + if ((x == null)) { + return null; + } + return ((IntellectualGenre)(x)); + } + set { + this.SetElement(IntellectualGenreXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName FixtureXName = System.Xml.Linq.XName.Get("Fixture", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Headline?, Product?, Classification?, IntellectualGenre?, Fixture?, EventDate?, Author?, AuthorTitle?, CreatorAddress?, CreatorCity?, CreatorState?, CreatorPostcode?, CreatorCountry?, CreatorPhone?, CreatorEmail?, CreatorURL?, Credit?, Source?, Copyright?, Transmission?, Rights?, URL?, Location?, City?, State?, Country?, CountryCode?, Instructions?, Status?, Writer?, Caption?, People*, Keyword*, Category*, Scene*, SubjectReference*) + /// + /// + public virtual Fixture Fixture { + get { + XElement x = this.GetElement(FixtureXName); + if ((x == null)) { + return null; + } + return ((Fixture)(x)); + } + set { + this.SetElement(FixtureXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName EventDateXName = System.Xml.Linq.XName.Get("EventDate", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Headline?, Product?, Classification?, IntellectualGenre?, Fixture?, EventDate?, Author?, AuthorTitle?, CreatorAddress?, CreatorCity?, CreatorState?, CreatorPostcode?, CreatorCountry?, CreatorPhone?, CreatorEmail?, CreatorURL?, Credit?, Source?, Copyright?, Transmission?, Rights?, URL?, Location?, City?, State?, Country?, CountryCode?, Instructions?, Status?, Writer?, Caption?, People*, Keyword*, Category*, Scene*, SubjectReference*) + /// + /// + public virtual EventDate EventDate { + get { + XElement x = this.GetElement(EventDateXName); + if ((x == null)) { + return null; + } + return ((EventDate)(x)); + } + set { + this.SetElement(EventDateXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName AuthorXName = System.Xml.Linq.XName.Get("Author", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Headline?, Product?, Classification?, IntellectualGenre?, Fixture?, EventDate?, Author?, AuthorTitle?, CreatorAddress?, CreatorCity?, CreatorState?, CreatorPostcode?, CreatorCountry?, CreatorPhone?, CreatorEmail?, CreatorURL?, Credit?, Source?, Copyright?, Transmission?, Rights?, URL?, Location?, City?, State?, Country?, CountryCode?, Instructions?, Status?, Writer?, Caption?, People*, Keyword*, Category*, Scene*, SubjectReference*) + /// + /// + public virtual Author Author { + get { + XElement x = this.GetElement(AuthorXName); + if ((x == null)) { + return null; + } + return ((Author)(x)); + } + set { + this.SetElement(AuthorXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName AuthorTitleXName = System.Xml.Linq.XName.Get("AuthorTitle", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Headline?, Product?, Classification?, IntellectualGenre?, Fixture?, EventDate?, Author?, AuthorTitle?, CreatorAddress?, CreatorCity?, CreatorState?, CreatorPostcode?, CreatorCountry?, CreatorPhone?, CreatorEmail?, CreatorURL?, Credit?, Source?, Copyright?, Transmission?, Rights?, URL?, Location?, City?, State?, Country?, CountryCode?, Instructions?, Status?, Writer?, Caption?, People*, Keyword*, Category*, Scene*, SubjectReference*) + /// + /// + public virtual AuthorTitle AuthorTitle { + get { + XElement x = this.GetElement(AuthorTitleXName); + if ((x == null)) { + return null; + } + return ((AuthorTitle)(x)); + } + set { + this.SetElement(AuthorTitleXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName CreatorAddressXName = System.Xml.Linq.XName.Get("CreatorAddress", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Headline?, Product?, Classification?, IntellectualGenre?, Fixture?, EventDate?, Author?, AuthorTitle?, CreatorAddress?, CreatorCity?, CreatorState?, CreatorPostcode?, CreatorCountry?, CreatorPhone?, CreatorEmail?, CreatorURL?, Credit?, Source?, Copyright?, Transmission?, Rights?, URL?, Location?, City?, State?, Country?, CountryCode?, Instructions?, Status?, Writer?, Caption?, People*, Keyword*, Category*, Scene*, SubjectReference*) + /// + /// + public virtual CreatorAddress CreatorAddress { + get { + XElement x = this.GetElement(CreatorAddressXName); + if ((x == null)) { + return null; + } + return ((CreatorAddress)(x)); + } + set { + this.SetElement(CreatorAddressXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName CreatorCityXName = System.Xml.Linq.XName.Get("CreatorCity", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Headline?, Product?, Classification?, IntellectualGenre?, Fixture?, EventDate?, Author?, AuthorTitle?, CreatorAddress?, CreatorCity?, CreatorState?, CreatorPostcode?, CreatorCountry?, CreatorPhone?, CreatorEmail?, CreatorURL?, Credit?, Source?, Copyright?, Transmission?, Rights?, URL?, Location?, City?, State?, Country?, CountryCode?, Instructions?, Status?, Writer?, Caption?, People*, Keyword*, Category*, Scene*, SubjectReference*) + /// + /// + public virtual CreatorCity CreatorCity { + get { + XElement x = this.GetElement(CreatorCityXName); + if ((x == null)) { + return null; + } + return ((CreatorCity)(x)); + } + set { + this.SetElement(CreatorCityXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName CreatorStateXName = System.Xml.Linq.XName.Get("CreatorState", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Headline?, Product?, Classification?, IntellectualGenre?, Fixture?, EventDate?, Author?, AuthorTitle?, CreatorAddress?, CreatorCity?, CreatorState?, CreatorPostcode?, CreatorCountry?, CreatorPhone?, CreatorEmail?, CreatorURL?, Credit?, Source?, Copyright?, Transmission?, Rights?, URL?, Location?, City?, State?, Country?, CountryCode?, Instructions?, Status?, Writer?, Caption?, People*, Keyword*, Category*, Scene*, SubjectReference*) + /// + /// + public virtual CreatorState CreatorState { + get { + XElement x = this.GetElement(CreatorStateXName); + if ((x == null)) { + return null; + } + return ((CreatorState)(x)); + } + set { + this.SetElement(CreatorStateXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName CreatorPostcodeXName = System.Xml.Linq.XName.Get("CreatorPostcode", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Headline?, Product?, Classification?, IntellectualGenre?, Fixture?, EventDate?, Author?, AuthorTitle?, CreatorAddress?, CreatorCity?, CreatorState?, CreatorPostcode?, CreatorCountry?, CreatorPhone?, CreatorEmail?, CreatorURL?, Credit?, Source?, Copyright?, Transmission?, Rights?, URL?, Location?, City?, State?, Country?, CountryCode?, Instructions?, Status?, Writer?, Caption?, People*, Keyword*, Category*, Scene*, SubjectReference*) + /// + /// + public virtual CreatorPostcode CreatorPostcode { + get { + XElement x = this.GetElement(CreatorPostcodeXName); + if ((x == null)) { + return null; + } + return ((CreatorPostcode)(x)); + } + set { + this.SetElement(CreatorPostcodeXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName CreatorCountryXName = System.Xml.Linq.XName.Get("CreatorCountry", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Headline?, Product?, Classification?, IntellectualGenre?, Fixture?, EventDate?, Author?, AuthorTitle?, CreatorAddress?, CreatorCity?, CreatorState?, CreatorPostcode?, CreatorCountry?, CreatorPhone?, CreatorEmail?, CreatorURL?, Credit?, Source?, Copyright?, Transmission?, Rights?, URL?, Location?, City?, State?, Country?, CountryCode?, Instructions?, Status?, Writer?, Caption?, People*, Keyword*, Category*, Scene*, SubjectReference*) + /// + /// + public virtual CreatorCountry CreatorCountry { + get { + XElement x = this.GetElement(CreatorCountryXName); + if ((x == null)) { + return null; + } + return ((CreatorCountry)(x)); + } + set { + this.SetElement(CreatorCountryXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName CreatorPhoneXName = System.Xml.Linq.XName.Get("CreatorPhone", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Headline?, Product?, Classification?, IntellectualGenre?, Fixture?, EventDate?, Author?, AuthorTitle?, CreatorAddress?, CreatorCity?, CreatorState?, CreatorPostcode?, CreatorCountry?, CreatorPhone?, CreatorEmail?, CreatorURL?, Credit?, Source?, Copyright?, Transmission?, Rights?, URL?, Location?, City?, State?, Country?, CountryCode?, Instructions?, Status?, Writer?, Caption?, People*, Keyword*, Category*, Scene*, SubjectReference*) + /// + /// + public virtual CreatorPhone CreatorPhone { + get { + XElement x = this.GetElement(CreatorPhoneXName); + if ((x == null)) { + return null; + } + return ((CreatorPhone)(x)); + } + set { + this.SetElement(CreatorPhoneXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName CreatorEmailXName = System.Xml.Linq.XName.Get("CreatorEmail", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Headline?, Product?, Classification?, IntellectualGenre?, Fixture?, EventDate?, Author?, AuthorTitle?, CreatorAddress?, CreatorCity?, CreatorState?, CreatorPostcode?, CreatorCountry?, CreatorPhone?, CreatorEmail?, CreatorURL?, Credit?, Source?, Copyright?, Transmission?, Rights?, URL?, Location?, City?, State?, Country?, CountryCode?, Instructions?, Status?, Writer?, Caption?, People*, Keyword*, Category*, Scene*, SubjectReference*) + /// + /// + public virtual CreatorEmail CreatorEmail { + get { + XElement x = this.GetElement(CreatorEmailXName); + if ((x == null)) { + return null; + } + return ((CreatorEmail)(x)); + } + set { + this.SetElement(CreatorEmailXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName CreatorURLXName = System.Xml.Linq.XName.Get("CreatorURL", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Headline?, Product?, Classification?, IntellectualGenre?, Fixture?, EventDate?, Author?, AuthorTitle?, CreatorAddress?, CreatorCity?, CreatorState?, CreatorPostcode?, CreatorCountry?, CreatorPhone?, CreatorEmail?, CreatorURL?, Credit?, Source?, Copyright?, Transmission?, Rights?, URL?, Location?, City?, State?, Country?, CountryCode?, Instructions?, Status?, Writer?, Caption?, People*, Keyword*, Category*, Scene*, SubjectReference*) + /// + /// + public virtual CreatorURL CreatorURL { + get { + XElement x = this.GetElement(CreatorURLXName); + if ((x == null)) { + return null; + } + return ((CreatorURL)(x)); + } + set { + this.SetElement(CreatorURLXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName CreditXName = System.Xml.Linq.XName.Get("Credit", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Headline?, Product?, Classification?, IntellectualGenre?, Fixture?, EventDate?, Author?, AuthorTitle?, CreatorAddress?, CreatorCity?, CreatorState?, CreatorPostcode?, CreatorCountry?, CreatorPhone?, CreatorEmail?, CreatorURL?, Credit?, Source?, Copyright?, Transmission?, Rights?, URL?, Location?, City?, State?, Country?, CountryCode?, Instructions?, Status?, Writer?, Caption?, People*, Keyword*, Category*, Scene*, SubjectReference*) + /// + /// + public virtual Credit Credit { + get { + XElement x = this.GetElement(CreditXName); + if ((x == null)) { + return null; + } + return ((Credit)(x)); + } + set { + this.SetElement(CreditXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName SourceXName = System.Xml.Linq.XName.Get("Source", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Headline?, Product?, Classification?, IntellectualGenre?, Fixture?, EventDate?, Author?, AuthorTitle?, CreatorAddress?, CreatorCity?, CreatorState?, CreatorPostcode?, CreatorCountry?, CreatorPhone?, CreatorEmail?, CreatorURL?, Credit?, Source?, Copyright?, Transmission?, Rights?, URL?, Location?, City?, State?, Country?, CountryCode?, Instructions?, Status?, Writer?, Caption?, People*, Keyword*, Category*, Scene*, SubjectReference*) + /// + /// + public virtual Source Source { + get { + XElement x = this.GetElement(SourceXName); + if ((x == null)) { + return null; + } + return ((Source)(x)); + } + set { + this.SetElement(SourceXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName CopyrightXName = System.Xml.Linq.XName.Get("Copyright", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Headline?, Product?, Classification?, IntellectualGenre?, Fixture?, EventDate?, Author?, AuthorTitle?, CreatorAddress?, CreatorCity?, CreatorState?, CreatorPostcode?, CreatorCountry?, CreatorPhone?, CreatorEmail?, CreatorURL?, Credit?, Source?, Copyright?, Transmission?, Rights?, URL?, Location?, City?, State?, Country?, CountryCode?, Instructions?, Status?, Writer?, Caption?, People*, Keyword*, Category*, Scene*, SubjectReference*) + /// + /// + public virtual Copyright Copyright { + get { + XElement x = this.GetElement(CopyrightXName); + if ((x == null)) { + return null; + } + return ((Copyright)(x)); + } + set { + this.SetElement(CopyrightXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName TransmissionXName = System.Xml.Linq.XName.Get("Transmission", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Headline?, Product?, Classification?, IntellectualGenre?, Fixture?, EventDate?, Author?, AuthorTitle?, CreatorAddress?, CreatorCity?, CreatorState?, CreatorPostcode?, CreatorCountry?, CreatorPhone?, CreatorEmail?, CreatorURL?, Credit?, Source?, Copyright?, Transmission?, Rights?, URL?, Location?, City?, State?, Country?, CountryCode?, Instructions?, Status?, Writer?, Caption?, People*, Keyword*, Category*, Scene*, SubjectReference*) + /// + /// + public virtual Transmission Transmission { + get { + XElement x = this.GetElement(TransmissionXName); + if ((x == null)) { + return null; + } + return ((Transmission)(x)); + } + set { + this.SetElement(TransmissionXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName RightsXName = System.Xml.Linq.XName.Get("Rights", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Headline?, Product?, Classification?, IntellectualGenre?, Fixture?, EventDate?, Author?, AuthorTitle?, CreatorAddress?, CreatorCity?, CreatorState?, CreatorPostcode?, CreatorCountry?, CreatorPhone?, CreatorEmail?, CreatorURL?, Credit?, Source?, Copyright?, Transmission?, Rights?, URL?, Location?, City?, State?, Country?, CountryCode?, Instructions?, Status?, Writer?, Caption?, People*, Keyword*, Category*, Scene*, SubjectReference*) + /// + /// + public virtual Rights Rights { + get { + XElement x = this.GetElement(RightsXName); + if ((x == null)) { + return null; + } + return ((Rights)(x)); + } + set { + this.SetElement(RightsXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName URLXName = System.Xml.Linq.XName.Get("URL", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Headline?, Product?, Classification?, IntellectualGenre?, Fixture?, EventDate?, Author?, AuthorTitle?, CreatorAddress?, CreatorCity?, CreatorState?, CreatorPostcode?, CreatorCountry?, CreatorPhone?, CreatorEmail?, CreatorURL?, Credit?, Source?, Copyright?, Transmission?, Rights?, URL?, Location?, City?, State?, Country?, CountryCode?, Instructions?, Status?, Writer?, Caption?, People*, Keyword*, Category*, Scene*, SubjectReference*) + /// + /// + public virtual URL URL { + get { + XElement x = this.GetElement(URLXName); + if ((x == null)) { + return null; + } + return ((URL)(x)); + } + set { + this.SetElement(URLXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName LocationXName = System.Xml.Linq.XName.Get("Location", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Headline?, Product?, Classification?, IntellectualGenre?, Fixture?, EventDate?, Author?, AuthorTitle?, CreatorAddress?, CreatorCity?, CreatorState?, CreatorPostcode?, CreatorCountry?, CreatorPhone?, CreatorEmail?, CreatorURL?, Credit?, Source?, Copyright?, Transmission?, Rights?, URL?, Location?, City?, State?, Country?, CountryCode?, Instructions?, Status?, Writer?, Caption?, People*, Keyword*, Category*, Scene*, SubjectReference*) + /// + /// + public virtual Location Location { + get { + XElement x = this.GetElement(LocationXName); + if ((x == null)) { + return null; + } + return ((Location)(x)); + } + set { + this.SetElement(LocationXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName CityXName = System.Xml.Linq.XName.Get("City", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Headline?, Product?, Classification?, IntellectualGenre?, Fixture?, EventDate?, Author?, AuthorTitle?, CreatorAddress?, CreatorCity?, CreatorState?, CreatorPostcode?, CreatorCountry?, CreatorPhone?, CreatorEmail?, CreatorURL?, Credit?, Source?, Copyright?, Transmission?, Rights?, URL?, Location?, City?, State?, Country?, CountryCode?, Instructions?, Status?, Writer?, Caption?, People*, Keyword*, Category*, Scene*, SubjectReference*) + /// + /// + public virtual City City { + get { + XElement x = this.GetElement(CityXName); + if ((x == null)) { + return null; + } + return ((City)(x)); + } + set { + this.SetElement(CityXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName StateXName = System.Xml.Linq.XName.Get("State", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Headline?, Product?, Classification?, IntellectualGenre?, Fixture?, EventDate?, Author?, AuthorTitle?, CreatorAddress?, CreatorCity?, CreatorState?, CreatorPostcode?, CreatorCountry?, CreatorPhone?, CreatorEmail?, CreatorURL?, Credit?, Source?, Copyright?, Transmission?, Rights?, URL?, Location?, City?, State?, Country?, CountryCode?, Instructions?, Status?, Writer?, Caption?, People*, Keyword*, Category*, Scene*, SubjectReference*) + /// + /// + public virtual State State { + get { + XElement x = this.GetElement(StateXName); + if ((x == null)) { + return null; + } + return ((State)(x)); + } + set { + this.SetElement(StateXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName CountryXName = System.Xml.Linq.XName.Get("Country", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Headline?, Product?, Classification?, IntellectualGenre?, Fixture?, EventDate?, Author?, AuthorTitle?, CreatorAddress?, CreatorCity?, CreatorState?, CreatorPostcode?, CreatorCountry?, CreatorPhone?, CreatorEmail?, CreatorURL?, Credit?, Source?, Copyright?, Transmission?, Rights?, URL?, Location?, City?, State?, Country?, CountryCode?, Instructions?, Status?, Writer?, Caption?, People*, Keyword*, Category*, Scene*, SubjectReference*) + /// + /// + public virtual Country Country { + get { + XElement x = this.GetElement(CountryXName); + if ((x == null)) { + return null; + } + return ((Country)(x)); + } + set { + this.SetElement(CountryXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName CountryCodeXName = System.Xml.Linq.XName.Get("CountryCode", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Headline?, Product?, Classification?, IntellectualGenre?, Fixture?, EventDate?, Author?, AuthorTitle?, CreatorAddress?, CreatorCity?, CreatorState?, CreatorPostcode?, CreatorCountry?, CreatorPhone?, CreatorEmail?, CreatorURL?, Credit?, Source?, Copyright?, Transmission?, Rights?, URL?, Location?, City?, State?, Country?, CountryCode?, Instructions?, Status?, Writer?, Caption?, People*, Keyword*, Category*, Scene*, SubjectReference*) + /// + /// + public virtual CountryCode CountryCode { + get { + XElement x = this.GetElement(CountryCodeXName); + if ((x == null)) { + return null; + } + return ((CountryCode)(x)); + } + set { + this.SetElement(CountryCodeXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName InstructionsXName = System.Xml.Linq.XName.Get("Instructions", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Headline?, Product?, Classification?, IntellectualGenre?, Fixture?, EventDate?, Author?, AuthorTitle?, CreatorAddress?, CreatorCity?, CreatorState?, CreatorPostcode?, CreatorCountry?, CreatorPhone?, CreatorEmail?, CreatorURL?, Credit?, Source?, Copyright?, Transmission?, Rights?, URL?, Location?, City?, State?, Country?, CountryCode?, Instructions?, Status?, Writer?, Caption?, People*, Keyword*, Category*, Scene*, SubjectReference*) + /// + /// + public virtual Instructions Instructions { + get { + XElement x = this.GetElement(InstructionsXName); + if ((x == null)) { + return null; + } + return ((Instructions)(x)); + } + set { + this.SetElement(InstructionsXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName StatusXName = System.Xml.Linq.XName.Get("Status", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Headline?, Product?, Classification?, IntellectualGenre?, Fixture?, EventDate?, Author?, AuthorTitle?, CreatorAddress?, CreatorCity?, CreatorState?, CreatorPostcode?, CreatorCountry?, CreatorPhone?, CreatorEmail?, CreatorURL?, Credit?, Source?, Copyright?, Transmission?, Rights?, URL?, Location?, City?, State?, Country?, CountryCode?, Instructions?, Status?, Writer?, Caption?, People*, Keyword*, Category*, Scene*, SubjectReference*) + /// + /// + public virtual Status Status { + get { + XElement x = this.GetElement(StatusXName); + if ((x == null)) { + return null; + } + return ((Status)(x)); + } + set { + this.SetElement(StatusXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName WriterXName = System.Xml.Linq.XName.Get("Writer", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Headline?, Product?, Classification?, IntellectualGenre?, Fixture?, EventDate?, Author?, AuthorTitle?, CreatorAddress?, CreatorCity?, CreatorState?, CreatorPostcode?, CreatorCountry?, CreatorPhone?, CreatorEmail?, CreatorURL?, Credit?, Source?, Copyright?, Transmission?, Rights?, URL?, Location?, City?, State?, Country?, CountryCode?, Instructions?, Status?, Writer?, Caption?, People*, Keyword*, Category*, Scene*, SubjectReference*) + /// + /// + public virtual Writer Writer { + get { + XElement x = this.GetElement(WriterXName); + if ((x == null)) { + return null; + } + return ((Writer)(x)); + } + set { + this.SetElement(WriterXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName CaptionXName = System.Xml.Linq.XName.Get("Caption", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Headline?, Product?, Classification?, IntellectualGenre?, Fixture?, EventDate?, Author?, AuthorTitle?, CreatorAddress?, CreatorCity?, CreatorState?, CreatorPostcode?, CreatorCountry?, CreatorPhone?, CreatorEmail?, CreatorURL?, Credit?, Source?, Copyright?, Transmission?, Rights?, URL?, Location?, City?, State?, Country?, CountryCode?, Instructions?, Status?, Writer?, Caption?, People*, Keyword*, Category*, Scene*, SubjectReference*) + /// + /// + public virtual Caption Caption { + get { + XElement x = this.GetElement(CaptionXName); + if ((x == null)) { + return null; + } + return ((Caption)(x)); + } + set { + this.SetElement(CaptionXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName PeopleXName = System.Xml.Linq.XName.Get("People", "urn:Microsoft.Expression.Media.Catalog"); + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private XSimpleList PeopleField; + + /// + /// + /// Occurrence: optional, repeating + /// + /// + /// Regular expression: (Headline?, Product?, Classification?, IntellectualGenre?, Fixture?, EventDate?, Author?, AuthorTitle?, CreatorAddress?, CreatorCity?, CreatorState?, CreatorPostcode?, CreatorCountry?, CreatorPhone?, CreatorEmail?, CreatorURL?, Credit?, Source?, Copyright?, Transmission?, Rights?, URL?, Location?, City?, State?, Country?, CountryCode?, Instructions?, Status?, Writer?, Caption?, People*, Keyword*, Category*, Scene*, SubjectReference*) + /// + /// + public virtual IList People { + get { + if ((this.PeopleField == null)) { + this.PeopleField = new XSimpleList(this, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype, PeopleXName); + } + return this.PeopleField; + } + set { + if ((value == null)) { + this.PeopleField = null; + } + else { + if ((this.PeopleField == null)) { + this.PeopleField = XSimpleList.Initialize(this, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype, value, PeopleXName); + } + else { + XTypedServices.SetList(this.PeopleField, value); + } + } + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName KeywordXName = System.Xml.Linq.XName.Get("Keyword", "urn:Microsoft.Expression.Media.Catalog"); + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private XSimpleList KeywordField; + + /// + /// + /// Occurrence: optional, repeating + /// + /// + /// Regular expression: (Headline?, Product?, Classification?, IntellectualGenre?, Fixture?, EventDate?, Author?, AuthorTitle?, CreatorAddress?, CreatorCity?, CreatorState?, CreatorPostcode?, CreatorCountry?, CreatorPhone?, CreatorEmail?, CreatorURL?, Credit?, Source?, Copyright?, Transmission?, Rights?, URL?, Location?, City?, State?, Country?, CountryCode?, Instructions?, Status?, Writer?, Caption?, People*, Keyword*, Category*, Scene*, SubjectReference*) + /// + /// + public virtual IList Keyword { + get { + if ((this.KeywordField == null)) { + this.KeywordField = new XSimpleList(this, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype, KeywordXName); + } + return this.KeywordField; + } + set { + if ((value == null)) { + this.KeywordField = null; + } + else { + if ((this.KeywordField == null)) { + this.KeywordField = XSimpleList.Initialize(this, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype, value, KeywordXName); + } + else { + XTypedServices.SetList(this.KeywordField, value); + } + } + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName CategoryXName = System.Xml.Linq.XName.Get("Category", "urn:Microsoft.Expression.Media.Catalog"); + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private XSimpleList CategoryField; + + /// + /// + /// Occurrence: optional, repeating + /// + /// + /// Regular expression: (Headline?, Product?, Classification?, IntellectualGenre?, Fixture?, EventDate?, Author?, AuthorTitle?, CreatorAddress?, CreatorCity?, CreatorState?, CreatorPostcode?, CreatorCountry?, CreatorPhone?, CreatorEmail?, CreatorURL?, Credit?, Source?, Copyright?, Transmission?, Rights?, URL?, Location?, City?, State?, Country?, CountryCode?, Instructions?, Status?, Writer?, Caption?, People*, Keyword*, Category*, Scene*, SubjectReference*) + /// + /// + public virtual IList Category { + get { + if ((this.CategoryField == null)) { + this.CategoryField = new XSimpleList(this, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype, CategoryXName); + } + return this.CategoryField; + } + set { + if ((value == null)) { + this.CategoryField = null; + } + else { + if ((this.CategoryField == null)) { + this.CategoryField = XSimpleList.Initialize(this, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype, value, CategoryXName); + } + else { + XTypedServices.SetList(this.CategoryField, value); + } + } + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName SceneXName = System.Xml.Linq.XName.Get("Scene", "urn:Microsoft.Expression.Media.Catalog"); + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private XSimpleList SceneField; + + /// + /// + /// Occurrence: optional, repeating + /// + /// + /// Regular expression: (Headline?, Product?, Classification?, IntellectualGenre?, Fixture?, EventDate?, Author?, AuthorTitle?, CreatorAddress?, CreatorCity?, CreatorState?, CreatorPostcode?, CreatorCountry?, CreatorPhone?, CreatorEmail?, CreatorURL?, Credit?, Source?, Copyright?, Transmission?, Rights?, URL?, Location?, City?, State?, Country?, CountryCode?, Instructions?, Status?, Writer?, Caption?, People*, Keyword*, Category*, Scene*, SubjectReference*) + /// + /// + public virtual IList Scene { + get { + if ((this.SceneField == null)) { + this.SceneField = new XSimpleList(this, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype, SceneXName); + } + return this.SceneField; + } + set { + if ((value == null)) { + this.SceneField = null; + } + else { + if ((this.SceneField == null)) { + this.SceneField = XSimpleList.Initialize(this, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype, value, SceneXName); + } + else { + XTypedServices.SetList(this.SceneField, value); + } + } + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName SubjectReferenceXName = System.Xml.Linq.XName.Get("SubjectReference", "urn:Microsoft.Expression.Media.Catalog"); + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private XSimpleList SubjectReferenceField; + + /// + /// + /// Occurrence: optional, repeating + /// + /// + /// Regular expression: (Headline?, Product?, Classification?, IntellectualGenre?, Fixture?, EventDate?, Author?, AuthorTitle?, CreatorAddress?, CreatorCity?, CreatorState?, CreatorPostcode?, CreatorCountry?, CreatorPhone?, CreatorEmail?, CreatorURL?, Credit?, Source?, Copyright?, Transmission?, Rights?, URL?, Location?, City?, State?, Country?, CountryCode?, Instructions?, Status?, Writer?, Caption?, People*, Keyword*, Category*, Scene*, SubjectReference*) + /// + /// + public virtual IList SubjectReference { + get { + if ((this.SubjectReferenceField == null)) { + this.SubjectReferenceField = new XSimpleList(this, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype, SubjectReferenceXName); + } + return this.SubjectReferenceField; + } + set { + if ((value == null)) { + this.SubjectReferenceField = null; + } + else { + if ((this.SubjectReferenceField == null)) { + this.SubjectReferenceField = XSimpleList.Initialize(this, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype, value, SubjectReferenceXName); + } + else { + XTypedServices.SetList(this.SubjectReferenceField, value); + } + } + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("AnnotationFields", "urn:Microsoft.Expression.Media.Catalog"); + + static AnnotationFields() { + BuildElementDictionary(); + contentModel = new SequenceContentModelEntity(new NamedContentModelEntity(HeadlineXName), new NamedContentModelEntity(ProductXName), new NamedContentModelEntity(ClassificationXName), new NamedContentModelEntity(IntellectualGenreXName), new NamedContentModelEntity(FixtureXName), new NamedContentModelEntity(EventDateXName), new NamedContentModelEntity(AuthorXName), new NamedContentModelEntity(AuthorTitleXName), new NamedContentModelEntity(CreatorAddressXName), new NamedContentModelEntity(CreatorCityXName), new NamedContentModelEntity(CreatorStateXName), new NamedContentModelEntity(CreatorPostcodeXName), new NamedContentModelEntity(CreatorCountryXName), new NamedContentModelEntity(CreatorPhoneXName), new NamedContentModelEntity(CreatorEmailXName), new NamedContentModelEntity(CreatorURLXName), new NamedContentModelEntity(CreditXName), new NamedContentModelEntity(SourceXName), new NamedContentModelEntity(CopyrightXName), new NamedContentModelEntity(TransmissionXName), new NamedContentModelEntity(RightsXName), new NamedContentModelEntity(URLXName), new NamedContentModelEntity(LocationXName), new NamedContentModelEntity(CityXName), new NamedContentModelEntity(StateXName), new NamedContentModelEntity(CountryXName), new NamedContentModelEntity(CountryCodeXName), new NamedContentModelEntity(InstructionsXName), new NamedContentModelEntity(StatusXName), new NamedContentModelEntity(WriterXName), new NamedContentModelEntity(CaptionXName), new NamedContentModelEntity(PeopleXName), new NamedContentModelEntity(KeywordXName), new NamedContentModelEntity(CategoryXName), new NamedContentModelEntity(SceneXName), new NamedContentModelEntity(SubjectReferenceXName)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static Dictionary localElementDictionary = new Dictionary(); + + private static void BuildElementDictionary() { + localElementDictionary.Add(HeadlineXName, typeof(Headline)); + localElementDictionary.Add(ProductXName, typeof(Product)); + localElementDictionary.Add(ClassificationXName, typeof(Classification)); + localElementDictionary.Add(IntellectualGenreXName, typeof(IntellectualGenre)); + localElementDictionary.Add(FixtureXName, typeof(Fixture)); + localElementDictionary.Add(EventDateXName, typeof(EventDate)); + localElementDictionary.Add(AuthorXName, typeof(Author)); + localElementDictionary.Add(AuthorTitleXName, typeof(AuthorTitle)); + localElementDictionary.Add(CreatorAddressXName, typeof(CreatorAddress)); + localElementDictionary.Add(CreatorCityXName, typeof(CreatorCity)); + localElementDictionary.Add(CreatorStateXName, typeof(CreatorState)); + localElementDictionary.Add(CreatorPostcodeXName, typeof(CreatorPostcode)); + localElementDictionary.Add(CreatorCountryXName, typeof(CreatorCountry)); + localElementDictionary.Add(CreatorPhoneXName, typeof(CreatorPhone)); + localElementDictionary.Add(CreatorEmailXName, typeof(CreatorEmail)); + localElementDictionary.Add(CreatorURLXName, typeof(CreatorURL)); + localElementDictionary.Add(CreditXName, typeof(Credit)); + localElementDictionary.Add(SourceXName, typeof(Source)); + localElementDictionary.Add(CopyrightXName, typeof(Copyright)); + localElementDictionary.Add(TransmissionXName, typeof(Transmission)); + localElementDictionary.Add(RightsXName, typeof(Rights)); + localElementDictionary.Add(URLXName, typeof(URL)); + localElementDictionary.Add(LocationXName, typeof(Location)); + localElementDictionary.Add(CityXName, typeof(City)); + localElementDictionary.Add(StateXName, typeof(State)); + localElementDictionary.Add(CountryXName, typeof(Country)); + localElementDictionary.Add(CountryCodeXName, typeof(CountryCode)); + localElementDictionary.Add(InstructionsXName, typeof(Instructions)); + localElementDictionary.Add(StatusXName, typeof(Status)); + localElementDictionary.Add(WriterXName, typeof(Writer)); + localElementDictionary.Add(CaptionXName, typeof(Caption)); + localElementDictionary.Add(PeopleXName, typeof(People)); + localElementDictionary.Add(KeywordXName, typeof(Keyword)); + localElementDictionary.Add(CategoryXName, typeof(Category)); + localElementDictionary.Add(SceneXName, typeof(Scene)); + localElementDictionary.Add(SubjectReferenceXName, typeof(SubjectReference)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + Dictionary IXMetaData.LocalElementsDictionary { + get { + return localElementDictionary; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static ContentModelEntity contentModel; + + ContentModelEntity IXMetaData.GetContentModel() { + return contentModel; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + /// + /// + /// Regular expression: (UserField_1?, UserField_2?, UserField_3?, UserField_4?, UserField_5?, UserField_6?, UserField_7?, UserField_8?, UserField_9?, UserField_10?, UserField_11?, UserField_12?, UserField_13?, UserField_14?, UserField_15?, UserField_16?) + /// + /// + public partial class UserFields : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static UserFields Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static UserFields Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static UserFields Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator UserFields(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + /// + /// + /// Regular expression: (UserField_1?, UserField_2?, UserField_3?, UserField_4?, UserField_5?, UserField_6?, UserField_7?, UserField_8?, UserField_9?, UserField_10?, UserField_11?, UserField_12?, UserField_13?, UserField_14?, UserField_15?, UserField_16?) + /// + /// + public UserFields() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName UserField_1XName = System.Xml.Linq.XName.Get("UserField_1", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (UserField_1?, UserField_2?, UserField_3?, UserField_4?, UserField_5?, UserField_6?, UserField_7?, UserField_8?, UserField_9?, UserField_10?, UserField_11?, UserField_12?, UserField_13?, UserField_14?, UserField_15?, UserField_16?) + /// + /// + public virtual UserField_1 UserField_1 { + get { + XElement x = this.GetElement(UserField_1XName); + if ((x == null)) { + return null; + } + return ((UserField_1)(x)); + } + set { + this.SetElement(UserField_1XName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName UserField_2XName = System.Xml.Linq.XName.Get("UserField_2", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (UserField_1?, UserField_2?, UserField_3?, UserField_4?, UserField_5?, UserField_6?, UserField_7?, UserField_8?, UserField_9?, UserField_10?, UserField_11?, UserField_12?, UserField_13?, UserField_14?, UserField_15?, UserField_16?) + /// + /// + public virtual UserField_2 UserField_2 { + get { + XElement x = this.GetElement(UserField_2XName); + if ((x == null)) { + return null; + } + return ((UserField_2)(x)); + } + set { + this.SetElement(UserField_2XName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName UserField_3XName = System.Xml.Linq.XName.Get("UserField_3", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (UserField_1?, UserField_2?, UserField_3?, UserField_4?, UserField_5?, UserField_6?, UserField_7?, UserField_8?, UserField_9?, UserField_10?, UserField_11?, UserField_12?, UserField_13?, UserField_14?, UserField_15?, UserField_16?) + /// + /// + public virtual UserField_3 UserField_3 { + get { + XElement x = this.GetElement(UserField_3XName); + if ((x == null)) { + return null; + } + return ((UserField_3)(x)); + } + set { + this.SetElement(UserField_3XName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName UserField_4XName = System.Xml.Linq.XName.Get("UserField_4", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (UserField_1?, UserField_2?, UserField_3?, UserField_4?, UserField_5?, UserField_6?, UserField_7?, UserField_8?, UserField_9?, UserField_10?, UserField_11?, UserField_12?, UserField_13?, UserField_14?, UserField_15?, UserField_16?) + /// + /// + public virtual UserField_4 UserField_4 { + get { + XElement x = this.GetElement(UserField_4XName); + if ((x == null)) { + return null; + } + return ((UserField_4)(x)); + } + set { + this.SetElement(UserField_4XName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName UserField_5XName = System.Xml.Linq.XName.Get("UserField_5", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (UserField_1?, UserField_2?, UserField_3?, UserField_4?, UserField_5?, UserField_6?, UserField_7?, UserField_8?, UserField_9?, UserField_10?, UserField_11?, UserField_12?, UserField_13?, UserField_14?, UserField_15?, UserField_16?) + /// + /// + public virtual UserField_5 UserField_5 { + get { + XElement x = this.GetElement(UserField_5XName); + if ((x == null)) { + return null; + } + return ((UserField_5)(x)); + } + set { + this.SetElement(UserField_5XName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName UserField_6XName = System.Xml.Linq.XName.Get("UserField_6", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (UserField_1?, UserField_2?, UserField_3?, UserField_4?, UserField_5?, UserField_6?, UserField_7?, UserField_8?, UserField_9?, UserField_10?, UserField_11?, UserField_12?, UserField_13?, UserField_14?, UserField_15?, UserField_16?) + /// + /// + public virtual UserField_6 UserField_6 { + get { + XElement x = this.GetElement(UserField_6XName); + if ((x == null)) { + return null; + } + return ((UserField_6)(x)); + } + set { + this.SetElement(UserField_6XName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName UserField_7XName = System.Xml.Linq.XName.Get("UserField_7", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (UserField_1?, UserField_2?, UserField_3?, UserField_4?, UserField_5?, UserField_6?, UserField_7?, UserField_8?, UserField_9?, UserField_10?, UserField_11?, UserField_12?, UserField_13?, UserField_14?, UserField_15?, UserField_16?) + /// + /// + public virtual UserField_7 UserField_7 { + get { + XElement x = this.GetElement(UserField_7XName); + if ((x == null)) { + return null; + } + return ((UserField_7)(x)); + } + set { + this.SetElement(UserField_7XName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName UserField_8XName = System.Xml.Linq.XName.Get("UserField_8", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (UserField_1?, UserField_2?, UserField_3?, UserField_4?, UserField_5?, UserField_6?, UserField_7?, UserField_8?, UserField_9?, UserField_10?, UserField_11?, UserField_12?, UserField_13?, UserField_14?, UserField_15?, UserField_16?) + /// + /// + public virtual UserField_8 UserField_8 { + get { + XElement x = this.GetElement(UserField_8XName); + if ((x == null)) { + return null; + } + return ((UserField_8)(x)); + } + set { + this.SetElement(UserField_8XName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName UserField_9XName = System.Xml.Linq.XName.Get("UserField_9", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (UserField_1?, UserField_2?, UserField_3?, UserField_4?, UserField_5?, UserField_6?, UserField_7?, UserField_8?, UserField_9?, UserField_10?, UserField_11?, UserField_12?, UserField_13?, UserField_14?, UserField_15?, UserField_16?) + /// + /// + public virtual UserField_9 UserField_9 { + get { + XElement x = this.GetElement(UserField_9XName); + if ((x == null)) { + return null; + } + return ((UserField_9)(x)); + } + set { + this.SetElement(UserField_9XName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName UserField_10XName = System.Xml.Linq.XName.Get("UserField_10", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (UserField_1?, UserField_2?, UserField_3?, UserField_4?, UserField_5?, UserField_6?, UserField_7?, UserField_8?, UserField_9?, UserField_10?, UserField_11?, UserField_12?, UserField_13?, UserField_14?, UserField_15?, UserField_16?) + /// + /// + public virtual UserField_10 UserField_10 { + get { + XElement x = this.GetElement(UserField_10XName); + if ((x == null)) { + return null; + } + return ((UserField_10)(x)); + } + set { + this.SetElement(UserField_10XName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName UserField_11XName = System.Xml.Linq.XName.Get("UserField_11", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (UserField_1?, UserField_2?, UserField_3?, UserField_4?, UserField_5?, UserField_6?, UserField_7?, UserField_8?, UserField_9?, UserField_10?, UserField_11?, UserField_12?, UserField_13?, UserField_14?, UserField_15?, UserField_16?) + /// + /// + public virtual UserField_11 UserField_11 { + get { + XElement x = this.GetElement(UserField_11XName); + if ((x == null)) { + return null; + } + return ((UserField_11)(x)); + } + set { + this.SetElement(UserField_11XName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName UserField_12XName = System.Xml.Linq.XName.Get("UserField_12", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (UserField_1?, UserField_2?, UserField_3?, UserField_4?, UserField_5?, UserField_6?, UserField_7?, UserField_8?, UserField_9?, UserField_10?, UserField_11?, UserField_12?, UserField_13?, UserField_14?, UserField_15?, UserField_16?) + /// + /// + public virtual UserField_12 UserField_12 { + get { + XElement x = this.GetElement(UserField_12XName); + if ((x == null)) { + return null; + } + return ((UserField_12)(x)); + } + set { + this.SetElement(UserField_12XName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName UserField_13XName = System.Xml.Linq.XName.Get("UserField_13", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (UserField_1?, UserField_2?, UserField_3?, UserField_4?, UserField_5?, UserField_6?, UserField_7?, UserField_8?, UserField_9?, UserField_10?, UserField_11?, UserField_12?, UserField_13?, UserField_14?, UserField_15?, UserField_16?) + /// + /// + public virtual UserField_13 UserField_13 { + get { + XElement x = this.GetElement(UserField_13XName); + if ((x == null)) { + return null; + } + return ((UserField_13)(x)); + } + set { + this.SetElement(UserField_13XName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName UserField_14XName = System.Xml.Linq.XName.Get("UserField_14", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (UserField_1?, UserField_2?, UserField_3?, UserField_4?, UserField_5?, UserField_6?, UserField_7?, UserField_8?, UserField_9?, UserField_10?, UserField_11?, UserField_12?, UserField_13?, UserField_14?, UserField_15?, UserField_16?) + /// + /// + public virtual UserField_14 UserField_14 { + get { + XElement x = this.GetElement(UserField_14XName); + if ((x == null)) { + return null; + } + return ((UserField_14)(x)); + } + set { + this.SetElement(UserField_14XName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName UserField_15XName = System.Xml.Linq.XName.Get("UserField_15", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (UserField_1?, UserField_2?, UserField_3?, UserField_4?, UserField_5?, UserField_6?, UserField_7?, UserField_8?, UserField_9?, UserField_10?, UserField_11?, UserField_12?, UserField_13?, UserField_14?, UserField_15?, UserField_16?) + /// + /// + public virtual UserField_15 UserField_15 { + get { + XElement x = this.GetElement(UserField_15XName); + if ((x == null)) { + return null; + } + return ((UserField_15)(x)); + } + set { + this.SetElement(UserField_15XName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName UserField_16XName = System.Xml.Linq.XName.Get("UserField_16", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (UserField_1?, UserField_2?, UserField_3?, UserField_4?, UserField_5?, UserField_6?, UserField_7?, UserField_8?, UserField_9?, UserField_10?, UserField_11?, UserField_12?, UserField_13?, UserField_14?, UserField_15?, UserField_16?) + /// + /// + public virtual UserField_16 UserField_16 { + get { + XElement x = this.GetElement(UserField_16XName); + if ((x == null)) { + return null; + } + return ((UserField_16)(x)); + } + set { + this.SetElement(UserField_16XName, value); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("UserFields", "urn:Microsoft.Expression.Media.Catalog"); + + static UserFields() { + BuildElementDictionary(); + contentModel = new SequenceContentModelEntity(new NamedContentModelEntity(UserField_1XName), new NamedContentModelEntity(UserField_2XName), new NamedContentModelEntity(UserField_3XName), new NamedContentModelEntity(UserField_4XName), new NamedContentModelEntity(UserField_5XName), new NamedContentModelEntity(UserField_6XName), new NamedContentModelEntity(UserField_7XName), new NamedContentModelEntity(UserField_8XName), new NamedContentModelEntity(UserField_9XName), new NamedContentModelEntity(UserField_10XName), new NamedContentModelEntity(UserField_11XName), new NamedContentModelEntity(UserField_12XName), new NamedContentModelEntity(UserField_13XName), new NamedContentModelEntity(UserField_14XName), new NamedContentModelEntity(UserField_15XName), new NamedContentModelEntity(UserField_16XName)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static Dictionary localElementDictionary = new Dictionary(); + + private static void BuildElementDictionary() { + localElementDictionary.Add(UserField_1XName, typeof(UserField_1)); + localElementDictionary.Add(UserField_2XName, typeof(UserField_2)); + localElementDictionary.Add(UserField_3XName, typeof(UserField_3)); + localElementDictionary.Add(UserField_4XName, typeof(UserField_4)); + localElementDictionary.Add(UserField_5XName, typeof(UserField_5)); + localElementDictionary.Add(UserField_6XName, typeof(UserField_6)); + localElementDictionary.Add(UserField_7XName, typeof(UserField_7)); + localElementDictionary.Add(UserField_8XName, typeof(UserField_8)); + localElementDictionary.Add(UserField_9XName, typeof(UserField_9)); + localElementDictionary.Add(UserField_10XName, typeof(UserField_10)); + localElementDictionary.Add(UserField_11XName, typeof(UserField_11)); + localElementDictionary.Add(UserField_12XName, typeof(UserField_12)); + localElementDictionary.Add(UserField_13XName, typeof(UserField_13)); + localElementDictionary.Add(UserField_14XName, typeof(UserField_14)); + localElementDictionary.Add(UserField_15XName, typeof(UserField_15)); + localElementDictionary.Add(UserField_16XName, typeof(UserField_16)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + Dictionary IXMetaData.LocalElementsDictionary { + get { + return localElementDictionary; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static ContentModelEntity contentModel; + + ContentModelEntity IXMetaData.GetContentModel() { + return contentModel; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + /// + /// + /// Regular expression: (Maker?, Model?, Software?, Format?, SourceURL?, ExifVersion?, CaptureDate?, ExposureProgram?, ISOSpeedRating?, ExposureBias?, ExposureTime?, Aperture?, SubjectDistance?, MeteringMode?, LightSource?, Flash?, FocalLength?, SensingMethod?, NoiseReduction?, Contrast?, Sharpness?, Saturation?, FocusMode?, DigitalZoom?, Lens?, Latitude?, Longitude?, Altitude?) + /// + /// + public partial class MetaDataFields : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static MetaDataFields Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static MetaDataFields Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static MetaDataFields Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator MetaDataFields(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + /// + /// + /// Regular expression: (Maker?, Model?, Software?, Format?, SourceURL?, ExifVersion?, CaptureDate?, ExposureProgram?, ISOSpeedRating?, ExposureBias?, ExposureTime?, Aperture?, SubjectDistance?, MeteringMode?, LightSource?, Flash?, FocalLength?, SensingMethod?, NoiseReduction?, Contrast?, Sharpness?, Saturation?, FocusMode?, DigitalZoom?, Lens?, Latitude?, Longitude?, Altitude?) + /// + /// + public MetaDataFields() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName MakerXName = System.Xml.Linq.XName.Get("Maker", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Maker?, Model?, Software?, Format?, SourceURL?, ExifVersion?, CaptureDate?, ExposureProgram?, ISOSpeedRating?, ExposureBias?, ExposureTime?, Aperture?, SubjectDistance?, MeteringMode?, LightSource?, Flash?, FocalLength?, SensingMethod?, NoiseReduction?, Contrast?, Sharpness?, Saturation?, FocusMode?, DigitalZoom?, Lens?, Latitude?, Longitude?, Altitude?) + /// + /// + public virtual Maker Maker { + get { + XElement x = this.GetElement(MakerXName); + if ((x == null)) { + return null; + } + return ((Maker)(x)); + } + set { + this.SetElement(MakerXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName ModelXName = System.Xml.Linq.XName.Get("Model", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Maker?, Model?, Software?, Format?, SourceURL?, ExifVersion?, CaptureDate?, ExposureProgram?, ISOSpeedRating?, ExposureBias?, ExposureTime?, Aperture?, SubjectDistance?, MeteringMode?, LightSource?, Flash?, FocalLength?, SensingMethod?, NoiseReduction?, Contrast?, Sharpness?, Saturation?, FocusMode?, DigitalZoom?, Lens?, Latitude?, Longitude?, Altitude?) + /// + /// + public virtual Model Model { + get { + XElement x = this.GetElement(ModelXName); + if ((x == null)) { + return null; + } + return ((Model)(x)); + } + set { + this.SetElement(ModelXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName SoftwareXName = System.Xml.Linq.XName.Get("Software", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Maker?, Model?, Software?, Format?, SourceURL?, ExifVersion?, CaptureDate?, ExposureProgram?, ISOSpeedRating?, ExposureBias?, ExposureTime?, Aperture?, SubjectDistance?, MeteringMode?, LightSource?, Flash?, FocalLength?, SensingMethod?, NoiseReduction?, Contrast?, Sharpness?, Saturation?, FocusMode?, DigitalZoom?, Lens?, Latitude?, Longitude?, Altitude?) + /// + /// + public virtual Software Software { + get { + XElement x = this.GetElement(SoftwareXName); + if ((x == null)) { + return null; + } + return ((Software)(x)); + } + set { + this.SetElement(SoftwareXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName FormatXName = System.Xml.Linq.XName.Get("Format", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Maker?, Model?, Software?, Format?, SourceURL?, ExifVersion?, CaptureDate?, ExposureProgram?, ISOSpeedRating?, ExposureBias?, ExposureTime?, Aperture?, SubjectDistance?, MeteringMode?, LightSource?, Flash?, FocalLength?, SensingMethod?, NoiseReduction?, Contrast?, Sharpness?, Saturation?, FocusMode?, DigitalZoom?, Lens?, Latitude?, Longitude?, Altitude?) + /// + /// + public virtual Format Format { + get { + XElement x = this.GetElement(FormatXName); + if ((x == null)) { + return null; + } + return ((Format)(x)); + } + set { + this.SetElement(FormatXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName SourceURLXName = System.Xml.Linq.XName.Get("SourceURL", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Maker?, Model?, Software?, Format?, SourceURL?, ExifVersion?, CaptureDate?, ExposureProgram?, ISOSpeedRating?, ExposureBias?, ExposureTime?, Aperture?, SubjectDistance?, MeteringMode?, LightSource?, Flash?, FocalLength?, SensingMethod?, NoiseReduction?, Contrast?, Sharpness?, Saturation?, FocusMode?, DigitalZoom?, Lens?, Latitude?, Longitude?, Altitude?) + /// + /// + public virtual SourceURL SourceURL { + get { + XElement x = this.GetElement(SourceURLXName); + if ((x == null)) { + return null; + } + return ((SourceURL)(x)); + } + set { + this.SetElement(SourceURLXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName ExifVersionXName = System.Xml.Linq.XName.Get("ExifVersion", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Maker?, Model?, Software?, Format?, SourceURL?, ExifVersion?, CaptureDate?, ExposureProgram?, ISOSpeedRating?, ExposureBias?, ExposureTime?, Aperture?, SubjectDistance?, MeteringMode?, LightSource?, Flash?, FocalLength?, SensingMethod?, NoiseReduction?, Contrast?, Sharpness?, Saturation?, FocusMode?, DigitalZoom?, Lens?, Latitude?, Longitude?, Altitude?) + /// + /// + public virtual ExifVersion ExifVersion { + get { + XElement x = this.GetElement(ExifVersionXName); + if ((x == null)) { + return null; + } + return ((ExifVersion)(x)); + } + set { + this.SetElement(ExifVersionXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName CaptureDateXName = System.Xml.Linq.XName.Get("CaptureDate", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Maker?, Model?, Software?, Format?, SourceURL?, ExifVersion?, CaptureDate?, ExposureProgram?, ISOSpeedRating?, ExposureBias?, ExposureTime?, Aperture?, SubjectDistance?, MeteringMode?, LightSource?, Flash?, FocalLength?, SensingMethod?, NoiseReduction?, Contrast?, Sharpness?, Saturation?, FocusMode?, DigitalZoom?, Lens?, Latitude?, Longitude?, Altitude?) + /// + /// + public virtual CaptureDate CaptureDate { + get { + XElement x = this.GetElement(CaptureDateXName); + if ((x == null)) { + return null; + } + return ((CaptureDate)(x)); + } + set { + this.SetElement(CaptureDateXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName ExposureProgramXName = System.Xml.Linq.XName.Get("ExposureProgram", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Maker?, Model?, Software?, Format?, SourceURL?, ExifVersion?, CaptureDate?, ExposureProgram?, ISOSpeedRating?, ExposureBias?, ExposureTime?, Aperture?, SubjectDistance?, MeteringMode?, LightSource?, Flash?, FocalLength?, SensingMethod?, NoiseReduction?, Contrast?, Sharpness?, Saturation?, FocusMode?, DigitalZoom?, Lens?, Latitude?, Longitude?, Altitude?) + /// + /// + public virtual ExposureProgram ExposureProgram { + get { + XElement x = this.GetElement(ExposureProgramXName); + if ((x == null)) { + return null; + } + return ((ExposureProgram)(x)); + } + set { + this.SetElement(ExposureProgramXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName ISOSpeedRatingXName = System.Xml.Linq.XName.Get("ISOSpeedRating", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Maker?, Model?, Software?, Format?, SourceURL?, ExifVersion?, CaptureDate?, ExposureProgram?, ISOSpeedRating?, ExposureBias?, ExposureTime?, Aperture?, SubjectDistance?, MeteringMode?, LightSource?, Flash?, FocalLength?, SensingMethod?, NoiseReduction?, Contrast?, Sharpness?, Saturation?, FocusMode?, DigitalZoom?, Lens?, Latitude?, Longitude?, Altitude?) + /// + /// + public virtual ISOSpeedRating ISOSpeedRating { + get { + XElement x = this.GetElement(ISOSpeedRatingXName); + if ((x == null)) { + return null; + } + return ((ISOSpeedRating)(x)); + } + set { + this.SetElement(ISOSpeedRatingXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName ExposureBiasXName = System.Xml.Linq.XName.Get("ExposureBias", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Maker?, Model?, Software?, Format?, SourceURL?, ExifVersion?, CaptureDate?, ExposureProgram?, ISOSpeedRating?, ExposureBias?, ExposureTime?, Aperture?, SubjectDistance?, MeteringMode?, LightSource?, Flash?, FocalLength?, SensingMethod?, NoiseReduction?, Contrast?, Sharpness?, Saturation?, FocusMode?, DigitalZoom?, Lens?, Latitude?, Longitude?, Altitude?) + /// + /// + public virtual ExposureBias ExposureBias { + get { + XElement x = this.GetElement(ExposureBiasXName); + if ((x == null)) { + return null; + } + return ((ExposureBias)(x)); + } + set { + this.SetElement(ExposureBiasXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName ExposureTimeXName = System.Xml.Linq.XName.Get("ExposureTime", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Maker?, Model?, Software?, Format?, SourceURL?, ExifVersion?, CaptureDate?, ExposureProgram?, ISOSpeedRating?, ExposureBias?, ExposureTime?, Aperture?, SubjectDistance?, MeteringMode?, LightSource?, Flash?, FocalLength?, SensingMethod?, NoiseReduction?, Contrast?, Sharpness?, Saturation?, FocusMode?, DigitalZoom?, Lens?, Latitude?, Longitude?, Altitude?) + /// + /// + public virtual ExposureTime ExposureTime { + get { + XElement x = this.GetElement(ExposureTimeXName); + if ((x == null)) { + return null; + } + return ((ExposureTime)(x)); + } + set { + this.SetElement(ExposureTimeXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName ApertureXName = System.Xml.Linq.XName.Get("Aperture", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Maker?, Model?, Software?, Format?, SourceURL?, ExifVersion?, CaptureDate?, ExposureProgram?, ISOSpeedRating?, ExposureBias?, ExposureTime?, Aperture?, SubjectDistance?, MeteringMode?, LightSource?, Flash?, FocalLength?, SensingMethod?, NoiseReduction?, Contrast?, Sharpness?, Saturation?, FocusMode?, DigitalZoom?, Lens?, Latitude?, Longitude?, Altitude?) + /// + /// + public virtual Aperture Aperture { + get { + XElement x = this.GetElement(ApertureXName); + if ((x == null)) { + return null; + } + return ((Aperture)(x)); + } + set { + this.SetElement(ApertureXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName SubjectDistanceXName = System.Xml.Linq.XName.Get("SubjectDistance", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Maker?, Model?, Software?, Format?, SourceURL?, ExifVersion?, CaptureDate?, ExposureProgram?, ISOSpeedRating?, ExposureBias?, ExposureTime?, Aperture?, SubjectDistance?, MeteringMode?, LightSource?, Flash?, FocalLength?, SensingMethod?, NoiseReduction?, Contrast?, Sharpness?, Saturation?, FocusMode?, DigitalZoom?, Lens?, Latitude?, Longitude?, Altitude?) + /// + /// + public virtual SubjectDistance SubjectDistance { + get { + XElement x = this.GetElement(SubjectDistanceXName); + if ((x == null)) { + return null; + } + return ((SubjectDistance)(x)); + } + set { + this.SetElement(SubjectDistanceXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName MeteringModeXName = System.Xml.Linq.XName.Get("MeteringMode", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Maker?, Model?, Software?, Format?, SourceURL?, ExifVersion?, CaptureDate?, ExposureProgram?, ISOSpeedRating?, ExposureBias?, ExposureTime?, Aperture?, SubjectDistance?, MeteringMode?, LightSource?, Flash?, FocalLength?, SensingMethod?, NoiseReduction?, Contrast?, Sharpness?, Saturation?, FocusMode?, DigitalZoom?, Lens?, Latitude?, Longitude?, Altitude?) + /// + /// + public virtual MeteringMode MeteringMode { + get { + XElement x = this.GetElement(MeteringModeXName); + if ((x == null)) { + return null; + } + return ((MeteringMode)(x)); + } + set { + this.SetElement(MeteringModeXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName LightSourceXName = System.Xml.Linq.XName.Get("LightSource", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Maker?, Model?, Software?, Format?, SourceURL?, ExifVersion?, CaptureDate?, ExposureProgram?, ISOSpeedRating?, ExposureBias?, ExposureTime?, Aperture?, SubjectDistance?, MeteringMode?, LightSource?, Flash?, FocalLength?, SensingMethod?, NoiseReduction?, Contrast?, Sharpness?, Saturation?, FocusMode?, DigitalZoom?, Lens?, Latitude?, Longitude?, Altitude?) + /// + /// + public virtual LightSource LightSource { + get { + XElement x = this.GetElement(LightSourceXName); + if ((x == null)) { + return null; + } + return ((LightSource)(x)); + } + set { + this.SetElement(LightSourceXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName FlashXName = System.Xml.Linq.XName.Get("Flash", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Maker?, Model?, Software?, Format?, SourceURL?, ExifVersion?, CaptureDate?, ExposureProgram?, ISOSpeedRating?, ExposureBias?, ExposureTime?, Aperture?, SubjectDistance?, MeteringMode?, LightSource?, Flash?, FocalLength?, SensingMethod?, NoiseReduction?, Contrast?, Sharpness?, Saturation?, FocusMode?, DigitalZoom?, Lens?, Latitude?, Longitude?, Altitude?) + /// + /// + public virtual Flash Flash { + get { + XElement x = this.GetElement(FlashXName); + if ((x == null)) { + return null; + } + return ((Flash)(x)); + } + set { + this.SetElement(FlashXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName FocalLengthXName = System.Xml.Linq.XName.Get("FocalLength", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Maker?, Model?, Software?, Format?, SourceURL?, ExifVersion?, CaptureDate?, ExposureProgram?, ISOSpeedRating?, ExposureBias?, ExposureTime?, Aperture?, SubjectDistance?, MeteringMode?, LightSource?, Flash?, FocalLength?, SensingMethod?, NoiseReduction?, Contrast?, Sharpness?, Saturation?, FocusMode?, DigitalZoom?, Lens?, Latitude?, Longitude?, Altitude?) + /// + /// + public virtual FocalLength FocalLength { + get { + XElement x = this.GetElement(FocalLengthXName); + if ((x == null)) { + return null; + } + return ((FocalLength)(x)); + } + set { + this.SetElement(FocalLengthXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName SensingMethodXName = System.Xml.Linq.XName.Get("SensingMethod", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Maker?, Model?, Software?, Format?, SourceURL?, ExifVersion?, CaptureDate?, ExposureProgram?, ISOSpeedRating?, ExposureBias?, ExposureTime?, Aperture?, SubjectDistance?, MeteringMode?, LightSource?, Flash?, FocalLength?, SensingMethod?, NoiseReduction?, Contrast?, Sharpness?, Saturation?, FocusMode?, DigitalZoom?, Lens?, Latitude?, Longitude?, Altitude?) + /// + /// + public virtual SensingMethod SensingMethod { + get { + XElement x = this.GetElement(SensingMethodXName); + if ((x == null)) { + return null; + } + return ((SensingMethod)(x)); + } + set { + this.SetElement(SensingMethodXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName NoiseReductionXName = System.Xml.Linq.XName.Get("NoiseReduction", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Maker?, Model?, Software?, Format?, SourceURL?, ExifVersion?, CaptureDate?, ExposureProgram?, ISOSpeedRating?, ExposureBias?, ExposureTime?, Aperture?, SubjectDistance?, MeteringMode?, LightSource?, Flash?, FocalLength?, SensingMethod?, NoiseReduction?, Contrast?, Sharpness?, Saturation?, FocusMode?, DigitalZoom?, Lens?, Latitude?, Longitude?, Altitude?) + /// + /// + public virtual NoiseReduction NoiseReduction { + get { + XElement x = this.GetElement(NoiseReductionXName); + if ((x == null)) { + return null; + } + return ((NoiseReduction)(x)); + } + set { + this.SetElement(NoiseReductionXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName ContrastXName = System.Xml.Linq.XName.Get("Contrast", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Maker?, Model?, Software?, Format?, SourceURL?, ExifVersion?, CaptureDate?, ExposureProgram?, ISOSpeedRating?, ExposureBias?, ExposureTime?, Aperture?, SubjectDistance?, MeteringMode?, LightSource?, Flash?, FocalLength?, SensingMethod?, NoiseReduction?, Contrast?, Sharpness?, Saturation?, FocusMode?, DigitalZoom?, Lens?, Latitude?, Longitude?, Altitude?) + /// + /// + public virtual Contrast Contrast { + get { + XElement x = this.GetElement(ContrastXName); + if ((x == null)) { + return null; + } + return ((Contrast)(x)); + } + set { + this.SetElement(ContrastXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName SharpnessXName = System.Xml.Linq.XName.Get("Sharpness", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Maker?, Model?, Software?, Format?, SourceURL?, ExifVersion?, CaptureDate?, ExposureProgram?, ISOSpeedRating?, ExposureBias?, ExposureTime?, Aperture?, SubjectDistance?, MeteringMode?, LightSource?, Flash?, FocalLength?, SensingMethod?, NoiseReduction?, Contrast?, Sharpness?, Saturation?, FocusMode?, DigitalZoom?, Lens?, Latitude?, Longitude?, Altitude?) + /// + /// + public virtual Sharpness Sharpness { + get { + XElement x = this.GetElement(SharpnessXName); + if ((x == null)) { + return null; + } + return ((Sharpness)(x)); + } + set { + this.SetElement(SharpnessXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName SaturationXName = System.Xml.Linq.XName.Get("Saturation", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Maker?, Model?, Software?, Format?, SourceURL?, ExifVersion?, CaptureDate?, ExposureProgram?, ISOSpeedRating?, ExposureBias?, ExposureTime?, Aperture?, SubjectDistance?, MeteringMode?, LightSource?, Flash?, FocalLength?, SensingMethod?, NoiseReduction?, Contrast?, Sharpness?, Saturation?, FocusMode?, DigitalZoom?, Lens?, Latitude?, Longitude?, Altitude?) + /// + /// + public virtual Saturation Saturation { + get { + XElement x = this.GetElement(SaturationXName); + if ((x == null)) { + return null; + } + return ((Saturation)(x)); + } + set { + this.SetElement(SaturationXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName FocusModeXName = System.Xml.Linq.XName.Get("FocusMode", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Maker?, Model?, Software?, Format?, SourceURL?, ExifVersion?, CaptureDate?, ExposureProgram?, ISOSpeedRating?, ExposureBias?, ExposureTime?, Aperture?, SubjectDistance?, MeteringMode?, LightSource?, Flash?, FocalLength?, SensingMethod?, NoiseReduction?, Contrast?, Sharpness?, Saturation?, FocusMode?, DigitalZoom?, Lens?, Latitude?, Longitude?, Altitude?) + /// + /// + public virtual FocusMode FocusMode { + get { + XElement x = this.GetElement(FocusModeXName); + if ((x == null)) { + return null; + } + return ((FocusMode)(x)); + } + set { + this.SetElement(FocusModeXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName DigitalZoomXName = System.Xml.Linq.XName.Get("DigitalZoom", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Maker?, Model?, Software?, Format?, SourceURL?, ExifVersion?, CaptureDate?, ExposureProgram?, ISOSpeedRating?, ExposureBias?, ExposureTime?, Aperture?, SubjectDistance?, MeteringMode?, LightSource?, Flash?, FocalLength?, SensingMethod?, NoiseReduction?, Contrast?, Sharpness?, Saturation?, FocusMode?, DigitalZoom?, Lens?, Latitude?, Longitude?, Altitude?) + /// + /// + public virtual DigitalZoom DigitalZoom { + get { + XElement x = this.GetElement(DigitalZoomXName); + if ((x == null)) { + return null; + } + return ((DigitalZoom)(x)); + } + set { + this.SetElement(DigitalZoomXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName LensXName = System.Xml.Linq.XName.Get("Lens", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Maker?, Model?, Software?, Format?, SourceURL?, ExifVersion?, CaptureDate?, ExposureProgram?, ISOSpeedRating?, ExposureBias?, ExposureTime?, Aperture?, SubjectDistance?, MeteringMode?, LightSource?, Flash?, FocalLength?, SensingMethod?, NoiseReduction?, Contrast?, Sharpness?, Saturation?, FocusMode?, DigitalZoom?, Lens?, Latitude?, Longitude?, Altitude?) + /// + /// + public virtual Lens Lens { + get { + XElement x = this.GetElement(LensXName); + if ((x == null)) { + return null; + } + return ((Lens)(x)); + } + set { + this.SetElement(LensXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName LatitudeXName = System.Xml.Linq.XName.Get("Latitude", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Maker?, Model?, Software?, Format?, SourceURL?, ExifVersion?, CaptureDate?, ExposureProgram?, ISOSpeedRating?, ExposureBias?, ExposureTime?, Aperture?, SubjectDistance?, MeteringMode?, LightSource?, Flash?, FocalLength?, SensingMethod?, NoiseReduction?, Contrast?, Sharpness?, Saturation?, FocusMode?, DigitalZoom?, Lens?, Latitude?, Longitude?, Altitude?) + /// + /// + public virtual Latitude Latitude { + get { + XElement x = this.GetElement(LatitudeXName); + if ((x == null)) { + return null; + } + return ((Latitude)(x)); + } + set { + this.SetElement(LatitudeXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName LongitudeXName = System.Xml.Linq.XName.Get("Longitude", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Maker?, Model?, Software?, Format?, SourceURL?, ExifVersion?, CaptureDate?, ExposureProgram?, ISOSpeedRating?, ExposureBias?, ExposureTime?, Aperture?, SubjectDistance?, MeteringMode?, LightSource?, Flash?, FocalLength?, SensingMethod?, NoiseReduction?, Contrast?, Sharpness?, Saturation?, FocusMode?, DigitalZoom?, Lens?, Latitude?, Longitude?, Altitude?) + /// + /// + public virtual Longitude Longitude { + get { + XElement x = this.GetElement(LongitudeXName); + if ((x == null)) { + return null; + } + return ((Longitude)(x)); + } + set { + this.SetElement(LongitudeXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName AltitudeXName = System.Xml.Linq.XName.Get("Altitude", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (Maker?, Model?, Software?, Format?, SourceURL?, ExifVersion?, CaptureDate?, ExposureProgram?, ISOSpeedRating?, ExposureBias?, ExposureTime?, Aperture?, SubjectDistance?, MeteringMode?, LightSource?, Flash?, FocalLength?, SensingMethod?, NoiseReduction?, Contrast?, Sharpness?, Saturation?, FocusMode?, DigitalZoom?, Lens?, Latitude?, Longitude?, Altitude?) + /// + /// + public virtual Altitude Altitude { + get { + XElement x = this.GetElement(AltitudeXName); + if ((x == null)) { + return null; + } + return ((Altitude)(x)); + } + set { + this.SetElement(AltitudeXName, value); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("MetaDataFields", "urn:Microsoft.Expression.Media.Catalog"); + + static MetaDataFields() { + BuildElementDictionary(); + contentModel = new SequenceContentModelEntity(new NamedContentModelEntity(MakerXName), new NamedContentModelEntity(ModelXName), new NamedContentModelEntity(SoftwareXName), new NamedContentModelEntity(FormatXName), new NamedContentModelEntity(SourceURLXName), new NamedContentModelEntity(ExifVersionXName), new NamedContentModelEntity(CaptureDateXName), new NamedContentModelEntity(ExposureProgramXName), new NamedContentModelEntity(ISOSpeedRatingXName), new NamedContentModelEntity(ExposureBiasXName), new NamedContentModelEntity(ExposureTimeXName), new NamedContentModelEntity(ApertureXName), new NamedContentModelEntity(SubjectDistanceXName), new NamedContentModelEntity(MeteringModeXName), new NamedContentModelEntity(LightSourceXName), new NamedContentModelEntity(FlashXName), new NamedContentModelEntity(FocalLengthXName), new NamedContentModelEntity(SensingMethodXName), new NamedContentModelEntity(NoiseReductionXName), new NamedContentModelEntity(ContrastXName), new NamedContentModelEntity(SharpnessXName), new NamedContentModelEntity(SaturationXName), new NamedContentModelEntity(FocusModeXName), new NamedContentModelEntity(DigitalZoomXName), new NamedContentModelEntity(LensXName), new NamedContentModelEntity(LatitudeXName), new NamedContentModelEntity(LongitudeXName), new NamedContentModelEntity(AltitudeXName)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static Dictionary localElementDictionary = new Dictionary(); + + private static void BuildElementDictionary() { + localElementDictionary.Add(MakerXName, typeof(Maker)); + localElementDictionary.Add(ModelXName, typeof(Model)); + localElementDictionary.Add(SoftwareXName, typeof(Software)); + localElementDictionary.Add(FormatXName, typeof(Format)); + localElementDictionary.Add(SourceURLXName, typeof(SourceURL)); + localElementDictionary.Add(ExifVersionXName, typeof(ExifVersion)); + localElementDictionary.Add(CaptureDateXName, typeof(CaptureDate)); + localElementDictionary.Add(ExposureProgramXName, typeof(ExposureProgram)); + localElementDictionary.Add(ISOSpeedRatingXName, typeof(ISOSpeedRating)); + localElementDictionary.Add(ExposureBiasXName, typeof(ExposureBias)); + localElementDictionary.Add(ExposureTimeXName, typeof(ExposureTime)); + localElementDictionary.Add(ApertureXName, typeof(Aperture)); + localElementDictionary.Add(SubjectDistanceXName, typeof(SubjectDistance)); + localElementDictionary.Add(MeteringModeXName, typeof(MeteringMode)); + localElementDictionary.Add(LightSourceXName, typeof(LightSource)); + localElementDictionary.Add(FlashXName, typeof(Flash)); + localElementDictionary.Add(FocalLengthXName, typeof(FocalLength)); + localElementDictionary.Add(SensingMethodXName, typeof(SensingMethod)); + localElementDictionary.Add(NoiseReductionXName, typeof(NoiseReduction)); + localElementDictionary.Add(ContrastXName, typeof(Contrast)); + localElementDictionary.Add(SharpnessXName, typeof(Sharpness)); + localElementDictionary.Add(SaturationXName, typeof(Saturation)); + localElementDictionary.Add(FocusModeXName, typeof(FocusMode)); + localElementDictionary.Add(DigitalZoomXName, typeof(DigitalZoom)); + localElementDictionary.Add(LensXName, typeof(Lens)); + localElementDictionary.Add(LatitudeXName, typeof(Latitude)); + localElementDictionary.Add(LongitudeXName, typeof(Longitude)); + localElementDictionary.Add(AltitudeXName, typeof(Altitude)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + Dictionary IXMetaData.LocalElementsDictionary { + get { + return localElementDictionary; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static ContentModelEntity contentModel; + + ContentModelEntity IXMetaData.GetContentModel() { + return contentModel; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + public partial class ExposureProgram : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static ExposureProgram Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static ExposureProgram Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static ExposureProgram Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator ExposureProgram(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + public ExposureProgram() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName strIDXName = System.Xml.Linq.XName.Get("strID", ""); + + /// + /// + /// Occurrence: required + /// + /// + public virtual string strID { + get { + XAttribute x = this.Attribute(strIDXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + set { + this.SetAttribute(strIDXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("ExposureProgram", "urn:Microsoft.Expression.Media.Catalog"); + + ContentModelEntity IXMetaData.GetContentModel() { + return ContentModelEntity.Default; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + public partial class MeteringMode : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static MeteringMode Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static MeteringMode Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static MeteringMode Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator MeteringMode(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + public MeteringMode() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName strIDXName = System.Xml.Linq.XName.Get("strID", ""); + + /// + /// + /// Occurrence: required + /// + /// + public virtual string strID { + get { + XAttribute x = this.Attribute(strIDXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + set { + this.SetAttribute(strIDXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("MeteringMode", "urn:Microsoft.Expression.Media.Catalog"); + + ContentModelEntity IXMetaData.GetContentModel() { + return ContentModelEntity.Default; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + public partial class LightSource : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static LightSource Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static LightSource Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static LightSource Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator LightSource(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + public LightSource() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName strIDXName = System.Xml.Linq.XName.Get("strID", ""); + + /// + /// + /// Occurrence: required + /// + /// + public virtual string strID { + get { + XAttribute x = this.Attribute(strIDXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + set { + this.SetAttribute(strIDXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("LightSource", "urn:Microsoft.Expression.Media.Catalog"); + + ContentModelEntity IXMetaData.GetContentModel() { + return ContentModelEntity.Default; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + public partial class Flash : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static Flash Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static Flash Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static Flash Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator Flash(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + public Flash() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName flash1XName = System.Xml.Linq.XName.Get("flash", ""); + + /// + /// + /// Occurrence: required + /// + /// + public virtual string flash1 { + get { + XAttribute x = this.Attribute(flash1XName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + set { + this.SetAttribute(flash1XName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("Flash", "urn:Microsoft.Expression.Media.Catalog"); + + ContentModelEntity IXMetaData.GetContentModel() { + return ContentModelEntity.Default; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + public partial class SensingMethod : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static SensingMethod Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static SensingMethod Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static SensingMethod Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator SensingMethod(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + public SensingMethod() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName strIDXName = System.Xml.Linq.XName.Get("strID", ""); + + /// + /// + /// Occurrence: required + /// + /// + public virtual string strID { + get { + XAttribute x = this.Attribute(strIDXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + set { + this.SetAttribute(strIDXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("SensingMethod", "urn:Microsoft.Expression.Media.Catalog"); + + ContentModelEntity IXMetaData.GetContentModel() { + return ContentModelEntity.Default; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + public partial class NoiseReduction : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static NoiseReduction Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static NoiseReduction Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static NoiseReduction Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator NoiseReduction(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + public NoiseReduction() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName strIDXName = System.Xml.Linq.XName.Get("strID", ""); + + /// + /// + /// Occurrence: required + /// + /// + public virtual string strID { + get { + XAttribute x = this.Attribute(strIDXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + set { + this.SetAttribute(strIDXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("NoiseReduction", "urn:Microsoft.Expression.Media.Catalog"); + + ContentModelEntity IXMetaData.GetContentModel() { + return ContentModelEntity.Default; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + public partial class Contrast : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static Contrast Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static Contrast Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static Contrast Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator Contrast(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + public Contrast() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName strIDXName = System.Xml.Linq.XName.Get("strID", ""); + + /// + /// + /// Occurrence: required + /// + /// + public virtual string strID { + get { + XAttribute x = this.Attribute(strIDXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + set { + this.SetAttribute(strIDXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("Contrast", "urn:Microsoft.Expression.Media.Catalog"); + + ContentModelEntity IXMetaData.GetContentModel() { + return ContentModelEntity.Default; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + public partial class Sharpness : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static Sharpness Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static Sharpness Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static Sharpness Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator Sharpness(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + public Sharpness() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName strIDXName = System.Xml.Linq.XName.Get("strID", ""); + + /// + /// + /// Occurrence: required + /// + /// + public virtual string strID { + get { + XAttribute x = this.Attribute(strIDXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + set { + this.SetAttribute(strIDXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("Sharpness", "urn:Microsoft.Expression.Media.Catalog"); + + ContentModelEntity IXMetaData.GetContentModel() { + return ContentModelEntity.Default; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + public partial class Saturation : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static Saturation Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static Saturation Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static Saturation Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator Saturation(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + public Saturation() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName strIDXName = System.Xml.Linq.XName.Get("strID", ""); + + /// + /// + /// Occurrence: required + /// + /// + public virtual string strID { + get { + XAttribute x = this.Attribute(strIDXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + set { + this.SetAttribute(strIDXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("Saturation", "urn:Microsoft.Expression.Media.Catalog"); + + ContentModelEntity IXMetaData.GetContentModel() { + return ContentModelEntity.Default; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + public partial class FocusMode : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static FocusMode Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static FocusMode Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static FocusMode Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator FocusMode(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + public FocusMode() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName strIDXName = System.Xml.Linq.XName.Get("strID", ""); + + /// + /// + /// Occurrence: required + /// + /// + public virtual string strID { + get { + XAttribute x = this.Attribute(strIDXName); + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + set { + this.SetAttribute(strIDXName, value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.AnyAtomicType).Datatype); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("FocusMode", "urn:Microsoft.Expression.Media.Catalog"); + + ContentModelEntity IXMetaData.GetContentModel() { + return ContentModelEntity.Default; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + /// + /// + /// Regular expression: (TrackName?, TrackEncoding?, StartTime?, TrackDuration?, DataSize?, DataRate?, FPMS?, TrackType?, Chapter?) + /// + /// + public partial class MovieTrack : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static MovieTrack Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static MovieTrack Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static MovieTrack Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator MovieTrack(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + /// + /// + /// Regular expression: (TrackName?, TrackEncoding?, StartTime?, TrackDuration?, DataSize?, DataRate?, FPMS?, TrackType?, Chapter?) + /// + /// + public MovieTrack() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName TrackNameXName = System.Xml.Linq.XName.Get("TrackName", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (TrackName?, TrackEncoding?, StartTime?, TrackDuration?, DataSize?, DataRate?, FPMS?, TrackType?, Chapter?) + /// + /// + public virtual TrackName TrackName { + get { + XElement x = this.GetElement(TrackNameXName); + if ((x == null)) { + return null; + } + return ((TrackName)(x)); + } + set { + this.SetElement(TrackNameXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName TrackEncodingXName = System.Xml.Linq.XName.Get("TrackEncoding", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (TrackName?, TrackEncoding?, StartTime?, TrackDuration?, DataSize?, DataRate?, FPMS?, TrackType?, Chapter?) + /// + /// + public virtual TrackEncoding TrackEncoding { + get { + XElement x = this.GetElement(TrackEncodingXName); + if ((x == null)) { + return null; + } + return ((TrackEncoding)(x)); + } + set { + this.SetElement(TrackEncodingXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName StartTimeXName = System.Xml.Linq.XName.Get("StartTime", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (TrackName?, TrackEncoding?, StartTime?, TrackDuration?, DataSize?, DataRate?, FPMS?, TrackType?, Chapter?) + /// + /// + public virtual StartTime StartTime { + get { + XElement x = this.GetElement(StartTimeXName); + if ((x == null)) { + return null; + } + return ((StartTime)(x)); + } + set { + this.SetElement(StartTimeXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName TrackDurationXName = System.Xml.Linq.XName.Get("TrackDuration", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (TrackName?, TrackEncoding?, StartTime?, TrackDuration?, DataSize?, DataRate?, FPMS?, TrackType?, Chapter?) + /// + /// + public virtual TrackDuration TrackDuration { + get { + XElement x = this.GetElement(TrackDurationXName); + if ((x == null)) { + return null; + } + return ((TrackDuration)(x)); + } + set { + this.SetElement(TrackDurationXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName DataSizeXName = System.Xml.Linq.XName.Get("DataSize", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (TrackName?, TrackEncoding?, StartTime?, TrackDuration?, DataSize?, DataRate?, FPMS?, TrackType?, Chapter?) + /// + /// + public virtual DataSize DataSize { + get { + XElement x = this.GetElement(DataSizeXName); + if ((x == null)) { + return null; + } + return ((DataSize)(x)); + } + set { + this.SetElement(DataSizeXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName DataRateXName = System.Xml.Linq.XName.Get("DataRate", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (TrackName?, TrackEncoding?, StartTime?, TrackDuration?, DataSize?, DataRate?, FPMS?, TrackType?, Chapter?) + /// + /// + public virtual DataRate DataRate { + get { + XElement x = this.GetElement(DataRateXName); + if ((x == null)) { + return null; + } + return ((DataRate)(x)); + } + set { + this.SetElement(DataRateXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName FPMSXName = System.Xml.Linq.XName.Get("FPMS", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (TrackName?, TrackEncoding?, StartTime?, TrackDuration?, DataSize?, DataRate?, FPMS?, TrackType?, Chapter?) + /// + /// + public virtual FPMS FPMS { + get { + XElement x = this.GetElement(FPMSXName); + if ((x == null)) { + return null; + } + return ((FPMS)(x)); + } + set { + this.SetElement(FPMSXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName TrackTypeXName = System.Xml.Linq.XName.Get("TrackType", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (TrackName?, TrackEncoding?, StartTime?, TrackDuration?, DataSize?, DataRate?, FPMS?, TrackType?, Chapter?) + /// + /// + public virtual TrackType TrackType { + get { + XElement x = this.GetElement(TrackTypeXName); + if ((x == null)) { + return null; + } + return ((TrackType)(x)); + } + set { + this.SetElement(TrackTypeXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName ChapterXName = System.Xml.Linq.XName.Get("Chapter", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (TrackName?, TrackEncoding?, StartTime?, TrackDuration?, DataSize?, DataRate?, FPMS?, TrackType?, Chapter?) + /// + /// + public virtual Chapter Chapter { + get { + XElement x = this.GetElement(ChapterXName); + if ((x == null)) { + return null; + } + return ((Chapter)(x)); + } + set { + this.SetElement(ChapterXName, value); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("MovieTrack", "urn:Microsoft.Expression.Media.Catalog"); + + static MovieTrack() { + BuildElementDictionary(); + contentModel = new SequenceContentModelEntity(new NamedContentModelEntity(TrackNameXName), new NamedContentModelEntity(TrackEncodingXName), new NamedContentModelEntity(StartTimeXName), new NamedContentModelEntity(TrackDurationXName), new NamedContentModelEntity(DataSizeXName), new NamedContentModelEntity(DataRateXName), new NamedContentModelEntity(FPMSXName), new NamedContentModelEntity(TrackTypeXName), new NamedContentModelEntity(ChapterXName)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static Dictionary localElementDictionary = new Dictionary(); + + private static void BuildElementDictionary() { + localElementDictionary.Add(TrackNameXName, typeof(TrackName)); + localElementDictionary.Add(TrackEncodingXName, typeof(TrackEncoding)); + localElementDictionary.Add(StartTimeXName, typeof(StartTime)); + localElementDictionary.Add(TrackDurationXName, typeof(TrackDuration)); + localElementDictionary.Add(DataSizeXName, typeof(DataSize)); + localElementDictionary.Add(DataRateXName, typeof(DataRate)); + localElementDictionary.Add(FPMSXName, typeof(FPMS)); + localElementDictionary.Add(TrackTypeXName, typeof(TrackType)); + localElementDictionary.Add(ChapterXName, typeof(Chapter)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + Dictionary IXMetaData.LocalElementsDictionary { + get { + return localElementDictionary; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static ContentModelEntity contentModel; + + ContentModelEntity IXMetaData.GetContentModel() { + return contentModel; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + /// + /// + /// Regular expression: (ChapName?, Offset?) + /// + /// + public partial class MovieChapterTrack : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static MovieChapterTrack Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static MovieChapterTrack Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static MovieChapterTrack Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator MovieChapterTrack(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + /// + /// + /// Regular expression: (ChapName?, Offset?) + /// + /// + public MovieChapterTrack() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName ChapNameXName = System.Xml.Linq.XName.Get("ChapName", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (ChapName?, Offset?) + /// + /// + public virtual ChapName ChapName { + get { + XElement x = this.GetElement(ChapNameXName); + if ((x == null)) { + return null; + } + return ((ChapName)(x)); + } + set { + this.SetElement(ChapNameXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName OffsetXName = System.Xml.Linq.XName.Get("Offset", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: optional + /// + /// + /// Regular expression: (ChapName?, Offset?) + /// + /// + public virtual Offset Offset { + get { + XElement x = this.GetElement(OffsetXName); + if ((x == null)) { + return null; + } + return ((Offset)(x)); + } + set { + this.SetElement(OffsetXName, value); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("MovieChapterTrack", "urn:Microsoft.Expression.Media.Catalog"); + + static MovieChapterTrack() { + BuildElementDictionary(); + contentModel = new SequenceContentModelEntity(new NamedContentModelEntity(ChapNameXName), new NamedContentModelEntity(OffsetXName)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static Dictionary localElementDictionary = new Dictionary(); + + private static void BuildElementDictionary() { + localElementDictionary.Add(ChapNameXName, typeof(ChapName)); + localElementDictionary.Add(OffsetXName, typeof(Offset)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + Dictionary IXMetaData.LocalElementsDictionary { + get { + return localElementDictionary; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static ContentModelEntity contentModel; + + ContentModelEntity IXMetaData.GetContentModel() { + return contentModel; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + /// + /// + /// Regular expression: (Set*) + /// + /// + public partial class SetList : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static SetList Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static SetList Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static SetList Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator SetList(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + /// + /// + /// Regular expression: (Set*) + /// + /// + public SetList() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName SetXName = System.Xml.Linq.XName.Get("Set", "urn:Microsoft.Expression.Media.Catalog"); + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private XTypedList SetField; + + /// + /// + /// Occurrence: optional, repeating + /// + /// + /// Regular expression: (Set*) + /// + /// + public virtual IList Set { + get { + if ((this.SetField == null)) { + this.SetField = new XTypedList(this, LinqToXsdTypeManager.Instance, SetXName); + } + return this.SetField; + } + set { + if ((value == null)) { + this.SetField = null; + } + else { + if ((this.SetField == null)) { + this.SetField = XTypedList.Initialize(this, LinqToXsdTypeManager.Instance, value, SetXName); + } + else { + XTypedServices.SetList(this.SetField, value); + } + } + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("SetList", "urn:Microsoft.Expression.Media.Catalog"); + + static SetList() { + BuildElementDictionary(); + contentModel = new SequenceContentModelEntity(new NamedContentModelEntity(SetXName)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static Dictionary localElementDictionary = new Dictionary(); + + private static void BuildElementDictionary() { + localElementDictionary.Add(SetXName, typeof(Set)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + Dictionary IXMetaData.LocalElementsDictionary { + get { + return localElementDictionary; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static ContentModelEntity contentModel; + + ContentModelEntity IXMetaData.GetContentModel() { + return contentModel; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + /// + /// + /// Regular expression: (SetName, (UniqueID | Set1)*) + /// + /// + public partial class Set : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static Set Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static Set Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static Set Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator Set(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + /// + /// + /// Regular expression: (SetName, (UniqueID | Set1)*) + /// + /// + public Set() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName SetNameXName = System.Xml.Linq.XName.Get("SetName", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (SetName, (UniqueID | Set1)*) + /// + /// + public virtual SetName SetName { + get { + XElement x = this.GetElement(SetNameXName); + return ((SetName)(x)); + } + set { + this.SetElement(SetNameXName, value); + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName UniqueIDXName = System.Xml.Linq.XName.Get("UniqueID", "urn:Microsoft.Expression.Media.Catalog"); + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private XSimpleList UniqueIDField; + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Setter: Appends + /// + /// + /// Regular expression: (SetName, (UniqueID | Set1)*) + /// + /// + public virtual IList UniqueID { + get { + if ((this.UniqueIDField == null)) { + this.UniqueIDField = new XSimpleList(this, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype, UniqueIDXName); + } + return this.UniqueIDField; + } + set { + if ((value == null)) { + this.UniqueIDField = null; + } + else { + if ((this.UniqueIDField == null)) { + this.UniqueIDField = XSimpleList.Initialize(this, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype, value, UniqueIDXName); + } + else { + XTypedServices.SetList(this.UniqueIDField, value); + } + } + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName Set1XName = System.Xml.Linq.XName.Get("Set", "urn:Microsoft.Expression.Media.Catalog"); + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private XTypedList Set1Field; + + /// + /// + /// Occurrence: required, choice + /// + /// + /// Setter: Appends + /// + /// + /// Regular expression: (SetName, (UniqueID | Set1)*) + /// + /// + public virtual IList Set1 { + get { + if ((this.Set1Field == null)) { + this.Set1Field = new XTypedList(this, LinqToXsdTypeManager.Instance, Set1XName); + } + return this.Set1Field; + } + set { + if ((value == null)) { + this.Set1Field = null; + } + else { + if ((this.Set1Field == null)) { + this.Set1Field = XTypedList.Initialize(this, LinqToXsdTypeManager.Instance, value, Set1XName); + } + else { + XTypedServices.SetList(this.Set1Field, value); + } + } + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("Set", "urn:Microsoft.Expression.Media.Catalog"); + + static Set() { + BuildElementDictionary(); + contentModel = new SequenceContentModelEntity(new NamedContentModelEntity(SetNameXName), new ChoiceContentModelEntity(new NamedContentModelEntity(UniqueIDXName), new NamedContentModelEntity(Set1XName))); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static Dictionary localElementDictionary = new Dictionary(); + + private static void BuildElementDictionary() { + localElementDictionary.Add(SetNameXName, typeof(SetName)); + localElementDictionary.Add(UniqueIDXName, typeof(UniqueID)); + localElementDictionary.Add(Set1XName, typeof(Set)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + Dictionary IXMetaData.LocalElementsDictionary { + get { + return localElementDictionary; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static ContentModelEntity contentModel; + + ContentModelEntity IXMetaData.GetContentModel() { + return contentModel; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + /// + /// + /// Regular expression: (MovieTrack) + /// + /// + public partial class MovieTrackType : XTypedElement, IXMetaData { + + public static explicit operator MovieTrackType(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + /// + /// + /// Regular expression: (MovieTrack) + /// + /// + public MovieTrackType() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName MovieTrackXName = System.Xml.Linq.XName.Get("MovieTrack", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (MovieTrack) + /// + /// + public virtual MovieTrack MovieTrack { + get { + XElement x = this.GetElement(MovieTrackXName); + return ((MovieTrack)(x)); + } + set { + this.SetElement(MovieTrackXName, value); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("MovieTrack", "urn:Microsoft.Expression.Media.Catalog"); + + static MovieTrackType() { + BuildElementDictionary(); + contentModel = new SequenceContentModelEntity(new NamedContentModelEntity(MovieTrackXName)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static Dictionary localElementDictionary = new Dictionary(); + + private static void BuildElementDictionary() { + localElementDictionary.Add(MovieTrackXName, typeof(MovieTrack)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + Dictionary IXMetaData.LocalElementsDictionary { + get { + return localElementDictionary; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static ContentModelEntity contentModel; + + ContentModelEntity IXMetaData.GetContentModel() { + return contentModel; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Fragment; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + /// + /// + /// Regular expression: (MovieChapterTrack) + /// + /// + public partial class MovieChapterTrackType : XTypedElement, IXMetaData { + + public static explicit operator MovieChapterTrackType(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + /// + /// + /// Regular expression: (MovieChapterTrack) + /// + /// + public MovieChapterTrackType() { + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName MovieChapterTrackXName = System.Xml.Linq.XName.Get("MovieChapterTrack", "urn:Microsoft.Expression.Media.Catalog"); + + /// + /// + /// Occurrence: required + /// + /// + /// Regular expression: (MovieChapterTrack) + /// + /// + public virtual MovieChapterTrack MovieChapterTrack { + get { + XElement x = this.GetElement(MovieChapterTrackXName); + return ((MovieChapterTrack)(x)); + } + set { + this.SetElement(MovieChapterTrackXName, value); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("MovieChapterTrack", "urn:Microsoft.Expression.Media.Catalog"); + + static MovieChapterTrackType() { + BuildElementDictionary(); + contentModel = new SequenceContentModelEntity(new NamedContentModelEntity(MovieChapterTrackXName)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static Dictionary localElementDictionary = new Dictionary(); + + private static void BuildElementDictionary() { + localElementDictionary.Add(MovieChapterTrackXName, typeof(MovieChapterTrack)); + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + Dictionary IXMetaData.LocalElementsDictionary { + get { + return localElementDictionary; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + private static ContentModelEntity contentModel; + + ContentModelEntity IXMetaData.GetContentModel() { + return contentModel; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Fragment; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + public partial class CatalogComment : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static CatalogComment Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static CatalogComment Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static CatalogComment Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator CatalogComment(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + public CatalogComment() { + } + + public CatalogComment(string content) { + this.TypedValue = content; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName TypedValueXName = System.Xml.Linq.XName.Get("TypedValue", ""); + + public virtual string TypedValue { + get { + XElement x = this.Untyped; + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype); + } + set { + this.SetValue(value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("CatalogComment", "urn:Microsoft.Expression.Media.Catalog"); + + ContentModelEntity IXMetaData.GetContentModel() { + return ContentModelEntity.Default; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + public partial class UserFieldDefinition : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static UserFieldDefinition Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static UserFieldDefinition Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static UserFieldDefinition Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator UserFieldDefinition(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + public UserFieldDefinition() { + } + + public UserFieldDefinition(string content) { + this.TypedValue = content; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName TypedValueXName = System.Xml.Linq.XName.Get("TypedValue", ""); + + public virtual string TypedValue { + get { + XElement x = this.Untyped; + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype); + } + set { + this.SetValue(value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("UserFieldDefinition", "urn:Microsoft.Expression.Media.Catalog"); + + ContentModelEntity IXMetaData.GetContentModel() { + return ContentModelEntity.Default; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + public partial class Filename : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static Filename Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static Filename Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static Filename Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator Filename(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + public Filename() { + } + + public Filename(string content) { + this.TypedValue = content; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName TypedValueXName = System.Xml.Linq.XName.Get("TypedValue", ""); + + public virtual string TypedValue { + get { + XElement x = this.Untyped; + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype); + } + set { + this.SetValue(value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("Filename", "urn:Microsoft.Expression.Media.Catalog"); + + ContentModelEntity IXMetaData.GetContentModel() { + return ContentModelEntity.Default; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + public partial class Filepath : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static Filepath Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static Filepath Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static Filepath Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator Filepath(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + public Filepath() { + } + + public Filepath(string content) { + this.TypedValue = content; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName TypedValueXName = System.Xml.Linq.XName.Get("TypedValue", ""); + + public virtual string TypedValue { + get { + XElement x = this.Untyped; + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype); + } + set { + this.SetValue(value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("Filepath", "urn:Microsoft.Expression.Media.Catalog"); + + ContentModelEntity IXMetaData.GetContentModel() { + return ContentModelEntity.Default; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + public partial class UniqueID : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static UniqueID Load(string xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static UniqueID Load(System.IO.TextReader xmlFile) { + return XTypedServices.Load(xmlFile); + } + + public static UniqueID Parse(string xml) { + return XTypedServices.Parse(xml); + } + + public static explicit operator UniqueID(XElement xe) { return XTypedServices.ToXTypedElement(xe,LinqToXsdTypeManager.Instance as ILinqToXsdTypeManager); } + + public override XTypedElement Clone() { + return XTypedServices.CloneXTypedElement(this); + } + + public UniqueID() { + } + + public UniqueID(string content) { + this.TypedValue = content; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal static readonly System.Xml.Linq.XName TypedValueXName = System.Xml.Linq.XName.Get("TypedValue", ""); + + public virtual string TypedValue { + get { + XElement x = this.Untyped; + return XTypedServices.ParseValue(x, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype); + } + set { + this.SetValue(value, XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String).Datatype); + } + } + + private static readonly System.Xml.Linq.XName xName = System.Xml.Linq.XName.Get("UniqueID", "urn:Microsoft.Expression.Media.Catalog"); + + ContentModelEntity IXMetaData.GetContentModel() { + return ContentModelEntity.Default; + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + System.Xml.Linq.XName IXMetaData.SchemaName { + get { + return xName; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + SchemaOrigin IXMetaData.TypeOrigin { + get { + return SchemaOrigin.Element; + } + } + + [DebuggerBrowsable(DebuggerBrowsableState.Never)] + ILinqToXsdTypeManager IXMetaData.TypeManager { + get { + return LinqToXsdTypeManager.Instance; + } + } + } + + public partial class Label : XTypedElement, IXMetaData { + + public void Save(string xmlFile) { + XTypedServices.Save(xmlFile, Untyped); + } + + public void Save(System.IO.TextWriter tw) { + XTypedServices.Save(tw, Untyped); + } + + public void Save(System.Xml.XmlWriter xmlWriter) { + XTypedServices.Save(xmlWriter, Untyped); + } + + public static Label Load(string xmlFile) { + return XTypedServices.Load