-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Feature/xamarin essentials events #1682
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/xamarin essentials events #1682
Conversation
src/EventBuilder/EventBuilder.csproj
Outdated
<PackageReference Include="Serilog" Version="1.5.14" /> | ||
<PackageReference Include="NuGet.Core" Version="2.14.0" /> | ||
</ItemGroup> | ||
<ItemGroup> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This formatting seems a bit inconsistent with the others, e.g. indent off by one
Directory.GetFiles(packageUnzipPath, | ||
"Xamarin.Essentials.dll", SearchOption.AllDirectories); | ||
|
||
var latestVersion = xamarinForms.Last();//x => x.Contains("netstandard2.0")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the x.contains needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Originally I had it pinned at netstandard2.0
, but then had to switch it to try to just get the last one. I am going to pin it at netstandard2.0
.
{"Windows.Foundation.EventHandler`2", "EventHandler"} | ||
}; | ||
|
||
private static string RenameBogusWinRTTypes(string typeName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given this is only being used for Xamarin.Essentials, do we need this slightly odd bodge?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am going to kick it all out for now.
|
||
var garbageNamespaceList = new[] | ||
{ | ||
"Windows.UI.Xaml.Data", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likewise, are these namespaces sensible to exclude?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same, I am cleaning all of the, seemingly, non-relevant stuff out of here.
Since this is designed for Xamarin.Essentials, these are not necessary
Thanks @michaelstonis! @ghuntley not sure who has the ability to push this out as an extra nuget package, is this something you could help with? |
I would suggest tabling this until this has been delt with in their repository. I reckon this would break existing code. |
I will keep an eye on the Essentials package and update this once they finalize their event structure. |
@michaelstonis The event structure has been finalized. That block has been cleared. |
As soon as they release a new nuget with these in them, I will get this updated. |
They released a new version a couple days ago https://www.nuget.org/packages/Xamarin.Essentials
|
Cool. I am on it. |
This also required changing the framework to netstandard 1.0, but I have no idea why
This now matches the standard event format. One thing that was immediately bad about the last implementation is that it caused a lot of chaff in intellisense, since every object would have these extensions. I changed this to not be extension methods, but just static instances that can be called from wherever and the experience is far better this way. I am open to reverting it though.
"Xamarin.Essentials.dll", SearchOption.AllDirectories); | ||
|
||
var latestVersion = xamarinForms.First(x => x.Contains("netstandard2.0")); | ||
var latestVersion = xamarinForms.First(x => x.Contains("netstandard1.0")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wonder if it's worthwhile not putting the version in?
XamForms, | ||
UWP, | ||
Winforms | ||
Winforms, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is going to be fun doing TVOS who wins first :)
src/EventBuilder/EventBuilder.csproj
Outdated
<PackageReference Include="NuGet.Core" Version="2.14.0" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Update="XamarinEssentialsTemplate.mustache"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is None, other mustache above is Content, can we keep them the same type and put them into the same ItemGroup?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can do!
BTW @michaelstonis I think you just need to do a conflict resolve on the files at the moment to get this ready for finishing the PR, and very minor minor comments in review. Then I think we are ready to pull. |
Hey @olevett you mentioned we might need a new NuGet package for the events? Should I get Oren/Geoffrey to help out? |
Merge remote-tracking branch 'upstream/master' into feature/xamarin-essentials-events fix-up Tizen base platform implementation
Thanks @michaelstonis |
Provides functionality to generate event mapping for Xamarin.Essentials
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Feature
What is the current behavior? (You can also link to an open issue here)
There are no event bindings for Xamarin.Essentials today
What is the new behavior (if this is a feature change)?
This adds the ability to provide event binding for Xamarin.Essentials
What might this PR break?
Not likely anything, but there were some changes to the event binding program.
Please check if the PR fulfills these requirements
Other information:
I would potentially consider this a first pass. Everything in the Essentials world is a static class, so binding the same way we did before is not possible. Right now, the extensions are added to
object
, so as soon as you do ausing Xamarin.Essentials;
, every object is going to have these extension methods available. I don't love this, but I really couldn't think of a better approach.