[mapguide-commits] r8809 - in sandbox/jng/aspnet50/Web/src: . MapGuideDotNetCoreApi MapGuideDotNetCoreApi/Custom

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Wed Nov 4 07:11:19 PST 2015


Author: jng
Date: 2015-11-04 07:11:19 -0800 (Wed, 04 Nov 2015)
New Revision: 8809

Added:
   sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/
   sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/Custom/
   sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/Custom/DnxCoreShims.cs
   sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/Custom/ManagedException.cs
   sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/DotNetCoreApi.rc
   sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/DotNetCoreApi.vcxproj
   sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/catchall.code
   sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/getclassid.code
   sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/project.json
Log:
Add .net core wrapper API project. Unlike the wrapper API for the full framework, this is back to a single .net monolithic assembly (because .net core does not have the concept of an AppDomain, so the existing CLR type resolution plumbing code that is generated doesn't work (which is why we #ifdef that stuff out when building for .net core)

Added: sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/Custom/DnxCoreShims.cs
===================================================================
--- sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/Custom/DnxCoreShims.cs	                        (rev 0)
+++ sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/Custom/DnxCoreShims.cs	2015-11-04 15:11:19 UTC (rev 8809)
@@ -0,0 +1,33 @@
+namespace System
+{
+    [AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Enum|AttributeTargets.Delegate, Inherited = false)]
+    public sealed class SerializableAttribute : Attribute
+    {
+    }
+    
+    public class SystemException : Exception
+    {
+        public SystemException() : base() { }
+        
+        public SystemException(string message) : base() { }
+    }
+    
+    public static class Environment
+    {
+        public static string NewLine { get { return "\n"; } }
+    }
+    
+    namespace Runtime
+    {
+        namespace Serialization
+        {
+            public class SerializationInfo
+            {
+            }
+            
+            public class StreamingContext
+            {
+            }
+        }
+    }
+}
\ No newline at end of file

Added: sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/Custom/ManagedException.cs
===================================================================
--- sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/Custom/ManagedException.cs	                        (rev 0)
+++ sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/Custom/ManagedException.cs	2015-11-04 15:11:19 UTC (rev 8809)
@@ -0,0 +1,91 @@
+//
+//  Copyright (C) 2004-2011 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+using System;
+
+namespace OSGeo.MapGuide
+{
+    /// <summary>
+    /// ManagedException is the exception class from which the root of unmanaged exception derive
+    /// This class, deriving from .NET Exception, allows to use the most common properties of
+    /// the Exception class on exceptions wrapping unmanaged MgException classes. The implementation
+    /// of these properties relies on the equivalent MgException methods.
+    ///
+    /// Although this class does not wrap any unmanaged class, it still holds a C++ pointer to
+    /// the MgException that derives from it.
+    /// </summary>
+    [Serializable]
+    public class ManagedException : Exception
+    {
+        private bool mIsWrapper;
+        private string mMessage;
+        private string mStackTrace;
+
+        public ManagedException()
+        {
+            mIsWrapper = true;
+            mMessage = string.Empty;
+            mStackTrace = string.Empty;
+        }
+
+        public override string Message
+        {
+            get
+            {
+                return mIsWrapper ? ((MgException)this).GetExceptionMessage() : mMessage;
+            }
+        }
+
+        public override string StackTrace
+        {
+            get
+            {
+                if (mIsWrapper)
+                {
+                    //Some cosmetic cleaning of the C++ stack trace to better line up with the .net one
+                    string[] mgStackTrace = ((MgException)this).GetStackTrace().Split(new string[] { "\r\n", "\n" }, StringSplitOptions.RemoveEmptyEntries);
+                    //This currently looks like the following if we re-join:
+                    //
+                    // at- <stack frame>
+                    // at- <stack frame>
+                    // at- <stack frame>
+                    //
+                    //The "-" being a leftover, so replace "at-" with "at" as well after re-joining.
+                    //The reason we don't blindly replace "-" in the C++ stack is because we don't want to scramble any physical path
+                    //that would also contain a "-"
+                    string sanitizedStack = ("   at" + string.Join(Environment.NewLine + "   at", mgStackTrace)).Replace("at-", "at");
+                    return string.Format("{0}{1}   ==== [C++ <-> .net] ===={1}{2}", sanitizedStack, Environment.NewLine, base.StackTrace);
+                }
+                else
+                {
+                    return mStackTrace;
+                }
+            }
+        }
+
+        public override string ToString()
+        {
+            string className = this.GetType().ToString();
+            return string.Format("{0}: {1}{2}{3}", className, this.Message, Environment.NewLine, this.StackTrace);
+        }
+
+        public virtual void Dispose()
+        {
+            //implemented by derived classes
+        }
+    }
+}

