Skip to content

Commit ea5ef54

Browse files
Updated DirectN nuget package.
1 parent edbff50 commit ea5ef54

File tree

11 files changed

+33
-42
lines changed

11 files changed

+33
-42
lines changed

Wice.DevTools/Wice.DevTools.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
</ItemGroup>
6161
<ItemGroup>
6262
<PackageReference Include="DirectN">
63-
<Version>1.15.0.2</Version>
63+
<Version>1.16.0</Version>
6464
</PackageReference>
6565
</ItemGroup>
6666
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

Wice.Samples.Gallery/Wice.Samples.Gallery.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,10 @@
205205
</ItemGroup>
206206
<ItemGroup>
207207
<PackageReference Include="DirectN">
208-
<Version>1.15.0.2</Version>
208+
<Version>1.16.0</Version>
209209
</PackageReference>
210210
<PackageReference Include="Microsoft.Windows.SDK.Contracts">
211-
<Version>10.0.22621.2428</Version>
211+
<Version>10.0.22621.3233</Version>
212212
</PackageReference>
213213
</ItemGroup>
214214
<ItemGroup>

Wice.Tests/Wice.Tests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,10 @@
9696
</ItemGroup>
9797
<ItemGroup>
9898
<PackageReference Include="DirectN">
99-
<Version>1.15.0.2</Version>
99+
<Version>1.16.0</Version>
100100
</PackageReference>
101101
<PackageReference Include="Microsoft.Windows.SDK.Contracts">
102-
<Version>10.0.22621.2428</Version>
102+
<Version>10.0.22621.3233</Version>
103103
</PackageReference>
104104
</ItemGroup>
105105
<ItemGroup>

Wice/Interop/ICompositorInterop.cs

Lines changed: 0 additions & 25 deletions
This file was deleted.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using System.Reflection;
22

3-
[assembly: AssemblyVersion("1.2.0.0")]
4-
[assembly: AssemblyFileVersion("1.2.0.0")]
5-
[assembly: AssemblyInformationalVersion("1.2.0.0")]
3+
[assembly: AssemblyVersion("1.2.1.0")]
4+
[assembly: AssemblyFileVersion("1.2.1.0")]
5+
[assembly: AssemblyInformationalVersion("1.2.1.0")]

Wice/Utilities/WinRTUtilities.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,24 @@ public static T WinRTCast<T>(this object obj, bool throwOnError = true) where T
7373
#endif
7474
}
7575

76+
public static T WinRTCast<T>(this IntPtr unk, bool throwOnError = true) where T : class
77+
{
78+
if (unk == IntPtr.Zero)
79+
return default;
80+
81+
if (throwOnError)
82+
return WinRTCast<T>(Marshal.GetObjectForIUnknown(unk), throwOnError);
83+
84+
try
85+
{
86+
return WinRTCast<T>(Marshal.GetObjectForIUnknown(unk), false);
87+
}
88+
catch
89+
{
90+
return default;
91+
}
92+
}
93+
7694
public static T ComCast<T>(this object obj, bool throwOnError = true) where T : class
7795
{
7896
if (obj == null)

Wice/Wice.csproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@
8282
<Compile Include="EditorHost.cs" />
8383
<Compile Include="EventTrigger.cs" />
8484
<Compile Include="Interop\ICompositionTarget.cs" />
85-
<Compile Include="Interop\ICompositorInterop.cs" />
8685
<Compile Include="Interop\IGeometrySource2DWinRT.cs" />
8786
<Compile Include="Interop\IGraphicsEffectSourceWinRT.cs" />
8887
<Compile Include="Interop\IGraphicsEffectWinRT.cs" />
@@ -370,10 +369,10 @@
370369
</ItemGroup>
371370
<ItemGroup>
372371
<PackageReference Include="DirectN">
373-
<Version>1.15.0.2</Version>
372+
<Version>1.16.0</Version>
374373
</PackageReference>
375374
<PackageReference Include="Microsoft.Windows.SDK.Contracts">
376-
<Version>10.0.22621.2428</Version>
375+
<Version>10.0.22621.3233</Version>
377376
</PackageReference>
378377
<PackageReference Include="System.Numerics.Vectors">
379378
<Version>4.5.0</Version>

Wice/Window.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,8 +1007,8 @@ protected virtual CompositionGraphicsDevice CreateCompositionDevice()
10071007
{
10081008
var interop = CompositorController.Compositor.ComCast<ICompositorInterop>();
10091009
var d2d1 = _d2D1Device.Value;
1010-
var hr = interop.CreateGraphicsDevice(d2d1.Object, out var obj);
1011-
var dev = obj.WinRTCast<CompositionGraphicsDevice>();
1010+
var hr = interop.CreateGraphicsDevice(d2d1.Object, out var unk);
1011+
var dev = unk.WinRTCast<CompositionGraphicsDevice>();
10121012
if (hr.Value < 0)
10131013
{
10141014
try

WiceCore.Samples.Gallery/WiceCore.Samples.Gallery.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
<Compile Include="..\Wice.Samples.Gallery\Samples\Text\RichTextBox\RichTextBoxSample.cs" Link="Samples\Text\RichTextBox\RichTextBoxSample.cs" />
160160
</ItemGroup>
161161
<ItemGroup>
162-
<PackageReference Include="DirectNCore" Version="1.15.0.2" />
162+
<PackageReference Include="DirectNCore" Version="1.16.0" />
163163
</ItemGroup>
164164
<ItemGroup>
165165
<ProjectReference Include="..\WiceCore\WiceCore.csproj" />

WiceCore.Tests/WiceCore.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@
3737
<EmbeddedResource Include="..\Wice.Tests\pg61797.txt" Link="pg61797.txt" />
3838
</ItemGroup>
3939
<ItemGroup>
40-
<PackageReference Include="DirectNCore" Version="1.15.0.2" />
40+
<PackageReference Include="DirectNCore" Version="1.16.0" />
4141
</ItemGroup>
4242
</Project>

0 commit comments

Comments
 (0)