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

Commit

Permalink
Remove reflection reference
Browse files Browse the repository at this point in the history
Add optional package version suffix

CleanUp Guid mess

Update nuspec
  • Loading branch information
FObermaier committed Jan 31, 2017
1 parent 0a880f5 commit f589b55
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 28 deletions.
Binary file modified .nuget/NuGet.exe
Binary file not shown.
24 changes: 15 additions & 9 deletions GeoAPI.NetCore/Consts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,40 @@ internal static class Consts
{
public const string Version = "1.7.5";
public const string Title = "GeoAPI";
public const string Description = "GeoAPI Version that matches NTS v.1.14";
public const string Description = "GeoAPI Version that matches NTS v.1.15";
public const string Company = "NetTopologySuite - Team";
public const string Copyright = "Copyright © 2007-2016";
public const string Copyright = "Copyright © NetTopologySuite - Team 2007-2017";
public const bool ComVisible = false;
public const bool CLSCompliant = true;

#if !(PCL || NET_CORE)
public const string Guid = "b6726fc4-0319-4a6d-84f5-aafc6ba530e3";
#endif

#if DEBUG
public const string Configuration = "Debug";
#else
public const string Configuration = "Stable";
#endif

#if NET40
#if NET45
public const string Product = "GeoAPI";
public const string Guid = "b6726fc4-0319-4a6d-84f5-aafc6ba530e3";
#elif NET40
public const string Product = "GeoAPI.Net40";
//public const string Guid = "b6726fc4-0319-4a6d-84f5-aafc6ba530e3";
#elif NET35
public const string Product = "GeoAPI.Net35";
public const string Guid = "8de32941-f422-41e6-a7e5-964bb4ab2d3b";
//public const string Guid = "8de32941-f422-41e6-a7e5-964bb4ab2d3b";
#elif NET20
public const string Product = "GeoAPI.Net20";
public const string Guid = "2ac6149a-cb66-48d3-9c2b-6a5c19dcf203";
//public const string Guid = "2ac6149a-cb66-48d3-9c2b-6a5c19dcf203";
#elif NET_CORE
public const string Product = "GeoAPI.NetCore";
public const string Guid = "eef37cab-4f83-4366-8533-3d7c16b449c7";
//public const string Guid = "eef37cab-4f83-4366-8533-3d7c16b449c7";
#elif WindowsCE
public const string Product = "GeoAPI.Net35CF";
public const string Guid = "8ce966f8-d4fd-4437-a79c-314d9632384a";
//public const string Guid = "8ce966f8-d4fd-4437-a79c-314d9632384a";
#elif PCL
public const string Product = "GeoAPI.PCL";
#endif
}
}
16 changes: 8 additions & 8 deletions GeoAPI.NetCore/GeometryServiceProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,26 +37,26 @@ public static IGeometryServices Instance
}
}

#if !(WindowsCE || NET45)
#if !(WindowsCE || PCL || NET_CORE)
private static IEnumerable<Type> GetLoadableTypes(Assembly assembly)
{
if (assembly == null)
return new Type[0];

try
{
#if (!NET45)
return assembly.GetExportedTypes();
#else
return assembly.ExportedTypes;
#endif
}
catch (ReflectionTypeLoadException ex)
{
var types = ex.Types;
IList<Type> list = new List<Type>(types.Length);
foreach (var t in types)
#if !NET_CORE
if (t != null && t.IsPublic)
#else
if (t != null)
#endif
{
list.Add(t);
}
Expand All @@ -65,7 +65,7 @@ private static IEnumerable<Type> GetLoadableTypes(Assembly assembly)
catch
{
return new Type[0];
}
}
}
#else
private static IEnumerable<Type> GetLoadableTypes(Assembly assembly)
Expand All @@ -76,7 +76,7 @@ private static IEnumerable<Type> GetLoadableTypes(Assembly assembly)