Added: sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/DotNetCoreApi.rc
===================================================================
--- sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/DotNetCoreApi.rc	                        (rev 0)
+++ sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/DotNetCoreApi.rc	2015-11-04 15:11:19 UTC (rev 8809)
@@ -0,0 +1,96 @@
+// Microsoft Visual C++ generated resource script.
+//
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "winresrc.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+    "#include ""winresrc.h""\r\n"
+    "\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+    "\r\n"
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 3,0,0,0
+ PRODUCTVERSION 3,0,0,0
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "040904b0"
+        BEGIN
+            VALUE "CompanyName", "Open Source Geospatial Foundation"
+            VALUE "FileDescription", "MapGuideDotNetCoreApi Dynamic Link Library"
+            VALUE "FileVersion", "3, 0, 0, 0"
+            VALUE "InternalName", "MapGuideDotNetCoreApi"
+            VALUE "LegalCopyright", "Copyright (C) 2006-2015 by Autodesk, Inc."
+            VALUE "OriginalFilename", "MapGuideDotNetCoreApi.dll"
+            VALUE "ProductName", "MapGuide Open Source"
+            VALUE "ProductVersion", "3, 0, 0, 0"
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x409, 1200
+    END
+END
+
+#endif    // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // not APSTUDIO_INVOKED
+

