Skip to content

Commit

Permalink
Net Core - GenApi CefSharp.Core
Browse files Browse the repository at this point in the history
Should now compile correctly
  • Loading branch information
amaitland committed Aug 12, 2020
1 parent 159a45b commit 76c7918
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 36 deletions.
45 changes: 17 additions & 28 deletions CefSharp.Core.RefAssembly/CefSharp.Core.RefAssembly.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,20 @@
<SignAssembly>false</SignAssembly>
<AssemblyOriginatorKeyFile>..\CefSharp.snk</AssemblyOriginatorKeyFile>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<NoWarn>CS1591,CS0436</NoWarn>
</PropertyGroup>

<!-- <PropertyGroup Condition="'$(Configuration)'=='Release'"> -->
<!-- <ProduceReferenceAssembly>true</ProduceReferenceAssembly> -->
<!-- </PropertyGroup> -->

<ItemGroup>
<ProjectReference Include="..\CefSharp\CefSharp.netcore.csproj" />
<ProjectReference Include="..\CefSharp.Core\CefSharp.Core.netcore.vcxproj" />
<ProjectReference Include="..\CefSharp\CefSharp.netcore.csproj">
<Private>false</Private>
</ProjectReference>
<ProjectReference Include="..\CefSharp.Core\CefSharp.Core.netcore.vcxproj">
<Private>false</Private>
</ProjectReference>
</ItemGroup>

<!-- GenApi -->
Expand All @@ -30,36 +35,20 @@
<GenAPITargetPath>$(GenAPITargetDir)$(AssemblyName).cs</GenAPITargetPath>
</PropertyGroup>

<!--
Call GenApi before we compile as to generate the source which is then used
to by this project to generate the dll
-->
<Target Name="GenApiBeforeCompile" BeforeTargets="Compile">
<Message Text="BeforeCompile" Importance="high" />

<Message Text="IntermediateTargetPath : $(IntermediateTargetPath)" Importance="high" />
<CallTarget Targets="GenerateReferenceAssemblySource"/>

<PropertyGroup>
<IntermediateTargetPath Condition="'$(IntermediateTargetPath)' == ''">$(IntermediateOutputPath)$(TargetName)$(TargetExt)</IntermediateTargetPath>
</PropertyGroup>

<ItemGroup Condition="'$(GenAPILibPath)' == ''">
<!-- build out a list of directories where dependencies are located -->
<_referencePathDirectoriesWithDuplicates Include="@(ReferencePath->'%(RootDir)%(Directory)'->TrimEnd('\'))" />
<!-- strip metadata, removing duplicates -->
<_referencePathDirectories Include="%(_referencePathDirectoriesWithDuplicates.Identity)" />
</ItemGroup>

<PropertyGroup Condition="'$(GenAPILibPath)' == ''">
<GenAPILibPath>@(_referencePathDirectories)</GenAPILibPath>
</PropertyGroup>

<Message Text="GenAPILibPath : $(GenAPILibPath)" Importance="high" />
<Message Text="IntermediateTargetPath : $(IntermediateTargetPath)" Importance="high" />

<Exec Command="$(_GenAPICommand) &quot;$(IntermediateTargetPath)&quot; --lib-path &quot;$(GenAPILibPath)&quot; --out &quot;$(GenAPITargetPath)&quot; $(GenAPIAdditionalParameters)" />

<ItemGroup>
<FileWrites Condition="'$(SkipGenAPITargetPathFileWrite)' != 'true'" Include="$(GenAPITargetPath)"/>
</ItemGroup>

<Message Text="Generated reference assembly source code: $(GenAPITargetPath)" Importance="high" />
<!--
GenApi generates our VC++ dispose/finalise methods are public sealed override void Dispose()
which won't compile, this just replaces that with public void Dispose
-->

<WriteLinesToFile File="$(GenAPITargetPath)" Lines="$([System.IO.File]::ReadAllText($(GenAPITargetPath)).Replace('public sealed override void Dispose()','public void Dispose()'))" Overwrite="true" Encoding="utf-8" />
</Target>
</Project>
10 changes: 2 additions & 8 deletions CefSharp.Core.RefAssembly/CefSharp.Core.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// GenAPI Version: 5.0.2.37403
Expand Down Expand Up @@ -174,7 +174,7 @@ public static void SetWindowPosition(System.IntPtr handle, int x, int y, int wid
}
public partial class PopupFeatures : CefSharp.IPopupFeatures, System.IDisposable
{
public unsafe PopupFeatures(CefStructBase<CefPopupFeaturesTraits> optmod System.Runtime.CompilerServices.IsConst* popupFeatures) { }
internal PopupFeatures() { }
public virtual int Height { get { throw null; } }
public virtual int HeightSet { get { throw null; } }
public virtual bool MenuBarVisible { get { throw null; } }
Expand Down Expand Up @@ -202,7 +202,6 @@ public PostData() { }
public void Dispose() { }
protected virtual void Dispose(bool A_0) { }
~PostData() { }
public unsafe implicit operator scoped_refptr<CefPostData>* (scoped_refptr<CefPostData>* ) { throw null; }
public virtual bool RemoveElement(CefSharp.IPostDataElement element) { throw null; }
public virtual void RemoveElements() { }
}
Expand All @@ -216,7 +215,6 @@ public PostDataElement() { }
public void Dispose() { }
protected virtual void Dispose(bool A_0) { }
~PostDataElement() { }
public unsafe implicit operator scoped_refptr<CefPostDataElement>* (scoped_refptr<CefPostDataElement>* ) { throw null; }
public virtual void SetToEmpty() { }
}
public partial class Request : CefSharp.Internals.CefWrapper, CefSharp.IRequest
Expand All @@ -238,10 +236,8 @@ protected virtual void Dispose(bool A_0) { }
~Request() { }
public virtual string GetHeaderByName(string name) { throw null; }
public virtual void InitializePostData() { }
public unsafe implicit operator scoped_refptr<CefRequest>* (scoped_refptr<CefRequest>* ) { throw null; }
public virtual void SetHeaderByName(string name, string value, bool overwrite) { }
public virtual void SetReferrer(string referrerUrl, CefSharp.ReferrerPolicy policy) { }
public void ThrowIfReadOnly() { }
}
public partial class RequestContext : CefSharp.Internals.CefWrapper, CefSharp.IRequestContext
{
Expand Down Expand Up @@ -318,7 +314,6 @@ public WindowInfo() { }
public void Dispose() { }
protected virtual void Dispose(bool A_0) { }
~WindowInfo() { }
public unsafe CefWindowInfo* GetWindowInfo() { throw null; }
public virtual void SetAsChild(System.IntPtr parentHandle) { }
public virtual void SetAsChild(System.IntPtr parentHandle, int left, int top, int right, int bottom) { }
public virtual void SetAsPopup(System.IntPtr parentHandle, string windowName) { }
Expand Down Expand Up @@ -352,7 +347,6 @@ public void Dispose() { }
protected virtual void Dispose(bool A_0) { }
~CefDragDataWrapper() { }
public virtual long GetFileContents(System.IO.Stream stream) { throw null; }
public unsafe implicit operator scoped_refptr<CefDragData>* (scoped_refptr<CefDragData>* ) { throw null; }
public virtual void ResetFileContents() { }
}
[System.CLSCompliantAttribute(false)]
Expand Down

0 comments on commit 76c7918

Please sign in to comment.