private static IGeometryServices ReflectInstance()
{
#if !PCL && !NET_CORE && !WindowsCE
#if !(WindowsCE || PCL || NET_CORE)
var a = AppDomain.CurrentDomain.GetAssemblies();
foreach (var assembly in a)
{
Expand Down Expand Up @@ -104,4 +104,4 @@ private static IGeometryServices ReflectInstance()
throw new InvalidOperationException("Cannot use GeometryServiceProvider without an assigned IGeometryServices class");
}
}
}
}
3 changes: 1 addition & 2 deletions GeoAPI.NetCore/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"name": "GeoAPI",
"dependencies": {
"NETStandard.Library": "1.6.1",
"System.Reflection.TypeExtensions": "4.3.0"
},
"frameworks": {
"netstandard1.0": {
Expand All @@ -25,4 +24,4 @@
"configurations": {
"CIBuild": {}
}
}
}
34 changes: 25 additions & 9 deletions GeoAPI.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,27 @@
<id>GeoAPI</id>
<version>$version$</version>
<authors>NetTopologySuite Team and Fabrício Godoy</authors>
<owners>nettopologysuite - team, skarllot, fgodoy-verion</owners>
<owners>nettopologysuite - team</owners>
<licenseUrl>https://raw.githubusercontent.com/NetTopologySuite/GeoAPI/master/GeoAPI/License.txt</licenseUrl>
<projectUrl>https://github.com/NetTopologySuite/GeoAPI</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>GeoAPI.NET project provides a common framework based on OGC/ISO standards to improve interoperability among .NET GIS projects.</description>
<releaseNotes>This version matches NetTopologySuite v1.14 API.</releaseNotes>
<copyright>Copyright 2007-2016</copyright>
<releaseNotes>This version matches NetTopologySuite v1.15 API.</releaseNotes>
<copyright>Copyright 2007-2017</copyright>
<tags>OGC SFS NTS GIS</tags>
<dependencies>
<group targetFramework=".NETStandard1.0">
<group targetFramework=".NETFramework4.5" />
<group targetFramework=".NETFramework4.0" />
<group targetFramework=".NETFramework4.0.3" />
<group targetFramework=".NETFramework3.5" />
<group targetFramework=".NETFramework2.0" />
<group targetFramework=".NETPortable4.5-Profile259" />
<group targetFramework=".NETPortable4.0-Profile328" />
<group targetFramework=".NETStandard1.1">
<dependency id="NETStandard.Library" version="[1.6.1, )" />
</group>
<group targetFramework=".NETStandard1.0">
<dependency id="NETStandard.Library" version="[1.6.1, )" />
<dependency id="System.Reflection.TypeExtensions" version="[4.3.0, )" />
</group>
</dependencies>
</metadata>
Expand Down Expand Up @@ -44,13 +53,20 @@
<file src="Release\v4.5\AnyCPU\GeoAPI.pdb" target="lib\net45" />
<file src="Release\v4.5\AnyCPU\GeoAPI.xml" target="lib\net45" />

<file src="Release\PCL\AnyCPU\GeoAPI.dll" target="lib\portable-net403+sl5+netcore45+wpa81+wp8+MonoAndroid10+XamariniOS10+MonoTouch10" />
<file src="Release\PCL\AnyCPU\GeoAPI.pdb" target="lib\portable-net403+sl5+netcore45+wpa81+wp8+MonoAndroid10+XamariniOS10+MonoTouch10" />
<file src="Release\PCL\AnyCPU\GeoAPI.xml" target="lib\portable-net403+sl5+netcore45+wpa81+wp8+MonoAndroid10+XamariniOS10+MonoTouch10" />
<file src="Release\PCL40\AnyCPU\GeoAPI.dll" target="lib\portable-net40+sl5+wp80+win8+wpa81" />
<file src="Release\PCL40\AnyCPU\GeoAPI.pdb" target="lib\portable-net40+sl5+wp80+win8+wpa81" />
<file src="Release\PCL40\AnyCPU\GeoAPI.xml" target="lib\portable-net40+sl5+wp80+win8+wpa81" />

<file src="Release\PCL\AnyCPU\GeoAPI.dll" target="lib\portable-net45+wp80+win8+wpa81" />
<file src="Release\PCL\AnyCPU\GeoAPI.pdb" target="lib\portable-net45+wp80+win8+wpa81" />
<file src="Release\PCL\AnyCPU\GeoAPI.xml" target="lib\portable-net45+wp80+win8+wpa81" />

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

<file src="Release\netstandard1.1\GeoAPI.dll" target="lib\netstandard1.1" />
<file src="Release\netstandard1.1\GeoAPI.pdb" target="lib\netstandard1.1" />

<file src="GeoAPI.NetCore\Consts.cs" target="src\Consts.cs" />
<file src="GeoAPI.NetCore\GeometryServiceProvider.cs" target="src\GeometryServiceProvider.cs" />
<file src="GeoAPI.NetCore\ICloneable.cs" target="src\ICloneable.cs" />
Expand Down Expand Up @@ -146,4 +162,4 @@
<file src="GeoAPI.NetCore\Operation\Buffer\JoinStyle.cs" target="src\Operation\Buffer\JoinStyle.cs" />
<file src="GeoAPI.NetCore\Properties\AssemblyInfo.cs" target="src\Properties\AssemblyInfo.cs" />
</files>
</package>
</package>
1 change: 1 addition & 0 deletions NuGet.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ set VersionInfoCommand=%SolutionDir%.nuget\VersionInfo.vbs
for /f %%i in ('cscript //nologo %VersionInfoCommand% %NuGetOutDir%\v4.0\AnyCPU\GeoAPI.dll') do set GeoAPIVersion=%%i
set AsmFileVersion=%GeoAPIVersion%
set NuGetVersion=%AsmFileVersion%
if not "%~1"=="" SET NuGetVersion=%NuGetVersion%-%~1

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

0 comments on commit f589b55

Please sign in to comment.