Added: sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/DotNetCoreApi.vcxproj
===================================================================
--- sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/DotNetCoreApi.vcxproj	                        (rev 0)
+++ sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/DotNetCoreApi.vcxproj	2015-11-04 15:11:19 UTC (rev 8809)
@@ -0,0 +1,284 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{696D2664-D17F-4357-8A19-2B5DC4B29962}</ProjectGuid>
+    <RootNamespace>PhpApi</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>Unicode</CharacterSet>
+    <PlatformToolset>v140</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>Unicode</CharacterSet>
+    <PlatformToolset>v140</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>Unicode</CharacterSet>
+    <PlatformToolset>v140</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>Unicode</CharacterSet>
+    <PlatformToolset>v140</PlatformToolset>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\bin\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\obj\$(Configuration)\DotNetCoreApi\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\bin\$(Configuration)64\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\obj\$(Configuration)64\DotNetCoreApi\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\bin\$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\obj\$(Configuration)\DotNetCoreApi\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\bin\$(Configuration)64\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\obj\$(Configuration)64\DotNetCoreApi\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MapGuideDotNetCoreUnmanagedApid</TargetName>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">MapGuideDotNetCoreUnmanagedApid</TargetName>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MapGuideDotNetCoreUnmanagedApi</TargetName>
+    <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MapGuideDotNetCoreUnmanagedApi</TargetName>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <PreBuildEvent>
+      <Command>del /Q .\Custom\*prop
+del /Q *.cs
+..\..\..\BuildTools\WebTools\IMake\Win32\IMake.exe ..\MapGuideApi\Constants.xml C# ./Constants.cs
+copy ..\DotNetUnmanagedApi\dotnet.i .\language.i
+..\..\..\BuildTools\WebTools\IMake\Win32\IMake.exe ..\MapGuideApi\MapGuideApiGen.xml C#
+..\..\..\Oem\SwigEx\Win32\swig -c++ -csharp -dllname MapGuideDotNetCoreUnmanagedApid -namespace OSGeo.MapGuide -proxydir .\Custom -baseexception MgException -clsidcode ..\getclassid.code -clsiddata m_cls_id -catchallcode ..\catchall.code -dispose "((MgDisposable*)arg1)->Release()" -rethrow "e->Raise()%3b" -nodefault -noconstants -module MapGuideDotNetCoreUnmanagedApi -o MgApi_wrap.cpp -lib ..\..\..\Oem\SWIGEx\Lib MapGuideApi.i
+</Command>
+    </PreBuildEvent>
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..\HttpHandler;..\WebApp;..\WebSupport;..\..\..\Common\MdfModel;..\..\..\Common\Foundation;..\..\..\Common\Geometry;..\..\..\Common\PlatformBase;..\..\..\Common\MapGuideCommon;..\..\..\Oem\ACE\ACE_wrappers;..\..\..\Oem\dbxml\xerces-c-src\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;_USE_32BIT_TIME_T;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <ExceptionHandling>Async</ExceptionHandling>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>ACEd.lib;xerces-c_3mgD.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)MapGuideDotNetCoreUnmanagedApid.dll</OutputFile>
+      <AdditionalLibraryDirectories>..\..\..\Oem\ACE\ACE_wrappers\lib\$(Configuration);..\..\..\Oem\dbxml\xerces-c-src\Build\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(OutDir)MapGuideDotNetCoreUnmanagedApid.pdb</ProgramDatabaseFile>
+      <SubSystem>Windows</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <ImportLibrary>..\..\lib\$(Configuration)\MapGuideDotNetCoreUnmanagedApid.lib</ImportLibrary>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <PreBuildEvent>
+      <Command>del /Q .\Custom\*prop
+del /Q *.cs
+..\..\..\BuildTools\WebTools\IMake\Win32\IMake.exe ..\MapGuideApi\Constants.xml C# ./Constants.cs
+copy ..\DotNetUnmanagedApi\dotnet.i .\language.i
+..\..\..\BuildTools\WebTools\IMake\Win32\IMake.exe ..\MapGuideApi\MapGuideApiGen.xml C#
+..\..\..\Oem\SwigEx\Win32\swig -c++ -csharp -dllname MapGuideDotNetCoreUnmanagedApid -namespace OSGeo.MapGuide -proxydir .\Custom -baseexception MgException -clsidcode ..\getclassid.code -clsiddata m_cls_id -catchallcode ..\catchall.code -dispose "((MgDisposable*)arg1)->Release()" -rethrow "e->Raise()%3b" -nodefault -noconstants -module MapGuideDotNetCoreUnmanagedApi -o MgApi_wrap.cpp -lib ..\..\..\Oem\SWIGEx\Lib MapGuideApi.i
+</Command>
+    </PreBuildEvent>
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..\HttpHandler;..\WebApp;..\WebSupport;..\..\..\Common\MdfModel;..\..\..\Common\Foundation;..\..\..\Common\Geometry;..\..\..\Common\PlatformBase;..\..\..\Common\MapGuideCommon;..\..\..\Oem\ACE\ACE_wrappers;..\..\..\Oem\dbxml\xerces-c-src\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <ExceptionHandling>Async</ExceptionHandling>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>ACEd.lib;xerces-c_3mgD.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)MapGuideDotNetCoreUnmanagedApid.dll</OutputFile>
+      <AdditionalLibraryDirectories>..\..\..\Oem\ACE\ACE_wrappers\lib64\$(Configuration);..\..\..\Oem\dbxml\xerces-c-src\Build\$(Configuration)64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(OutDir)MapGuideDotNetCoreUnmanagedApid.pdb</ProgramDatabaseFile>
+      <SubSystem>Windows</SubSystem>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <ImportLibrary>..\..\lib\$(Configuration)64\MapGuideDotNetCoreUnmanagedApid.lib</ImportLibrary>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <PreBuildEvent>
+      <Command>del /Q .\Custom\*prop
+del /Q *.cs
+..\..\..\BuildTools\WebTools\IMake\Win32\IMake.exe ..\MapGuideApi\Constants.xml C# ./Constants.cs
+copy ..\DotNetUnmanagedApi\dotnet.i .\language.i
+..\..\..\BuildTools\WebTools\IMake\Win32\IMake.exe ..\MapGuideApi\MapGuideApiGen.xml C#
+..\..\..\Oem\SwigEx\Win32\swig -c++ -csharp -dllname MapGuideDotNetCoreUnmanagedApi -namespace OSGeo.MapGuide -proxydir .\Custom -baseexception MgException -clsidcode ..\getclassid.code -clsiddata m_cls_id -catchallcode ..\catchall.code -dispose "((MgDisposable*)arg1)->Release()" -rethrow "e->Raise()%3b" -nodefault -noconstants -module MapGuideDotNetCoreUnmanagedApi -o MgApi_wrap.cpp -lib ..\..\..\Oem\SWIGEx\Lib MapGuideApi.i
+</Command>
+    </PreBuildEvent>
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <AdditionalIncludeDirectories>..\HttpHandler;..\WebApp;..\WebSupport;..\..\..\Common\MdfModel;..\..\..\Common\Foundation;..\..\..\Common\Geometry;..\..\..\Common\PlatformBase;..\..\..\Common\MapGuideCommon;..\..\..\Oem\ACE\ACE_wrappers;..\..\..\Oem\dbxml\xerces-c-src\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_USE_32BIT_TIME_T;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <ExceptionHandling>Async</ExceptionHandling>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>ACE.lib;xerces-c_3mg.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)MapGuideDotNetCoreUnmanagedApi.dll</OutputFile>
+      <AdditionalLibraryDirectories>..\..\..\Oem\ACE\ACE_wrappers\lib\$(Configuration);..\..\..\Oem\dbxml\xerces-c-src\Build\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(OutDir)MapGuideDotNetCoreUnmanagedApi.pdb</ProgramDatabaseFile>
+      <SubSystem>Windows</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <ImportLibrary>..\..\lib\$(Configuration)\MapGuideDotNetCoreUnmanagedApi.lib</ImportLibrary>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <PreBuildEvent>
+      <Command>del /Q .\Custom\*prop
+del /Q *.cs
+..\..\..\BuildTools\WebTools\IMake\Win32\IMake.exe ..\MapGuideApi\Constants.xml C# ./Constants.cs
+copy ..\DotNetUnmanagedApi\dotnet.i .\language.i
+..\..\..\BuildTools\WebTools\IMake\Win32\IMake.exe ..\MapGuideApi\MapGuideApiGen.xml C#
+..\..\..\Oem\SwigEx\Win32\swig -c++ -csharp -dllname MapGuideDotNetCoreUnmanagedApi -namespace OSGeo.MapGuide -proxydir .\Custom -baseexception MgException -clsidcode ..\getclassid.code -clsiddata m_cls_id -catchallcode ..\catchall.code -dispose "((MgDisposable*)arg1)->Release()" -rethrow "e->Raise()%3b" -nodefault -noconstants -module MapGuideDotNetCoreUnmanagedApi -o MgApi_wrap.cpp -lib ..\..\..\Oem\SWIGEx\Lib MapGuideApi.i
+</Command>
+    </PreBuildEvent>
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <AdditionalIncludeDirectories>..\HttpHandler;..\WebApp;..\WebSupport;..\..\..\Common\MdfModel;..\..\..\Common\Foundation;..\..\..\Common\Geometry;..\..\..\Common\PlatformBase;..\..\..\Common\MapGuideCommon;..\..\..\Oem\ACE\ACE_wrappers;..\..\..\Oem\dbxml\xerces-c-src\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <ExceptionHandling>Async</ExceptionHandling>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>ACE.lib;xerces-c_3mg.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(OutDir)MapGuideDotNetCoreUnmanagedApi.dll</OutputFile>
+      <AdditionalLibraryDirectories>..\..\..\Oem\ACE\ACE_wrappers\lib64\$(Configuration);..\..\..\Oem\dbxml\xerces-c-src\Build\$(Configuration)64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <ProgramDatabaseFile>$(OutDir)MapGuideDotNetCoreUnmanagedApi.pdb</ProgramDatabaseFile>
+      <SubSystem>Windows</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <DataExecutionPrevention>
+      </DataExecutionPrevention>
+      <ImportLibrary>..\..\lib\$(Configuration)64\MapGuideDotNetCoreUnmanagedApi.lib</ImportLibrary>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <None Include="catchall.code" />
+    <None Include="getclassid.code" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="MgApi_wrap.cpp">
+      <PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessToFile>
+      <PreprocessSuppressLineNumbers Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</PreprocessSuppressLineNumbers>
+      <PreprocessToFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessToFile>
+      <PreprocessSuppressLineNumbers Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</PreprocessSuppressLineNumbers>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="DotNetCoreApi.rc" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\..\Common\Foundation\Foundation.vcxproj">
+      <Project>{a82adc7d-4da4-42f2-9bf6-df5dcfb44425}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\Common\Geometry\Geometry.vcxproj">
+      <Project>{d954daac-e305-40ce-b3f3-c229a0bef4f0}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\Common\MapGuideCommon\MapGuideCommon.vcxproj">
+      <Project>{5287a594-4d4f-43fe-a281-e279ab708cf1}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\Common\PlatformBase\PlatformBase.vcxproj">
+      <Project>{f7334b1b-0efa-47e3-8e66-df158e61b7e4}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="..\HttpHandler\HttpHandler.vcxproj">
+      <Project>{78619d0e-d3f9-4ddf-b90e-f99cb03dfc44}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="..\WebApp\WebApp.vcxproj">
+      <Project>{b797917b-6842-467c-8b14-e00b76a91247}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="..\WebSupport\WebSupport.vcxproj">
+      <Project>{795b1b0e-4ec8-469d-b641-e26324266fbf}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
\ No newline at end of file

