Skip to content
This repository was archived by the owner on Jun 22, 2023. It is now read-only.

Commit f589b55

Browse files
committed
Remove reflection reference
Add optional package version suffix CleanUp Guid mess Update nuspec
1 parent 0a880f5 commit f589b55

File tree

6 files changed

+50
-28
lines changed

6 files changed

+50
-28
lines changed

.nuget/NuGet.exe

302 KB
Binary file not shown.

GeoAPI.NetCore/Consts.cs

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,40 @@ internal static class Consts
22
{
33
public const string Version = "1.7.5";
44
public const string Title = "GeoAPI";
5-
public const string Description = "GeoAPI Version that matches NTS v.1.14";
5+
public const string Description = "GeoAPI Version that matches NTS v.1.15";
66
public const string Company = "NetTopologySuite - Team";
7-
public const string Copyright = "Copyright © 2007-2016";
7+
public const string Copyright = "Copyright © NetTopologySuite - Team 2007-2017";
88
public const bool ComVisible = false;
99
public const bool CLSCompliant = true;
1010

11+
#if !(PCL || NET_CORE)
12+
public const string Guid = "b6726fc4-0319-4a6d-84f5-aafc6ba530e3";
13+
#endif
14+
1115
#if DEBUG
1216
public const string Configuration = "Debug";
1317
#else
1418
public const string Configuration = "Stable";
1519
#endif
1620

17-
#if NET40
21+
#if NET45
1822
public const string Product = "GeoAPI";
19-
public const string Guid = "b6726fc4-0319-4a6d-84f5-aafc6ba530e3";
23+
#elif NET40
24+
public const string Product = "GeoAPI.Net40";
25+
//public const string Guid = "b6726fc4-0319-4a6d-84f5-aafc6ba530e3";
2026
#elif NET35
2127
public const string Product = "GeoAPI.Net35";
22-
public const string Guid = "8de32941-f422-41e6-a7e5-964bb4ab2d3b";
28+
//public const string Guid = "8de32941-f422-41e6-a7e5-964bb4ab2d3b";
2329
#elif NET20
2430
public const string Product = "GeoAPI.Net20";
25-
public const string Guid = "2ac6149a-cb66-48d3-9c2b-6a5c19dcf203";
31+
//public const string Guid = "2ac6149a-cb66-48d3-9c2b-6a5c19dcf203";
2632
#elif NET_CORE
2733
public const string Product = "GeoAPI.NetCore";
28-
public const string Guid = "eef37cab-4f83-4366-8533-3d7c16b449c7";
34+
//public const string Guid = "eef37cab-4f83-4366-8533-3d7c16b449c7";
2935
#elif WindowsCE
3036
public const string Product = "GeoAPI.Net35CF";
31-
public const string Guid = "8ce966f8-d4fd-4437-a79c-314d9632384a";
37+
//public const string Guid = "8ce966f8-d4fd-4437-a79c-314d9632384a";
3238
#elif PCL
3339
public const string Product = "GeoAPI.PCL";
3440
#endif
35-
}
41+
}

GeoAPI.NetCore/GeometryServiceProvider.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,26 +37,26 @@ public static IGeometryServices Instance
3737
}
3838
}
3939

40-
#if !(WindowsCE || NET45)
40+
#if !(WindowsCE || PCL || NET_CORE)
4141
private static IEnumerable<Type> GetLoadableTypes(Assembly assembly)
4242
{
4343
if (assembly == null)
4444
return new Type[0];
4545

4646
try
4747
{
48+
#if (!NET45)
4849
return assembly.GetExportedTypes();
50+
#else
51+
return assembly.ExportedTypes;
52+
#endif
4953
}
5054
catch (ReflectionTypeLoadException ex)
5155
{
5256
var types = ex.Types;
5357
IList<Type> list = new List<Type>(types.Length);
5458
foreach (var t in types)
55-
#if !NET_CORE
5659
if (t != null && t.IsPublic)
57-
#else
58-
if (t != null)
59-
#endif
6060
{
6161
list.Add(t);
6262
}
@@ -65,7 +65,7 @@ private static IEnumerable<Type> GetLoadableTypes(Assembly assembly)
6565
catch
6666
{
6767
return new Type[0];
68-
}
68+
}
6969
}
7070
#else
7171
private static IEnumerable<Type> GetLoadableTypes(Assembly assembly)
@@ -76,7 +76,7 @@ private static IEnumerable<Type> GetLoadableTypes(Assembly assembly)
7676

7777
private static IGeometryServices ReflectInstance()
7878
{
79-
#if !PCL && !NET_CORE && !WindowsCE
79+
#if !(WindowsCE || PCL || NET_CORE)
8080
var a = AppDomain.CurrentDomain.GetAssemblies();
8181
foreach (var assembly in a)
8282
{
@@ -104,4 +104,4 @@ private static IGeometryServices ReflectInstance()
104104
throw new InvalidOperationException("Cannot use GeometryServiceProvider without an assigned IGeometryServices class");
105105
}
106106
}
107-
}
107+
}

GeoAPI.NetCore/project.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"name": "GeoAPI",
44
"dependencies": {
55
"NETStandard.Library": "1.6.1",
6-
"System.Reflection.TypeExtensions": "4.3.0"
76
},
87
"frameworks": {
98
"netstandard1.0": {
@@ -25,4 +24,4 @@
2524
"configurations": {
2625
"CIBuild": {}
2726
}
28-
}
27+
}

