daily update on 20250122 by nitload youmu, architect rearrange
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -11,15 +11,16 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="coverlet.collector" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing.MSTest" Version="1.1.2" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\StgSharp.Modeling\StgSharp.Modeling.csproj" />
|
||||
<ProjectReference Include="..\StgSharp.Modeling\StgSharp.Model.Lang.csproj" />
|
||||
<ProjectReference Include="..\StgSharpTerminalDialogue\StgSharpTerminalDialogue.csproj" />
|
||||
<ProjectReference Include="..\StgSharp\StgSharp.csproj" />
|
||||
<ProjectReference Include="..\StgSharp\StgSharp.Commom.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -56,14 +56,13 @@ namespace STgSharpTest
|
||||
[TestMethod]
|
||||
public void TestMethod()
|
||||
{
|
||||
if (!STEPReader.FromFile("D:\\NitloadIndustry\\Ñо¿ÏîÄ¿\\1-Flagship\\TH2020\\ProjectFile\\_NPart#8299.stp", out STEPReader reader))
|
||||
if (!StepReader.FromFile("D:\\NitloadIndustry\\Ñо¿ÏîÄ¿\\1-Flagship\\TH2020\\ProjectFile\\_NPart#8299.stp", out StepReader reader))
|
||||
{
|
||||
throw new Exception();
|
||||
}
|
||||
var info = reader.GetInfo();
|
||||
var t0 = reader.ReadDataSection(out ConcurrentQueue<STEPExpression> queue);
|
||||
var t1 = reader.AnalyseDataSection(queue);
|
||||
Task.WaitAll(t0, t1);
|
||||
//var t0 = reader.ReadDataSection(out ConcurrentQueue<StepExpression> queue);
|
||||
//var t1 = reader.AnalyseDataSection(queue);
|
||||
Console.WriteLine("OK");
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSharpTest")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+63c3cd17e2188771886daeb4046edf28633fa949")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+6cfaa42ff31cf213685faf60a3fcde42b99f0224")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("StgSharpTest")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharpTest")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/63c3cd17e2188771886daeb4046edf28633fa949/*"}}
|
||||
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/6cfaa42ff31cf213685faf60a3fcde42b99f0224/*"}}
|
||||
@@ -4,22 +4,17 @@
|
||||
"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\STgSharpTest\\StgSharpTest.csproj": {}
|
||||
},
|
||||
"projects": {
|
||||
"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Modeling\\StgSharp.Modeling.csproj": {
|
||||
"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Modeling\\StgSharp.Model.Lang.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Modeling\\StgSharp.Modeling.csproj",
|
||||
"projectName": "StgSharp.Modeling",
|
||||
"projectPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Modeling\\StgSharp.Modeling.csproj",
|
||||
"projectUniqueName": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Modeling\\StgSharp.Model.Lang.csproj",
|
||||
"projectName": "StgSharp.Model.Lang",
|
||||
"projectPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Modeling\\StgSharp.Model.Lang.csproj",
|
||||
"packagesPath": "C:\\Users\\Youmu\\.nuget\\packages\\",
|
||||
"outputPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Modeling\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"fallbackFolders": [
|
||||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
|
||||
],
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\Youmu\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
|
||||
"C:\\Users\\Youmu\\AppData\\Roaming\\NuGet\\NuGet.Config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"netstandard2.1"
|
||||
@@ -34,8 +29,8 @@
|
||||
"netstandard2.1": {
|
||||
"targetAlias": "netstandard2.1",
|
||||
"projectReferences": {
|
||||
"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp\\StgSharp.csproj": {
|
||||
"projectPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp\\StgSharp.csproj"
|
||||
"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp\\StgSharp.Commom.csproj": {
|
||||
"projectPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp\\StgSharp.Commom.csproj"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -83,13 +78,8 @@
|
||||
"packagesPath": "C:\\Users\\Youmu\\.nuget\\packages\\",
|
||||
"outputPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharpTerminalDialogue\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"fallbackFolders": [
|
||||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
|
||||
],
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\Youmu\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
|
||||
"C:\\Users\\Youmu\\AppData\\Roaming\\NuGet\\NuGet.Config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"net8.0"
|
||||
@@ -155,13 +145,8 @@
|
||||
"packagesPath": "C:\\Users\\Youmu\\.nuget\\packages\\",
|
||||
"outputPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\STgSharpTest\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"fallbackFolders": [
|
||||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
|
||||
],
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\Youmu\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
|
||||
"C:\\Users\\Youmu\\AppData\\Roaming\\NuGet\\NuGet.Config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"net8.0"
|
||||
@@ -176,14 +161,14 @@
|
||||
"net8.0": {
|
||||
"targetAlias": "net8.0",
|
||||
"projectReferences": {
|
||||
"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Modeling\\StgSharp.Modeling.csproj": {
|
||||
"projectPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Modeling\\StgSharp.Modeling.csproj"
|
||||
"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Modeling\\StgSharp.Model.Lang.csproj": {
|
||||
"projectPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Modeling\\StgSharp.Model.Lang.csproj"
|
||||
},
|
||||
"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharpTerminalDialogue\\StgSharpTerminalDialogue.csproj": {
|
||||
"projectPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharpTerminalDialogue\\StgSharpTerminalDialogue.csproj"
|
||||
},
|
||||
"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp\\StgSharp.csproj": {
|
||||
"projectPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp\\StgSharp.csproj"
|
||||
"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp\\StgSharp.Commom.csproj": {
|
||||
"projectPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp\\StgSharp.Commom.csproj"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -211,6 +196,10 @@
|
||||
"target": "Package",
|
||||
"version": "[3.1.1, )"
|
||||
},
|
||||
"Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing.MSTest": {
|
||||
"target": "Package",
|
||||
"version": "[1.1.2, )"
|
||||
},
|
||||
"Microsoft.NET.Test.Sdk": {
|
||||
"target": "Package",
|
||||
"version": "[17.8.0, )"
|
||||
@@ -240,22 +229,17 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp\\StgSharp.csproj": {
|
||||
"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp\\StgSharp.Commom.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp\\StgSharp.csproj",
|
||||
"projectName": "StgSharp",
|
||||
"projectPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp\\StgSharp.csproj",
|
||||
"projectUniqueName": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp\\StgSharp.Commom.csproj",
|
||||
"projectName": "StgSharp.Commom",
|
||||
"projectPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp\\StgSharp.Commom.csproj",
|
||||
"packagesPath": "C:\\Users\\Youmu\\.nuget\\packages\\",
|
||||
"outputPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"fallbackFolders": [
|
||||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
|
||||
],
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\Youmu\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
|
||||
"C:\\Users\\Youmu\\AppData\\Roaming\\NuGet\\NuGet.Config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"netstandard2.1"
|
||||
@@ -295,6 +279,10 @@
|
||||
"suppressParent": "All",
|
||||
"target": "Package",
|
||||
"version": "[0.3.49-beta, )"
|
||||
},
|
||||
"System.Runtime.CompilerServices.Unsafe": {
|
||||
"target": "Package",
|
||||
"version": "[6.1.0, )"
|
||||
}
|
||||
},
|
||||
"imports": [
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,39 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="BlueprintNodeAttribute.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the “Software”), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED “AS IS”,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace StgSharp.Blueprint
|
||||
{
|
||||
[AttributeUsage( AttributeTargets.Method, AllowMultiple = false )]
|
||||
public class BlueprintNodeExecutionAttribute : Attribute { }
|
||||
}
|
||||
@@ -0,0 +1,165 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="PartialDictionary.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the “Software”), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED “AS IS”,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace StgSharp.Collections
|
||||
{
|
||||
public partial class PartialDictionary<TKey, TValue> : IDictionary<TKey, TValue>
|
||||
{
|
||||
|
||||
private readonly Dictionary<TKey, TValue> _source;
|
||||
private readonly HashSet<TKey> _keys;
|
||||
private readonly PartialDictionaryValues _values;
|
||||
|
||||
public PartialDictionary(
|
||||
Dictionary<TKey, TValue> source,
|
||||
TKey[] index )
|
||||
{
|
||||
_source = source;
|
||||
_keys = new HashSet<TKey>( index );
|
||||
foreach( TKey item in _keys ) {
|
||||
if( !_source.ContainsKey( item ) ) {
|
||||
_source.Add( item, default! );
|
||||
}
|
||||
}
|
||||
_values = new PartialDictionaryValues( this );
|
||||
}
|
||||
|
||||
public PartialDictionary(
|
||||
Dictionary<TKey, TValue> source,
|
||||
HashSet<TKey> keys )
|
||||
{
|
||||
_source = source;
|
||||
_keys = keys;
|
||||
foreach( TKey item in _keys ) {
|
||||
if( !_source.ContainsKey( item ) ) {
|
||||
_source.Add( item, default! );
|
||||
}
|
||||
}
|
||||
_values = new PartialDictionaryValues( this );
|
||||
}
|
||||
|
||||
public TValue this[ TKey key ]
|
||||
{
|
||||
get
|
||||
{
|
||||
if( _keys.Contains( key ) ) {
|
||||
return _source[ key ];
|
||||
}
|
||||
throw new KeyNotFoundException();
|
||||
}
|
||||
set
|
||||
{
|
||||
if( _keys.Contains( key ) ) {
|
||||
_source[ key ] = value;
|
||||
}
|
||||
throw new KeyNotFoundException();
|
||||
}
|
||||
}
|
||||
|
||||
public ICollection<TKey> Keys => _keys;
|
||||
|
||||
public ICollection<TValue> Values => _values;
|
||||
|
||||
public int Count => _keys.Count;
|
||||
|
||||
public bool Contains( KeyValuePair<TKey, TValue> item )
|
||||
{
|
||||
return _keys.Contains( item.Key ) && _source.Contains( item );
|
||||
}
|
||||
|
||||
public bool ContainsKey( TKey key )
|
||||
{
|
||||
return _keys.Contains( key );
|
||||
}
|
||||
|
||||
public void CopyTo( KeyValuePair<TKey, TValue>[] array, int arrayIndex )
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
|
||||
{
|
||||
foreach( TKey item in _keys ) {
|
||||
yield return new KeyValuePair<TKey, TValue>(item, _source[item]);
|
||||
}
|
||||
}
|
||||
|
||||
public bool TryGetValue( TKey key, out TValue value )
|
||||
{
|
||||
if( _keys.Contains( key ) ) {
|
||||
value = _source[ key ];
|
||||
return true;
|
||||
}
|
||||
value = default!;
|
||||
return false;
|
||||
}
|
||||
|
||||
void ICollection<KeyValuePair<TKey, TValue>>.Add(
|
||||
KeyValuePair<TKey, TValue> item )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void ICollection<KeyValuePair<TKey, TValue>>.Clear()
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
bool ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly => true;
|
||||
|
||||
bool ICollection<KeyValuePair<TKey, TValue>>.Remove(
|
||||
KeyValuePair<TKey, TValue> item )
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
void IDictionary<TKey, TValue>.Add( TKey key, TValue value )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
bool IDictionary<TKey, TValue>.Remove( TKey key )
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return GetEnumerator();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="PartialDictionaryValues.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the “Software”), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED “AS IS”,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace StgSharp.Collections
|
||||
{
|
||||
public partial class PartialDictionary<TKey, TValue>
|
||||
{
|
||||
|
||||
internal sealed class PartialDictionaryValues : ICollection<TValue>
|
||||
{
|
||||
|
||||
private readonly PartialDictionary<TKey, TValue> _values;
|
||||
|
||||
public PartialDictionaryValues(
|
||||
PartialDictionary<TKey, TValue> value )
|
||||
{
|
||||
_values = value;
|
||||
}
|
||||
|
||||
public bool IsReadOnly => true;
|
||||
|
||||
public int Count => _values.Count;
|
||||
|
||||
void ICollection<TValue>.Add( TValue item )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void ICollection<TValue>.Clear()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
public bool Contains( TValue item )
|
||||
{
|
||||
foreach (var kvp in _values)
|
||||
{
|
||||
if (kvp.Value != null && kvp.Value.Equals(item))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void CopyTo( TValue[] array, int arrayIndex )
|
||||
{
|
||||
foreach (var kvp in _values)
|
||||
{
|
||||
array[arrayIndex] = kvp.Value;
|
||||
arrayIndex++;
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerator<TValue> GetEnumerator()
|
||||
{
|
||||
foreach (var key in _values._keys)
|
||||
{
|
||||
yield return _values._source[key];
|
||||
}
|
||||
}
|
||||
|
||||
bool ICollection<TValue>.Remove( TValue item )
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return GetEnumerator();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="ExpReader.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the “Software”), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED “AS IS”,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO.MemoryMappedFiles;
|
||||
using System.Text;
|
||||
|
||||
namespace StgSharp.Expression
|
||||
{
|
||||
internal class ExpFileReader : IDisposable
|
||||
{
|
||||
|
||||
private bool disposedValue;
|
||||
private FileStream _expFileStream;
|
||||
private MemoryMappedFile _expMemoryMappedFile;
|
||||
|
||||
public ExpFileReader( string path )
|
||||
{
|
||||
if( !File.Exists( path ) ) {
|
||||
throw new FileNotFoundException();
|
||||
}
|
||||
_expFileStream = new FileStream(
|
||||
path, FileMode.Open, FileAccess.Read );
|
||||
_expMemoryMappedFile = MemoryMappedFile.CreateFromFile(
|
||||
_expFileStream, null, 0, MemoryMappedFileAccess.Read,
|
||||
HandleInheritability.None, true );
|
||||
}
|
||||
|
||||
public MemoryMappedViewStream CreateMemoryStram()
|
||||
{
|
||||
return _expMemoryMappedFile.CreateViewStream();
|
||||
}
|
||||
|
||||
// ~ExpFileReader()
|
||||
// {
|
||||
// Dispose(disposing: false);
|
||||
// }
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose( disposing: true );
|
||||
GC.SuppressFinalize( this );
|
||||
}
|
||||
|
||||
protected virtual void Dispose( bool disposing )
|
||||
{
|
||||
if( !disposedValue ) {
|
||||
if( disposing ) {
|
||||
_expFileStream.Dispose();
|
||||
_expMemoryMappedFile.Dispose();
|
||||
}
|
||||
|
||||
disposedValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="BpNodeGenerator.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the “Software”), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED “AS IS”,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
using Microsoft.CodeAnalysis;
|
||||
using Microsoft.CodeAnalysis.CSharp;
|
||||
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
||||
using Microsoft.CodeAnalysis.Text;
|
||||
|
||||
using StgSharp.Blueprint;
|
||||
using StgSharp.Collections;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace StgSharp.Generator
|
||||
{
|
||||
internal class BpNodeSyntaxReceiver : ISyntaxReceiver
|
||||
{
|
||||
private static readonly string _indexTypeName = typeof( PartialDictionary<string, object> ).Name;
|
||||
private static BpNodeSyntaxReceiver receiver = new BpNodeSyntaxReceiver();
|
||||
|
||||
public List<MethodDeclarationSyntax> ValidMethod { get; private set; } = new List<MethodDeclarationSyntax>();
|
||||
public List<MethodDeclarationSyntax> InvalidMethod { get; private set; } = new List<MethodDeclarationSyntax>();
|
||||
|
||||
public BpNodeSyntaxReceiver()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public BpNodeSyntaxReceiver(SyntaxNode node)
|
||||
{
|
||||
OnVisitSyntaxNode(node);
|
||||
}
|
||||
|
||||
public void OnVisitSyntaxNode( SyntaxNode syntaxNode )
|
||||
{
|
||||
if( syntaxNode is MethodDeclarationSyntax mds && mds.AttributeLists
|
||||
.SelectMany( list => list.Attributes )
|
||||
.Any( syntax => syntax.Name.ToString() ==
|
||||
typeof( BlueprintNodeExecutionAttribute ).Name ) ) {
|
||||
SeparatedSyntaxList<ParameterSyntax> paramList = mds.ParameterList.Parameters;
|
||||
if( mds.Modifiers.Any( SyntaxKind.StaticKeyword ) && paramList.Count ==
|
||||
2 && paramList[ 0 ].Type!.ToString() == _indexTypeName && paramList[
|
||||
1 ].Type!.ToString() ==
|
||||
_indexTypeName ) {
|
||||
ValidMethod.Add(mds);
|
||||
}
|
||||
else
|
||||
{
|
||||
InvalidMethod.Add(mds);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void BuildNode(SourceProductionContext context, MethodDeclarationSyntax mds)
|
||||
{
|
||||
if (mds.AttributeLists
|
||||
.SelectMany(list => list.Attributes)
|
||||
.Any(syntax => syntax.Name.ToString() ==
|
||||
typeof(BlueprintNodeExecutionAttribute).Name))
|
||||
{
|
||||
SeparatedSyntaxList<ParameterSyntax> paramList = mds.ParameterList.Parameters;
|
||||
if (mds.Modifiers.Any(SyntaxKind.StaticKeyword) && paramList.Count ==
|
||||
2 && paramList[0].Type!.ToString() == _indexTypeName && paramList[
|
||||
1].Type!.ToString() ==
|
||||
_indexTypeName)
|
||||
{
|
||||
var methodName = mds.Identifier.Text;
|
||||
var sourceText = SourceText.From( """
|
||||
|
||||
""",encoding:Encoding.UTF8);
|
||||
context.AddSource("GeneratedBlueprintNode.cs", sourceText);
|
||||
}
|
||||
else
|
||||
{
|
||||
var diagnostic = Diagnostic.Create(
|
||||
new DiagnosticDescriptor(
|
||||
id:"SSE0001",
|
||||
title: "Invalid Blueprint Node Method",
|
||||
messageFormat: "Blueprint Node Method must be static and have two parameters of type PartialDictionary<string, object>",
|
||||
category: "Blueprint Node",
|
||||
DiagnosticSeverity.Error,
|
||||
isEnabledByDefault: true),
|
||||
mds.GetLocation(),mds.Identifier.Text);
|
||||
|
||||
context.ReportDiagnostic(diagnostic);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="ExpCodeGenerator.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the “Software”), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED “AS IS”,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
using Microsoft.CodeAnalysis;
|
||||
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
||||
|
||||
using System;
|
||||
|
||||
namespace StgSharp.Generator
|
||||
{
|
||||
[Generator]
|
||||
public partial class MainGenerator : IIncrementalGenerator
|
||||
{
|
||||
public void Initialize(IncrementalGeneratorInitializationContext context)
|
||||
{
|
||||
var declaration =
|
||||
context.SyntaxProvider.CreateSyntaxProvider(
|
||||
predicate: static (s,_) => s is MethodDeclarationSyntax,
|
||||
transform: static (cds,_) => (MethodDeclarationSyntax)cds.Node
|
||||
).Where(static m=>m!=null);
|
||||
|
||||
context.RegisterSourceOutput(declaration, BpNodeSyntaxReceiver.BuildNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>preview</LangVersion>
|
||||
<EnforceExtendedAnalyzerRules>True</EnforceExtendedAnalyzerRules>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.12.0" PrivateAssets="all" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
+331
@@ -0,0 +1,331 @@
|
||||
{
|
||||
"runtimeTarget": {
|
||||
"name": ".NETStandard,Version=v2.0/",
|
||||
"signature": ""
|
||||
},
|
||||
"compilationOptions": {},
|
||||
"targets": {
|
||||
".NETStandard,Version=v2.0": {},
|
||||
".NETStandard,Version=v2.0/": {
|
||||
"StgSgharp.Generator/1.0.0": {
|
||||
"dependencies": {
|
||||
"Microsoft.CodeAnalysis.CSharp": "4.12.0",
|
||||
"NETStandard.Library": "2.0.3"
|
||||
},
|
||||
"runtime": {
|
||||
"StgSgharp.Generator.dll": {}
|
||||
}
|
||||
},
|
||||
"Microsoft.CodeAnalysis.Analyzers/3.3.4": {},
|
||||
"Microsoft.CodeAnalysis.Common/4.12.0": {
|
||||
"dependencies": {
|
||||
"Microsoft.CodeAnalysis.Analyzers": "3.3.4",
|
||||
"System.Buffers": "4.5.1",
|
||||
"System.Collections.Immutable": "8.0.0",
|
||||
"System.Memory": "4.5.5",
|
||||
"System.Numerics.Vectors": "4.5.0",
|
||||
"System.Reflection.Metadata": "8.0.0",
|
||||
"System.Runtime.CompilerServices.Unsafe": "6.0.0",
|
||||
"System.Text.Encoding.CodePages": "7.0.0",
|
||||
"System.Threading.Tasks.Extensions": "4.5.4"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/Microsoft.CodeAnalysis.dll": {
|
||||
"assemblyVersion": "4.12.0.0",
|
||||
"fileVersion": "4.1200.24.57207"
|
||||
}
|
||||
},
|
||||
"resources": {
|
||||
"lib/netstandard2.0/cs/Microsoft.CodeAnalysis.resources.dll": {
|
||||
"locale": "cs"
|
||||
},
|
||||
"lib/netstandard2.0/de/Microsoft.CodeAnalysis.resources.dll": {
|
||||
"locale": "de"
|
||||
},
|
||||
"lib/netstandard2.0/es/Microsoft.CodeAnalysis.resources.dll": {
|
||||
"locale": "es"
|
||||
},
|
||||
"lib/netstandard2.0/fr/Microsoft.CodeAnalysis.resources.dll": {
|
||||
"locale": "fr"
|
||||
},
|
||||
"lib/netstandard2.0/it/Microsoft.CodeAnalysis.resources.dll": {
|
||||
"locale": "it"
|
||||
},
|
||||
"lib/netstandard2.0/ja/Microsoft.CodeAnalysis.resources.dll": {
|
||||
"locale": "ja"
|
||||
},
|
||||
"lib/netstandard2.0/ko/Microsoft.CodeAnalysis.resources.dll": {
|
||||
"locale": "ko"
|
||||
},
|
||||
"lib/netstandard2.0/pl/Microsoft.CodeAnalysis.resources.dll": {
|
||||
"locale": "pl"
|
||||
},
|
||||
"lib/netstandard2.0/pt-BR/Microsoft.CodeAnalysis.resources.dll": {
|
||||
"locale": "pt-BR"
|
||||
},
|
||||
"lib/netstandard2.0/ru/Microsoft.CodeAnalysis.resources.dll": {
|
||||
"locale": "ru"
|
||||
},
|
||||
"lib/netstandard2.0/tr/Microsoft.CodeAnalysis.resources.dll": {
|
||||
"locale": "tr"
|
||||
},
|
||||
"lib/netstandard2.0/zh-Hans/Microsoft.CodeAnalysis.resources.dll": {
|
||||
"locale": "zh-Hans"
|
||||
},
|
||||
"lib/netstandard2.0/zh-Hant/Microsoft.CodeAnalysis.resources.dll": {
|
||||
"locale": "zh-Hant"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.CodeAnalysis.CSharp/4.12.0": {
|
||||
"dependencies": {
|
||||
"Microsoft.CodeAnalysis.Analyzers": "3.3.4",
|
||||
"Microsoft.CodeAnalysis.Common": "4.12.0",
|
||||
"System.Buffers": "4.5.1",
|
||||
"System.Collections.Immutable": "8.0.0",
|
||||
"System.Memory": "4.5.5",
|
||||
"System.Numerics.Vectors": "4.5.0",
|
||||
"System.Reflection.Metadata": "8.0.0",
|
||||
"System.Runtime.CompilerServices.Unsafe": "6.0.0",
|
||||
"System.Text.Encoding.CodePages": "7.0.0",
|
||||
"System.Threading.Tasks.Extensions": "4.5.4"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/Microsoft.CodeAnalysis.CSharp.dll": {
|
||||
"assemblyVersion": "4.12.0.0",
|
||||
"fileVersion": "4.1200.24.57207"
|
||||
}
|
||||
},
|
||||
"resources": {
|
||||
"lib/netstandard2.0/cs/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
||||
"locale": "cs"
|
||||
},
|
||||
"lib/netstandard2.0/de/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
||||
"locale": "de"
|
||||
},
|
||||
"lib/netstandard2.0/es/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
||||
"locale": "es"
|
||||
},
|
||||
"lib/netstandard2.0/fr/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
||||
"locale": "fr"
|
||||
},
|
||||
"lib/netstandard2.0/it/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
||||
"locale": "it"
|
||||
},
|
||||
"lib/netstandard2.0/ja/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
||||
"locale": "ja"
|
||||
},
|
||||
"lib/netstandard2.0/ko/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
||||
"locale": "ko"
|
||||
},
|
||||
"lib/netstandard2.0/pl/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
||||
"locale": "pl"
|
||||
},
|
||||
"lib/netstandard2.0/pt-BR/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
||||
"locale": "pt-BR"
|
||||
},
|
||||
"lib/netstandard2.0/ru/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
||||
"locale": "ru"
|
||||
},
|
||||
"lib/netstandard2.0/tr/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
||||
"locale": "tr"
|
||||
},
|
||||
"lib/netstandard2.0/zh-Hans/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
||||
"locale": "zh-Hans"
|
||||
},
|
||||
"lib/netstandard2.0/zh-Hant/Microsoft.CodeAnalysis.CSharp.resources.dll": {
|
||||
"locale": "zh-Hant"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Microsoft.NETCore.Platforms/1.1.0": {},
|
||||
"NETStandard.Library/2.0.3": {
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Platforms": "1.1.0"
|
||||
}
|
||||
},
|
||||
"System.Buffers/4.5.1": {
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/System.Buffers.dll": {
|
||||
"assemblyVersion": "4.0.3.0",
|
||||
"fileVersion": "4.6.28619.1"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Collections.Immutable/8.0.0": {
|
||||
"dependencies": {
|
||||
"System.Memory": "4.5.5",
|
||||
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/System.Collections.Immutable.dll": {
|
||||
"assemblyVersion": "8.0.0.0",
|
||||
"fileVersion": "8.0.23.53103"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Memory/4.5.5": {
|
||||
"dependencies": {
|
||||
"System.Buffers": "4.5.1",
|
||||
"System.Numerics.Vectors": "4.5.0",
|
||||
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/System.Memory.dll": {
|
||||
"assemblyVersion": "4.0.1.2",
|
||||
"fileVersion": "4.6.31308.1"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Numerics.Vectors/4.5.0": {
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/System.Numerics.Vectors.dll": {
|
||||
"assemblyVersion": "4.1.4.0",
|
||||
"fileVersion": "4.6.26515.6"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Reflection.Metadata/8.0.0": {
|
||||
"dependencies": {
|
||||
"System.Collections.Immutable": "8.0.0",
|
||||
"System.Memory": "4.5.5"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/System.Reflection.Metadata.dll": {
|
||||
"assemblyVersion": "8.0.0.0",
|
||||
"fileVersion": "8.0.23.53103"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Runtime.CompilerServices.Unsafe/6.0.0": {
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll": {
|
||||
"assemblyVersion": "6.0.0.0",
|
||||
"fileVersion": "6.0.21.52210"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Text.Encoding.CodePages/7.0.0": {
|
||||
"dependencies": {
|
||||
"System.Memory": "4.5.5",
|
||||
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/System.Text.Encoding.CodePages.dll": {
|
||||
"assemblyVersion": "7.0.0.0",
|
||||
"fileVersion": "7.0.22.51805"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Threading.Tasks.Extensions/4.5.4": {
|
||||
"dependencies": {
|
||||
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/System.Threading.Tasks.Extensions.dll": {
|
||||
"assemblyVersion": "4.2.0.1",
|
||||
"fileVersion": "4.6.28619.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"StgSgharp.Generator/1.0.0": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
},
|
||||
"Microsoft.CodeAnalysis.Analyzers/3.3.4": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-AxkxcPR+rheX0SmvpLVIGLhOUXAKG56a64kV9VQZ4y9gR9ZmPXnqZvHJnmwLSwzrEP6junUF11vuc+aqo5r68g==",
|
||||
"path": "microsoft.codeanalysis.analyzers/3.3.4",
|
||||
"hashPath": "microsoft.codeanalysis.analyzers.3.3.4.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.CodeAnalysis.Common/4.12.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-c1kNYihL2gdcuU1dqm8R8YeA4YkB43TpU3pa2r66Uooh6AAhRtENzj9A4Kj0a+H8JDDyuTjNZql9XlVUzV+UjA==",
|
||||
"path": "microsoft.codeanalysis.common/4.12.0",
|
||||
"hashPath": "microsoft.codeanalysis.common.4.12.0.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.CodeAnalysis.CSharp/4.12.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-30vVQ1MizeC22iEdEvI2w0eTIYG43/L20yBzuQH01xKzJgHAoWehzI2F8u07o4mXh4DGMOjQF7aEm0zzvsG3Mg==",
|
||||
"path": "microsoft.codeanalysis.csharp/4.12.0",
|
||||
"hashPath": "microsoft.codeanalysis.csharp.4.12.0.nupkg.sha512"
|
||||
},
|
||||
"Microsoft.NETCore.Platforms/1.1.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==",
|
||||
"path": "microsoft.netcore.platforms/1.1.0",
|
||||
"hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512"
|
||||
},
|
||||
"NETStandard.Library/2.0.3": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==",
|
||||
"path": "netstandard.library/2.0.3",
|
||||
"hashPath": "netstandard.library.2.0.3.nupkg.sha512"
|
||||
},
|
||||
"System.Buffers/4.5.1": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg==",
|
||||
"path": "system.buffers/4.5.1",
|
||||
"hashPath": "system.buffers.4.5.1.nupkg.sha512"
|
||||
},
|
||||
"System.Collections.Immutable/8.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-AurL6Y5BA1WotzlEvVaIDpqzpIPvYnnldxru8oXJU2yFxFUy3+pNXjXd1ymO+RA0rq0+590Q8gaz2l3Sr7fmqg==",
|
||||
"path": "system.collections.immutable/8.0.0",
|
||||
"hashPath": "system.collections.immutable.8.0.0.nupkg.sha512"
|
||||
},
|
||||
"System.Memory/4.5.5": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==",
|
||||
"path": "system.memory/4.5.5",
|
||||
"hashPath": "system.memory.4.5.5.nupkg.sha512"
|
||||
},
|
||||
"System.Numerics.Vectors/4.5.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-QQTlPTl06J/iiDbJCiepZ4H//BVraReU4O4EoRw1U02H5TLUIT7xn3GnDp9AXPSlJUDyFs4uWjWafNX6WrAojQ==",
|
||||
"path": "system.numerics.vectors/4.5.0",
|
||||
"hashPath": "system.numerics.vectors.4.5.0.nupkg.sha512"
|
||||
},
|
||||
"System.Reflection.Metadata/8.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-ptvgrFh7PvWI8bcVqG5rsA/weWM09EnthFHR5SCnS6IN+P4mj6rE1lBDC4U8HL9/57htKAqy4KQ3bBj84cfYyQ==",
|
||||
"path": "system.reflection.metadata/8.0.0",
|
||||
"hashPath": "system.reflection.metadata.8.0.0.nupkg.sha512"
|
||||
},
|
||||
"System.Runtime.CompilerServices.Unsafe/6.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==",
|
||||
"path": "system.runtime.compilerservices.unsafe/6.0.0",
|
||||
"hashPath": "system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512"
|
||||
},
|
||||
"System.Text.Encoding.CodePages/7.0.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-LSyCblMpvOe0N3E+8e0skHcrIhgV2huaNcjUUEa8hRtgEAm36aGkRoC8Jxlb6Ra6GSfF29ftduPNywin8XolzQ==",
|
||||
"path": "system.text.encoding.codepages/7.0.0",
|
||||
"hashPath": "system.text.encoding.codepages.7.0.0.nupkg.sha512"
|
||||
},
|
||||
"System.Threading.Tasks.Extensions/4.5.4": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg==",
|
||||
"path": "system.threading.tasks.extensions/4.5.4",
|
||||
"hashPath": "system.threading.tasks.extensions.4.5.4.nupkg.sha512"
|
||||
}
|
||||
}
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file=".NETStandard,Version=v2.0.AssemblyAttributes.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the ¡°Software¡±), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(
|
||||
".NETStandard,Version=v2.0",
|
||||
FrameworkDisplayName = ".NET Standard 2.0" )]
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSgharp.Generator")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+6cfaa42ff31cf213685faf60a3fcde42b99f0224")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("StgSgharp.Generator")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("StgSgharp.Generator")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
// 由 MSBuild WriteCodeFragment 类生成。
|
||||
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSgharp.Generator.Expression")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+6cfaa42ff31cf213685faf60a3fcde42b99f0224")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("StgSgharp.Generator.Expression")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("StgSgharp.Generator.Expression")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
// 由 MSBuild WriteCodeFragment 类生成。
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSgharp.Generator.Expression\obj\Debug\netstandard2.0\StgSgharp.Generator.csproj.AssemblyReference.cache
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSgharp.Generator.Expression\obj\Debug\netstandard2.0\StgSgharp.Generator.GeneratedMSBuildEditorConfig.editorconfig
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSgharp.Generator.Expression\obj\Debug\netstandard2.0\StgSgharp.Generator.AssemblyInfoInputs.cache
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSgharp.Generator.Expression\obj\Debug\netstandard2.0\StgSgharp.Generator.AssemblyInfo.cs
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSgharp.Generator.Expression\obj\Debug\netstandard2.0\StgSgharp.Generator.csproj.CoreCompileInputs.cache
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSgharp.Generator.Expression\obj\Debug\netstandard2.0\StgSgharp.Generator.sourcelink.json
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSgharp.Generator.Expression\bin\Debug\netstandard2.0\StgSgharp.Generator.deps.json
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSgharp.Generator.Expression\bin\Debug\netstandard2.0\StgSgharp.Generator.dll
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSgharp.Generator.Expression\bin\Debug\netstandard2.0\StgSgharp.Generator.pdb
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSgharp.Generator.Expression\obj\Debug\netstandard2.0\StgSgharp.Generator.dll
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSgharp.Generator.Expression\obj\Debug\netstandard2.0\StgSgharp.Generator.pdb
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/6cfaa42ff31cf213685faf60a3fcde42b99f0224/*"}}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSgharp.Generator.Expression")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+6cfaa42ff31cf213685faf60a3fcde42b99f0224")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("StgSgharp.Generator.Expression")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("StgSgharp.Generator.Expression")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
// 由 MSBuild WriteCodeFragment 类生成。
|
||||
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"format": 1,
|
||||
"restore": {
|
||||
"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSgharp.Generator.Expression\\StgSgharp.Generator.Expression.csproj": {}
|
||||
},
|
||||
"projects": {
|
||||
"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSgharp.Generator.Expression\\StgSgharp.Generator.Expression.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSgharp.Generator.Expression\\StgSgharp.Generator.Expression.csproj",
|
||||
"projectName": "StgSgharp.Generator.Expression",
|
||||
"projectPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSgharp.Generator.Expression\\StgSgharp.Generator.Expression.csproj",
|
||||
"packagesPath": "C:\\Users\\Youmu\\.nuget\\packages\\",
|
||||
"outputPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSgharp.Generator.Expression\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\Youmu\\AppData\\Roaming\\NuGet\\NuGet.Config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"netstandard2.0"
|
||||
],
|
||||
"sources": {
|
||||
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
|
||||
"C:\\Program Files\\dotnet\\library-packs": {},
|
||||
"D:\\Programmer\\NugetLocal": {},
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard2.0": {
|
||||
"targetAlias": "netstandard2.0",
|
||||
"projectReferences": {}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
},
|
||||
"restoreAuditProperties": {
|
||||
"enableAudit": "true",
|
||||
"auditLevel": "low",
|
||||
"auditMode": "direct"
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard2.0": {
|
||||
"targetAlias": "netstandard2.0",
|
||||
"dependencies": {
|
||||
"Microsoft.CodeAnalysis.CSharp": {
|
||||
"target": "Package",
|
||||
"version": "[4.12.0, )"
|
||||
},
|
||||
"NETStandard.Library": {
|
||||
"suppressParent": "All",
|
||||
"target": "Package",
|
||||
"version": "[2.0.3, )",
|
||||
"autoReferenced": true
|
||||
}
|
||||
},
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48",
|
||||
"net481"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.400\\RuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
{
|
||||
"format": 1,
|
||||
"restore": {
|
||||
"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSgharp.Generator.Expression\\StgSgharp.Generator.csproj": {}
|
||||
},
|
||||
"projects": {
|
||||
"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSgharp.Generator.Expression\\StgSgharp.Generator.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSgharp.Generator.Expression\\StgSgharp.Generator.csproj",
|
||||
"projectName": "StgSgharp.Generator",
|
||||
"projectPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSgharp.Generator.Expression\\StgSgharp.Generator.csproj",
|
||||
"packagesPath": "C:\\Users\\Youmu\\.nuget\\packages\\",
|
||||
"outputPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSgharp.Generator.Expression\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\Youmu\\AppData\\Roaming\\NuGet\\NuGet.Config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"netstandard2.0"
|
||||
],
|
||||
"sources": {
|
||||
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
|
||||
"C:\\Program Files\\dotnet\\library-packs": {},
|
||||
"D:\\Programmer\\NugetLocal": {},
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard2.0": {
|
||||
"targetAlias": "netstandard2.0",
|
||||
"projectReferences": {}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
},
|
||||
"restoreAuditProperties": {
|
||||
"enableAudit": "true",
|
||||
"auditLevel": "low",
|
||||
"auditMode": "direct"
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard2.0": {
|
||||
"targetAlias": "netstandard2.0",
|
||||
"dependencies": {
|
||||
"Microsoft.CodeAnalysis.CSharp": {
|
||||
"suppressParent": "All",
|
||||
"target": "Package",
|
||||
"version": "[4.12.0, )"
|
||||
},
|
||||
"NETStandard.Library": {
|
||||
"suppressParent": "All",
|
||||
"target": "Package",
|
||||
"version": "[2.0.3, )",
|
||||
"autoReferenced": true
|
||||
}
|
||||
},
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48",
|
||||
"net481"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.400\\RuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,15 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<Nullable>annotations</Nullable>
|
||||
<LangVersion>preview</LangVersion>
|
||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.1.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file=".NETStandard,Version=v2.1.AssemblyAttributes.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the ¡°Software¡±), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(
|
||||
".NETStandard,Version=v2.1",
|
||||
FrameworkDisplayName = ".NET Standard 2.1" )]
|
||||
@@ -0,0 +1,54 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StgSharp.Internal.AssemblyInfo.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the “Software”), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED “AS IS”,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute( "StgSharp.Internal" )]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute( "Debug" )]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute( "1.0.0.0" )]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute(
|
||||
"1.0.0+6cfaa42ff31cf213685faf60a3fcde42b99f0224" )]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute( "StgSharp.Internal" )]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute( "StgSharp.Internal" )]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute( "1.0.0.0" )]
|
||||
|
||||
// 由 MSBuild WriteCodeFragment 类生成。
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
{
|
||||
"format": 1,
|
||||
"restore": {
|
||||
"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Internal\\StgSharp.Internal.csproj": {}
|
||||
},
|
||||
"projects": {
|
||||
"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Internal\\StgSharp.Internal.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Internal\\StgSharp.Internal.csproj",
|
||||
"projectName": "StgSharp.Internal",
|
||||
"projectPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Internal\\StgSharp.Internal.csproj",
|
||||
"packagesPath": "C:\\Users\\Youmu\\.nuget\\packages\\",
|
||||
"outputPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Internal\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\Youmu\\AppData\\Roaming\\NuGet\\NuGet.Config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"netstandard2.1"
|
||||
],
|
||||
"sources": {
|
||||
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
|
||||
"C:\\Program Files\\dotnet\\library-packs": {},
|
||||
"D:\\Programmer\\NugetLocal": {},
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard2.1": {
|
||||
"targetAlias": "netstandard2.1",
|
||||
"projectReferences": {}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
},
|
||||
"restoreAuditProperties": {
|
||||
"enableAudit": "true",
|
||||
"auditLevel": "low",
|
||||
"auditMode": "direct"
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard2.1": {
|
||||
"targetAlias": "netstandard2.1",
|
||||
"dependencies": {
|
||||
"System.Runtime.CompilerServices.Unsafe": {
|
||||
"target": "Package",
|
||||
"version": "[6.1.0, )"
|
||||
}
|
||||
},
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48",
|
||||
"net481"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"frameworkReferences": {
|
||||
"NETStandard.Library": {
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.400\\RuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
{
|
||||
"version": 3,
|
||||
"targets": {
|
||||
".NETStandard,Version=v2.1": {
|
||||
"System.Runtime.CompilerServices.Unsafe/6.1.0": {
|
||||
"type": "package",
|
||||
"compile": {
|
||||
"lib/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"System.Runtime.CompilerServices.Unsafe/6.1.0": {
|
||||
"sha512": "5o/HZxx6RVqYlhKSq8/zronDkALJZUT2Vz0hx43f0gwe8mwlM0y2nYlqdBwLMzr262Bwvpikeb/yEwkAa5PADg==",
|
||||
"type": "package",
|
||||
"path": "system.runtime.compilerservices.unsafe/6.1.0",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"Icon.png",
|
||||
"PACKAGE.md",
|
||||
"buildTransitive/net461/System.Runtime.CompilerServices.Unsafe.targets",
|
||||
"buildTransitive/net462/_._",
|
||||
"buildTransitive/net6.0/_._",
|
||||
"buildTransitive/netcoreapp2.0/System.Runtime.CompilerServices.Unsafe.targets",
|
||||
"lib/net462/System.Runtime.CompilerServices.Unsafe.dll",
|
||||
"lib/net462/System.Runtime.CompilerServices.Unsafe.xml",
|
||||
"lib/net7.0/_._",
|
||||
"lib/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll",
|
||||
"lib/netstandard2.0/System.Runtime.CompilerServices.Unsafe.xml",
|
||||
"system.runtime.compilerservices.unsafe.6.1.0.nupkg.sha512",
|
||||
"system.runtime.compilerservices.unsafe.nuspec"
|
||||
]
|
||||
}
|
||||
},
|
||||
"projectFileDependencyGroups": {
|
||||
".NETStandard,Version=v2.1": [
|
||||
"System.Runtime.CompilerServices.Unsafe >= 6.1.0"
|
||||
]
|
||||
},
|
||||
"packageFolders": {
|
||||
"C:\\Users\\Youmu\\.nuget\\packages\\": {}
|
||||
},
|
||||
"project": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Internal\\StgSharp.Internal.csproj",
|
||||
"projectName": "StgSharp.Internal",
|
||||
"projectPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Internal\\StgSharp.Internal.csproj",
|
||||
"packagesPath": "C:\\Users\\Youmu\\.nuget\\packages\\",
|
||||
"outputPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Internal\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\Youmu\\AppData\\Roaming\\NuGet\\NuGet.Config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"netstandard2.1"
|
||||
],
|
||||
"sources": {
|
||||
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
|
||||
"C:\\Program Files\\dotnet\\library-packs": {},
|
||||
"D:\\Programmer\\NugetLocal": {},
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard2.1": {
|
||||
"targetAlias": "netstandard2.1",
|
||||
"projectReferences": {}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
},
|
||||
"restoreAuditProperties": {
|
||||
"enableAudit": "true",
|
||||
"auditLevel": "low",
|
||||
"auditMode": "direct"
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard2.1": {
|
||||
"targetAlias": "netstandard2.1",
|
||||
"dependencies": {
|
||||
"System.Runtime.CompilerServices.Unsafe": {
|
||||
"target": "Package",
|
||||
"version": "[6.1.0, )"
|
||||
}
|
||||
},
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48",
|
||||
"net481"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"frameworkReferences": {
|
||||
"NETStandard.Library": {
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.400\\RuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using StgSharp.Blueprint;
|
||||
using StgSharp.Geometries;
|
||||
using StgSharp.Math;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace StgSharp.Modeling.STEP
|
||||
{
|
||||
public abstract class IStepObject: StepExpressionBase , IGeometry
|
||||
{
|
||||
public abstract Point this[int index] { get; set; }
|
||||
|
||||
public abstract Vec4[] VertexStream { get; }
|
||||
public abstract CoordinationBase Coordination { get; }
|
||||
public abstract int VertexCount { get; }
|
||||
public abstract ReadOnlySpan<int> VertexIndices { get; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepExpression.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the “Software”), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED “AS IS”,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
using StgSharp;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace StgSharp.Modeling.STEP
|
||||
{
|
||||
public abstract class StepExpressionBase
|
||||
{
|
||||
public abstract List<StepExpressionBase> ParameterList { get; set; }
|
||||
|
||||
public int ID { get; internal set; }
|
||||
}
|
||||
|
||||
public abstract class StepExpressionParameter : StepExpressionBase
|
||||
{
|
||||
public abstract object Value { get; set; }
|
||||
}
|
||||
|
||||
public class StepObjectConstructor
|
||||
{
|
||||
|
||||
private static Regex regex = new Regex(
|
||||
@"(?<param1>.+?(\)|'\s?\)|'))\s?(?<sepcomma>,)\s?(?<other>(.|\(|\(\s?').+)",
|
||||
RegexOptions.Compiled );
|
||||
|
||||
private readonly int _id;
|
||||
private readonly List<string> _paramList;
|
||||
private string _caller;
|
||||
|
||||
public StepObjectConstructor( int id, string caller, string parameters )
|
||||
{
|
||||
_caller = caller;
|
||||
_paramList = new List<string>();
|
||||
SplitParameter( parameters );
|
||||
}
|
||||
|
||||
public string this[ int paramIndex ]
|
||||
{
|
||||
get => _paramList[ paramIndex ];
|
||||
}
|
||||
|
||||
public ReadOnlyCollection<string> ParamList
|
||||
{
|
||||
get => _paramList.AsReadOnly();
|
||||
}
|
||||
|
||||
public static string TempCallerName
|
||||
{
|
||||
get => "TEMPCALLER";
|
||||
}
|
||||
|
||||
public string Caller
|
||||
{
|
||||
get => _caller;
|
||||
internal set => _caller = value;
|
||||
}
|
||||
|
||||
public static StepObjectConstructor CreateTempExpression( int id )
|
||||
{
|
||||
return new StepObjectConstructor( id, "TEMPCALLER", string.Empty );
|
||||
}
|
||||
|
||||
private void SplitParameter( string parameters )
|
||||
{
|
||||
if( string.IsNullOrEmpty( parameters ) || string.IsNullOrWhiteSpace(
|
||||
parameters ) ) {
|
||||
return;
|
||||
}
|
||||
Match match = regex.Match( parameters );
|
||||
while( match.Success ) {
|
||||
_paramList.Add( match.Groups[ "param1" ].Value );
|
||||
parameters = match.Groups[ "other" ].Value;
|
||||
match = regex.Match( parameters );
|
||||
}
|
||||
_paramList.Add( parameters );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public record class StepCodeLine
|
||||
{
|
||||
public StepCodeLine( int id, string codeLine )
|
||||
{
|
||||
ID = id;
|
||||
CodeLine = codeLine;
|
||||
}
|
||||
|
||||
public int ID
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public string CodeLine
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,227 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="STEPHeader.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the “Software”), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED “AS IS”,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace StgSharp.Modeling.STEP
|
||||
{
|
||||
/// <summary>
|
||||
/// C# implementation of HEADER part in STEP file.
|
||||
/// </summary>
|
||||
public struct StepInfo
|
||||
{
|
||||
|
||||
private STEPFileDescriptor _header;
|
||||
private STEPFileName _name;
|
||||
private STEPSchema _schema;
|
||||
|
||||
public (int mainLevel, int? subLevel) Level
|
||||
{
|
||||
get => _header.Level;
|
||||
internal set => _header.Level = value;
|
||||
}
|
||||
|
||||
public DateTime TimeStamp
|
||||
{
|
||||
get => _name.TimeStamp;
|
||||
internal set => _name.TimeStamp = value;
|
||||
}
|
||||
|
||||
public STEPFileDescriptor Descriptor
|
||||
{
|
||||
get => _header;
|
||||
internal set => _header = value;
|
||||
}
|
||||
|
||||
public STEPFileName FileName
|
||||
{
|
||||
get => _name;
|
||||
internal set => _name = value;
|
||||
}
|
||||
|
||||
public STEPSchema Schema
|
||||
{
|
||||
get => _schema;
|
||||
internal set => _schema = value;
|
||||
}
|
||||
|
||||
public string Description
|
||||
{
|
||||
get => _header.Description;
|
||||
internal set => _header.Description = value;
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get => _name.Name;
|
||||
internal set => _name.Name = value;
|
||||
}
|
||||
|
||||
public string Author
|
||||
{
|
||||
get => _name.Author;
|
||||
internal set => _name.Author = value;
|
||||
}
|
||||
|
||||
public string Organization
|
||||
{
|
||||
get => _name.Organization;
|
||||
internal set => _name.Organization = value;
|
||||
}
|
||||
|
||||
public string OriginatingSystem
|
||||
{
|
||||
get => _name.OriginatingSystem;
|
||||
internal set => _name.OriginatingSystem = value;
|
||||
}
|
||||
|
||||
public string Authorization
|
||||
{
|
||||
get => _name.Authorization;
|
||||
internal set => _name.Authorization = value;
|
||||
}
|
||||
|
||||
public string PreprocessorVersion
|
||||
{
|
||||
get => _name.PreprocessorVersion;
|
||||
internal set => _name.PreprocessorVersion = value;
|
||||
}
|
||||
|
||||
public string Version
|
||||
{
|
||||
get => _name.Version;
|
||||
internal set => _name.Version = value;
|
||||
}
|
||||
|
||||
public string SchemaString
|
||||
{
|
||||
get => _schema.Data;
|
||||
internal set => _schema.Data = value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// C# implementation of FILE_NAME part in header of STEP file.
|
||||
/// </summary>
|
||||
public struct STEPFileName
|
||||
{
|
||||
|
||||
public DateTime TimeStamp
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
public string Author
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
public string Description
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
public string PreprocessorVersion
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
public string Version
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
public string Organization
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
public string OriginatingSystem
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
public string Authorization
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public struct STEPSchema
|
||||
{
|
||||
|
||||
private List<string> _schema;
|
||||
|
||||
public string Data
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// C# implementation of FILE_NAME part in header of STEP file.
|
||||
/// </summary>
|
||||
public struct STEPFileDescriptor
|
||||
{
|
||||
|
||||
public (int mainLevel,int? subLevel) Level
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
public string Description
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="STEP.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the “Software”), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED “AS IS”,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
using StgSharp.Blueprint;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace StgSharp.Modeling.STEP
|
||||
{
|
||||
public class StepModel
|
||||
{
|
||||
private Dictionary<int, IStepObject> _node
|
||||
= new Dictionary<int, IStepObject>( );
|
||||
private BlueprintSchedueler _builder;
|
||||
private StepInfo _header;
|
||||
|
||||
internal StepModel(
|
||||
StepInfo header,
|
||||
Dictionary<int, IStepObject> nodeSource)
|
||||
{
|
||||
_header = header;
|
||||
_node = nodeSource;
|
||||
_builder = new BlueprintSchedueler();
|
||||
}
|
||||
|
||||
public void OrganizeNode()
|
||||
{
|
||||
foreach (var node in _node)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void BuildGeometry()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepDataReader.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the “Software”), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED “AS IS”,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.IO;
|
||||
using System.IO.MemoryMappedFiles;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StgSharp.Modeling.STEP
|
||||
{
|
||||
public partial class StepReader
|
||||
{
|
||||
private Regex expressionSpilitter = new Regex(
|
||||
@"^#(?<id>[0-9]+)\s*?=\s*?(?<expression>\S.*?)\s*;$",
|
||||
RegexOptions.Compiled );
|
||||
|
||||
private ThreadLocal<ConcurrentQueue<StepCodeLine>> _codeLineQueue
|
||||
= new ThreadLocal<ConcurrentQueue<StepCodeLine>>();
|
||||
|
||||
public ConcurrentQueue<StepCodeLine> DataSectionPool
|
||||
{
|
||||
get => _codeLineQueue.Value;
|
||||
}
|
||||
|
||||
public void ReadDataSection()
|
||||
{
|
||||
if (_codeLineQueue.Value == null)
|
||||
{
|
||||
_codeLineQueue.Value = new ConcurrentQueue<StepCodeLine>();
|
||||
}
|
||||
using (MemoryMappedViewStream ms = _memoryFile.CreateViewStream(
|
||||
0, _size, MemoryMappedFileAccess.Read))
|
||||
{
|
||||
using (StreamReader sr = new StreamReader(ms))
|
||||
{
|
||||
long pos = _headStart;
|
||||
string line;
|
||||
while (string.IsNullOrEmpty(line = sr.ReadLine()))
|
||||
{
|
||||
switch (line)
|
||||
{
|
||||
default:
|
||||
break;
|
||||
}
|
||||
Match match = expressionSpilitter.Match(line);
|
||||
if (match.Success)
|
||||
{
|
||||
int id = int.Parse(match.Groups["id"].Value);
|
||||
string expression = match.Groups["expression"].Value;
|
||||
StepCodeLine stepExpression = new StepCodeLine(id, expression);
|
||||
_codeLineQueue.Value.Enqueue(stepExpression);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepHeadReader.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the ¡°Software¡±), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED ¡°AS IS¡±,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO.MemoryMappedFiles;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StgSharp.Modeling.STEP
|
||||
{
|
||||
public partial class StepReader
|
||||
{
|
||||
/**/
|
||||
|
||||
private static Regex expressionSplitter = new Regex(
|
||||
@"^(?<CALLER>[A-Z_]+)\s?\((?<PARAM>.+)\)\;",
|
||||
RegexOptions.Compiled );
|
||||
|
||||
public StepInfo GetInfo()
|
||||
{
|
||||
StepInfo info = new StepInfo();
|
||||
List<StepObjectConstructor> constructorList = new List<StepObjectConstructor>();
|
||||
using( MemoryMappedViewStream ms = _memoryFile.CreateViewStream(
|
||||
0, _size, MemoryMappedFileAccess.Read ) ) {
|
||||
using( StreamReader sr = new StreamReader( ms ) ) {
|
||||
long pos = _headStart;
|
||||
ms.Seek( _headStart, SeekOrigin.Begin );
|
||||
while( pos <= _headEnd ) {
|
||||
string token = ReadToken( sr, ref pos );
|
||||
if( token == "HEADER;" ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if( token == "ENDSEC;" ) {
|
||||
break;
|
||||
}
|
||||
|
||||
GroupCollection match = expressionSplitter.Match(
|
||||
token )
|
||||
.Groups;
|
||||
constructorList.Add(
|
||||
new StepObjectConstructor(
|
||||
0, match[ "CALLER" ].ToString(),
|
||||
match[ "PARAM" ].ToString() ) );
|
||||
}
|
||||
foreach( StepObjectConstructor constructor in constructorList ) {
|
||||
switch( constructor.Caller ) {
|
||||
case "FILE_DESCRIPTION":
|
||||
info.Description = StepDataParser.ToString(
|
||||
constructor[ 0 ] );
|
||||
info.Level = StepDataParser.ToVersion(
|
||||
constructor[ 1 ] );
|
||||
break;
|
||||
case "FILE_NAME":
|
||||
info.Name = StepDataParser.ToString(
|
||||
constructor[ 0 ] );
|
||||
info.TimeStamp = StepDataParser.ToDateTime(
|
||||
constructor[ 1 ] );
|
||||
info.Author = StepDataParser.ToString(
|
||||
constructor[ 2 ] );
|
||||
info.Organization = StepDataParser.ToString(
|
||||
constructor[ 3 ] );
|
||||
info.PreprocessorVersion = StepDataParser.ToString(
|
||||
constructor[ 4 ] );
|
||||
info.OriginatingSystem = StepDataParser.ToString(
|
||||
constructor[ 5 ] );
|
||||
info.Authorization = StepDataParser.ToString(
|
||||
constructor[ 6 ] );
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return info;
|
||||
}
|
||||
/**/
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,158 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepReader.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the “Software”), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED “AS IS”,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
using StgSharp;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO.MemoryMappedFiles;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace StgSharp.Modeling.STEP
|
||||
{
|
||||
public partial class StepReader : IDisposable
|
||||
{
|
||||
|
||||
private const string fileLabel = "ISO-10303-21;";
|
||||
|
||||
private bool disposedValue;
|
||||
private FileStream _fileStream;
|
||||
private long _headStart = -1, _headEnd = -1, _dataStart = -1, _size;
|
||||
private MemoryMappedFile _memoryFile;
|
||||
|
||||
private StepReader() { }
|
||||
|
||||
private StepReader( FileStream stream, long size )
|
||||
{
|
||||
_fileStream = stream;
|
||||
_size = size;
|
||||
_memoryFile = MemoryMappedFile.CreateFromFile(
|
||||
stream, mapName: null, size, MemoryMappedFileAccess.Read,
|
||||
HandleInheritability.None, leaveOpen: true );
|
||||
}
|
||||
|
||||
// ~StepReader()
|
||||
// {
|
||||
// Dispose(disposing: false);
|
||||
// }
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose( disposing: true );
|
||||
GC.SuppressFinalize( this );
|
||||
}
|
||||
|
||||
public static bool FromFile( string path, out StepReader reader )
|
||||
{
|
||||
FileInfo info = new FileInfo( path );
|
||||
if( !info.Exists ) {
|
||||
reader = null!;
|
||||
return false;
|
||||
}
|
||||
FileStream stream = new FileStream(
|
||||
path, FileMode.Open, FileAccess.Read, FileShare.Read,
|
||||
bufferSize: 4096, useAsync: true );
|
||||
byte[] fileHead = new byte[40];
|
||||
stream.Read( fileHead, 0, fileLabel.Length );
|
||||
if( !Encoding.UTF8.GetString( fileHead ).Contains( fileLabel ) ) {
|
||||
throw new InvalidDataException(
|
||||
"The given file is not a STEP file" );
|
||||
}
|
||||
reader = new StepReader( stream, info.Length );
|
||||
reader.LocateSection();
|
||||
return reader != null;
|
||||
}
|
||||
|
||||
private void LocateSection()
|
||||
{
|
||||
long startPos = 0;
|
||||
byte[] buffer = new byte[1024];
|
||||
Span<byte> bufferSpan = buffer,
|
||||
headerSec = Encoding.UTF8.GetBytes( "HEADER;" ),
|
||||
endsecSec = Encoding.UTF8.GetBytes( "ENDSEC;" ),
|
||||
dataSec = Encoding.UTF8.GetBytes( "DATA;" );
|
||||
_fileStream.Position = 0;
|
||||
for( ; startPos < _size; startPos += 1000 ) {
|
||||
_fileStream.Read( buffer );
|
||||
if( _headStart == -1 ) {
|
||||
long pos = bufferSpan.IndexOf( headerSec );
|
||||
if( pos >= 0 ) {
|
||||
_headStart = startPos + pos;
|
||||
}
|
||||
}
|
||||
if( _headEnd == -1 ) {
|
||||
long pos = bufferSpan.IndexOf( endsecSec );
|
||||
if( pos >= 0 ) {
|
||||
_headEnd = startPos + pos;
|
||||
}
|
||||
}
|
||||
if( _dataStart == -1 ) {
|
||||
long pos = bufferSpan.IndexOf( dataSec );
|
||||
if( pos >= 0 ) {
|
||||
_dataStart = startPos + pos;
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
_fileStream.Seek( 1000, SeekOrigin.Current );
|
||||
}
|
||||
}
|
||||
|
||||
private string ReadToken( StreamReader reader, ref long posCache )
|
||||
{
|
||||
StringBuilder token = new StringBuilder( 100 );
|
||||
while( token.Length == 0 || token[ token.Length - 1 ] != ';' ) {
|
||||
string subString = reader.ReadLine();
|
||||
if( subString == null ) {
|
||||
break;
|
||||
}
|
||||
token.Append( subString.TrimStart() );
|
||||
}
|
||||
posCache += token.Length;
|
||||
return token.ToString();
|
||||
}
|
||||
|
||||
private protected virtual void Dispose( bool disposing )
|
||||
{
|
||||
if( !disposedValue ) {
|
||||
if( disposing ) {
|
||||
_fileStream.Dispose();
|
||||
_memoryFile.Dispose();
|
||||
}
|
||||
|
||||
disposedValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StepDataParser.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the “Software”), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED “AS IS”,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
using StgSharp.Math;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace StgSharp.Modeling.STEP
|
||||
{
|
||||
public static class StepDataParser
|
||||
{
|
||||
|
||||
private static Regex _stringParser = new Regex(
|
||||
@"(\(\s?'|')\s*(?<value>.+)\s*('\s*\)|')", RegexOptions.Compiled );
|
||||
private static Regex _vectorParser = new Regex(
|
||||
@"^\(\s+(?<x>-?[0-9]+\.[0-9]+),\s+(?<y>-?[0-9]+\.[0-9]+),\s+(?<z>-?[0-9]+\.[0-9]+)\s+\)$",
|
||||
RegexOptions.Compiled );
|
||||
|
||||
public static DateTime ToDateTime( string source )
|
||||
{
|
||||
Match match = _stringParser.Match( source );
|
||||
if( match.Success ) {
|
||||
return DateTime.Parse( match.Groups[ "value" ].Value );
|
||||
}
|
||||
throw new InvalidCastException();
|
||||
}
|
||||
|
||||
public static string ToString( string source )
|
||||
{
|
||||
Match match = _stringParser.Match( source );
|
||||
if( match.Success ) {
|
||||
return match.Groups[ "value" ].Value;
|
||||
}
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
public static Vec3 ToVector3D( string source )
|
||||
{
|
||||
Match match = _vectorParser.Match( source );
|
||||
if( match.Success ) {
|
||||
return new Vec3(
|
||||
float.Parse( match.Groups[ "x" ].Value ),
|
||||
float.Parse( match.Groups[ "y" ].Value ),
|
||||
float.Parse( match.Groups[ "z" ].Value ) );
|
||||
}
|
||||
return Vec3.Zero;
|
||||
}
|
||||
|
||||
public static (int, int?) ToVersion( string source )
|
||||
{
|
||||
Match match = _stringParser.Match( source );
|
||||
if( match.Success ) {
|
||||
string data = match.Groups[ "value" ].Value;
|
||||
if( data.Contains( ';' ) ) {
|
||||
string[] subData = data.Split( ';' );
|
||||
return (int.Parse( subData[ 0 ] ), int.Parse( subData[ 1 ] ));
|
||||
}
|
||||
return (int.Parse( data ), null);
|
||||
}
|
||||
return (-1,-1);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>preview</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\StgSharp\StgSharp.Commom.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="STEP\Elements\" />
|
||||
<Folder Include="Expression\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,23 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSharp.Model")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+6cfaa42ff31cf213685faf60a3fcde42b99f0224")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("StgSharp.Model")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharp.Model")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
// 由 MSBuild WriteCodeFragment 类生成。
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSharp.Model.Lang")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+6cfaa42ff31cf213685faf60a3fcde42b99f0224")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("StgSharp.Model.Lang")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharp.Model.Lang")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
// 由 MSBuild WriteCodeFragment 类生成。
|
||||
|
||||
@@ -1,33 +1,3 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="StgSharp.Modeling.AssemblyInfo.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the “Software”), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED “AS IS”,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
@@ -41,14 +11,13 @@
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute( "StgSharp.Modeling" )]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute( "Debug" )]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute( "1.0.0.0" )]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute(
|
||||
"1.0.0+63c3cd17e2188771886daeb4046edf28633fa949" )]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute( "StgSharp.Modeling" )]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute( "StgSharp.Modeling" )]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute( "1.0.0.0" )]
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSharp.Modeling")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+6cfaa42ff31cf213685faf60a3fcde42b99f0224")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("StgSharp.Modeling")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharp.Modeling")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
// 由 MSBuild WriteCodeFragment 类生成。
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/63c3cd17e2188771886daeb4046edf28633fa949/*"}}
|
||||
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/6cfaa42ff31cf213685faf60a3fcde42b99f0224/*"}}
|
||||
@@ -0,0 +1,149 @@
|
||||
{
|
||||
"format": 1,
|
||||
"restore": {
|
||||
"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Modeling\\StgSharp.Model.Lang.csproj": {}
|
||||
},
|
||||
"projects": {
|
||||
"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Modeling\\StgSharp.Model.Lang.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Modeling\\StgSharp.Model.Lang.csproj",
|
||||
"projectName": "StgSharp.Model.Lang",
|
||||
"projectPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Modeling\\StgSharp.Model.Lang.csproj",
|
||||
"packagesPath": "C:\\Users\\Youmu\\.nuget\\packages\\",
|
||||
"outputPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Modeling\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\Youmu\\AppData\\Roaming\\NuGet\\NuGet.Config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"netstandard2.1"
|
||||
],
|
||||
"sources": {
|
||||
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
|
||||
"C:\\Program Files\\dotnet\\library-packs": {},
|
||||
"D:\\Programmer\\NugetLocal": {},
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard2.1": {
|
||||
"targetAlias": "netstandard2.1",
|
||||
"projectReferences": {
|
||||
"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp\\StgSharp.Commom.csproj": {
|
||||
"projectPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp\\StgSharp.Commom.csproj"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
},
|
||||
"restoreAuditProperties": {
|
||||
"enableAudit": "true",
|
||||
"auditLevel": "low",
|
||||
"auditMode": "direct"
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard2.1": {
|
||||
"targetAlias": "netstandard2.1",
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48",
|
||||
"net481"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"frameworkReferences": {
|
||||
"NETStandard.Library": {
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.400\\RuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp\\StgSharp.Commom.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp\\StgSharp.Commom.csproj",
|
||||
"projectName": "StgSharp.Commom",
|
||||
"projectPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp\\StgSharp.Commom.csproj",
|
||||
"packagesPath": "C:\\Users\\Youmu\\.nuget\\packages\\",
|
||||
"outputPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\Youmu\\AppData\\Roaming\\NuGet\\NuGet.Config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"netstandard2.1"
|
||||
],
|
||||
"sources": {
|
||||
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
|
||||
"C:\\Program Files\\dotnet\\library-packs": {},
|
||||
"D:\\Programmer\\NugetLocal": {},
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard2.1": {
|
||||
"targetAlias": "netstandard2.1",
|
||||
"projectReferences": {}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
},
|
||||
"restoreAuditProperties": {
|
||||
"enableAudit": "true",
|
||||
"auditLevel": "low",
|
||||
"auditMode": "direct"
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard2.1": {
|
||||
"targetAlias": "netstandard2.1",
|
||||
"dependencies": {
|
||||
"Microsoft.CSharp": {
|
||||
"target": "Package",
|
||||
"version": "[4.7.0, )"
|
||||
},
|
||||
"Microsoft.Windows.CsWin32": {
|
||||
"suppressParent": "All",
|
||||
"target": "Package",
|
||||
"version": "[0.3.49-beta, )"
|
||||
},
|
||||
"System.Runtime.CompilerServices.Unsafe": {
|
||||
"target": "Package",
|
||||
"version": "[6.1.0, )"
|
||||
}
|
||||
},
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48",
|
||||
"net481"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"frameworkReferences": {
|
||||
"NETStandard.Library": {
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.400\\RuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
{
|
||||
"format": 1,
|
||||
"restore": {
|
||||
"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Modeling\\StgSharp.Model.csproj": {}
|
||||
},
|
||||
"projects": {
|
||||
"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Modeling\\StgSharp.Model.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Modeling\\StgSharp.Model.csproj",
|
||||
"projectName": "StgSharp.Model",
|
||||
"projectPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Modeling\\StgSharp.Model.csproj",
|
||||
"packagesPath": "C:\\Users\\Youmu\\.nuget\\packages\\",
|
||||
"outputPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Modeling\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\Youmu\\AppData\\Roaming\\NuGet\\NuGet.Config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"netstandard2.1"
|
||||
],
|
||||
"sources": {
|
||||
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
|
||||
"C:\\Program Files\\dotnet\\library-packs": {},
|
||||
"D:\\Programmer\\NugetLocal": {},
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard2.1": {
|
||||
"targetAlias": "netstandard2.1",
|
||||
"projectReferences": {
|
||||
"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp\\StgSharp.csproj": {
|
||||
"projectPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp\\StgSharp.csproj"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
},
|
||||
"restoreAuditProperties": {
|
||||
"enableAudit": "true",
|
||||
"auditLevel": "low",
|
||||
"auditMode": "direct"
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard2.1": {
|
||||
"targetAlias": "netstandard2.1",
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48",
|
||||
"net481"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"frameworkReferences": {
|
||||
"NETStandard.Library": {
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.400\\RuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp\\StgSharp.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp\\StgSharp.csproj",
|
||||
"projectName": "StgSharp",
|
||||
"projectPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp\\StgSharp.csproj",
|
||||
"packagesPath": "C:\\Users\\Youmu\\.nuget\\packages\\",
|
||||
"outputPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\Youmu\\AppData\\Roaming\\NuGet\\NuGet.Config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"netstandard2.1"
|
||||
],
|
||||
"sources": {
|
||||
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
|
||||
"C:\\Program Files\\dotnet\\library-packs": {},
|
||||
"D:\\Programmer\\NugetLocal": {},
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard2.1": {
|
||||
"targetAlias": "netstandard2.1",
|
||||
"projectReferences": {}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
},
|
||||
"restoreAuditProperties": {
|
||||
"enableAudit": "true",
|
||||
"auditLevel": "low",
|
||||
"auditMode": "direct"
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard2.1": {
|
||||
"targetAlias": "netstandard2.1",
|
||||
"dependencies": {
|
||||
"Microsoft.CSharp": {
|
||||
"target": "Package",
|
||||
"version": "[4.7.0, )"
|
||||
},
|
||||
"Microsoft.Windows.CsWin32": {
|
||||
"suppressParent": "All",
|
||||
"target": "Package",
|
||||
"version": "[0.3.49-beta, )"
|
||||
},
|
||||
"System.Runtime.CompilerServices.Unsafe": {
|
||||
"target": "Package",
|
||||
"version": "[6.1.0, )"
|
||||
}
|
||||
},
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48",
|
||||
"net481"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"frameworkReferences": {
|
||||
"NETStandard.Library": {
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.400\\RuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,13 +13,8 @@
|
||||
"packagesPath": "C:\\Users\\Youmu\\.nuget\\packages\\",
|
||||
"outputPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Modeling\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"fallbackFolders": [
|
||||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
|
||||
],
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\Youmu\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
|
||||
"C:\\Users\\Youmu\\AppData\\Roaming\\NuGet\\NuGet.Config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"netstandard2.1"
|
||||
@@ -83,13 +78,8 @@
|
||||
"packagesPath": "C:\\Users\\Youmu\\.nuget\\packages\\",
|
||||
"outputPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"fallbackFolders": [
|
||||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
|
||||
],
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\Youmu\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
|
||||
"C:\\Users\\Youmu\\AppData\\Roaming\\NuGet\\NuGet.Config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"netstandard2.1"
|
||||
@@ -129,6 +119,10 @@
|
||||
"suppressParent": "All",
|
||||
"target": "Package",
|
||||
"version": "[0.3.49-beta, )"
|
||||
},
|
||||
"System.Runtime.CompilerServices.Unsafe": {
|
||||
"target": "Package",
|
||||
"version": "[6.1.0, )"
|
||||
}
|
||||
},
|
||||
"imports": [
|
||||
|
||||
@@ -15,17 +15,31 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"StgSharp/1.0.0": {
|
||||
"System.Runtime.CompilerServices.Unsafe/6.1.0": {
|
||||
"type": "package",
|
||||
"compile": {
|
||||
"lib/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll": {
|
||||
"related": ".xml"
|
||||
}
|
||||
}
|
||||
},
|
||||
"StgSharp.Commom/1.0.0": {
|
||||
"type": "project",
|
||||
"framework": ".NETStandard,Version=v2.1",
|
||||
"dependencies": {
|
||||
"Microsoft.CSharp": "4.7.0"
|
||||
"Microsoft.CSharp": "4.7.0",
|
||||
"System.Runtime.CompilerServices.Unsafe": "6.1.0"
|
||||
},
|
||||
"compile": {
|
||||
"bin/placeholder/StgSharp.dll": {}
|
||||
"bin/placeholder/StgSharp.Commom.dll": {}
|
||||
},
|
||||
"runtime": {
|
||||
"bin/placeholder/StgSharp.dll": {}
|
||||
"bin/placeholder/StgSharp.Commom.dll": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -100,37 +114,53 @@
|
||||
"version.txt"
|
||||
]
|
||||
},
|
||||
"StgSharp/1.0.0": {
|
||||
"System.Runtime.CompilerServices.Unsafe/6.1.0": {
|
||||
"sha512": "5o/HZxx6RVqYlhKSq8/zronDkALJZUT2Vz0hx43f0gwe8mwlM0y2nYlqdBwLMzr262Bwvpikeb/yEwkAa5PADg==",
|
||||
"type": "package",
|
||||
"path": "system.runtime.compilerservices.unsafe/6.1.0",
|
||||
"files": [
|
||||
".nupkg.metadata",
|
||||
".signature.p7s",
|
||||
"Icon.png",
|
||||
"PACKAGE.md",
|
||||
"buildTransitive/net461/System.Runtime.CompilerServices.Unsafe.targets",
|
||||
"buildTransitive/net462/_._",
|
||||
"buildTransitive/net6.0/_._",
|
||||
"buildTransitive/netcoreapp2.0/System.Runtime.CompilerServices.Unsafe.targets",
|
||||
"lib/net462/System.Runtime.CompilerServices.Unsafe.dll",
|
||||
"lib/net462/System.Runtime.CompilerServices.Unsafe.xml",
|
||||
"lib/net7.0/_._",
|
||||
"lib/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll",
|
||||
"lib/netstandard2.0/System.Runtime.CompilerServices.Unsafe.xml",
|
||||
"system.runtime.compilerservices.unsafe.6.1.0.nupkg.sha512",
|
||||
"system.runtime.compilerservices.unsafe.nuspec"
|
||||
]
|
||||
},
|
||||
"StgSharp.Commom/1.0.0": {
|
||||
"type": "project",
|
||||
"path": "../StgSharp/StgSharp.csproj",
|
||||
"msbuildProject": "../StgSharp/StgSharp.csproj"
|
||||
"path": "../StgSharp/StgSharp.Commom.csproj",
|
||||
"msbuildProject": "../StgSharp/StgSharp.Commom.csproj"
|
||||
}
|
||||
},
|
||||
"projectFileDependencyGroups": {
|
||||
".NETStandard,Version=v2.1": [
|
||||
"StgSharp >= 1.0.0"
|
||||
"StgSharp.Commom >= 1.0.0"
|
||||
]
|
||||
},
|
||||
"packageFolders": {
|
||||
"C:\\Users\\Youmu\\.nuget\\packages\\": {},
|
||||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {}
|
||||
"C:\\Users\\Youmu\\.nuget\\packages\\": {}
|
||||
},
|
||||
"project": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Modeling\\StgSharp.Modeling.csproj",
|
||||
"projectName": "StgSharp.Modeling",
|
||||
"projectPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Modeling\\StgSharp.Modeling.csproj",
|
||||
"projectUniqueName": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Modeling\\StgSharp.Model.Lang.csproj",
|
||||
"projectName": "StgSharp.Model.Lang",
|
||||
"projectPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Modeling\\StgSharp.Model.Lang.csproj",
|
||||
"packagesPath": "C:\\Users\\Youmu\\.nuget\\packages\\",
|
||||
"outputPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Modeling\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"fallbackFolders": [
|
||||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
|
||||
],
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\Youmu\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
|
||||
"C:\\Users\\Youmu\\AppData\\Roaming\\NuGet\\NuGet.Config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"netstandard2.1"
|
||||
@@ -145,8 +175,8 @@
|
||||
"netstandard2.1": {
|
||||
"targetAlias": "netstandard2.1",
|
||||
"projectReferences": {
|
||||
"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp\\StgSharp.csproj": {
|
||||
"projectPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp\\StgSharp.csproj"
|
||||
"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp\\StgSharp.Commom.csproj": {
|
||||
"projectPath": "D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp\\StgSharp.Commom.csproj"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
//-----------------------------------------------------------------------
|
||||
using StgSharp.Graphics;
|
||||
using StgSharp.Graphics.OpenGL;
|
||||
using StgSharp.Internal.OpenGL;
|
||||
|
||||
using System;
|
||||
|
||||
@@ -173,22 +174,22 @@ namespace StgSharp
|
||||
#pragma warning restore CA1027
|
||||
{
|
||||
|
||||
Joystick_1 = GLconst.GLFW_JOYSTICK_1,
|
||||
Joystick_2 = GLconst.GLFW_JOYSTICK_2,
|
||||
Joystick_3 = GLconst.GLFW_JOYSTICK_3,
|
||||
Joystick_4 = GLconst.GLFW_JOYSTICK_4,
|
||||
Joystick_5 = GLconst.GLFW_JOYSTICK_5,
|
||||
Joystick_6 = GLconst.GLFW_JOYSTICK_6,
|
||||
Joystick_7 = GLconst.GLFW_JOYSTICK_7,
|
||||
Joystick_8 = GLconst.GLFW_JOYSTICK_8,
|
||||
Joystick_9 = GLconst.GLFW_JOYSTICK_9,
|
||||
Joystick_10 = GLconst.GLFW_JOYSTICK_10,
|
||||
Joystick_11 = GLconst.GLFW_JOYSTICK_11,
|
||||
Joystick_12 = GLconst.GLFW_JOYSTICK_12,
|
||||
Joystick_13 = GLconst.GLFW_JOYSTICK_13,
|
||||
Joystick_14 = GLconst.GLFW_JOYSTICK_14,
|
||||
Joystick_15 = GLconst.GLFW_JOYSTICK_15,
|
||||
Joystick_16 = GLconst.GLFW_JOYSTICK_16,
|
||||
Joystick_1 = glConst.GLFW_JOYSTICK_1,
|
||||
Joystick_2 = glConst.GLFW_JOYSTICK_2,
|
||||
Joystick_3 = glConst.GLFW_JOYSTICK_3,
|
||||
Joystick_4 = glConst.GLFW_JOYSTICK_4,
|
||||
Joystick_5 = glConst.GLFW_JOYSTICK_5,
|
||||
Joystick_6 = glConst.GLFW_JOYSTICK_6,
|
||||
Joystick_7 = glConst.GLFW_JOYSTICK_7,
|
||||
Joystick_8 = glConst.GLFW_JOYSTICK_8,
|
||||
Joystick_9 = glConst.GLFW_JOYSTICK_9,
|
||||
Joystick_10 = glConst.GLFW_JOYSTICK_10,
|
||||
Joystick_11 = glConst.GLFW_JOYSTICK_11,
|
||||
Joystick_12 = glConst.GLFW_JOYSTICK_12,
|
||||
Joystick_13 = glConst.GLFW_JOYSTICK_13,
|
||||
Joystick_14 = glConst.GLFW_JOYSTICK_14,
|
||||
Joystick_15 = glConst.GLFW_JOYSTICK_15,
|
||||
Joystick_16 = glConst.GLFW_JOYSTICK_16,
|
||||
First = Joystick_1,
|
||||
Last = Joystick_16
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
using StgSharp.Data;
|
||||
using StgSharp.Internal;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -33,7 +33,7 @@ using StgSharp;
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace StgSharp.Data
|
||||
namespace StgSharp.Internal
|
||||
{
|
||||
public class DataLabel
|
||||
{
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
using StgSharp.Data.Intrinsic;
|
||||
using StgSharp.Internal.Intrinsic;
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
@@ -39,7 +39,7 @@ using System.Transactions;
|
||||
using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace StgSharp.Data
|
||||
namespace StgSharp.Internal
|
||||
{
|
||||
public class RandomGenerator
|
||||
{
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
using StgSharp.Data.FileIO;
|
||||
using StgSharp.Internal.FileIO;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -36,7 +36,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StgSharp.Data
|
||||
namespace StgSharp.Internal
|
||||
{
|
||||
/// <summary>
|
||||
/// An independent storage area, used as the only folder type in root folder. Contains several
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
using StgSharp.Data.Intrinsic;
|
||||
using StgSharp.Internal.Intrinsic;
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
@@ -38,7 +38,7 @@ using System.Runtime.InteropServices;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
namespace StgSharp.Data
|
||||
namespace StgSharp.Internal
|
||||
{
|
||||
[StructLayout( LayoutKind.Explicit, Size = 16 )]
|
||||
public struct SSDSegmentHead
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
using StgSharp.Data.Intrinsic;
|
||||
using StgSharp.Internal.Intrinsic;
|
||||
using StgSharp.Math;
|
||||
|
||||
using System;
|
||||
@@ -39,7 +39,7 @@ using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StgSharp.Data
|
||||
namespace StgSharp.Internal
|
||||
{
|
||||
[StructLayout( LayoutKind.Explicit, Size = StgSharp.ssdSegmentLength * 16 )]
|
||||
public unsafe struct SSDSegment : IComparable<int>, IComparable<SSDSegment>
|
||||
|
||||
@@ -28,14 +28,14 @@
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
using StgSharp.Data.FileIO;
|
||||
using StgSharp.Internal.FileIO;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace StgSharp.Data
|
||||
namespace StgSharp.Internal
|
||||
{
|
||||
public partial class SSD
|
||||
{
|
||||
|
||||
@@ -28,14 +28,14 @@
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
using StgSharp.Data.FileIO;
|
||||
using StgSharp.Internal.FileIO;
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace StgSharp.Data
|
||||
namespace StgSharp.Internal
|
||||
{
|
||||
public class SSDFolder : ISSDSerializable
|
||||
{
|
||||
|
||||
@@ -43,7 +43,7 @@ using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace StgSharp.Data.FileIO
|
||||
namespace StgSharp.Internal.FileIO
|
||||
{
|
||||
public class SSDraw
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace StgSharp.Data
|
||||
namespace StgSharp.Internal
|
||||
{
|
||||
/// <summary>
|
||||
/// A class contains a sets of methods to serialize several types
|
||||
|
||||
@@ -34,7 +34,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StgSharp.Data
|
||||
namespace StgSharp.Internal
|
||||
{
|
||||
public interface ISSDSerializable
|
||||
{
|
||||
|
||||
@@ -33,7 +33,8 @@
|
||||
// using StgSharp.Graphics;
|
||||
// using StgSharp.Math;
|
||||
|
||||
using StgSharp.Data.Intrinsic;
|
||||
using StgSharp.Internal;
|
||||
using StgSharp.Internal.Intrinsic;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -168,8 +169,8 @@ namespace StgSharp
|
||||
/// <summary>
|
||||
/// Write a log message to log file, and mark the _level of this message.
|
||||
/// </summary>
|
||||
/// <param name="message"> A string contains information of how current evironment runs. </param>
|
||||
/// <param name="logType"> The severity of current message. </param>
|
||||
/// <param _name="message"> A string contains information of how current evironment runs. </param>
|
||||
/// <param _name="logType"> The severity of current message. </param>
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
public static void WriteLog( string message, LogType logType )
|
||||
{
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace StgSharp.Geometries
|
||||
/// <summary>
|
||||
/// Calculate movement to center
|
||||
/// </summary>
|
||||
/// <param name="tick"> CurrentBlueprint time tick </param>
|
||||
/// <param _name="tick"> CurrentBlueprint time tick </param>
|
||||
/// <returns></returns>
|
||||
public virtual Vec3 MovCenter( uint tick )
|
||||
{
|
||||
|
||||
@@ -3,7 +3,12 @@
|
||||
// Project-level suppressions either have no target or are given
|
||||
// a specific target and scoped to a namespace, type, member, etc.
|
||||
|
||||
global using StgSharp.Internal;
|
||||
global using StgSharp.Internal.Intrinsic;
|
||||
global using StgSharp.Internal.OpenGL;
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[assembly: SuppressMessage("Design", "CA1008:枚举应具有零值", Justification = "<挂起>", Scope = "type", Target = "~T:StgSharp.Graphics.OpenGL.ShaderStatus")]
|
||||
[assembly: SuppressMessage("Naming", "CA1715:标识符应具有正确的前缀", Justification = "<挂起>", Scope = "member", Target = "~M:StgSharp.Graphics.OpenGL.ShaderProgram.GetUniform``2(System.String)~StgSharp.Graphics.OpenGL.Uniform{``0,``1}")]
|
||||
@@ -15,3 +20,4 @@ using System.Diagnostics.CodeAnalysis;
|
||||
[assembly: SuppressMessage("Performance", "CA1864:首选 \"IDictionary.TryAdd(TKey, TValue)\" 方法", Justification = "<挂起>", Scope = "member", Target = "~P:StgSharp.MVVM.View.ViewBase.ViewRender`1.Item(System.String)")]
|
||||
[assembly: SuppressMessage("Design", "CA1033:接口方法应可由子类型调用", Justification = "<挂起>", Scope = "member", Target = "~P:StgSharp.Collections.IBidirectionalDictionary`2.System#Collections#Generic#IDictionary<TFirst,TSecond>#Keys")]
|
||||
[assembly: SuppressMessage("Design", "CA1033:接口方法应可由子类型调用", Justification = "<挂起>", Scope = "member", Target = "~P:StgSharp.Collections.IBidirectionalDictionary`2.System#Collections#Generic#IDictionary<TFirst,TSecond>#Values")]
|
||||
[assembly: DefaultDllImportSearchPaths(DllImportSearchPath.ApplicationDirectory)]
|
||||
@@ -50,14 +50,14 @@ namespace StgSharp.Graphics
|
||||
/// <summary>
|
||||
/// Get the only handle to one of the Object instance
|
||||
/// </summary>
|
||||
/// <param name="index"></param>
|
||||
/// <param _name="index"></param>
|
||||
/// <returns></returns>
|
||||
public GlHandle this[ int index ] => _bufferHandle[ index ];
|
||||
|
||||
/// <summary>
|
||||
/// Bind a buffer instance to OpenGL
|
||||
/// </summary>
|
||||
/// <param name="index"> Index of handle of the object in this instance to be bind </param>
|
||||
/// <param _name="index"> Index of handle of the object in this instance to be bind </param>
|
||||
public abstract void Bind( int index );
|
||||
|
||||
public void Dispose()
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
using StgSharp.Data;
|
||||
using StgSharp.Internal;
|
||||
using StgSharp.Graphics.OpenGL;
|
||||
using StgSharp.Math;
|
||||
|
||||
@@ -41,6 +41,7 @@ using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using StgSharp.Internal.OpenGL;
|
||||
|
||||
namespace StgSharp.Graphics
|
||||
{
|
||||
@@ -106,7 +107,7 @@ namespace StgSharp.Graphics
|
||||
internal set => _rawInfo.Width = value;
|
||||
}
|
||||
|
||||
public int PixelSize => GlHelper.GetPixelSize(
|
||||
public int PixelSize => ImageInfo.GetPixelSize(
|
||||
_rawInfo.pixelLayout, _rawInfo.Channel );
|
||||
|
||||
public PixelChannelLayout PixelLayout
|
||||
@@ -173,7 +174,7 @@ namespace StgSharp.Graphics
|
||||
public unsafe byte[] GetBytes()
|
||||
{
|
||||
if( _data.Length == 0 ) {
|
||||
int size = Width * Height * GlHelper.GetPixelSize(
|
||||
int size = Width * Height * ImageInfo.GetPixelSize(
|
||||
PixelLayout, Channel );
|
||||
_data = new Span<byte>( ( byte* )_rawInfo.StreamPtr,
|
||||
size ).ToArray();
|
||||
@@ -207,76 +208,6 @@ namespace StgSharp.Graphics
|
||||
|
||||
}
|
||||
|
||||
[StructLayout( LayoutKind.Sequential )]
|
||||
internal struct ImageInfo
|
||||
{
|
||||
|
||||
private ImageChannel channel;
|
||||
private int height;
|
||||
private int width;
|
||||
private IntPtr pixelPtr;
|
||||
internal PixelChannelLayout pixelLayout;
|
||||
|
||||
public ImageChannel Channel
|
||||
{
|
||||
get => channel;
|
||||
set { channel = value; }
|
||||
}
|
||||
|
||||
public int ChannelCount
|
||||
{
|
||||
get => GlHelper.GetChannelCount( channel );
|
||||
}
|
||||
|
||||
public int Height
|
||||
{
|
||||
get => height;
|
||||
set => height = value;
|
||||
}
|
||||
|
||||
public int StreamSize
|
||||
{
|
||||
get => width * height * GlHelper.GetPixelSize(
|
||||
pixelLayout, channel );
|
||||
}
|
||||
|
||||
public int Width
|
||||
{
|
||||
get => width;
|
||||
set => width = value;
|
||||
}
|
||||
|
||||
public IntPtr StreamPtr
|
||||
{
|
||||
get => pixelPtr;
|
||||
internal set => pixelPtr = value;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int hash = 17;
|
||||
hash = hash * 17 + width;
|
||||
hash = hash * 17 + height;
|
||||
hash = hash * 17 + ( int )channel;
|
||||
return hash;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{channel}\t{width}\t{height}\t{(ulong)StreamPtr}";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public enum ImageChannel : uint
|
||||
{
|
||||
|
||||
SingleColor = GLconst.RED,
|
||||
DoubleColor = GLconst.RG,
|
||||
TripleColor = GLconst.RGB,
|
||||
WithAlphaChannel = GLconst.RGBA,
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
namespace StgSharp.Graphics.OpenGL
|
||||
@@ -284,54 +215,5 @@ namespace StgSharp.Graphics.OpenGL
|
||||
public static partial class GlHelper
|
||||
{
|
||||
|
||||
internal static int GetChannelCount( ImageChannel channel )
|
||||
{
|
||||
return channel switch
|
||||
{
|
||||
ImageChannel.SingleColor => 1,
|
||||
ImageChannel.DoubleColor => 2,
|
||||
ImageChannel.TripleColor => 3,
|
||||
ImageChannel.WithAlphaChannel => 4,
|
||||
_ => throw new InvalidCastException(
|
||||
"Unknown color channel decoding setting." )
|
||||
};
|
||||
}
|
||||
|
||||
internal static int GetPixelSize(
|
||||
PixelChannelLayout layout,
|
||||
ImageChannel cahnnel )
|
||||
{
|
||||
return layout switch
|
||||
{
|
||||
PixelChannelLayout.UByte => sizeof( byte ) * GetChannelCount(
|
||||
cahnnel ),
|
||||
PixelChannelLayout.Byte => sizeof( byte ) * GetChannelCount(
|
||||
cahnnel ),
|
||||
PixelChannelLayout.UShort => sizeof( short ) * GetChannelCount(
|
||||
cahnnel ),
|
||||
PixelChannelLayout.Short => sizeof( short ) * GetChannelCount(
|
||||
cahnnel ),
|
||||
PixelChannelLayout.UInt => sizeof( int ) * GetChannelCount(
|
||||
cahnnel ),
|
||||
PixelChannelLayout.Int => sizeof( int ) * GetChannelCount(
|
||||
cahnnel ),
|
||||
PixelChannelLayout.Float => sizeof( float ) * GetChannelCount(
|
||||
cahnnel ),
|
||||
PixelChannelLayout.UByte332 => sizeof( byte ),
|
||||
PixelChannelLayout.UByte233Rev => sizeof( byte ),
|
||||
PixelChannelLayout.UShort565 => sizeof( short ),
|
||||
PixelChannelLayout.UShort565Rev => sizeof( short ),
|
||||
PixelChannelLayout.UShort4444 => sizeof( short ),
|
||||
PixelChannelLayout.UShort4444Rev => sizeof( short ),
|
||||
PixelChannelLayout.UShort5551 => sizeof( short ),
|
||||
PixelChannelLayout.UShort1555Rev => sizeof( short ),
|
||||
PixelChannelLayout.UInt8888 => sizeof( int ),
|
||||
PixelChannelLayout.UInt8888Rev => sizeof( int ),
|
||||
PixelChannelLayout.UInt1010102 => sizeof( int ),
|
||||
PixelChannelLayout.UInt2101010Rev => sizeof( int ),
|
||||
_ => throw new ArgumentException( "Unknown layout type" ),
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -30,6 +30,7 @@
|
||||
//-----------------------------------------------------------------------
|
||||
using StgSharp.Graphics;
|
||||
using StgSharp.Graphics.OpenGL;
|
||||
using StgSharp.Internal.OpenGL;
|
||||
using StgSharp.Math;
|
||||
|
||||
using System;
|
||||
|
||||
@@ -47,9 +47,9 @@ namespace StgSharp.Graphics.OpenGL
|
||||
#pragma warning restore CA1008
|
||||
{
|
||||
|
||||
Read = GLconst.READ_FRAMEBUFFER,
|
||||
All = GLconst.FRAMEBUFFER,
|
||||
Draw = GLconst.DRAW_FRAMEBUFFER,
|
||||
Read = glConst.READ_FRAMEBUFFER,
|
||||
All = glConst.FRAMEBUFFER,
|
||||
Draw = glConst.DRAW_FRAMEBUFFER,
|
||||
|
||||
}
|
||||
|
||||
@@ -63,10 +63,10 @@ namespace StgSharp.Graphics.OpenGL
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Bind the frame buffer object with name frame buffer to the frame buffer target specified
|
||||
/// Bind the frame buffer object with _name frame buffer to the frame buffer target specified
|
||||
/// by target. <see langword="FrameBufferTarget.All" /> will be set as default target.
|
||||
/// </summary>
|
||||
/// <param name="index"> Index of object to be binded in handle set </param>
|
||||
/// <param _name="index"> Index of object to be binded in handle set </param>
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
public override unsafe void Bind( int index )
|
||||
{
|
||||
@@ -74,11 +74,11 @@ namespace StgSharp.Graphics.OpenGL
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Bind the frame buffer object with name frame buffer to the frame buffer target specified
|
||||
/// Bind the frame buffer object with _name frame buffer to the frame buffer target specified
|
||||
/// by target. Target of this frame buffer should be set manually.
|
||||
/// </summary>
|
||||
/// <param name="target"> The frame buffer target of the binding operation. </param>
|
||||
/// <param name="index"> Index of object to be binded in handle set </param>
|
||||
/// <param _name="target"> The frame buffer target of the binding operation. </param>
|
||||
/// <param _name="index"> Index of object to be binded in handle set </param>
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
public unsafe void Bind( FrameBufferTarget target, int index )
|
||||
{
|
||||
|
||||
@@ -28,7 +28,8 @@
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
using StgSharp.Data.Intrinsic;
|
||||
using StgSharp.Internal.Intrinsic;
|
||||
using StgSharp.Internal.OpenGL;
|
||||
using StgSharp.Math;
|
||||
|
||||
using System;
|
||||
@@ -85,14 +86,14 @@ namespace StgSharp.Graphics.OpenGL
|
||||
public void Bind2D( int index )
|
||||
{
|
||||
currentEditingTextureIndex = index;
|
||||
_gl.BindTexture( GLconst.TEXTURE_2D, _textureHandle[ index ] );
|
||||
_gl.BindTexture( glConst.TEXTURE_2D, _textureHandle[ index ] );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load an <see cref="Image" /> to certain texture.
|
||||
/// </summary>
|
||||
/// <param name="index"> </param>
|
||||
/// <param name="i"> </param>
|
||||
/// <param _name="index"> </param>
|
||||
/// <param _name="i"> </param>
|
||||
public unsafe void LoadTexture( int index, Image i )
|
||||
{
|
||||
byte[] handle = i.PixelBuffer;
|
||||
@@ -117,10 +118,10 @@ namespace StgSharp.Graphics.OpenGL
|
||||
}
|
||||
#endif
|
||||
_gl.TextureParameter(
|
||||
GLconst.TEXTURE_2D, GLconst.TEXTURE_MIN_FILTER,
|
||||
glConst.TEXTURE_2D, glConst.TEXTURE_MIN_FILTER,
|
||||
( int )onMinify );
|
||||
_gl.TextureParameter(
|
||||
GLconst.TEXTURE_2D, GLconst.TEXTURE_MAG_FILTER,
|
||||
glConst.TEXTURE_2D, glConst.TEXTURE_MAG_FILTER,
|
||||
( int )onMagnify );
|
||||
}
|
||||
|
||||
@@ -137,10 +138,10 @@ namespace StgSharp.Graphics.OpenGL
|
||||
}
|
||||
#endif
|
||||
_gl.TextureParameter(
|
||||
GLconst.TEXTURE_2D, GLconst.TEXTURE_WRAP_S,
|
||||
glConst.TEXTURE_2D, glConst.TEXTURE_WRAP_S,
|
||||
( int )onHorizontial );
|
||||
_gl.TextureParameter(
|
||||
GLconst.TEXTURE_2D, GLconst.TEXTURE_WRAP_T, ( int )onVertical );
|
||||
glConst.TEXTURE_2D, glConst.TEXTURE_WRAP_T, ( int )onVertical );
|
||||
}
|
||||
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
@@ -252,12 +253,12 @@ namespace StgSharp.Graphics.OpenGL
|
||||
#pragma warning restore CA1008
|
||||
{
|
||||
|
||||
Nearest = GLconst.NEAREST,
|
||||
Linear = GLconst.LINEAR,
|
||||
NearestLinearMipmap = GLconst.NEAREST_MIPMAP_LINEAR,
|
||||
LinearLinearMipmap = GLconst.LINEAR_MIPMAP_LINEAR,
|
||||
NearestNearestMipmap = GLconst.NEAREST_MIPMAP_NEAREST,
|
||||
LinearNearestMipmap = GLconst.LINEAR_MIPMAP_NEAREST,
|
||||
Nearest = glConst.NEAREST,
|
||||
Linear = glConst.LINEAR,
|
||||
NearestLinearMipmap = glConst.NEAREST_MIPMAP_LINEAR,
|
||||
LinearLinearMipmap = glConst.LINEAR_MIPMAP_LINEAR,
|
||||
NearestNearestMipmap = glConst.NEAREST_MIPMAP_NEAREST,
|
||||
LinearNearestMipmap = glConst.LINEAR_MIPMAP_NEAREST,
|
||||
|
||||
}
|
||||
|
||||
@@ -266,22 +267,22 @@ namespace StgSharp.Graphics.OpenGL
|
||||
#pragma warning restore CA1008
|
||||
{
|
||||
|
||||
Unit0 = GLconst.TEXTURE0,
|
||||
Unit1 = GLconst.TEXTURE1,
|
||||
Unit2 = GLconst.TEXTURE2,
|
||||
Unit3 = GLconst.TEXTURE3,
|
||||
Unit4 = GLconst.TEXTURE4,
|
||||
Unit5 = GLconst.TEXTURE5,
|
||||
Unit6 = GLconst.TEXTURE6,
|
||||
Unit7 = GLconst.TEXTURE7,
|
||||
Unit8 = GLconst.TEXTURE8,
|
||||
Unit9 = GLconst.TEXTURE9,
|
||||
Unit10 = GLconst.TEXTURE10,
|
||||
Unit11 = GLconst.TEXTURE11,
|
||||
Unit12 = GLconst.TEXTURE12,
|
||||
Unit13 = GLconst.TEXTURE13,
|
||||
Unit14 = GLconst.TEXTURE14,
|
||||
Unit15 = GLconst.TEXTURE15,
|
||||
Unit0 = glConst.TEXTURE0,
|
||||
Unit1 = glConst.TEXTURE1,
|
||||
Unit2 = glConst.TEXTURE2,
|
||||
Unit3 = glConst.TEXTURE3,
|
||||
Unit4 = glConst.TEXTURE4,
|
||||
Unit5 = glConst.TEXTURE5,
|
||||
Unit6 = glConst.TEXTURE6,
|
||||
Unit7 = glConst.TEXTURE7,
|
||||
Unit8 = glConst.TEXTURE8,
|
||||
Unit9 = glConst.TEXTURE9,
|
||||
Unit10 = glConst.TEXTURE10,
|
||||
Unit11 = glConst.TEXTURE11,
|
||||
Unit12 = glConst.TEXTURE12,
|
||||
Unit13 = glConst.TEXTURE13,
|
||||
Unit14 = glConst.TEXTURE14,
|
||||
Unit15 = glConst.TEXTURE15,
|
||||
|
||||
}
|
||||
|
||||
@@ -290,10 +291,10 @@ namespace StgSharp.Graphics.OpenGL
|
||||
#pragma warning restore CA1008
|
||||
{
|
||||
|
||||
Repeat = GLconst.REPEAT,
|
||||
MirroredRepeat = GLconst.MIRRORED_REPEAT,
|
||||
ClampToEdge = GLconst.CLAMP_TO_EDGE,
|
||||
ClampToBorder = GLconst.CLAMP_TO_BORDER,
|
||||
Repeat = glConst.REPEAT,
|
||||
MirroredRepeat = glConst.MIRRORED_REPEAT,
|
||||
ClampToEdge = glConst.CLAMP_TO_EDGE,
|
||||
ClampToBorder = glConst.CLAMP_TO_BORDER,
|
||||
|
||||
}
|
||||
}
|
||||
@@ -66,10 +66,10 @@ namespace StgSharp.Graphics.OpenGL
|
||||
/// <summary>
|
||||
/// Set _data to current vertex buffer object
|
||||
/// </summary>
|
||||
/// <typeparam name="T"> Type of bufferData </typeparam>
|
||||
/// <param name="index"> Index to find certain VBO in this instance </param>
|
||||
/// <param name="bufferData"> Data to write in </param>
|
||||
/// <param name="usage"> How OpenGL use these _data, defined by <see cref="BufferUsage" /></param>
|
||||
/// <typeparam _name="T"> Type of bufferData </typeparam>
|
||||
/// <param _name="index"> Index to find certain VBO in this instance </param>
|
||||
/// <param _name="bufferData"> Data to write in </param>
|
||||
/// <param _name="usage"> How OpenGL use these _data, defined by <see cref="BufferUsage" /></param>
|
||||
public void WriteMatrixData<T>(
|
||||
int index,
|
||||
T bufferData,
|
||||
@@ -83,10 +83,10 @@ namespace StgSharp.Graphics.OpenGL
|
||||
/// <summary>
|
||||
/// Set _data to current vertex buffer object
|
||||
/// </summary>
|
||||
/// <typeparam name="T"> Type of bufferData </typeparam>
|
||||
/// <param name="index"> Index to find certain VBO in this instance </param>
|
||||
/// <param name="bufferArray"> Data to write in </param>
|
||||
/// <param name="usage"> How OpenGL use these _data, defined by <see cref="BufferUsage" /></param>
|
||||
/// <typeparam _name="T"> Type of bufferData </typeparam>
|
||||
/// <param _name="index"> Index to find certain VBO in this instance </param>
|
||||
/// <param _name="bufferArray"> Data to write in </param>
|
||||
/// <param _name="usage"> How OpenGL use these _data, defined by <see cref="BufferUsage" /></param>
|
||||
public void WriteScalerData<T>(
|
||||
int index,
|
||||
T[] bufferArray,
|
||||
@@ -105,10 +105,10 @@ namespace StgSharp.Graphics.OpenGL
|
||||
/// <summary>
|
||||
/// Set _data to current vertex buffer object
|
||||
/// </summary>
|
||||
/// <typeparam name="T"> Type of bufferData </typeparam>
|
||||
/// <param name="index"> Index to find certain VBO in this instance </param>
|
||||
/// <param name="scalerSpan"> A <see cref="Span{T}" /> of _data to write in </param>
|
||||
/// <param name="usage"> How OpenGL use these _data, defined by <see cref="BufferUsage" /></param>
|
||||
/// <typeparam _name="T"> Type of bufferData </typeparam>
|
||||
/// <param _name="index"> Index to find certain VBO in this instance </param>
|
||||
/// <param _name="scalerSpan"> A <see cref="Span{T}" /> of _data to write in </param>
|
||||
/// <param _name="usage"> How OpenGL use these _data, defined by <see cref="BufferUsage" /></param>
|
||||
public void WriteScalerData<T>(
|
||||
int index,
|
||||
ReadOnlySpan<T> scalerSpan,
|
||||
@@ -127,10 +127,10 @@ namespace StgSharp.Graphics.OpenGL
|
||||
/// <summary>
|
||||
/// Set _data to current vertex buffer object
|
||||
/// </summary>
|
||||
/// <typeparam name="T"> Type of bufferData </typeparam>
|
||||
/// <param name="index"> Index to find certain VBO in this instance </param>
|
||||
/// <param name="vectorSpan"> A <see cref="Span{T}" /> of _data to write in </param>
|
||||
/// <param name="usage"> How OpenGL use these _data, defined by <see cref="BufferUsage" /></param>
|
||||
/// <typeparam _name="T"> Type of bufferData </typeparam>
|
||||
/// <param _name="index"> Index to find certain VBO in this instance </param>
|
||||
/// <param _name="vectorSpan"> A <see cref="Span{T}" /> of _data to write in </param>
|
||||
/// <param _name="usage"> How OpenGL use these _data, defined by <see cref="BufferUsage" /></param>
|
||||
public void WriteVectorData<T>(
|
||||
int index,
|
||||
ReadOnlySpan<T> vectorSpan,
|
||||
@@ -144,10 +144,10 @@ namespace StgSharp.Graphics.OpenGL
|
||||
/// <summary>
|
||||
/// Set _data to current vertex buffer object
|
||||
/// </summary>
|
||||
/// <typeparam name="T"> Type of bufferData </typeparam>
|
||||
/// <param name="index"> Index to find certain VBO in this instance </param>
|
||||
/// <param name="vectorArray"> A array of _data to write in </param>
|
||||
/// <param name="usage"> How OpenGL use these _data, defined by <see cref="BufferUsage" /></param>
|
||||
/// <typeparam _name="T"> Type of bufferData </typeparam>
|
||||
/// <param _name="index"> Index to find certain VBO in this instance </param>
|
||||
/// <param _name="vectorArray"> A array of _data to write in </param>
|
||||
/// <param _name="usage"> How OpenGL use these _data, defined by <see cref="BufferUsage" /></param>
|
||||
public void WriteVectorData<T>(
|
||||
int index,
|
||||
T[] vectorArray,
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
using StgSharp;
|
||||
using StgSharp.Data;
|
||||
using StgSharp.Internal;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -86,8 +86,8 @@ namespace StgSharp.Graphics.OpenGL
|
||||
/// <summary>
|
||||
/// Attach one shader code to a shader program.
|
||||
/// </summary>
|
||||
/// <param name="target"> Shader program to attach </param>
|
||||
/// <param name="index"> Index of shader code in current shader code set. </param>
|
||||
/// <param _name="target"> Shader program to attach </param>
|
||||
/// <param _name="index"> Index of shader code in current shader code set. </param>
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
public void AttachTo( int index, ShaderProgram target )
|
||||
{
|
||||
@@ -160,7 +160,7 @@ namespace StgSharp.Graphics.OpenGL
|
||||
public enum ShaderStatus : int
|
||||
{
|
||||
|
||||
CompileStatus = GLconst.COMPILE_STATUS,
|
||||
CompileStatus = glConst.COMPILE_STATUS,
|
||||
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ namespace StgSharp.Graphics.OpenGL
|
||||
/// <summary>
|
||||
/// Get a uniform form current shader, the value type of the uniform should be provided.
|
||||
/// </summary>
|
||||
/// <param name="name"> ContextName of the Uniform in shader code </param>
|
||||
/// <param _name="name"> ContextName of the Uniform in shader code </param>
|
||||
/// <returns></returns>
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
public unsafe Uniform<T> GetUniform<T>( string name ) where T: struct
|
||||
@@ -193,7 +193,7 @@ namespace StgSharp.Graphics.OpenGL
|
||||
/// <summary>
|
||||
/// Get a uniform form current shader, the value type of the uniform should be provided.
|
||||
/// </summary>
|
||||
/// <param name="name"> ContextName of the Uniform in shader code </param>
|
||||
/// <param _name="name"> ContextName of the Uniform in shader code </param>
|
||||
/// <returns></returns>
|
||||
public unsafe Uniform<T, U> GetUniform<T, U>( string name )
|
||||
where T: struct
|
||||
@@ -206,7 +206,7 @@ namespace StgSharp.Graphics.OpenGL
|
||||
/// <summary>
|
||||
/// Get a uniform form current shader, the value type of the uniform should be provided.
|
||||
/// </summary>
|
||||
/// <param name="name"> ContextName of the Uniform in shader code </param>
|
||||
/// <param _name="name"> ContextName of the Uniform in shader code </param>
|
||||
/// <returns></returns>
|
||||
public unsafe Uniform<T, U, V> GetUniform<T, U, V>( string name )
|
||||
where T: struct
|
||||
@@ -220,7 +220,7 @@ namespace StgSharp.Graphics.OpenGL
|
||||
/// <summary>
|
||||
/// Get a uniform form current shader, the value type of the uniform should be provided.
|
||||
/// </summary>
|
||||
/// <param name="name"> ContextName of the Uniform in shader code </param>
|
||||
/// <param _name="name"> ContextName of the Uniform in shader code </param>
|
||||
/// <returns></returns>
|
||||
public unsafe Uniform<T, U, V, W> GetUniform<T, U, V, W>( string name )
|
||||
where T: struct
|
||||
|
||||
@@ -33,6 +33,7 @@ using StgSharp.Math;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
@@ -129,7 +130,7 @@ namespace StgSharp.Graphics.OpenGL
|
||||
{
|
||||
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
public void SetUniformValue( Uniform<Matrix44> uniform, Matrix44 mat )
|
||||
public void SetUniformValue( [NotNull] Uniform<Matrix44> uniform, Matrix44 mat )
|
||||
{
|
||||
Matrix44 temp = mat;
|
||||
Context.glUniformMatrix4fv(
|
||||
@@ -138,35 +139,35 @@ namespace StgSharp.Graphics.OpenGL
|
||||
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
public void SetUniformValue(
|
||||
Uniform<float, float, float, float> uniform,
|
||||
[NotNull]Uniform<float, float, float, float> uniform,
|
||||
Vec4 vec )
|
||||
{
|
||||
Vec4 temp = vec;
|
||||
Context.glUniform1fv( uniform.id.SignedValue, 4, &temp );
|
||||
Context.glUniform1fv( uniform.id.SignedValue, 4, &temp.reg );
|
||||
}
|
||||
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
public void SetUniformValue( Uniform<Vec4> uniform, Vec4 vec )
|
||||
public void SetUniformValue( [NotNull]Uniform<Vec4> uniform, Vec4 vec )
|
||||
{
|
||||
Vec4 temp = vec;
|
||||
Context.glUniform1fv( uniform.id.SignedValue, 4, &temp );
|
||||
Context.glUniform1fv( uniform.id.SignedValue, 4, &temp.reg );
|
||||
}
|
||||
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
public void SetUniformValue( Uniform<float> uniform, float v0 )
|
||||
public void SetUniformValue( [NotNull]Uniform<float> uniform, float v0 )
|
||||
{
|
||||
Context.glUniform1f( uniform.id.SignedValue, v0 );
|
||||
}
|
||||
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
public void SetUniformValue( Uniform<int> uniform, int i0 )
|
||||
public void SetUniformValue( [NotNull]Uniform<int> uniform, int i0 )
|
||||
{
|
||||
Context.glUniform1i( uniform.id.SignedValue, i0 );
|
||||
}
|
||||
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
public void SetUniformValue(
|
||||
Uniform<float, float> uniform,
|
||||
[NotNull] Uniform<float, float> uniform,
|
||||
float v0,
|
||||
float v1 )
|
||||
{
|
||||
@@ -175,7 +176,7 @@ namespace StgSharp.Graphics.OpenGL
|
||||
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
public void SetUniformValue(
|
||||
Uniform<float, float, float> uniform,
|
||||
[NotNull] Uniform<float, float, float> uniform,
|
||||
float v0,
|
||||
float v1,
|
||||
float v2 )
|
||||
@@ -185,7 +186,7 @@ namespace StgSharp.Graphics.OpenGL
|
||||
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
public void SetUniformValue(
|
||||
Uniform<float, float, float, float> uniform,
|
||||
[NotNull] Uniform<float, float, float, float> uniform,
|
||||
float v0,
|
||||
float v1,
|
||||
float v2,
|
||||
|
||||
@@ -59,9 +59,9 @@ namespace StgSharp.Graphics.OpenGL
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
/// <summary>
|
||||
/// Get the function pointer of given OpenGL api name
|
||||
/// Get the function pointer of given OpenGL api _name
|
||||
/// </summary>
|
||||
/// <param name="name"> ContextName of the OpenGL api </param>
|
||||
/// <param _name="name"> ContextName of the OpenGL api </param>
|
||||
/// <returns> The funtion pointer of the api in stream of <see cref="IntPtr" /></returns>
|
||||
public static IntPtr LoadGLfunc( string name )
|
||||
{
|
||||
@@ -77,7 +77,7 @@ namespace StgSharp.Graphics.OpenGL
|
||||
/// <summary>
|
||||
/// Load all supported OpenGL APIs and bind them to given <see cref="ViewPort" />.
|
||||
/// </summary>
|
||||
/// <param name="contextHandle"> The handle to current OpenGL viewPortDisplay </param>
|
||||
/// <param _name="contextHandle"> The handle to current OpenGL viewPortDisplay </param>
|
||||
public static unsafe void LoadOpenGLApiTo( IntPtr contextHandle )
|
||||
{
|
||||
OpenglContext* context = ( OpenglContext* )contextHandle;
|
||||
@@ -151,7 +151,7 @@ namespace StgSharp.Graphics.OpenGL
|
||||
}
|
||||
|
||||
int extensionCount;
|
||||
context->glGetIntegerv( GLconst.NUM_EXTENSIONS, &extensionCount );
|
||||
context->glGetIntegerv( glConst.NUM_EXTENSIONS, &extensionCount );
|
||||
if( extensionCount == 0 ) {
|
||||
InternalIO.InternalWriteLog(
|
||||
"No supported OpenGL extensions are found.", LogType.Info );
|
||||
@@ -161,7 +161,7 @@ namespace StgSharp.Graphics.OpenGL
|
||||
List<string> extensions = new List<string>();
|
||||
|
||||
for( uint i = 0; i < extensionCount; i++ ) {
|
||||
byte* strPtr = context->glGetStringi( GLconst.EXTENSIONS, i );
|
||||
byte* strPtr = context->glGetStringi( glConst.EXTENSIONS, i );
|
||||
extensions.Add( Marshal.PtrToStringAnsi( ( IntPtr )strPtr ) );
|
||||
}
|
||||
|
||||
@@ -3219,7 +3219,7 @@ namespace StgSharp.Graphics.OpenGL
|
||||
"glStencilOpSeparate" );
|
||||
contextPtr->glUniform1f = ( delegate*<int, float, void> )load(
|
||||
"glUniform1f" );
|
||||
contextPtr->glUniform1fv = ( delegate*<int, uint, Vec4*, void> )load(
|
||||
contextPtr->glUniform1fv = ( delegate*<int, uint, M128*, void> )load(
|
||||
"glUniform1fv" );
|
||||
contextPtr->glUniform1i = ( delegate*<int, int, void> )load(
|
||||
"glUniform1i" );
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace StgSharp.Graphics.OpenGL
|
||||
|
||||
internal void ReturnAvailableUnit( IEnumerable<TextureUnit> source )
|
||||
{
|
||||
int v = GLconst.TEXTURE0 + TextureUnitCount;
|
||||
int v = glConst.TEXTURE0 + TextureUnitCount;
|
||||
foreach( TextureUnit unit in source ) {
|
||||
if( ( int )unit > v ) {
|
||||
throw new InvalidOperationException(
|
||||
@@ -83,7 +83,7 @@ namespace StgSharp.Graphics.OpenGL
|
||||
ConcurrentQueue<TextureUnit> result = new ConcurrentQueue<TextureUnit>(
|
||||
);
|
||||
for( int index = 0; index < TextureUnitCount; index++ ) {
|
||||
result.Enqueue( ( TextureUnit )( GLconst.TEXTURE0 + index ) );
|
||||
result.Enqueue( ( TextureUnit )( glConst.TEXTURE0 + index ) );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,8 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
using StgSharp.Graphics;
|
||||
|
||||
using StgSharp.Internal;
|
||||
using StgSharp.Internal.OpenGL;
|
||||
using StgSharp.Math;
|
||||
|
||||
using System;
|
||||
@@ -42,25 +43,6 @@ using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
|
||||
namespace StgSharp
|
||||
{
|
||||
internal static unsafe partial class InternalIO
|
||||
{
|
||||
|
||||
[DllImport(
|
||||
SSC_libName,
|
||||
EntryPoint = "glCheckShaderStat",
|
||||
CallingConvention = CallingConvention.Cdecl )]
|
||||
#pragma warning disable CA5392
|
||||
internal static extern int glCheckShaderStatus(
|
||||
ref OpenglContext context,
|
||||
uint shaderHandle,
|
||||
int key,
|
||||
ref IntPtr logPtr );
|
||||
#pragma warning restore CA5392
|
||||
}
|
||||
}
|
||||
|
||||
namespace StgSharp.Graphics.OpenGL
|
||||
{
|
||||
public unsafe partial class OpenGLFunction
|
||||
@@ -77,13 +59,13 @@ namespace StgSharp.Graphics.OpenGL
|
||||
private OpenGLFunction()
|
||||
{
|
||||
textureUnitCountGetter = new Lazy<int>(
|
||||
() => GetMaskInteger( GLconst.MAX_TEXTURE_IMAGE_UNITS ) );
|
||||
() => GetMaskInteger( glConst.MAX_TEXTURE_IMAGE_UNITS ) );
|
||||
unusedTextureImageUintInitilizing = new Lazy<ConcurrentQueue<TextureUnit>>(
|
||||
InitializeUnusedTextureImageUint );
|
||||
_attachmentColorRange = new Lazy<int>(
|
||||
() => {
|
||||
return GetMaskInteger(
|
||||
( uint )GLconst.MAX_COLOR_ATTACHMENTS );
|
||||
( uint )glConst.MAX_COLOR_ATTACHMENTS );
|
||||
} );
|
||||
}
|
||||
|
||||
@@ -123,7 +105,7 @@ namespace StgSharp.Graphics.OpenGL
|
||||
public void Assert( bool shouldReportWhenNormal )
|
||||
{
|
||||
uint code = Context.glGetError();
|
||||
if( code != GLconst.NO_ERROR ) {
|
||||
if( code != glConst.NO_ERROR ) {
|
||||
throw new GlExecutionException( code );
|
||||
}
|
||||
if( shouldReportWhenNormal ) {
|
||||
@@ -147,8 +129,8 @@ namespace StgSharp.Graphics.OpenGL
|
||||
/// Bind a frame buffer to a frame buffer target Same function as <see
|
||||
/// href="https://docs._gl/gl3/glBindFramebuffer">glBindFramebuffer</see>.
|
||||
/// </summary>
|
||||
/// <param name="target"> The frame buffer target of the binding operation. </param>
|
||||
/// <param name="handle"> The handle of the frame buffer object to bind. </param>
|
||||
/// <param _name="target"> The frame buffer target of the binding operation. </param>
|
||||
/// <param _name="handle"> The handle of the frame buffer object to bind. </param>
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
public void BindFrameBuffer( FrameBufferTarget target, GlHandle handle )
|
||||
{
|
||||
@@ -158,7 +140,7 @@ namespace StgSharp.Graphics.OpenGL
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
public void BindRenderBuffer( GlHandle handle )
|
||||
{
|
||||
Context.glBindRenderbuffer( GLconst.RENDERBUFFER, handle.Value );
|
||||
Context.glBindRenderbuffer( glConst.RENDERBUFFER, handle.Value );
|
||||
}
|
||||
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
@@ -223,7 +205,7 @@ namespace StgSharp.Graphics.OpenGL
|
||||
GlHandle rboHandle )
|
||||
{
|
||||
Context.glFramebufferRenderbuffer(
|
||||
GLconst.FRAMEBUFFER, ( uint )attachment, GLconst.RENDERBUFFER,
|
||||
glConst.FRAMEBUFFER, ( uint )attachment, glConst.RENDERBUFFER,
|
||||
rboHandle.Value );
|
||||
}
|
||||
|
||||
@@ -297,7 +279,7 @@ namespace StgSharp.Graphics.OpenGL
|
||||
/// href="https://docs.gl/gl3/glDeleteRenderbuffers">glDeleteRenderbuffers</see>. The only
|
||||
/// deifference is that this mehtod can only delete one renderbuffer at the same time.
|
||||
/// </summary>
|
||||
/// <param name="bufferHandle"> Handle to buffer to delete. </param>
|
||||
/// <param _name="bufferHandle"> Handle to buffer to delete. </param>
|
||||
public unsafe void DeleteRenderBuffer( GlHandle bufferHandle )
|
||||
{
|
||||
Context.glDeleteRenderbuffers( 1, &bufferHandle.Value );
|
||||
@@ -324,9 +306,9 @@ namespace StgSharp.Graphics.OpenGL
|
||||
uint a;
|
||||
a = type switch
|
||||
{
|
||||
TypeCode.UInt32 => GLconst.UNSIGNED_INT,
|
||||
TypeCode.UInt16 => GLconst.UNSIGNED_SHORT,
|
||||
TypeCode.Byte => GLconst.UNSIGNED_BYTE,
|
||||
TypeCode.UInt32 => glConst.UNSIGNED_INT,
|
||||
TypeCode.UInt16 => glConst.UNSIGNED_SHORT,
|
||||
TypeCode.Byte => glConst.UNSIGNED_BYTE,
|
||||
_ => throw new ArgumentException(
|
||||
$"{$"{$"Parameter error in parameter {nameof(type)} method DrawElements. "}"}{$"{$"Only {typeof(uint).Name},{typeof(ushort).Name},{typeof(byte).Name} types are supported."}"}" )
|
||||
};
|
||||
@@ -344,15 +326,15 @@ namespace StgSharp.Graphics.OpenGL
|
||||
uint a;
|
||||
switch( type ) {
|
||||
case TypeCode.UInt32:
|
||||
a = GLconst.UNSIGNED_INT;
|
||||
a = glConst.UNSIGNED_INT;
|
||||
break;
|
||||
|
||||
case TypeCode.UInt16:
|
||||
a = GLconst.UNSIGNED_SHORT;
|
||||
a = glConst.UNSIGNED_SHORT;
|
||||
break;
|
||||
|
||||
case TypeCode.Byte:
|
||||
a = GLconst.UNSIGNED_BYTE;
|
||||
a = glConst.UNSIGNED_BYTE;
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -508,7 +490,7 @@ namespace StgSharp.Graphics.OpenGL
|
||||
fixed( byte* ptr = code ) {
|
||||
int ret = Context.glGetUniformLocation( program.Value, ptr );
|
||||
#if DEBUG
|
||||
if( ( ret == GLconst.INVALID_OPERATION ) || ( ret == GLconst.INVALID_VALUE ) ) {
|
||||
if( ( ret == glConst.INVALID_OPERATION ) || ( ret == glConst.INVALID_VALUE ) ) {
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
if( ret == -1 ) {
|
||||
@@ -707,7 +689,7 @@ namespace StgSharp.Graphics.OpenGL
|
||||
(int width, int height) size )
|
||||
{
|
||||
Context.glRenderbufferStorage(
|
||||
GLconst.RENDERBUFFER, ( uint )internalFormat, size.width,
|
||||
glConst.RENDERBUFFER, ( uint )internalFormat, size.width,
|
||||
size.height );
|
||||
}
|
||||
|
||||
@@ -717,7 +699,7 @@ namespace StgSharp.Graphics.OpenGL
|
||||
(uint width, uint height) size )
|
||||
{
|
||||
Context.glRenderbufferStorage(
|
||||
GLconst.RENDERBUFFER, ( uint )internalFormat, ( int )size.width,
|
||||
glConst.RENDERBUFFER, ( uint )internalFormat, ( int )size.width,
|
||||
( int )size.height );
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace StgSharp.Graphics.OpenGL
|
||||
/// <summary>
|
||||
/// Create a set of <see cref="ElementBuffer" />.
|
||||
/// </summary>
|
||||
/// <param name="count"> Amount of EBO to be created. </param>
|
||||
/// <param _name="count"> Amount of EBO to be created. </param>
|
||||
/// <returns></returns>
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
protected ElementBuffer CreateElementBuffer( int count )
|
||||
@@ -73,7 +73,7 @@ namespace StgSharp.Graphics.OpenGL
|
||||
/// <summary>
|
||||
/// Create a sets of <see cref="TextureGL" />
|
||||
/// </summary>
|
||||
/// <param name="count"> Amount of textures to be created. </param>
|
||||
/// <param _name="count"> Amount of textures to be created. </param>
|
||||
/// <returns></returns>
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
protected TextureGL CreateTexture( int count )
|
||||
@@ -84,7 +84,7 @@ namespace StgSharp.Graphics.OpenGL
|
||||
/// <summary>
|
||||
/// Create a set of <see cref="VertexArray" />.
|
||||
/// </summary>
|
||||
/// <param name="count"> Amount of VAO to be created. </param>
|
||||
/// <param _name="count"> Amount of VAO to be created. </param>
|
||||
/// <returns></returns>
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
protected VertexArray CreateVertexArray( int count )
|
||||
@@ -95,7 +95,7 @@ namespace StgSharp.Graphics.OpenGL
|
||||
/// <summary>
|
||||
/// Create a set of <see cref="VertexBuffer" />.
|
||||
/// </summary>
|
||||
/// <param name="count"> Amount of Object to be created. </param>
|
||||
/// <param _name="count"> Amount of Object to be created. </param>
|
||||
/// <returns></returns>
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
protected VertexBuffer CreateVertexBuffer( int count )
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user