Added: sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/catchall.code
===================================================================
--- sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/catchall.code	                        (rev 0)
+++ sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/catchall.code	2015-11-04 15:11:19 UTC (rev 8809)
@@ -0,0 +1,8 @@
+
+void onCatchAll(const char* proxyfname)
+{
+    string s = proxyfname;
+    wstring fname = MgUtil::MultiByteToWideChar(s);
+    MgUnclassifiedException* e = new MgUnclassifiedException(fname, __LINE__, __WFILE__, NULL, L"", NULL);
+    ThrowDotNetExceptionWrapper(e);
+}

Added: sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/getclassid.code
===================================================================
--- sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/getclassid.code	                        (rev 0)
+++ sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/getclassid.code	2015-11-04 15:11:19 UTC (rev 8809)
@@ -0,0 +1,15 @@
+
+DllExport int SWIGSTDCALL  getClassId(void* ptrObj)
+{
+  return ((MgObject*)ptrObj)->GetClassId();
+}
+
+DllExport char* SWIGSTDCALL  getClassName(void* ptrObj)
+{
+  return ((MgObject*)ptrObj)->GetMultiByteClassName();
+}
+
+DllExport char* SWIGSTDCALL  getNameSpace(void* ptrObj)
+{
+  return ((MgObject*)ptrObj)->GetNameSpace();
+}

