Skip to content

Commit fc943d6

Browse files
authored
Adding package READMEs and updating package metadata (#3083)
1 parent 1a2fc28 commit fc943d6

File tree

21 files changed

+245
-28
lines changed

21 files changed

+245
-28
lines changed

build/common.props

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<PackageLicenseExpression>MIT</PackageLicenseExpression>
2121
<PackageIcon>webjobs.png</PackageIcon>
2222
<PackageTags>Microsoft Azure WebJobs AzureFunctions</PackageTags>
23+
<PackageReadmeFile>README.md</PackageReadmeFile>
2324
<CodeAnalysisRuleSet>..\..\src.ruleset</CodeAnalysisRuleSet>
2425
<UseSourceLink Condition="$(UseSourceLink) == '' And $(CI) != ''">true</UseSourceLink>
2526
<SignAssembly>true</SignAssembly>

sample/SampleHost/Functions.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Licensed under the MIT License. See License.txt in the project root for license information.
33

44
using System.Threading.Tasks;
5-
using Microsoft.Azure.EventHubs;
5+
using Azure.Messaging.EventHubs;
66
using Microsoft.Azure.WebJobs;
77
using Microsoft.Extensions.Logging;
88
using Newtonsoft.Json.Linq;
@@ -71,7 +71,7 @@ public void ProcessEvents([EventHubTrigger("testhub2", Connection = "TestEventHu
7171
{
7272
foreach (var evt in events)
7373
{
74-
log.LogInformation($"Event processed (Offset={evt.SystemProperties.Offset}, SequenceNumber={evt.SystemProperties.SequenceNumber})");
74+
log.LogInformation($"Event processed (Offset={evt.Offset}, SequenceNumber={evt.SequenceNumber})");
7575
}
7676
}
7777
}

sample/SampleHost/Program.cs

+4-7
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ class Program
1313
{
1414
public static async Task Main(string[] args)
1515
{
16-
var builder = new HostBuilder()
17-
.UseEnvironment("Development")
16+
var builder = Host.CreateDefaultBuilder(args)
17+
.UseEnvironment(EnvironmentName.Development)
1818
.ConfigureWebJobs(b =>
1919
{
2020
b.AddAzureStorageCoreServices()
@@ -48,11 +48,8 @@ public static async Task Main(string[] args)
4848
})
4949
.UseConsoleLifetime();
5050

51-
var host = builder.Build();
52-
using (host)
53-
{
54-
await host.RunAsync();
55-
}
51+
using var host = builder.Build();
52+
await host.RunAsync();
5653
}
5754
}
5855
}

sample/SampleHost/SampleHost.csproj

+12-8
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<OutputType>Exe</OutputType>
55
<TargetFramework>netcoreapp3.1</TargetFramework>
66
<CodeAnalysisRuleSet>$(SolutionDir)\src.ruleset</CodeAnalysisRuleSet>
7-
<LangVersion>7.1</LangVersion>
7+
<LangVersion>8.0</LangVersion>
88
</PropertyGroup>
99

1010
<ItemGroup>
@@ -13,13 +13,17 @@
1313
</ItemGroup>
1414

1515
<ItemGroup>
16-
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.EventHubs" Version="3.0.6" />
17-
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.ServiceBus" Version="3.1.1" />
18-
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="5.0.0" />
19-
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="2.1.1" />
20-
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.1.1" />
21-
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="2.1.1" />
22-
<PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta004" />
16+
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.EventHubs" Version="6.3.3" />
17+
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.ServiceBus" Version="5.16.1" />
18+
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="5.3.0" />
19+
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="8.0.0" />
20+
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.1" />
21+
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
22+
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
23+
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
24+
<PrivateAssets>all</PrivateAssets>
25+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
26+
</PackageReference>
2327
</ItemGroup>
2428

2529
<ItemGroup>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Microsoft.Azure.WebJobs.Extensions.Rpc
2+
3+
This package provides RPC capabilities to the WebJobs SDK, allowing extensions to communicate between the host and worker via RPC. For more information, please visit https://go.microsoft.com/fwlink/?linkid=2279708.
4+
5+
## Commonly used types
6+
7+
- `WebJobsExtensionBuilderRpcExtensions`
8+
9+
## Example usage
10+
11+
The below example demonstrates how an extension can register a custom gRPC extension.
12+
13+
``` CSharp
14+
public static IWebJobsBuilder AddMyExtension(this IWebJobsBuilder builder, Action<MyExtensionOptions> configure)
15+
{
16+
builder.AddExtension<MyExtensionConfigProvider>()
17+
.MapWorkerGrpcService<MyGrpcService>();
18+
19+
builder.Services.AddSingleton<MyGrpcService>();
20+
21+
return builder;
22+
}
23+
```

src/Microsoft.Azure.WebJobs.Extensions.Rpc/WebJobs.Extensions.Rpc.csproj

+5-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
<TargetFramework>net6.0</TargetFramework>
66
<LangVersion>latest</LangVersion>
77
<PackageId>Microsoft.Azure.WebJobs.Extensions.Rpc</PackageId>
8+
<Description>This package provides RPC capabilities to the WebJobs SDK, allowing extensions to communicate between the host and worker via RPC. For more information, please visit https://go.microsoft.com/fwlink/?linkid=2279708.</Description>
89
<AssemblyName>Microsoft.Azure.WebJobs.Extensions.Rpc</AssemblyName>
910
<RootNamespace>Microsoft.Azure.WebJobs.Extensions.Rpc</RootNamespace>
10-
<Description>This package contains the runtime assemblies for Microsoft.Azure.WebJobs.Extensions.Rpc. For more information, please visit http://go.microsoft.com/fwlink/?LinkID=320971</Description>
1111
</PropertyGroup>
1212

1313
<ItemGroup>
@@ -17,5 +17,8 @@
1717
<ItemGroup>
1818
<PackageReference Include="Grpc.AspNetCore" Version="2.49.0" />
1919
</ItemGroup>
20-
20+
<ItemGroup>
21+
<Content Include="README.md" Pack="true" PackagePath="/" />
22+
</ItemGroup>
23+
2124
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Microsoft.Azure.WebJobs.Host.Storage
2+
3+
This package contains Azure Storage based implementations of some WebJobs SDK component interfaces. For more information, please visit https://go.microsoft.com/fwlink/?linkid=2279708.
4+
5+
## Commonly used types
6+
7+
The main types exposed by this package are host builder extension methods to `IWebJobsBuilder`, provided by the following Types:
8+
9+
- `RuntimeStorageWebJobsBuilderExtensions`
10+
- `StorageServiceCollectionExtensions`
11+
- `StorageServiceCollectionExtensions`
12+
13+
## Example usage
14+
15+
The below example demonstrates the registration of Azure Storage services via the `AddAzureStorageCoreServices` builder method.
16+
17+
``` CSharp
18+
using System.Threading.Tasks;
19+
using Microsoft.Extensions.Hosting;
20+
21+
class Program
22+
{
23+
public static async Task Main(string[] args)
24+
{
25+
var builder = Host.CreateDefaultBuilder(args)
26+
.ConfigureWebJobs(b =>
27+
{
28+
b.AddAzureStorageCoreServices();
29+
b.AddAzureStorageQueues();
30+
});
31+
32+
using var host = builder.Build();
33+
await host.RunAsync();
34+
}
35+
}
36+
```

src/Microsoft.Azure.WebJobs.Host.Storage/WebJobs.Host.Storage.csproj

+6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
<InformationalVersion>$(Version) Commit hash: $(CommitHash)</InformationalVersion>
88
<TargetFramework>netstandard2.0</TargetFramework>
99
<LangVersion>latest</LangVersion>
10+
<PackageId>Microsoft.Azure.WebJobs.Host.Storage</PackageId>
11+
<Description>This package contains Azure Storage based implementations of some WebJobs SDK component interfaces. For more information, please visit https://go.microsoft.com/fwlink/?linkid=2279708.</Description>
1012
<AssemblyName>Microsoft.Azure.WebJobs.Host.Storage</AssemblyName>
1113
</PropertyGroup>
1214

@@ -22,6 +24,10 @@
2224
<WarningsAsErrors />
2325
</PropertyGroup>
2426

27+
<ItemGroup>
28+
<Content Include="README.md" Pack="true" PackagePath="/" />
29+
</ItemGroup>
30+
2531
<ItemGroup>
2632
<PackageReference Include="Azure.Storage.Blobs" Version="12.19.1" />
2733
<PackageReference Include="Microsoft.Extensions.Azure" Version="1.7.1" />
+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Microsoft.Azure.WebJobs.Host
2+
3+
This package contains the runtime host components of the WebJobs SDK. For more information, please visit https://go.microsoft.com/fwlink/?linkid=2279708.
4+
5+
## Commonly used types
6+
7+
- `WebJobsHostBuilderExtensions`
8+
- `JobHost`
9+
- `IExtensionConfigProvider`
10+
11+
## Example usage
12+
13+
The below example demonstrates configuration and startup of a job host running in a console application.
14+
15+
``` CSharp
16+
using System.Threading.Tasks;
17+
using Microsoft.Extensions.Hosting;
18+
19+
class Program
20+
{
21+
public static async Task Main(string[] args)
22+
{
23+
var builder = Host.CreateDefaultBuilder(args)
24+
.ConfigureWebJobs(b =>
25+
{
26+
b.AddAzureStorageCoreServices();
27+
b.AddAzureStorageQueues();
28+
});
29+
30+
using var host = builder.Build();
31+
await host.RunAsync();
32+
}
33+
}
34+
```

src/Microsoft.Azure.WebJobs.Host/WebJobs.Host.Sources.csproj

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
<PropertyGroup>
77
<PackageId>Microsoft.Azure.WebJobs.Sources</PackageId>
8+
<Description>This package contains source for the runtime host components of the WebJobs SDK. For more information, please visit https://go.microsoft.com/fwlink/?linkid=2279708.</Description>
89
<IsPackable>true</IsPackable>
910
<IncludeBuildOutput>false</IncludeBuildOutput>
1011
<ContentTargetFolders>contentFiles</ContentTargetFolders>
@@ -16,6 +17,10 @@
1617
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
1718
</PropertyGroup>
1819

20+
<ItemGroup>
21+
<Content Include="README.md" Pack="true" PackagePath="/" />
22+
</ItemGroup>
23+
1924
<ItemGroup>
2025
<Compile Update="Converters\AsyncConverter.cs">
2126
<Pack>true</Pack>

src/Microsoft.Azure.WebJobs.Host/WebJobs.Host.csproj

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<TargetFramework>netstandard2.0</TargetFramework>
66
<LangVersion>latest</LangVersion>
77
<PackageId>Microsoft.Azure.WebJobs</PackageId>
8-
<Description>This package contains the runtime assemblies for Microsoft.Azure.WebJobs.Host. It also adds rich diagnostics capabilities which makes it easier to monitor the WebJobs in the dashboard. For more information, please visit http://go.microsoft.com/fwlink/?LinkID=320971</Description>
8+
<Description>This package contains the runtime host components of the WebJobs SDK. For more information, please visit https://go.microsoft.com/fwlink/?linkid=2279708.</Description>
99
<AssemblyName>Microsoft.Azure.WebJobs.Host</AssemblyName>
1010
<RootNamespace>Microsoft.Azure.WebJobs.Host</RootNamespace>
1111
</PropertyGroup>
@@ -114,4 +114,8 @@
114114
</EmbeddedResource>
115115
</ItemGroup>
116116

117+
<ItemGroup>
118+
<Content Include="README.md" Pack="true" PackagePath="/" />
119+
</ItemGroup>
120+
117121
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Microsoft.Azure.WebJobs.Logging.ApplicationInsights
2+
3+
This package adds Application Insights based logging capabilities to the WebJobs SDK. For more information, please visit https://go.microsoft.com/fwlink/?linkid=2279708.
4+
5+
## Commonly used types
6+
7+
- `ApplicationInsightsLoggingBuilderExtensions`
8+
- `ApplicationInsightsLoggerProvider`
9+
- `ApplicationInsightsLoggerOptions`
10+
11+
## Example usage
12+
13+
The below example demonstrates configuration of ApplicationInsights logging on host startup via the `AddApplicationInsightsWebJobs` builder method.
14+
15+
``` CSharp
16+
using System.Threading.Tasks;
17+
using Microsoft.Extensions.Hosting;
18+
using Microsoft.Extensions.Logging;
19+
20+
class Program
21+
{
22+
public static async Task Main(string[] args)
23+
{
24+
var builder = Host.CreateDefaultBuilder(args)
25+
.ConfigureWebJobs(b =>
26+
{
27+
b.AddAzureStorageCoreServices();
28+
b.AddAzureStorageQueues();
29+
})
30+
.ConfigureLogging((context, b) =>
31+
{
32+
// If this key exists in any config, use it to enable App Insights
33+
string appInsightsKey = context.Configuration["APPINSIGHTS_INSTRUMENTATIONKEY"];
34+
if (!string.IsNullOrEmpty(appInsightsKey))
35+
{
36+
b.AddApplicationInsightsWebJobs(o => o.InstrumentationKey = appInsightsKey);
37+
}
38+
});
39+
40+
using var host = builder.Build();
41+
await host.RunAsync();
42+
}
43+
}
44+
```

src/Microsoft.Azure.WebJobs.Logging.ApplicationInsights/WebJobs.Logging.ApplicationInsights.csproj

+6-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<InformationalVersion>$(Version) Commit hash: $(CommitHash)</InformationalVersion>
88
<TargetFramework>netstandard2.0</TargetFramework>
99
<PackageId>Microsoft.Azure.WebJobs.Logging.ApplicationInsights</PackageId>
10-
<Description>This package contains the runtime assemblies for Microsoft.Azure.WebJobs.Logging.ApplicationInsights. For more information, please visit http://go.microsoft.com/fwlink/?LinkID=320971</Description>
10+
<Description>This package adds Application Insights based logging capabilities to the WebJobs SDK. For more information, please visit https://go.microsoft.com/fwlink/?linkid=2279708.</Description>
1111
<AssemblyName>Microsoft.Azure.WebJobs.Logging.ApplicationInsights</AssemblyName>
1212
<RootNamespace>Microsoft.Azure.WebJobs.Logging.ApplicationInsights</RootNamespace>
1313
</PropertyGroup>
@@ -26,6 +26,10 @@
2626
<AdditionalFiles Include="..\..\stylecop.json" Link="stylecop.json" />
2727
</ItemGroup>
2828

29+
<ItemGroup>
30+
<Content Include="README.md" Pack="true" PackagePath="/" />
31+
</ItemGroup>
32+
2933
<ItemGroup>
3034
<PackageReference Include="Azure.Identity" Version="1.11.4" />
3135
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.21.0" />
@@ -50,7 +54,7 @@
5054
without all of the others in this solution. If changes to WebJobs.Host are needed here, re-introduce the
5155
project reference.
5256
-->
53-
<PackageReference Include="Microsoft.Azure.WebJobs" Version="3.0.33" />
57+
<PackageReference Include="Microsoft.Azure.WebJobs" Version="3.0.39" />
5458
</ItemGroup>
5559

5660
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Microsoft.Azure.WebJobs.Host.Logging
2+
3+
This package provides logging related Types and capabilities to the WebJobs SDK. For more information, please visit https://go.microsoft.com/fwlink/?linkid=2279708.
4+
5+
## Commonly used types
6+
7+
- `LogFactory`
8+
- `ILogReader`
9+
- `ILogWriter`

src/Microsoft.Azure.WebJobs.Logging/WebJobs.Logging.csproj

+7-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<InformationalVersion>$(Version) Commit hash: $(CommitHash)</InformationalVersion>
66
<TargetFramework>netstandard2.0</TargetFramework>
77
<PackageId>Microsoft.Azure.WebJobs.Logging</PackageId>
8-
<Description>This package contains the runtime assemblies for Microsoft.Azure.WebJobs.Logging. For more information, please visit http://go.microsoft.com/fwlink/?LinkID=320971</Description>
8+
<Description>This package provides logging related Types and capabilities to the WebJobs SDK. For more information, please visit https://go.microsoft.com/fwlink/?linkid=2279708.</Description>
99
<AssemblyName>Microsoft.Azure.WebJobs.Logging</AssemblyName>
1010
<RootNamespace>Microsoft.Azure.WebJobs.Logging</RootNamespace>
1111
</PropertyGroup>
@@ -19,15 +19,19 @@
1919
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
2020
<WarningsAsErrors />
2121
</PropertyGroup>
22-
22+
2323
<ItemGroup>
2424
<AdditionalFiles Include="..\..\stylecop.json" Link="stylecop.json" />
2525
</ItemGroup>
26+
27+
<ItemGroup>
28+
<Content Include="README.md" Pack="true" PackagePath="/" />
29+
</ItemGroup>
2630

2731
<ItemGroup>
2832
<PackageReference Include="Microsoft.Azure.Cosmos.Table" Version="1.0.7" />
2933
<PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta004">
3034
<PrivateAssets>all</PrivateAssets>
3135
</PackageReference>
3236
</ItemGroup>
33-
</Project>
37+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Microsoft.Azure.WebJobs.Rpc.Core
2+
3+
This package provides core RPC Types and capabilities to the WebJobs SDK. For more information, please visit https://go.microsoft.com/fwlink/?linkid=2279708.

0 commit comments

Comments
 (0)