GeoAPI.nuspec

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,27 @@
44
<id>GeoAPI</id>
55
<version>$version$</version>
66
<authors>NetTopologySuite Team and Fabrício Godoy</authors>
7-
<owners>nettopologysuite - team, skarllot, fgodoy-verion</owners>
7+
<owners>nettopologysuite - team</owners>
88
<licenseUrl>https://raw.githubusercontent.com/NetTopologySuite/GeoAPI/master/GeoAPI/License.txt</licenseUrl>
99
<projectUrl>https://github.com/NetTopologySuite/GeoAPI</projectUrl>
1010
<requireLicenseAcceptance>false</requireLicenseAcceptance>
1111
<description>GeoAPI.NET project provides a common framework based on OGC/ISO standards to improve interoperability among .NET GIS projects.</description>
12-
<releaseNotes>This version matches NetTopologySuite v1.14 API.</releaseNotes>
13-
<copyright>Copyright 2007-2016</copyright>
12+
<releaseNotes>This version matches NetTopologySuite v1.15 API.</releaseNotes>
13+
<copyright>Copyright 2007-2017</copyright>
1414
<tags>OGC SFS NTS GIS</tags>
1515
<dependencies>
16-
<group targetFramework=".NETStandard1.0">
16+
<group targetFramework=".NETFramework4.5" />
17+
<group targetFramework=".NETFramework4.0" />
18+
<group targetFramework=".NETFramework4.0.3" />
19+
<group targetFramework=".NETFramework3.5" />
20+
<group targetFramework=".NETFramework2.0" />
21+
<group targetFramework=".NETPortable4.5-Profile259" />
22+
<group targetFramework=".NETPortable4.0-Profile328" />
23+
<group targetFramework=".NETStandard1.1">
24+
<dependency id="NETStandard.Library" version="[1.6.1, )" />
25+
</group>
26+
<group targetFramework=".NETStandard1.0">
1727
<dependency id="NETStandard.Library" version="[1.6.1, )" />
18-
<dependency id="System.Reflection.TypeExtensions" version="[4.3.0, )" />
1928
</group>
2029
</dependencies>
2130
</metadata>
@@ -44,13 +53,20 @@
4453
<file src="Release\v4.5\AnyCPU\GeoAPI.pdb" target="lib\net45" />
4554
<file src="Release\v4.5\AnyCPU\GeoAPI.xml" target="lib\net45" />
4655

47-
<file src="Release\PCL\AnyCPU\GeoAPI.dll" target="lib\portable-net403+sl5+netcore45+wpa81+wp8+MonoAndroid10+XamariniOS10+MonoTouch10" />
48-
<file src="Release\PCL\AnyCPU\GeoAPI.pdb" target="lib\portable-net403+sl5+netcore45+wpa81+wp8+MonoAndroid10+XamariniOS10+MonoTouch10" />
49-
<file src="Release\PCL\AnyCPU\GeoAPI.xml" target="lib\portable-net403+sl5+netcore45+wpa81+wp8+MonoAndroid10+XamariniOS10+MonoTouch10" />
56+
<file src="Release\PCL40\AnyCPU\GeoAPI.dll" target="lib\portable-net40+sl5+wp80+win8+wpa81" />
57+
<file src="Release\PCL40\AnyCPU\GeoAPI.pdb" target="lib\portable-net40+sl5+wp80+win8+wpa81" />
58+
<file src="Release\PCL40\AnyCPU\GeoAPI.xml" target="lib\portable-net40+sl5+wp80+win8+wpa81" />
59+
60+
<file src="Release\PCL\AnyCPU\GeoAPI.dll" target="lib\portable-net45+wp80+win8+wpa81" />
61+
<file src="Release\PCL\AnyCPU\GeoAPI.pdb" target="lib\portable-net45+wp80+win8+wpa81" />
62+
<file src="Release\PCL\AnyCPU\GeoAPI.xml" target="lib\portable-net45+wp80+win8+wpa81" />
5063

5164
<file src="Release\netstandard1.0\GeoAPI.dll" target="lib\netstandard1.0" />
5265
<file src="Release\netstandard1.0\GeoAPI.pdb" target="lib\netstandard1.0" />
5366

67+
<file src="Release\netstandard1.1\GeoAPI.dll" target="lib\netstandard1.1" />
68+
<file src="Release\netstandard1.1\GeoAPI.pdb" target="lib\netstandard1.1" />
69+
5470
<file src="GeoAPI.NetCore\Consts.cs" target="src\Consts.cs" />
5571
<file src="GeoAPI.NetCore\GeometryServiceProvider.cs" target="src\GeometryServiceProvider.cs" />
5672
<file src="GeoAPI.NetCore\ICloneable.cs" target="src\ICloneable.cs" />
@@ -146,4 +162,4 @@
146162
<file src="GeoAPI.NetCore\Operation\Buffer\JoinStyle.cs" target="src\Operation\Buffer\JoinStyle.cs" />
147163
<file src="GeoAPI.NetCore\Properties\AssemblyInfo.cs" target="src\Properties\AssemblyInfo.cs" />
148164
</files>
149-
</package>
165+
</package>

NuGet.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ set VersionInfoCommand=%SolutionDir%.nuget\VersionInfo.vbs
88
for /f %%i in ('cscript //nologo %VersionInfoCommand% %NuGetOutDir%\v4.0\AnyCPU\GeoAPI.dll') do set GeoAPIVersion=%%i
99
set AsmFileVersion=%GeoAPIVersion%
1010
set NuGetVersion=%AsmFileVersion%
11+
if not "%~1"=="" SET NuGetVersion=%NuGetVersion%-%~1
1112

1213
%NuGetCommand% update -self
1314
%NuGetCommand% pack GeoAPI.nuspec -Version %NuGetVersion% -outputdirectory %NuGetOutDir% -symbols

0 commit comments

Comments
 (0)