Added: sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/project.json
===================================================================
--- sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/project.json	                        (rev 0)
+++ sandbox/jng/aspnet50/Web/src/MapGuideDotNetCoreApi/project.json	2015-11-04 15:11:19 UTC (rev 8809)
@@ -0,0 +1,36 @@
+{
+  "version": "3.1.0-*",
+  "description": "MapGuide API for .net Core",
+  "authors": [ "OSGeo" ],
+  "tags": [ "MapGuide" ],
+  "projectUrl": "http://mapguide.osgeo.org",
+  "licenseUrl": "",
+  "configurations": {
+    "Debug": {
+      "compilationOptions": {
+        "define": ["DEBUG", "TRACE"]
+      }
+    },
+    "Release": {
+      "compilationOptions": {
+        "define": ["RELEASE", "TRACE"],
+        "optimize": true
+      }
+    }
+  },
+  "frameworks": {
+    "dnxcore50": {
+      "dependencies": {
+        "Microsoft.CSharp": "4.0.1-beta-23225",
+        "System.Collections": "4.0.11-beta-23225",
+        "System.Linq": "4.0.1-beta-23225",
+        "System.Runtime": "4.0.21-beta-23225",
+        "System.Threading": "4.0.11-beta-23225",
+        "System.Runtime.InteropServices": "4.0.21-beta-23225"
+      }
+    }
+  },
+  "sources": {
+    "compile": ["*.cs", "Custom/*.cs"]
+  }
+}
\ No newline at end of file



More information about the mapguide-commits mailing list