Adding basic nano project elements

This commit is contained in:
Laurent Ellerbach 2021-06-27 10:06:16 +02:00
Родитель 88aaa4607c
Коммит 79d9b503f6
15 изменённых файлов: 229 добавлений и 11 удалений

Просмотреть файл

@ -0,0 +1,13 @@
user=nanoframework
project=nanoFramework.Azure.Devices
issues=true
add_issues_wo_labels=false
add_pr_wo_labels=false
add_issues_wo_labels=false
filter_issues_by_milestone=false
exclude_labels=Area: Config-and-Build,Area: Infrastructure-and-Organization,reverted
enhancement_labels=Type: enhancement
bug_labels=Type: bug
merge_prefix=**Documentation and other chores:**
unreleased_label=**Changes available only in 'Preview' NuGet packages:**
author=false

Просмотреть файл

@ -12,10 +12,19 @@
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<FileAlignment>512</FileAlignment>
<RootNamespace>AzureMqttSDK</RootNamespace>
<AssemblyName>AzureMqttSDK</AssemblyName>
<RootNamespace>nanoFramework.Azure.Devices.Client</RootNamespace>
<AssemblyName>nanoFramework.Azure.Devices.Client</AssemblyName>
<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup>
<DelaySign>false</DelaySign>
</PropertyGroup>
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.props" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.props')" />
<ItemGroup>
<Compile Include="CloudToDeviceMessage.cs" />

Двоичные данные
Azure.Devices.DeviceClient/key.snk Normal file

Двоичный файл не отображается.

3
CODE_OF_CONDUCT.md Normal file
Просмотреть файл

