Skip to content

Commit

Permalink
Add GlobalScope
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrstenke committed Jan 5, 2025
1 parent 0b925c3 commit 5294c25
Show file tree
Hide file tree
Showing 141 changed files with 10,287 additions and 9,719 deletions.
2 changes: 2 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
<DocumentationFile>$(BaseIntermediateOutputPath)$(MSBuildProjectName).xml</DocumentationFile>
<DebugType>portable</DebugType>
<Deterministic>true</Deterministic>
<PackageReadmeFile>Readme.md</PackageReadmeFile>

</PropertyGroup>

Expand All @@ -56,6 +57,7 @@
<ItemGroup Condition="$(MsBuildProjectDirectoryNoRoot.Contains('src'))">

<None Include="..\..\img\icons\Durian-pkg-icon-128.png" Pack="true" Visible="false" PackagePath="" />
<None Include="Readme.md" Pack="true" PackagePath=""/>

</ItemGroup>

Expand Down
7 changes: 7 additions & 0 deletions Durian.sln
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Durian.Samples.CopyFrom", "
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Durian.GlobalScope", "src\Durian.GlobalScope\Durian.GlobalScope.csproj", "{643FFE0C-B641-4504-8F6A-0EA694F3DEF7}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GlobalScope", "GlobalScope", "{A04BF577-5DEB-477A-A22C-3557852AC25B}"
ProjectSection(SolutionItems) = preProject
docs\GlobalScope\DUR0501.md = docs\GlobalScope\DUR0501.md
docs\GlobalScope\DUR0502.md = docs\GlobalScope\DUR0502.md
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -485,6 +491,7 @@ Global
{072AEE81-1199-4446-B2D5-54384D23DAE0} = {BA3DE2E2-7B32-4612-8219-24FBCF850813}
{9C383ACD-8C9E-4C24-B2EA-4326C7553866} = {D98DD137-AADE-4474-86EF-9F0874607687}
{643FFE0C-B641-4504-8F6A-0EA694F3DEF7} = {74D7ECF9-D1F6-46FA-B8D8-D34F86F713EA}
{A04BF577-5DEB-477A-A22C-3557852AC25B} = {BA3DE2E2-7B32-4612-8219-24FBCF850813}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {09524C45-0D6D-4456-B89D-9673853B9FA0}
Expand Down
22 changes: 22 additions & 0 deletions docs/GlobalScope/DUR0501.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# DUR0501 - Error
### Type marked with the GlobalScopeAttribute must be static.

## Example 1

### Code with diagnostic:
```csharp
using Durian;

// DUR0501
[GlobalScope]
public class Test
{
public static void DoStuff()
{
}
}

```
##

*\(Written by Piotr Stenke\)*
22 changes: 22 additions & 0 deletions docs/GlobalScope/DUR0502.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# DUR0502 - Error
### Type marked with the GlobalScopeAttribute cannot be a nested type.

## Example 1

### Code with diagnostic:
```csharp
using Durian;

public static class Test
{
// DUR0502
[GlobalScope]
public static class Inner
{
}
}

```
##

*\(Written by Piotr Stenke\)*
Loading

0 comments on commit 5294c25

Please sign in to comment.