Skip to content
Nathan Castle edited this page Aug 7, 2017 · 6 revisions

Esri welcomes contributions from anyone and everyone. Please see our guidelines for contributing.

Contributing to samples for the ArcGIS Runtime SDK for .NET

This guide describes how you can contribute improvements to source code.

  1. Make sure you have a GitHub account.
  2. To add an enhancement or fix a problem, create an issue.
    • Be descriptive. Clearly describe the issue including steps to reproduce and, if possible, a sample. If an enhancement, clearly describe the additional functionality and provide a good use case to support it.
  3. Fork the ArcGIS Runtime SDK for .NET Samples repo on GitHub.
  4. Clone it to your local machine.
  5. Checkout the master branch.
  6. Create a new feature branch on your local machine. The name of the branch is not important.
  7. Write code to add an enhancement or fix a problem.
    • Follow the coding conventions already used in the source code.
    • Document your code.
    • Make commits of logical units.
    • Use clear and descriptive commit messages.
  8. Test your code.

Submitting changes

  1. Push the changes in your feature branch to your repo.
  2. Submit a pull request against the "master" branch.
  3. In the pull request comments, add a reference to the issue the pull request resolves. For example, if the pull request resolves issue 45, add a comment to the pull request that includes "#45" (no quotes).

Code reviews

Expect a good amount of feedback as part of any pull request. Pull requests will be reviewed and tested, and may be rejected for various reasons. If rejected because it would cause a breaking change or includes a feature that is out of scope, it will be closed permanently. If rejected because the proposed changes failed code review or testing, please review feedback, fix and reopen as necessary.

Offline Data

If your sample requires offline data (such as a tile package or mobile map package on disk), this will need to be added to an arcGIS Online portal. Each sample viewer includes a DataManager class to facilitate a consistent approach to managing offline data. The steps for adding offline data to a sample are as follows:

  • Update metadata.json to indicate true for RequiresOfflineData
  • Update the metadata.json file with a DataItemIds key, with a collection of string Ids referenced by your sample
  • Update your code to:
    • Check for the existence of the desired file (by name) in local storage (System.IO.File.Exists(path))
    • Download the file if not already present (GetData static method on the data manager`
    • Pass the path to the file in local storage

For an example of a sample using offline data, see Open Mobile Map (map package), located under the "map" category.

For consistency, merged samples will need to reference data from an Esri-internal ArcGIS Online portal. If your sample uses offline data, @mention a team member or reviewer and provide a link to the referenced file for review.

License

By contributing your code, you agree to license your contribution under the terms of the Apache License, Version 2.0.

Your contributions should be an original work of authorship by you, including any modifications or additions to an existing work, that is intentionally submitted for inclusion in this repo. Contributions that require an additional third-party license or have other restrictions (including, but not limited to, related patents and trademarks) will be rejected.

Clone this wiki locally