Skip to content

Commit

Permalink
Добавил COM компонент
Browse files Browse the repository at this point in the history
  • Loading branch information
jdeshin committed Feb 3, 2018
1 parent d434212 commit b7a9bc6
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
Binary file added MarkdigMarkdownProcessorCom/Markdig.dll
Binary file not shown.
4 changes: 4 additions & 0 deletions MarkdigMarkdownProcessorCom/MarkdigMarkdownProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
using System.Text;
using System.Threading.Tasks;
using System.Runtime.InteropServices;
using System.IO;
using System.Reflection;
using Markdig;

namespace MarkdigMarkdownProcessorCom
Expand Down Expand Up @@ -40,6 +42,7 @@ public MarkdigMarkdownProcessor()
public string GetHtmlFromMarkdown(string markdown)
{
return Markdown.ToHtml(markdown, _pipeline);
//return "";
}

/// <summary>
Expand All @@ -54,6 +57,7 @@ public void ConfigureExtensions(string extensions = null)
public string GetStringFromMarkdown(string markdown)
{
return Markdown.ToPlainText(markdown, _pipeline);
//return "";
}
}
}
12 changes: 9 additions & 3 deletions MarkdigMarkdownProcessorCom/MarkdigMarkdownProcessorCom.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<RegisterForComInterop>true</RegisterForComInterop>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
Expand All @@ -37,8 +38,9 @@
<AssemblyOriginatorKeyFile>Markdig_COM_Key.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="Markdig, Version=0.14.9.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Markdig.0.14.9\lib\net40\Markdig.dll</HintPath>
<Reference Include="Markdig">
<HintPath>.\Markdig.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand All @@ -55,7 +57,11 @@
</ItemGroup>
<ItemGroup>
<None Include="Markdig_COM_Key.snk" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Content Include="Markdig.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
4 changes: 0 additions & 4 deletions MarkdigMarkdownProcessorCom/packages.config

This file was deleted.

0 comments on commit b7a9bc6

Please sign in to comment.