Skip to content

Conversation

@blackdwarf
Copy link

Blurb added to the Primer main document. Add more detailed document
in the documents. The document covers both P/Invoke and COM interop. The COM interop doesn't have an example, which I left out intentionally, because I couldn't find a good one that would not branch off into other points like using dynamic etc.

/cc @richlander @terrajobst

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point. I think it would be valuable to go through the whole doc set and standardize the samples. Thoughts, @blackdwarf @richlander?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given the flux of stuff at this point, the samples might change, so going through them all in the entire doc set might be little too much work. We could do it for the primer, at least, since the topics there are unlikely to change.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally, and @blackdwarf and I were talking about this recently, we would not have any sample code in the source doc files themselves and just refer to samples elsewhere via a range link. As I recall, it is hard for Sphinx to refer to samples outside the repo.

Having the samples align with the corefx code guidelines is a good idea.

@blackdwarf
Copy link
Author

Added changes from the PR. Thanks for reviewing!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is useful to state that the FX itself relies on native interop to implement FX APIS, such as for writing to the console and reading files.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point that one, will add.

@richlander
Copy link
Member

On COM Interop ... I'm still having trouble with that. I think we should remove it. It's true we want these docs to be general enough that someone using .NET Framework, Xamarin or Unity would take benefit from them. It also means that they shouldn't be confused by Windows only content.

@migueldeicaza gave us the advice to approach the platform with a Unix-first mentality. I think that we need to apply that guidance as best we can.

@blackdwarf
Copy link
Author

If you want, removing it is easy. I fear, however, that we are not giving a clear enough picture of the overall .NET possibilities. I agree with @migueldeicaza comment, it is the right way to go, but maybe I should just try to make the distinction even clearer (between COM interop and P/Invoke and what is supported where)?

@richlander
Copy link
Member

What's wrong with putting COM Interop as part of .NET Framework-specific section of this doc set and not mentioning it here? Put another way, if I'm reading this documentation to learn about .NET Core (I assume that's the primary scenario), how is COM Interop relevant to me, particularly if I'm reading this on an OS X machine?

@blackdwarf
Copy link
Author

Errrr...We don't have a .NET Framework specific section of this doc set (that I know of). And the idea was (at least when we started) that you are new to .NET and reading the Primer to learn about .NET not specifically about .NET Core. If this is .NET Primer about Core only, then for sure, COM interop should not exist.

@blackdwarf
Copy link
Author

OK, I've updated the document. Added Linux and OS X samples. I've also removed COM Interop from the document, in order to unblock the PR. I've also added comments to some code samples to see how it would work.

@richlander
Copy link
Member

Thanks for all the effort @blackdwarf. Let's go with that!

Can you rebase and then merge?

Blurb added to the Primer main document. Add more detailed document
in the documents.
@blackdwarf
Copy link
Author

Done, merging (finally). :))

blackdwarf pushed a commit that referenced this pull request Oct 12, 2015
Add Interoperability primer document
@blackdwarf blackdwarf merged commit 7ca5c36 into master Oct 12, 2015
@richlander
Copy link
Member

Thanks for all the effort @blackdwarf!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants