Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into dotnet-archive
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfbjarne committed Jul 28, 2021
2 parents 65b7daf + 7986b2f commit 25f19ae
Show file tree
Hide file tree
Showing 35 changed files with 339 additions and 107 deletions.
9 changes: 9 additions & 0 deletions Localize/loc/de/tools/mtouch/Errors.resx.lcl
Original file line number Diff line number Diff line change
Expand Up @@ -3592,6 +3592,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";MX8041" ItemType="0;.resx" PsrId="211" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Unable to create an instance of the type {0}.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Es kann keine Instanz des Typs {0}erstellt werden.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";MX_ConfigurationAwareStep" ItemType="0;.resx" PsrId="211" InstFlg="true" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The linker step '{0}' failed during processing: {1}]]></Val>
Expand Down
9 changes: 9 additions & 0 deletions Localize/loc/es/tools/mtouch/Errors.resx.lcl
Original file line number Diff line number Diff line change
Expand Up @@ -3592,6 +3592,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";MX8041" ItemType="0;.resx" PsrId="211" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Unable to create an instance of the type {0}.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[No se puede crear una instancia de tipo {0}.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";MX_ConfigurationAwareStep" ItemType="0;.resx" PsrId="211" InstFlg="true" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The linker step '{0}' failed during processing: {1}]]></Val>
Expand Down
9 changes: 9 additions & 0 deletions Localize/loc/fr/tools/mtouch/Errors.resx.lcl
Original file line number Diff line number Diff line change
Expand Up @@ -3592,6 +3592,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";MX8041" ItemType="0;.resx" PsrId="211" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Unable to create an instance of the type {0}.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Impossible de créer une instance du type {0}.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";MX_ConfigurationAwareStep" ItemType="0;.resx" PsrId="211" InstFlg="true" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The linker step '{0}' failed during processing: {1}]]></Val>
Expand Down
9 changes: 9 additions & 0 deletions Localize/loc/it/tools/mtouch/Errors.resx.lcl
Original file line number Diff line number Diff line change
Expand Up @@ -3592,6 +3592,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";MX8041" ItemType="0;.resx" PsrId="211" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Unable to create an instance of the type {0}.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Impossibile creare un'istanza del tipo di {0}.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";MX_ConfigurationAwareStep" ItemType="0;.resx" PsrId="211" InstFlg="true" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The linker step '{0}' failed during processing: {1}]]></Val>
Expand Down
9 changes: 9 additions & 0 deletions Localize/loc/ja/tools/mtouch/Errors.resx.lcl
Original file line number Diff line number Diff line change
Expand Up @@ -3592,6 +3592,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";MX8041" ItemType="0;.resx" PsrId="211" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Unable to create an instance of the type {0}.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[型 {0} のインスタンスを作成できません。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";MX_ConfigurationAwareStep" ItemType="0;.resx" PsrId="211" InstFlg="true" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The linker step '{0}' failed during processing: {1}]]></Val>
Expand Down
9 changes: 9 additions & 0 deletions Localize/loc/zh-Hans/tools/mtouch/Errors.resx.lcl
Original file line number Diff line number Diff line change
Expand Up @@ -3592,6 +3592,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";MX8041" ItemType="0;.resx" PsrId="211" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Unable to create an instance of the type {0}.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[无法创建类型 {0} 的实例。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";MX_ConfigurationAwareStep" ItemType="0;.resx" PsrId="211" InstFlg="true" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The linker step '{0}' failed during processing: {1}]]></Val>
Expand Down
9 changes: 9 additions & 0 deletions Localize/loc/zh-Hant/tools/mtouch/Errors.resx.lcl
Original file line number Diff line number Diff line change
Expand Up @@ -3592,6 +3592,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";MX8041" ItemType="0;.resx" PsrId="211" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Unable to create an instance of the type {0}.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[無法建立 {0} 類型的執行個體。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";MX_ConfigurationAwareStep" ItemType="0;.resx" PsrId="211" InstFlg="true" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The linker step '{0}' failed during processing: {1}]]></Val>
Expand Down
11 changes: 7 additions & 4 deletions dotnet/Workloads/vs-workload.template.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@
<ShortNames Include="@PACK_VERSION_LONG@">
<Replacement>@PACK_VERSION_SHORT@</Replacement>
</ShortNames>
<ComponentResources Include="ios" Category=".NET" Title=".NET SDK for iOS" Description=".NET SDK Workload for building iOS applications."/>
<ComponentVersions Include="ios" Version="@IOS_WORKLOAD_VERSION@" />
<ComponentResources Include="maccatalyst" Category=".NET" Title=".NET SDK for Mac Catalyst" Description=".NET SDK Workload for building macOS applications with Mac Catalyst."/>
<ComponentVersions Include="maccatalyst" Version="@MACCATALYST_WORKLOAD_VERSION@" />
<ShortNames Include="Microsoft.MacCatalyst.Runtime.maccatalyst">
<Replacement>Microsoft.MacCatalyst.Runtime</Replacement>
</ShortNames>
<ComponentResources Include="ios" Version="@IOS_WORKLOAD_VERSION@" Category=".NET" Title=".NET SDK for iOS" Description=".NET SDK Workload for building iOS applications."/>
<ComponentResources Include="maccatalyst" Version="@MACCATALYST_WORKLOAD_VERSION@" Category=".NET" Title=".NET SDK for Mac Catalyst" Description=".NET SDK Workload for building macOS applications with Mac Catalyst."/>
<WorkloadPackages Include="$(NuGetPackagePath)\Microsoft.NET.Sdk.iOS.Manifest*.nupkg" Version="@IOS_WORKLOAD_VERSION@" />
<WorkloadPackages Include="$(NuGetPackagePath)\Microsoft.NET.Sdk.MacCatalyst.Manifest*.nupkg" Version="@MACCATALYST_WORKLOAD_VERSION@" />
</ItemGroup>
</Project>
3 changes: 1 addition & 2 deletions dotnet/targets/Xamarin.Shared.Sdk.targets
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@
<EnableUnsafeUTF7Encoding Condition="'$(EnableUnsafeUTF7Encoding)' == ''">false</EnableUnsafeUTF7Encoding>
<EventSourceSupport Condition="'$(EventSourceSupport)' == ''">false</EventSourceSupport>
<HttpActivityPropagationSupport Condition="'$(HttpActivityPropagationSupport)' == ''">false</HttpActivityPropagationSupport>
<!-- native bits for ICU are not ready for Catalyst - https://github.com/xamarin/xamarin-macios/issues/11392 -->
<InvariantGlobalization Condition="'$(_PlatformName)' == 'MacCatalyst' And '$(InvariantGlobalization)' == ''">true</InvariantGlobalization>
<InvariantGlobalization Condition="'$(InvariantGlobalization)' == ''">false</InvariantGlobalization>
<StartupHookSupport Condition="'$(StartupHookSupport)' == ''">false</StartupHookSupport>
<UseSystemResourceKeys Condition="'$(UseSystemResourceKeys)' == ''">true</UseSystemResourceKeys>
<UseNativeHttpHandler Condition="'$(_PlatformName)' != 'macOS' And '$(UseNativeHttpHandler)' == ''">true</UseNativeHttpHandler>
Expand Down
2 changes: 2 additions & 0 deletions src/CoreAnimation/CALayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ void SetCALayerDelegate (CALayerDelegate? value)
}
}

