Skip to content

Commit 056f1a8

Browse files
committed
Extract MSDN doc provider into its own repository.
1 parent 724d536 commit 056f1a8

13 files changed

Lines changed: 277 additions & 9 deletions

.editorconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
; This file is for unifying the coding style for different editors and IDEs.
2+
; More information at http://EditorConfig.org
3+
4+
root = true
5+
6+
[*]
7+
end_of_line = CRLF
8+
9+
[*.cs]
10+
indent_style = space
11+
indent_size = 4

.gitignore

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
2+
#ignore thumbnails created by windows
3+
Thumbs.db
4+
#Ignore files build by Visual Studio
5+
*.obj
6+
*.exe
7+
*.pdb
8+
*.user
9+
*.aps
10+
*.pch
11+
*.vspscc
12+
*_i.c
13+
*_p.c
14+
*.ncb
15+
*.suo
16+
*.tlb
17+
*.tlh
18+
*.bak
19+
*.cache
20+
*.ilk
21+
*.log
22+
*.orig
23+
[Bb]in
24+
[Dd]ebug*/
25+
*.lib
26+
*.sbr
27+
*.nogit
28+
*.nupkg
29+
*.sdf
30+
*.opensdf
31+
*.suo
32+
*.dotCover
33+
sdk-include/
34+
vc-include/
35+
obj/
36+
ipch*/
37+
Demo/
38+
AppPackages/
39+
[Rr]elease*/
40+
_ReSharper*/
41+
[Tt]est[Rr]esult*
42+
Generated*/
43+
packages/
44+
Temp*/
45+
.vs/
46+
#ignore build log file
47+
BuildErrors.log
48+
#ignore certification test results
49+
Source/CertificationTests/Results/*
50+
*.tlog
51+
52+
# Documentation
53+
_build/
54+
55+
.vscode/*

Directory.Build.targets

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<Project>
2+
<Import Project="$(MSBuildThisFileDirectory)/SdkPackage.targets" Condition="'$(SharpGenSdkPackage)' == 'true'" />
3+
</Project>

Directory.build.props

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<Project>
2+
<PropertyGroup>
3+
<VersionPrefix Condition="'$(APPVEYOR_REPO_TAG_NAME)' != ''">$(APPVEYOR_REPO_TAG_NAME)</VersionPrefix>
4+
<VersionPrefix Condition="'$(VersionPrefix)' == ''">1.0.4</VersionPrefix>
5+
<VersionSuffix Condition="'$(CI)' == ''">local</VersionSuffix>
6+
<VersionSuffix Condition="'$(CI)' != '' AND '$(APPVEYOR_REPO_TAG_NAME)' == ''">ci$(APPVEYOR_BUILD_NUMBER)</VersionSuffix>
7+
<Authors>jkoritzinsky</Authors>
8+
<Copyright>(c) 2010-2017 Alexandre Mutel, 2017-2018 Jeremy Koritzinsky</Copyright>
9+
<PackageLicenseUrl>https://github.com/jkoritzinsky/SharpGen.Doc.Msdn/blob/master/LICENSE.txt</PackageLicenseUrl>
10+
<PackageProjectUrl>https://github.com/jkoritzinsky/SharpGen.Doc.Msdn</PackageProjectUrl>
11+
<Tags>SharpGen;Documentation;MSDN</Tags>
12+
<RepositoryUrl>https://github.com/jkoritzinsky/SharpGen.Doc.Msdn</RepositoryUrl>
13+
<LangVersion>7.2</LangVersion>
14+
</PropertyGroup>
15+
</Project>

LICENSE.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2010-2017 Alexandre Mutel, 2017 Jeremy Koritzinsky
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# SharpGen.Doc.Msdn
2+
3+
MSDN Documentation Provider for SharpGen and SharpGenTools.Sdk.

SdkPackage.targets

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<Project>
2+
<ItemGroup>
3+
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="15.3.409" PrivateAssets="all" />
4+
<Content Include="**/*.props" Exclude="obj/**" PackagePath="build;buildMultiTargeting" />
5+
<Content Include="**/*.targets" Exclude="obj/**" PackagePath="build;buildMultiTargeting" />
6+
</ItemGroup>
7+
8+
<ItemGroup>
9+
<PackageReference Update="*">
10+
<PrivateAssets>all</PrivateAssets>
11+
</PackageReference>
12+
</ItemGroup>
13+
14+
<Target Name="PackTaskDependencies" BeforeTargets="GenerateNuspec">
15+
<!--
16+
The include needs to happen after output has been copied to build output folder
17+
but before NuGet generates a nuspec.
18+
-->
19+
20+
<ItemGroup>
21+
<ReferencedAssemblies Include="bin\$(Configuration)\**\*.dll" />
22+
<ReferencedAssemblyPdbs Include="bin\$(Configuration)\**\*.pdb" Condition="'$(Configuration)' == 'Debug'" />
23+
<_PackageFiles Include="@(ReferencedAssemblies);@(ReferencedAssemblyPdbs)" Condition="'%(FileName)' != '$(AssemblyName)'">
24+
<PackagePath>tools\%(RecursiveDir)%(FileName)%(Extension)</PackagePath>
25+
<Visible>false</Visible>
26+
<BuildAction>None</BuildAction>
27+
</_PackageFiles>
28+
</ItemGroup>
29+
</Target>
30+
31+
<Target Name="PackDummyLibFile" BeforeTargets="GenerateNuspec">
32+
<Touch Files="$(BaseIntermediateOutputPath)$(Configuration)/_._" AlwaysCreate="true" />
33+
34+
<ItemGroup>
35+
<_PackageFiles Include="$(BaseIntermediateOutputPath)$(Configuration)/_._">
36+
<PackagePath>lib/netstandard1.1</PackagePath>
37+
<Visible>false</Visible>
38+
<BuildAction>None</BuildAction>
39+
</_PackageFiles>
40+
</ItemGroup>
41+
</Target>
42+
</Project>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.IO;
4+
using System.Reflection;
5+
using System.Text;
6+
7+
namespace SharpGen.Doc.Msdn.Tasks
8+
{
9+
static class BindingRedirectResolution
10+
{
11+
public static void Enable()
12+
{
13+
}
14+
15+
static BindingRedirectResolution()
16+
{
17+
#if NET46
18+
AppDomain.CurrentDomain.AssemblyResolve += (s, args) =>
19+
{
20+
var assemblyPath = Assembly.GetExecutingAssembly().Location;
21+
var referenceName = new AssemblyName(AppDomain.CurrentDomain.ApplyPolicy(args.Name));
22+
var fileName = referenceName.Name + ".dll";
23+
24+
if (!String.IsNullOrEmpty(assemblyPath))
25+
{
26+
var probingPath = Path.Combine(Path.GetDirectoryName(assemblyPath), fileName);
27+
if (File.Exists(probingPath))
28+
{
29+
var name = AssemblyName.GetAssemblyName(probingPath);
30+
31+
if (name.Version >= referenceName.Version)
32+
{
33+
return Assembly.Load(name);
34+
}
35+
}
36+
}
37+
38+
return null;
39+
};
40+
#endif
41+
}
42+
}
43+
}

SharpGen.Doc.Msdn.Tasks/MsdnDocTask.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using Microsoft.Build.Framework;
44
using Microsoft.Build.Utilities;
55
using SharpGen.CppModel;
6-
using SharpGenTools.Sdk;
76

87
namespace SharpGen.Doc.Msdn.Tasks
98
{

SharpGen.Doc.Msdn.Tasks/SharpGen.Doc.Msdn.Tasks.csproj

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,7 @@
1616
<ProjectReference Include="..\SharpGen.Doc.Msdn\SharpGen.Doc.Msdn.csproj">
1717
<PrivateAssets>all</PrivateAssets>
1818
</ProjectReference>
19-
<ProjectReference Include="..\SharpGen\SharpGen.csproj">
20-
<PrivateAssets>all</PrivateAssets>
21-
</ProjectReference>
22-
</ItemGroup>
23-
24-
<ItemGroup>
25-
<Compile Include="..\SharpGenTools.Sdk\BindingRedirectResolution.cs" Link="BindingRedirectResolution.cs" />
19+
<PackageReference Include="SharpGen" Version="1.0.3" />
2620
</ItemGroup>
2721

2822
</Project>

0 commit comments

Comments
 (0)