@ -0,0 +1,3 @@
# Contributor Code of Conduct
Please refer to the contributor Code of Conduct at the Home repository [here](https://github.com/nanoframework/Home/blob/master/CODE_OF_CONDUCT.md.

3
CONTRIBUTING.md Normal file
Просмотреть файл

@ -0,0 +1,3 @@
# Contributing to **nanoFramework**
Please refer to the contribution guidelines at the Home repository [here](https://github.com/nanoframework/Home/blob/master/CONTRIBUTING.md).

21
LICENSE Normal file
Просмотреть файл

@ -0,0 +1,21 @@
MIT License
Copyright (c) .NET Foundation and Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

7
NuGet.Config Normal file
Просмотреть файл

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="NuGet" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="Azure Artifacts nanoFramework dev" value="https://pkgs.dev.azure.com/nanoframework/feed/_packaging/sandbox/nuget/v3/index.json" protocolVersion="3" />
</packageSources>
</configuration>

41
README.md Normal file
Просмотреть файл

@ -0,0 +1,41 @@
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=nanoframework_Azure.Devices&metric=alert_status)](https://sonarcloud.io/dashboard?id=nanoframework_Azure.Devices) [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=nanoframework_Azure.Devices&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=nanoframework_Azure.Devices) [![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) [![NuGet](https://img.shields.io/nuget/dt/nanoFramework.Azure.Devices.Client.svg?label=NuGet&style=flat&logo=nuget)](https://www.nuget.org/packages/nanoFramework.Azure.Devices.Client/) [![#yourfirstpr](https://img.shields.io/badge/first--timers--only-friendly-blue.svg)](https://github.com/nanoframework/Home/blob/master/CONTRIBUTING.md) [![Discord](https://img.shields.io/discord/478725473862549535.svg?logo=discord&logoColor=white&label=Discord&color=7289DA)](https://discord.gg/gCyBu8T)
![nanoFramework logo](https://github.com/nanoframework/Home/blob/master/resources/logo/nanoFramework-repo-logo.png)
-----
# Welcome to the **nanoFramework** Azure.Devices.Client Library repository!
## Build status
| Component | Build Status | NuGet Package |
|:-|---|---|
| nanoFramework.Azure.Devices.Client | [![Build Status](https://dev.azure.com/nanoframework/nanoFramework.Azure.Devices.Client/_apis/build/status/nanoframework.Azure.Devices.Client?branchName=develop)](https://dev.azure.com/nanoframework/nanoFramework.Azure.Devices.Client/_build/latest?definitionId=7?branchName=master) | [![NuGet](https://img.shields.io/nuget/v/nanoFramework.Azure.Devices.Client.svg?label=NuGet&style=flat&logo=nuget)](https://www.nuget.org/packages/nanoFramework.Azure.Devices.Client/) |
| nanoFramework.Azure.Devices.Client (preview) | [![Build Status](https://dev.azure.com/nanoframework/nanoFramework.Azure.Devices.Client/_apis/build/status/nanoframework.Azure.Devices.Client?branchName=develop)](https://dev.azure.com/nanoframework/nanoFramework.Azure.Devices.Client/_build/latest?definitionId=7?branchName=develop) | [![](https://badgen.net/badge/NuGet/preview/D7B023?icon=https://simpleicons.now.sh/azuredevops/fff)](https://dev.azure.com/nanoframework/feed/_packaging?_a=package&feed=sandbox&package=nanoFramework.Azure.Devices.Client&protocolType=NuGet&view=overview) |
## Usage
TODO
## Feedback and documentation
For documentation, providing feedback, issues and finding out how to contribute please refer to the [Home repo](https://github.com/nanoframework/Home).
Join our Discord community [here](https://discord.gg/gCyBu8T).
## Credits
The list of contributors to this project can be found at [CONTRIBUTORS](https://github.com/nanoframework/Home/blob/master/CONTRIBUTORS.md).
## License
The **nanoFramework** Class Libraries are licensed under the [MIT license](LICENSE.md).
## Code of Conduct
This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community.
For more information see the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/code-of-conduct).
### .NET Foundation
This project is supported by the [.NET Foundation](https://dotnetfoundation.org).

Двоичные данные
assets/nf-logo.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 4.0 KiB

21
assets/readme.txt Normal file
Просмотреть файл

@ -0,0 +1,21 @@
_____ _
_ __ __ _ _ __ ___ | ___| __ __ _ _ __ ___ _____ _____ _ __| | __
| '_ \ / _` | '_ \ / _ \| |_ | '__/ _` | '_ ` _ \ / _ \ \ /\ / / _ \| '__| |/ /
| | | | (_| | | | | (_) | _|| | | (_| | | | | | | __/\ V V / (_) | | | <
|_| |_|\__,_|_| |_|\___/|_| |_| \__,_|_| |_| |_|\___| \_/\_/ \___/|_| |_|\_\
===================================================================================
API docs: https://docs.nanoframework.net/api
Browse our samples repository: https://github.com/nanoframework/samples
Check our documentation online: https://docs.nanoframework.net
Join our lively Discord community: https://discord.gg/gCyBu8T
Report issues: https://github.com/nanoframework/Home/issues
Follow us on Twitter: https://twitter.com/nanoframework
Follow our YouTube channel: https://www.youtube.com/c/nanoFramework

44
azure-pipelines.yml Normal file
Просмотреть файл

@ -0,0 +1,44 @@
trigger:
branches:
include: [main, develop, "release-*" ]
paths:
exclude: ["*.md", .gitignore]
tags:
include: ["v*"]
# PR always trigger build
# add nf-tools repo to resources (for Azure Pipelines templates)
resources:
repositories:
- repository: templates
type: github
name: nanoframework/nf-tools
endpoint: nanoframework
pool:
vmImage: 'VS2017-Win2016'
variables:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
nugetPackageName: 'nanoFramework.Azure.Devices.Client'
repoName: 'nanoFramework.Azure.Devices'
steps:
# step from template @ nf-tools repo
# all build, update and publish steps
- template: azure-pipelines-templates/class-lib-build.yml@templates
parameters:
sonarCloudProject: 'nanoFramework.Azure.Devices'
# step from template @ nf-tools repo
# report error
- template: azure-pipelines-templates/discord-webhook-task.yml@templates
parameters:
status: 'failure'
webhookUrl: '$(DiscordWebhook)'
message: ''

Просмотреть файл

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>nanoFramework.Azure.Devices.Client</id>
<version>$version$</version>
<title>nanoFramework.Azure.Devices.Client</title>
<authors>nanoFramework project contributors</authors>
<owners>nanoFramework project contributors</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<license type="expression">MIT</license>
<releaseNotes>
</releaseNotes>
<developmentDependency>false</developmentDependency>
<projectUrl>https://github.com/nanoframework/lib-nanoFramework.Azure.Devices.Client</projectUrl>
<iconUrl>https://secure.gravatar.com/avatar/97d0e092247f0716db6d4b47b7d1d1ad</iconUrl>
<repository type="git" url="https://github.com/nanoframework/nanoFramework.Azure.Devices" commit="$commit$" />
<copyright>Copyright (c) .NET Foundation and Contributors</copyright>
<description>This package includes the nanoFramework.Azure.Devices.Client assembly for nanoFramework C# projects.
This is an SDK for Azure IoT Hub using MQTT boker.</description>
<summary>nanoFramework.Azure.Devices.Client assembly for nanoFramework C# projects</summary>
<tags>nanoFramework C# csharp netmf netnf Microsoft.Azure.Devices nanoFramework.Azure.Devices</tags>
<dependencies>
<dependency id="nanoFramework.CoreLibrary" version="1.10.3-preview.7" />
</dependencies>
</metadata>
<files>
<file src="Azure.Devices.DeviceClient\bin\Release\nanoFramework.Azure.Devices.Client.dll" target="lib\nanoFramework.Azure.Devices.Client.dll" />
<file src="Azure.Devices.DeviceClient\bin\Release\nanoFramework.Azure.Devices.Client.pdb" target="lib\nanoFramework.Azure.Devices.Client.pdb" />
<file src="Azure.Devices.DeviceClient\bin\Release\nanoFramework.Azure.Devices.Client.pdbx" target="lib\nanoFramework.Azure.Devices.Client.pdbx" />
<file src="Azure.Devices.DeviceClient\bin\Release\nanoFramework.Azure.Devices.Client.pe" target="lib\nanoFramework.Azure.Devices.Client.pe" />
<file src="Azure.Devices.DeviceClient\bin\Release\nanoFramework.Azure.Devices.Client.xml" target="lib\nanoFramework.Azure.Devices.Client.xml" />
<!-- readme -->
<file src="readme.txt" target="readme.txt" />
</files>
</package>

Просмотреть файл

@ -25,9 +25,6 @@
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AzureMqttSDK\Azure.Devices.DeviceClient.nfproj" />
</ItemGroup>
<ItemGroup>
<Reference Include="Iot.Device.Bmxx80, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\packages\nanoFramework.Iot.Device.Bmxx80.1.0.118\lib\Iot.Device.Bmxx80.dll</HintPath>
@ -155,6 +152,9 @@
<SpecificVersion>True</SpecificVersion>
</Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Azure.Devices.DeviceClient\Azure.Devices.DeviceClient.nfproj" />
</ItemGroup>
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />
<ProjectExtensions>
<ProjectCapabilities>

Просмотреть файл

@ -3,10 +3,6 @@
// See LICENSE file in the project root for full license information.
//
///
/// NOTE: this demo uses the information outlined in https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-mqtt-support
///
using nanoFramework.Azure.Devices.Client;
using nanoFramework.Azure.Devices.Shared;
using nanoFramework.Networking;
@ -78,8 +74,8 @@ try
catch (Exception ex)
{
// We won't do anything
// This global try catch is to make sure whatever happen, we will safely be able to go
// To sleep
// This global try catch is to make sure whatever happen, we will safely be able to
// reboot or do anything else.
Debug.WriteLine(ex.ToString());
}

25
version.json Normal file
Просмотреть файл

@ -0,0 +1,25 @@
{
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
"version": "1.0.0-preview.{height}",
"assemblyVersion": {
"precision": "revision"
},
"semVer1NumericIdentifierPadding": 3,
"nuGetPackageVersion": {
"semVer": 2.0
},
"publicReleaseRefSpec": [
"^refs/heads/develop$",
"^refs/heads/main$",
"^refs/heads/v\\d+(?:\\.\\d+)?$"
],
"cloudBuild": {
"setAllVariables": true,
"buildNumber": null
},
"release": {
"branchName": "release-v{version}",
"versionIncrement": "build",
"firstUnstableTag": "preview"
}
}