// Note: preserving this member allows us to re-enable the `Optimizable` binding flag
[Preserve (Conditional = true)]
void OnDispose ()
{
if (calayerdelegate != null) {
Expand Down
2 changes: 2 additions & 0 deletions src/UIKit/UIGestureRecognizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ public partial class UIGestureRecognizer {
// Called by the Dispose() method, because this can run from a finalizer, we need to
// (a) reference the handle, that we will release later, and (b) to remove the targets on the
// UI thread.
// Note: preserving this member allows us to re-enable the `Optimizable` binding flag
[Preserve (Conditional = true)]
void OnDispose ()
{
var copyOfRecognizers = recognizers;
Expand Down
14 changes: 7 additions & 7 deletions src/appkit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15103,16 +15103,16 @@ partial interface NSView : NSDraggingDestination, NSAnimatablePropertyContainer,
void WillRemoveSubview ([NullAllowed] NSView subview);

[Export ("removeFromSuperview")]
[PreSnippet ("var mySuper = Superview;")]
[PostSnippet ("if (mySuper != null) {\n\t#pragma warning disable 168\n\tvar flush = mySuper.Subviews;\n#pragma warning restore 168\n\t}")]
[PreSnippet ("var mySuper = Superview;", Optimizable = true)]
[PostSnippet ("if (mySuper != null) {\n\t#pragma warning disable 168\n\tvar flush = mySuper.Subviews;\n#pragma warning restore 168\n\t}", Optimizable = true)]
void RemoveFromSuperview ();

[Export ("replaceSubview:with:")][PostGet ("Subviews")]
void ReplaceSubviewWith (NSView oldView, NSView newView);

[Export ("removeFromSuperviewWithoutNeedingDisplay")]
[PreSnippet ("var mySuper = Superview;")]
[PostSnippet ("if (mySuper != null) {\n\t#pragma warning disable 168\n\tvar flush = mySuper.Subviews;\n#pragma warning restore 168\n\t}")]
[PreSnippet ("var mySuper = Superview;", Optimizable = true)]
[PostSnippet ("if (mySuper != null) {\n\t#pragma warning disable 168\n\tvar flush = mySuper.Subviews;\n#pragma warning restore 168\n\t}", Optimizable = true)]
void RemoveFromSuperviewWithoutNeedingDisplay ();

[Export ("resizeSubviewsWithOldSize:")]
Expand Down Expand Up @@ -19670,16 +19670,16 @@ partial interface NSWindow : NSAnimatablePropertyContainer, NSUserInterfaceItemI
CGRect ContentRectFor (CGRect frameRect);

[Export ("init")]
[PostSnippet ("if (!DisableReleasedWhenClosedInConstructor) { ReleasedWhenClosed = false; }")]
[PostSnippet ("if (!DisableReleasedWhenClosedInConstructor) { ReleasedWhenClosed = false; }", Optimizable = true)]
IntPtr Constructor ();

[DesignatedInitializer]
[Export ("initWithContentRect:styleMask:backing:defer:")]
[PostSnippet ("if (!DisableReleasedWhenClosedInConstructor) { ReleasedWhenClosed = false; }")]
[PostSnippet ("if (!DisableReleasedWhenClosedInConstructor) { ReleasedWhenClosed = false; }", Optimizable = true)]
IntPtr Constructor (CGRect contentRect, NSWindowStyle aStyle, NSBackingStore bufferingType, bool deferCreation);

[Export ("initWithContentRect:styleMask:backing:defer:screen:")]
[PostSnippet ("if (!DisableReleasedWhenClosedInConstructor) { ReleasedWhenClosed = false; }")]
[PostSnippet ("if (!DisableReleasedWhenClosedInConstructor) { ReleasedWhenClosed = false; }", Optimizable = true)]
IntPtr Constructor (CGRect contentRect, NSWindowStyle aStyle, NSBackingStore bufferingType, bool deferCreation, NSScreen screen);

[Export ("title")]
Expand Down
2 changes: 1 addition & 1 deletion src/avfoundation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12412,7 +12412,7 @@ interface AVPlayerLooper
IntPtr Constructor (AVQueuePlayer player, AVPlayerItem itemToLoop, CMTimeRange loopRange);

#if !XAMCORE_4_0 // This API got introduced in Xcode 8.0 binding but is not currently present nor in Xcode 8.3 or Xcode 9.0 needs research
[PostSnippet ("loopingEnabled = false;")]
[PostSnippet ("loopingEnabled = false;", Optimizable = true)]
#endif
[Export ("disableLooping")]
void DisableLooping ();
Expand Down
4 changes: 2 additions & 2 deletions src/coreanimation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ enum CAContentsFormat {
}

[BaseType (typeof (NSObject))]
[Dispose ("OnDispose ();")]
[Dispose ("OnDispose ();", Optimizable = true)]
interface CALayer : CAMediaTiming, NSSecureCoding {
[Export ("layer")][Static]
CALayer Create ();
Expand Down Expand Up @@ -432,7 +432,7 @@ interface CALayer : CAMediaTiming, NSSecureCoding {
string Name { get; set; }

[Export ("delegate", ArgumentSemantic.Weak)][NullAllowed]
NSObject WeakDelegate { get; [PostSnippet (@"SetCALayerDelegate (value as CALayerDelegate);")] set; }
NSObject WeakDelegate { get; [PostSnippet (@"SetCALayerDelegate (value as CALayerDelegate);", Optimizable = true)] set; }

[Wrap ("WeakDelegate")]
[Protocolize]
Expand Down
Loading

0 comments on commit 25f19ae

Please sign in to comment.