-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Moved WebPubSum to generated surface area + extensions #21549
Changes from all commits
d93305a
967733d
5abae0c
5854d56
a13a76e
6f53c29
36af753
cb246a8
85ebf55
493b0f4
216f24d
78892f9
7b609f8
456e077
42a4485
3289f3a
be1b341
2702228
6d4c97f
dceffed
38fa14b
b336aa5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,7 +80,7 @@ serviceClient.SendToAll("Hello World!"); | |
```C# Snippet:WebPubSubSendJson | ||
var serviceClient = new WebPubSubServiceClient(new Uri(endpoint), "some_hub", new AzureKeyCredential(key)); | ||
|
||
serviceClient.SendToAll( | ||
serviceClient.SendToAll("application/json", | ||
RequestContent.Create( | ||
new | ||
{ | ||
|
@@ -95,9 +95,7 @@ serviceClient.SendToAll( | |
var serviceClient = new WebPubSubServiceClient(new Uri(endpoint), "some_hub", new AzureKeyCredential(key)); | ||
|
||
Stream stream = BinaryData.FromString("Hello World!").ToStream(); | ||
serviceClient.SendToAll( | ||
RequestContent.Create(stream), | ||
HttpHeader.Common.OctetStreamContentType.Value); | ||
serviceClient.SendToAll("application/octet-stream", RequestContent.Create(stream)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we just create it from the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Service team wanted a stream sample as their users will often have a stream. |
||
``` | ||
|
||
## Troubleshooting | ||
|
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<Description>Azure SDK client library for the WebPubSub service</Description> | ||
<AssemblyTitle>Azure SDK for WebPubSub</AssemblyTitle> | ||
<Version>1.0.0-beta.2</Version> | ||
<PackageTags>Azure, WebPubSub, SignalR</PackageTags> | ||
<TargetFrameworks>$(RequiredTargetFrameworks)</TargetFrameworks> | ||
<NoWarn>$(NoWarn);419</NoWarn> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit - consider saying what you're ignoring so folks know when/if it's safe to add back. |
||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Azure.Core" /> | ||
<PackageReference Include="Azure.Core.Experimental" /> | ||
<PackageReference Include="System.IdentityModel.Tokens.Jwt" /> | ||
<PackageReference Include="System.Text.Json" /> | ||
</ItemGroup> | ||
|
@@ -24,31 +26,7 @@ | |
<Compile Include="$(AzureCoreSharedSources)TaskExtensions.cs" Link="Shared\%(RecursiveDir)\%(Filename)%(Extension)" /> | ||
<Compile Include="$(AzureCoreSharedSources)OperationHelpers.cs" Link="Shared\%(RecursiveDir)\%(Filename)%(Extension)" /> | ||
<Compile Include="$(AzureCoreSharedSources)AzureResourceProviderNamespaceAttribute.cs" Link="Shared\%(RecursiveDir)\%(Filename)%(Extension)" /> | ||
<Compile Include="$(AzureCoreSharedSources)Argument.cs" LinkBase="Shared" /> | ||
</ItemGroup> | ||
|
||
<!-- HACK --> | ||
<!-- Hack around lack of support for RequestContent in the code generators --> | ||
<UsingTask TaskName="ReplaceText" TaskFactory="RoslynCodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was amazing while it lasted, but I am happy to see it gone :-) |
||
<ParameterGroup> | ||
<FileName ParameterType="System.String" Required="true" /> | ||
<Pattern ParameterType="System.String" Required="true" /> | ||
<Replacement ParameterType="System.String" Required="true" /> | ||
</ParameterGroup> | ||
<Task> | ||
<Using Namespace="System" /> | ||
<Using Namespace="System.IO" /> | ||
<Using Namespace="System.Text.RegularExpressions" /> | ||
<Code Type="Fragment" Language="cs"> | ||
<![CDATA[ | ||
File.WriteAllText(FileName, Regex.Replace(File.ReadAllText(FileName), Pattern, Replacement)); | ||
]]> | ||
</Code> | ||
</Task> | ||
</UsingTask> | ||
<Target Name="HackGeneratedCode" AfterTargets="GenerateCode" Condition="'$(_GenerateCode)' == 'true'"> | ||
<Message Importance="high" Text="Hacking RequestContent into Generated Code" /> | ||
<ReplaceText Filename="$(MSBuildThisFileDirectory)\Generated\WebPubSubRestClient.cs" Pattern="Stream message" Replacement="RequestContent message" /> | ||
<ReplaceText Filename="$(MSBuildThisFileDirectory)\Generated\WebPubSubRestClient.cs" Pattern="RequestContent\.Create\(message\)" Replacement="message" /> | ||
</Target> | ||
<!-- /HACK --> | ||
</Project> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
This file was deleted.
This file was deleted.
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.
Consider either updating https://github.com/Azure/azure-webpubsub/blob/main/docs/references/server-sdks/csharp-server-sdks.md as well or working with them to link to this file so we don't have out of date copies.