Sets warnings as errors and adds FxCop analyzer to Schema project. (#4061)

* Configured TreatWarningsAsErrors on all projects in the libraries folder except for Microsoft.Bot.Builder.Dialogs.Adaptive.Testing (that needs to be addressed separatelly).
Created Directory.Build.props for FunctionalTests and Tests to manage excludes for the projects in those folders.
Added NoWarn properties for documentation on each project (these will be addressed by another issue).
Fixed long hanging fruit warnings.
Added Roslyn FxCop analyzer to Microsoft.Bot.Schema and fixed violation or excluded them using #pragma.

* Fixed binary compat issues

* Fixed more binary compat issues
This commit is contained in:
Gabo Gilabert 2020-06-12 16:42:12 -04:00 коммит произвёл GitHub
Родитель 914757e0c8
Коммит 2963d0da22
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
62 изменённых файлов: 473 добавлений и 177 удалений

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

@ -34,8 +34,6 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<AssemblyOriginatorKeyFile>$(SolutionDir)\build\35MSSharedLib1024.snk</AssemblyOriginatorKeyFile>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn),1573,1591,1712</NoWarn>
<SignAssembly>true</SignAssembly>
<DelaySign>true</DelaySign>
</PropertyGroup>
@ -44,11 +42,6 @@
<DefineConstants>SIGNASSEMBLY</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<!-- For debug builds, we don't generate documentation. Supress the StyleCop rule that warns about this. -->
<NoWarn>$(NoWarn);SA0001</NoWarn>
</PropertyGroup>
<PropertyGroup>
<!-- Rules found at: https://aka.ms/Microsoft-NuGet-Compliance -->
<PackageProjectUrl>https://github.com/Microsoft/botbuilder-dotnet</PackageProjectUrl>
@ -65,7 +58,7 @@
Suppress a warning about upcoming deprecation of PackageLicenseUrl. When embedding licenses are supported,
replace PackageLicenseUrl with PackageLicenseExpression.
-->
<NoWarn>$(NoWarn);NU5125</NoWarn>
<NoWarn>NU5125</NoWarn>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>

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

@ -0,0 +1,10 @@
<Project>
<!-- Contains common properties that apply to projects under the FunctionalTests folder -->
<PropertyGroup>
<!-- For tests, we don't generate documentation. Supress related rules. -->
<NoWarn>$(NoWarn);SA0001;CS1573,CS1591,CS1712</NoWarn>
</PropertyGroup>
<!-- This ensures that Directory.Build.props in parent folders are merged with this one -->
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
</Project>

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

@ -5,6 +5,9 @@ MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{4269F3C3-6B42-419B-B64A-3E6DC0F1574A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{AD743B78-D61F-4FBF-B620-FA83CE599A50}"
ProjectSection(SolutionItems) = preProject
tests\Directory.Build.props = tests\Directory.Build.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bot.Builder.Dialogs.Adaptive", "libraries\Microsoft.Bot.Builder.Dialogs.Adaptive\Microsoft.Bot.Builder.Dialogs.Adaptive.csproj", "{3CF175CF-1AF4-4109-96CB-221684DCED7D}"
EndProject
@ -71,6 +74,9 @@ EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bot.Builder.FunctionalTests", "FunctionalTests\Microsoft.Bot.Builder.FunctionalTests\Microsoft.Bot.Builder.FunctionalTests.csproj", "{B9DDC8CB-8EDF-4D98-913A-22F19E642223}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "FunctionalTests", "FunctionalTests", "{8667F820-8ADA-4498-91AE-AE95DEE5227E}"
ProjectSection(SolutionItems) = preProject
FunctionalTests\Directory.Build.props = FunctionalTests\Directory.Build.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bot.Builder.Testing", "libraries\Microsoft.Bot.Builder.Testing\Microsoft.Bot.Builder.Testing.csproj", "{060F070A-BBFA-490E-BE89-3844C857B771}"
EndProject
@ -111,6 +117,9 @@ EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bot.Builder.AI.LuisV3.Tests", "tests\Microsoft.Bot.Builder.Ai.LUISV3.tests\Microsoft.Bot.Builder.AI.LuisV3.Tests.csproj", "{474C57B1-C9FC-4B71-A92B-B25BA27FAFA7}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Adapters", "Adapters", "{6230B915-B238-4E57-AAC4-06B4498F540F}"
ProjectSection(SolutionItems) = preProject
libraries\Adapters\Directory.Build.props = libraries\Adapters\Directory.Build.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Bot.Builder.Adapters.Twilio", "libraries\Adapters\Microsoft.Bot.Builder.Adapters.Twilio\Microsoft.Bot.Builder.Adapters.Twilio.csproj", "{1D1AD39B-EBCF-4960-930E-84246DEF6AAE}"
EndProject

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

@ -1,4 +1,5 @@
<Project>
<!-- Contains common properties that apply to projects under the Adapters folder -->
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.6">
<PrivateAssets>all</PrivateAssets>
@ -6,5 +7,6 @@
</PackageReference>
</ItemGroup>
<!-- This ensures that Directory.Build.props in parent folders are merged with this one -->
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
</Project>

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

@ -6,6 +6,8 @@
<PackageVersion Condition=" '$(IsBuildServer)' != '' ">$(PreviewPackageVersion)</PackageVersion>
<Configurations>Debug;Release</Configurations>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Microsoft.Bot.Builder.Adapters.Facebook.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup>
@ -15,17 +17,16 @@
<Summary>This library implements C# classes for the Facebook adapter.</Summary>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU' ">
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Microsoft.Bot.Builder.Adapters.Facebook.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>Full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup>
<!-- These documentation warnings excludes should be removed as part of https://github.com/microsoft/botbuilder-dotnet/issues/4052 -->
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Condition=" '$(IsBuildServer)' == '' " Version="$(LocalPackageVersion)" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Condition=" '$(IsBuildServer)' != '' " Version="$(ReleasePackageVersion)" />

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

@ -6,6 +6,8 @@
<PackageVersion Condition=" '$(IsBuildServer)' != '' ">$(PreviewPackageVersion)</PackageVersion>
<Configurations>Debug;Release;</Configurations>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Microsoft.Bot.Builder.Adapters.Slack.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup>
@ -17,17 +19,17 @@
<NoWarn>$(NoWarn),CS8002</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Microsoft.Bot.Builder.Adapters.Slack.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>Full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup>
<!-- CS8002: The SlackAPI package isn't signed, so supress the warning. There seems to not be a way to supress this for ONLY SlackAPI. -->
<!-- CS1591: These documentation warnings excludes should be removed as part of https://github.com/microsoft/botbuilder-dotnet/issues/4052 -->
<NoWarn>$(NoWarn);CS8002;CS1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="SlackAPI" Version="1.1.2" />

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

@ -6,6 +6,8 @@
<PackageVersion Condition=" '$(IsBuildServer)' != '' ">$(PreviewPackageVersion)</PackageVersion>
<Configurations>Debug;Release</Configurations>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Microsoft.Bot.Builder.Adapters.Twilio.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup>
@ -15,23 +17,17 @@
<Summary>This library implements C# classes for Twilio adapter.</Summary>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>Full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<!-- The Twilio package isn't signed, so supress the warning. There seems to not be a way to supress this for ONLY Twilio. -->
<NoWarn>$(NoWarn),CS8002</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU' ">
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Microsoft.Bot.Builder.Adapters.Twilio.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>Full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Twilio" Version="5.33.1" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Condition=" '$(IsBuildServer)' == '' " Version="$(LocalPackageVersion)" />

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

@ -46,6 +46,12 @@ namespace Microsoft.Bot.Builder.Adapters.Twilio
TwilioClient.Init(Options.TwilioAccountSid, Options.TwilioAuthToken);
}
/// <summary>
/// Gets the <see cref="TwilioAdapterOptions"/> for the wrapper.
/// </summary>
/// <value>
/// The <see cref="TwilioAdapterOptions"/> for the wrapper.
/// </value>
public TwilioAdapterOptions Options { get; }
/// <summary>

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

@ -6,6 +6,8 @@
<PackageVersion Condition=" '$(IsBuildServer)' != '' ">$(PreviewPackageVersion)</PackageVersion>
<Configurations>Debug;Release;</Configurations>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Microsoft.Bot.Builder.Adapters.Webex.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
@ -13,14 +15,6 @@
<PackageId>Microsoft.Bot.Builder.Adapters.Webex</PackageId>
<Description>Library for connecting bots with Webex Teams API.</Description>
<Summary>This library implements C# classes for the Webex Adapter</Summary>
<!-- The Thrzn41.WebexTeams package isn't signed, so supress the warning. There seems to not be a way to supress this for ONLY Thrzn41.WebexTeams. -->
<NoWarn>$(NoWarn),CS8002</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU' ">
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Microsoft.Bot.Builder.Adapters.Webex.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
@ -28,6 +22,12 @@
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup>
<!-- CS8002: The Thrzn41.WebexTeams package isn't signed, so supress the warning. There seems to not be a way to supress this for ONLY Thrzn41.WebexTeams. -->
<!-- CS1591: These documentation warnings excludes should be removed as part of https://github.com/microsoft/botbuilder-dotnet/issues/4052 -->
<NoWarn>$(NoWarn);CS8002;CS1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Thrzn41.WebexTeams" Version="1.6.2" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Condition=" '$(IsBuildServer)' == '' " Version="$(LocalPackageVersion)" />

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

@ -7,10 +7,8 @@
<PackageVersion Condition=" '$(IsBuildServer)' != '' ">$(ReleasePackageVersion)</PackageVersion>
<Configurations>Debug;Release</Configurations>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DocumentationFile>bin\$(Configuration)\netstandard2.0\AdaptiveExpressions.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
@ -18,6 +16,11 @@
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup>
<!-- These documentation warnings excludes should be removed as part of https://github.com/microsoft/botbuilder-dotnet/issues/4052 -->
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageId>AdaptiveExpressions</PackageId>

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

@ -345,7 +345,6 @@ namespace AdaptiveExpressions
/// Return all static paths to memory. If there is a computed element index, then the path is terminated there,
/// but you might get other paths from the computed part as well.
/// </remarks>
/// <param name="expression">Expression to get references from.</param>
/// <returns>List of the static reference paths.</returns>
public IReadOnlyList<string> References()
{

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

@ -21,7 +21,7 @@ namespace AdaptiveExpressions
/// Gets or sets a value, a function that been called when there is null value hit in memory.
/// </summary>
/// <value>
/// The delegate.</placeholder>
/// The function delegate.
/// </value>
public Func<string, object> NullSubstitution { get; set; } = null;
}

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

@ -462,6 +462,7 @@ namespace Microsoft.Bot.Builder.AI.Luis
/// <param name="predictionOptions">LuisRecognizerOptions implementation to override current properties.</param>
/// <param name="telemetryProperties"> Additional properties to be logged to telemetry with the LuisResult event.</param>
/// <param name="telemetryMetrics">Additional metrics to be logged to telemetry with the LuisResult event.</param>
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
/// <returns>RecognizerResult object.</returns>
private async Task<RecognizerResult> RecognizeInternalAsync(ITurnContext turnContext, LuisRecognizerOptions predictionOptions, Dictionary<string, string> telemetryProperties, Dictionary<string, double> telemetryMetrics, CancellationToken cancellationToken)
{

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

@ -6,6 +6,8 @@
<PackageVersion Condition=" '$(IsBuildServer)' != '' ">$(ReleasePackageVersion)</PackageVersion>
<Configurations>Debug;Release</Configurations>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<DocumentationFile>bin\$(Configuration)\netstandard2.0\Microsoft.Bot.Builder.AI.Luis.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
@ -16,15 +18,16 @@
<ContentTargetFolders>content</ContentTargetFolders>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DocumentationFile>bin\$(Configuration)\netstandard2.0\Microsoft.Bot.Builder.AI.Luis.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>Full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup>
<!-- These documentation warnings excludes should be removed as part of https://github.com/microsoft/botbuilder-dotnet/issues/4052 -->
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<Content Include="**/*.dialog" />
<Content Include="**/*.lg" />

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

@ -6,6 +6,8 @@
<PackageVersion Condition=" '$(IsBuildServer)' != '' ">$(ReleasePackageVersion)</PackageVersion>
<Configurations>Debug;Release</Configurations>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<DocumentationFile>bin\$(Configuration)\netstandard2.0\Microsoft.Bot.Builder.AI.QnA.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
@ -15,15 +17,16 @@
<ContentTargetFolders>content</ContentTargetFolders>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DocumentationFile>bin\$(Configuration)\netstandard2.0\Microsoft.Bot.Builder.AI.QnA.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>Full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup>
<!-- These documentation warnings excludes should be removed as part of https://github.com/microsoft/botbuilder-dotnet/issues/4052 -->
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<Content Include="**/*.dialog" />
<Content Include="**/*.lg" />

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

@ -7,6 +7,8 @@
<PackageVersion Condition=" '$(IsBuildServer)' != '' ">$(ReleasePackageVersion)</PackageVersion>
<Configurations>Debug;Release</Configurations>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<DocumentationFile>bin\$(Configuration)\netstandard2.0\Microsoft.Bot.Builder.ApplicationInsights.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
@ -16,10 +18,6 @@
<Summary>This library provides integration between the Microsoft Bot Builder SDK and Application Insights.</Summary>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DocumentationFile>bin\$(Configuration)\netstandard2.0\Microsoft.Bot.Builder.ApplicationInsights.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>Full</DebugType>
<DebugSymbols>true</DebugSymbols>

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

@ -59,7 +59,7 @@ namespace Microsoft.Bot.Builder.Azure
public int ContainerThroughput { get; set; } = 400;
/// <summary>
/// Gets or sets the suffix to be added to every key. <see cref="CosmosDbKeyEscape.EscapeKey"/>.
/// Gets or sets the suffix to be added to every key. <see cref="CosmosDbKeyEscape.EscapeKey(string)"/>.
///
/// Note: <see cref="CompatibilityMode"/> must be set to 'false' to use a KeySuffix.
/// When KeySuffix is used, keys will NOT be truncated but an exception will be thrown if

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

@ -6,6 +6,8 @@
<PackageVersion Condition=" '$(IsBuildServer)' != '' ">$(ReleasePackageVersion)</PackageVersion>
<Configurations>Debug;Release</Configurations>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<DocumentationFile>bin\$(Configuration)\netstandard2.0\Microsoft.Bot.Builder.Azure.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
@ -13,15 +15,16 @@
<Description>Azure classes for using Azure Services on the Microsoft Bot Builder SDK</Description>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DocumentationFile>bin\$(Configuration)\netstandard2.0\Microsoft.Bot.Builder.Azure.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>Full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup>
<!-- These documentation warnings excludes should be removed as part of https://github.com/microsoft/botbuilder-dotnet/issues/4052 -->
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>
<PropertyGroup>
<!-- The KeyVault package, picked up as a transitive dependency of the Azure Storage libraries
doesn't yet support NetStandard20. I confirmed with the Azure Storage team that this warning

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

@ -7,6 +7,11 @@
<PackageVersion Condition=" '$(IsBuildServer)' != '' ">$(PreviewPackageVersion)</PackageVersion>
<Configurations>Debug;Release</Configurations>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<DocumentationFile>bin\$(Configuration)\netstandard2.0\Microsoft.Bot.Builder.Dialogs.Adaptive.Testing.xml</DocumentationFile>
<!--
TODO: Enable treat warnings as errors once FxCop is enabled and all the issues has been addressed.
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
-->
</PropertyGroup>
<PropertyGroup>
@ -17,21 +22,22 @@
<ContentTargetFolders>content</ContentTargetFolders>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DocumentationFile>bin\$(Configuration)\netstandard2.0\Microsoft.Bot.Builder.Dialogs.Adaptive.Testing.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>Full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup>
<!-- These documentation warnings excludes should be removed as part of https://github.com/microsoft/botbuilder-dotnet/issues/4052 -->
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<Content Include="**/*.dialog" />
<Content Include="**/*.lg" />
<Content Include="**/*.lu" />
<Content Include="**/*.schema" />
<Content Include="**/*.qna"/>
<Content Include="**/*.qna" />
</ItemGroup>
<ItemGroup>

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

@ -7,6 +7,8 @@
<PackageVersion Condition=" '$(IsBuildServer)' != '' ">$(ReleasePackageVersion)</PackageVersion>
<Configurations>Debug;Release</Configurations>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<DocumentationFile>bin\$(Configuration)\netstandard2.0\Microsoft.Bot.Builder.Dialogs.Adaptive.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
@ -17,15 +19,16 @@
<ContentTargetFolders>content</ContentTargetFolders>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DocumentationFile>bin\$(Configuration)\netstandard2.0\Microsoft.Bot.Builder.Dialogs.Adaptive.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>Full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup>
<!-- These documentation warnings excludes should be removed as part of https://github.com/microsoft/botbuilder-dotnet/issues/4052 -->
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<Content Include="**/*.dialog" />
<Content Include="**/*.lg" />

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

@ -7,6 +7,8 @@
<PackageVersion Condition=" '$(IsBuildServer)' != '' ">$(PreviewPackageVersion)</PackageVersion>
<Configurations>Debug;Release</Configurations>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<DocumentationFile>bin\$(Configuration)\netstandard2.0\Microsoft.Bot.Builder.Dialogs.Debugging.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
@ -17,14 +19,15 @@
<ContentTargetFolders>content</ContentTargetFolders>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DocumentationFile>bin\$(Configuration)\netstandard2.0\Microsoft.Bot.Builder.Dialogs.Debugging.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>Full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup>
<!-- These documentation warnings excludes should be removed as part of https://github.com/microsoft/botbuilder-dotnet/issues/4052 -->
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AsyncUsageAnalyzers" Version="1.0.0-alpha003" PrivateAssets="all" />

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

@ -6,6 +6,8 @@
<PackageVersion Condition=" '$(IsBuildServer)' != '' ">$(ReleasePackageVersion)</PackageVersion>
<Configurations>Debug;Release</Configurations>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<DocumentationFile>bin\$(Configuration)\netstandard2.0\Microsoft.Bot.Builder.Dialogs.Declarative.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
@ -16,14 +18,15 @@
<ContentTargetFolders>content</ContentTargetFolders>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DocumentationFile>bin\$(Configuration)\netstandard2.0\Microsoft.Bot.Builder.Dialogs.Declarative.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>Full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup>
<!-- These documentation warnings excludes should be removed as part of https://github.com/microsoft/botbuilder-dotnet/issues/4052 -->
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<Content Include="**/*.dialog" />

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

@ -22,7 +22,6 @@ namespace Microsoft.Bot.Builder.Dialogs.Memory.Scopes
/// <summary>
/// Initializes a new instance of the <see cref="ReadOnlyObject"/> class.
/// </summary>
/// <param name="dialogContext">dialog context for evalutation of expression properties.</param>
/// <param name="obj">object to wrap. Any expression properties on it will be evaluated using the dc.</param>
public ReadOnlyObject(object obj)
{

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

@ -7,6 +7,8 @@
<PackageVersion Condition=" '$(IsBuildServer)' != '' ">$(ReleasePackageVersion)</PackageVersion>
<Configurations>Debug;Release</Configurations>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<DocumentationFile>bin\$(Configuration)\netstandard2.0\Microsoft.Bot.Builder.Dialogs.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
@ -18,15 +20,16 @@
<Summary>This library implements .NET Simple Dialog classes </Summary>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DocumentationFile>bin\$(Configuration)\netstandard2.0\Microsoft.Bot.Builder.Dialogs.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>Full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup>
<!-- These documentation warnings excludes should be removed as part of https://github.com/microsoft/botbuilder-dotnet/issues/4052 -->
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AsyncUsageAnalyzers" Version="1.0.0-alpha003" PrivateAssets="all" />
<PackageReference Include="Microsoft.Bot.Builder" Condition=" '$(IsBuildServer)' == '' " Version="$(LocalPackageVersion)" />

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

@ -7,6 +7,8 @@
<PackageVersion Condition=" '$(IsBuildServer)' != '' ">$(ReleasePackageVersion)</PackageVersion>
<Configurations>Debug;Release</Configurations>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<DocumentationFile>bin\$(Configuration)\netstandard2.0\Microsoft.Bot.Builder.LanguageGeneration.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
@ -16,14 +18,15 @@
<Summary>This library implements Language Generation template library system for the Bot Builder SDK</Summary>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DocumentationFile>bin\$(Configuration)\netstandard2.0\Microsoft.Bot.Builder.LanguageGeneration.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>Full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup>
<!-- These documentation warnings excludes should be removed as part of https://github.com/microsoft/botbuilder-dotnet/issues/4052 -->
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Antlr4.CodeGenerator" Version="4.6.6">

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

@ -6,6 +6,8 @@
<PackageVersion Condition=" '$(IsBuildServer)' != '' ">$(ReleasePackageVersion)</PackageVersion>
<Configurations>Debug;Release;</Configurations>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<DocumentationFile>bin\$(Configuration)\netstandard2.0\Microsoft.Bot.Builder.TemplateManager.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
@ -14,15 +16,16 @@
<Summary>This library implements .NET TemplateManager classes to manage libraries of template renderers in Microsoft Bot Builder SDK v4</Summary>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DocumentationFile>bin\$(Configuration)\netstandard2.0\Microsoft.Bot.Builder.TemplateManager.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>Full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup>
<!-- These documentation warnings excludes should be removed as part of https://github.com/microsoft/botbuilder-dotnet/issues/4052 -->
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Bot.Builder" Condition=" '$(IsBuildServer)' == '' " Version="$(LocalPackageVersion)" />
<PackageReference Include="Microsoft.Bot.Builder" Condition=" '$(IsBuildServer)' != '' " Version="$(ReleasePackageVersion)" />

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

@ -7,6 +7,8 @@
<PackageVersion Condition=" '$(IsBuildServer)' != '' ">$(ReleasePackageVersion)</PackageVersion>
<Configurations>Debug;Release</Configurations>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<DocumentationFile>bin\$(Configuration)\netstandard2.0\Microsoft.Bot.Builder.Testing.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
@ -16,10 +18,6 @@
<Summary>Library for building bot tests using Microsoft Bot Framework Connector</Summary>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DocumentationFile>bin\$(Configuration)\netstandard2.0\Microsoft.Bot.Builder.Testing.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>Full</DebugType>
<DebugSymbols>true</DebugSymbols>

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

@ -19,9 +19,12 @@ namespace Microsoft.Bot.Builder.Testing.XUnit
{
private const string TestObjectKey = "TestObjectKey";
// Needed by serializer
/// <summary>
/// Initializes a new instance of the <see cref="TestDataObject"/> class.
/// </summary>
public TestDataObject()
{
// Note: This empty constructor is needed by the serializer.
}
/// <summary>

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

@ -45,6 +45,14 @@ namespace Microsoft.Bot.Builder.Testing.XUnit
/// <value>The <see cref="ITestOutputHelper"/> instance for this middleware.</value>
protected ITestOutputHelper Output { get; }
/// <summary>
/// Processes the incoming activity and logs it using the <see cref="ITestOutputHelper"/>.
/// </summary>
/// <param name="context">The context object for this turn.</param>
/// <param name="next">The delegate to call to continue the bot middleware pipeline.</param>
/// <param name="cancellationToken">A cancellation token that can be used by other objects
/// or threads to receive notice of cancellation.</param>
/// <returns>A task that represents the work queued to execute.</returns>
public async Task OnTurnAsync(ITurnContext context, NextDelegate next, CancellationToken cancellationToken = default(CancellationToken))
{
var stopwatch = new Stopwatch();

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

@ -7,10 +7,8 @@
<PackageVersion Condition=" '$(IsBuildServer)' != '' ">$(ReleasePackageVersion)</PackageVersion>
<Configurations>Debug;Release</Configurations>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DocumentationFile>bin\$(Configuration)\netstandard2.0\Microsoft.Bot.Builder.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
@ -18,6 +16,11 @@
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup>
<!-- These documentation warnings excludes should be removed as part of https://github.com/microsoft/botbuilder-dotnet/issues/4052 -->
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageId>Microsoft.Bot.Builder</PackageId>

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

@ -367,6 +367,7 @@ namespace Microsoft.Bot.Builder.Streaming
/// then generates and returns a response if appropriate.
/// </summary>
/// <param name="request">A ReceiveRequest from the connected channel.</param>
/// <param name="response">The <see cref="StreamingResponse"/> instance.</param>
/// <returns>A response if the given request matches against a defined path.</returns>
private StreamingResponse HandleCustomPaths(ReceiveRequest request, StreamingResponse response)
{

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

@ -6,6 +6,8 @@
<PackageVersion Condition=" '$(IsBuildServer)' != '' ">$(ReleasePackageVersion)</PackageVersion>
<Configurations>Debug;Release;</Configurations>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<DocumentationFile>bin\$(Configuration)\netstandard2.0\Microsoft.Bot.Configuration.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
@ -14,15 +16,16 @@
<Description>Classes for loading and saving bot configuration files</Description>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DocumentationFile>bin\$(Configuration)\netstandard2.0\Microsoft.Bot.Configuration.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>Full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup>
<!-- These documentation warnings excludes should be removed as part of https://github.com/microsoft/botbuilder-dotnet/issues/4052 -->
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AsyncUsageAnalyzers" Version="1.0.0-alpha003" PrivateAssets="all" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />

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

@ -6,6 +6,8 @@
<PackageVersion Condition=" '$(IsBuildServer)' != '' ">$(ReleasePackageVersion)</PackageVersion>
<Configurations>Debug;Release</Configurations>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<DocumentationFile>bin\$(Configuration)\netstandard2.0\Microsoft.Bot.Connector.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
@ -15,15 +17,16 @@
<Summary>Client REST API library for Microsoft Bot Framework Connector</Summary>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DocumentationFile>bin\$(Configuration)\netstandard2.0\Microsoft.Bot.Connector.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>Full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup>
<!-- These documentation warnings excludes should be removed as part of https://github.com/microsoft/botbuilder-dotnet/issues/4052 -->
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<Compile Remove="node_modules\**" />
<EmbeddedResource Remove="node_modules\**" />

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

@ -7,7 +7,6 @@ using Newtonsoft.Json;
namespace Microsoft.Bot.Schema
{
#pragma warning disable SA1609 // PropertyDocumentationMustHaveValue, temporary ignore, needs to be fixed later
/// <summary>
/// An Activity is the basic communication type for the Bot Framework 3.0
/// protocol.
@ -176,6 +175,9 @@ namespace Microsoft.Bot.Schema
/// 'messageUpdate', 'messageDelete', 'installationUpdate',
/// 'messageReaction', 'suggestion', 'trace', 'handoff'.
/// </summary>
/// <value>
/// The activity type (see <see cref="ActivityTypes"/>).
/// </value>
[JsonProperty(PropertyName = "type")]
public string Type { get; set; }
@ -183,6 +185,9 @@ namespace Microsoft.Bot.Schema
/// Gets or sets an ID that uniquely identifies the activity on the
/// channel.
/// </summary>
/// <value>
/// An ID that uniquely identifies the activity on the channel.
/// </value>
[JsonProperty(PropertyName = "id")]
public string Id { get; set; }
@ -190,6 +195,9 @@ namespace Microsoft.Bot.Schema
/// Gets or sets the date and time when the message was sent, in UTC,
/// expressed in ISO-8601 format.
/// </summary>
/// <value>
/// The date and time when the message was sent, in UTC, expressed in ISO-8601 format.
/// </value>
[JsonProperty(PropertyName = "timestamp")]
public System.DateTimeOffset? Timestamp { get; set; }
@ -198,6 +206,9 @@ namespace Microsoft.Bot.Schema
/// time, expressed in ISO-8601 format.
/// For example, 2016-09-23T13:07:49.4714686-07:00.
/// </summary>
/// <value>
/// The date and time when the message was sent, in local time, expressed in ISO-8601 format.
/// </value>
[JsonProperty(PropertyName = "localTimestamp")]
public System.DateTimeOffset? LocalTimestamp { get; set; }
@ -206,6 +217,10 @@ namespace Microsoft.Bot.Schema
/// the message, expressed in IANA Time Zone database format.
/// For example, America/Los_Angeles.
/// </summary>
/// <value>
/// The name of the timezone used to define local time for
/// the message, expressed in IANA Time Zone database format.
/// </value>
[JsonProperty(PropertyName = "localTimezone")]
public string LocalTimezone { get; set; }
@ -213,6 +228,9 @@ namespace Microsoft.Bot.Schema
/// Gets or sets the URL that specifies the channel's service endpoint.
/// Set by the channel.
/// </summary>
/// <value>
/// The URL that specifies the channel's service endpoint.
/// </value>
[JsonProperty(PropertyName = "serviceUrl")]
public string ServiceUrl { get; set; }
@ -220,70 +238,111 @@ namespace Microsoft.Bot.Schema
/// Gets or sets an ID that uniquely identifies the channel.
/// Set by the channel.
/// </summary>
/// <value>
/// An ID that uniquely identifies the channel.
/// </value>
[JsonProperty(PropertyName = "channelId")]
public string ChannelId { get; set; }
/// <summary>
/// Gets or sets the sender of the message.
/// </summary>
/// <value>
/// The <see cref="ChannelAccount"/> for the sender of the message.
/// </value>
[JsonProperty(PropertyName = "from")]
public ChannelAccount From { get; set; }
/// <summary>
/// Gets or sets the conversation to which the activity belongs.
/// </summary>
/// <value>
/// The <see cref="ConversationAccount"/> to which the activity belongs.
/// </value>
[JsonProperty(PropertyName = "conversation")]
public ConversationAccount Conversation { get; set; }
/// <summary>
/// Gets or sets the recipient of the message.
/// </summary>
/// <value>
/// The <see cref="ChannelAccount"/> for the recipient of the message.
/// </value>
[JsonProperty(PropertyName = "recipient")]
public ChannelAccount Recipient { get; set; }
/// <summary>
/// Gets or sets the format of text fields. Default: markdown. Possible
/// values include: 'markdown', 'plain', 'xml'.
/// values are defined by <see cref="TextFormatTypes"/>.
/// </summary>
/// <value>
/// The format of text fields (see <see cref="TextFormatTypes"/>).
/// </value>
[JsonProperty(PropertyName = "textFormat")]
public string TextFormat { get; set; }
/// <summary>
/// Gets or sets the layout hint for multiple attachments. Default:
/// list. Possible values include: 'list', 'carousel'.
/// list. Possible values are defined by <see cref="AttachmentLayoutTypes"/>.
/// </summary>
/// <value>
/// The layout hint for multiple attachments.
/// </value>
[JsonProperty(PropertyName = "attachmentLayout")]
public string AttachmentLayout { get; set; }
/// <summary>
/// Gets or sets the collection of members added to the conversation.
/// </summary>
/// <value>
/// The collection of members added to the conversation.
/// </value>
[JsonProperty(PropertyName = "membersAdded")]
#pragma warning disable CA2227 // Collection properties should be read only (we can't change this without breaking binary compat)
public IList<ChannelAccount> MembersAdded { get; set; }
#pragma warning restore CA2227 // Collection properties should be read only
/// <summary>
/// Gets or sets the collection of members removed from the
/// conversation.
/// </summary>
/// <value>
/// The collection of members removed from the conversation.
/// </value>
[JsonProperty(PropertyName = "membersRemoved")]
#pragma warning disable CA2227 // Collection properties should be read only (we can't change this without breaking binary compat)
public IList<ChannelAccount> MembersRemoved { get; set; }
#pragma warning restore CA2227 // Collection properties should be read only
/// <summary>
/// Gets or sets the collection of reactions added to the conversation.
/// </summary>
/// <value>
/// The collection of reactions added to the conversation.
/// </value>
[JsonProperty(PropertyName = "reactionsAdded")]
#pragma warning disable CA2227 // Collection properties should be read only (we can't change this without breaking binary compat)
public IList<MessageReaction> ReactionsAdded { get; set; }
#pragma warning restore CA2227 // Collection properties should be read only
/// <summary>
/// Gets or sets the collection of reactions removed from the
/// conversation.
/// </summary>
/// <value>
/// The collection of reactions removed from the conversation.
/// </value>
[JsonProperty(PropertyName = "reactionsRemoved")]
#pragma warning disable CA2227 // Collection properties should be read only (we can't change this without breaking binary compat)
public IList<MessageReaction> ReactionsRemoved { get; set; }
#pragma warning restore CA2227 // Collection properties should be read only
/// <summary>
/// Gets or sets the updated topic name of the conversation.
/// </summary>
/// <value>
/// The updated topic name of the conversation.
/// </value>
[JsonProperty(PropertyName = "topicName")]
public string TopicName { get; set; }
@ -291,6 +350,9 @@ namespace Microsoft.Bot.Schema
/// Gets or sets a value indicating whether the prior history of the
/// channel is disclosed.
/// </summary>
/// <value>
/// A value indicating whether the prior history of the channel is disclosed.
/// </value>
[JsonProperty(PropertyName = "historyDisclosed")]
public bool? HistoryDisclosed { get; set; }
@ -302,27 +364,40 @@ namespace Microsoft.Bot.Schema
/// country or region.
/// The locale name can also correspond to a valid BCP-47 language tag.
/// </summary>
/// <value>
/// A locale for the activity.
/// </value>
[JsonProperty(PropertyName = "locale")]
public string Locale { get; set; }
/// <summary>
/// Gets or sets the text content of the message.
/// </summary>
/// <value>
/// The text content of the message.
/// </value>
[JsonProperty(PropertyName = "text")]
public string Text { get; set; }
/// <summary>
/// Gets or sets the text to speak.
/// </summary>
/// <value>
/// The text to speak.
/// </value>
[JsonProperty(PropertyName = "speak")]
public string Speak { get; set; }
/// <summary>
/// Gets or sets a string indicating whether your bot is accepting,
/// expecting, or ignoring user input after the message is delivered to
/// the client. Possible values include: 'acceptingInput',
/// 'ignoringInput', 'expectingInput'.
/// the client (see <see cref="InputHints"/>.
/// </summary>
/// <value>
/// A string indicating whether your bot is accepting,
/// expecting, or ignoring user input after the message is delivered to
/// the client.
/// </value>
[JsonProperty(PropertyName = "inputHint")]
public string InputHint { get; set; }
@ -330,38 +405,64 @@ namespace Microsoft.Bot.Schema
/// Gets or sets the text to display if the channel cannot render
/// cards.
/// </summary>
/// <value>
/// The text to display if the channel cannot render cards.
/// </value>
[JsonProperty(PropertyName = "summary")]
public string Summary { get; set; }
/// <summary>
/// Gets or sets the suggested actions for the activity.
/// </summary>
/// <value>
/// The suggested actions for the activity.
/// </value>
[JsonProperty(PropertyName = "suggestedActions")]
public SuggestedActions SuggestedActions { get; set; }
/// <summary>
/// Gets or sets the attachments for the activity.
/// </summary>
/// <value>
/// The attachments for the activity.
/// </value>
[JsonProperty(PropertyName = "attachments")]
#pragma warning disable CA2227 // Collection properties should be read only (we can't change this without breaking binary compat)
public IList<Attachment> Attachments { get; set; }
#pragma warning restore CA2227 // Collection properties should be read only
/// <summary>
/// Gets or sets the entities that were mentioned in the message.
/// </summary>
/// <value>
/// The entities that were mentioned in the message.
/// </value>
[JsonProperty(PropertyName = "entities")]
#pragma warning disable CA2227 // Collection properties should be read only (we can't change this without breaking binary compat)
public IList<Entity> Entities { get; set; }
#pragma warning restore CA2227 // Collection properties should be read only
/// <summary>
/// Gets or sets channel-specific content.
/// </summary>
/// <value>
/// Channel-specific content.
/// </value>
[JsonProperty(PropertyName = "channelData")]
#pragma warning disable CA1721 // Property names should not match get methods (we can't change this without changing binary compat).
public object ChannelData { get; set; }
#pragma warning restore CA1721 // Property names should not match get methods
/// <summary>
/// Gets or sets a string indicating whether the recipient of a
/// contactRelationUpdate was added to or removed from the sender's
/// contact list.
/// </summary>
/// <value>
/// A string indicating whether the recipient of a
/// contactRelationUpdate was added to or removed from the sender's
/// contact list.
/// </value>
[JsonProperty(PropertyName = "action")]
public string Action { get; set; }
@ -369,24 +470,36 @@ namespace Microsoft.Bot.Schema
/// Gets or sets the ID of the message to which this message is a
/// reply.
/// </summary>
/// <value>
/// The ID of the message to which this message is a reply.
/// </value>
[JsonProperty(PropertyName = "replyToId")]
public string ReplyToId { get; set; }
/// <summary>
/// Gets or sets a descriptive label for the activity.
/// </summary>
/// <value>
/// A descriptive label for the activity.
/// </value>
[JsonProperty(PropertyName = "label")]
public string Label { get; set; }
/// <summary>
/// Gets or sets the type of the activity's value object.
/// </summary>
/// <value>
/// The type of the activity's value object.
/// </value>
[JsonProperty(PropertyName = "valueType")]
public string ValueType { get; set; }
/// <summary>
/// Gets or sets a value that is associated with the activity.
/// </summary>
/// <value>
/// A value that is associated with the activity.
/// </value>
[JsonProperty(PropertyName = "value")]
public object Value { get; set; }
@ -394,21 +507,29 @@ namespace Microsoft.Bot.Schema
/// Gets or sets the name of the operation associated with an invoke or
/// event activity.
/// </summary>
/// <value>
/// The name of the operation associated with an invoke or event activity.
/// </value>
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
/// <summary>
/// Gets or sets a reference to another conversation or activity.
/// Gets or sets a <see cref="ConversationReference"/> to another conversation or activity.
/// </summary>
/// <value>
/// A reference to another conversation or activity.
/// </value>
[JsonProperty(PropertyName = "relatesTo")]
public ConversationReference RelatesTo { get; set; }
/// <summary>
/// Gets or sets a code for endOfConversation activities that indicates
/// why the conversation ended. Possible values include:
/// 'unknown', 'completedSuccessfully', 'userCancelled', 'botTimedOut',
/// 'botIssuedInvalidMessage', 'channelFailed'.
/// why the conversation ended. Possible values are defined in <see cref="EndOfConversationCodes"/>.
/// </summary>
/// <value>
/// A code for endOfConversation activities that indicates
/// why the conversation ended.
/// </value>
[JsonProperty(PropertyName = "code")]
public string Code { get; set; }
@ -416,22 +537,32 @@ namespace Microsoft.Bot.Schema
/// Gets or sets the time at which the activity should be considered to
/// be "expired" and should not be presented to the recipient.
/// </summary>
/// <value>
/// The time at which the activity should be considered to
/// be "expired" and should not be presented to the recipient.
/// </value>
[JsonProperty(PropertyName = "expiration")]
public System.DateTimeOffset? Expiration { get; set; }
/// <summary>
/// Gets or sets the importance of the activity. Possible values
/// include: 'low', 'normal', 'high'.
/// are defined in <see cref="ActivityImportance"/>.
/// </summary>
/// <value>
/// The importance of the activity.
/// </value>
[JsonProperty(PropertyName = "importance")]
public string Importance { get; set; }
/// <summary>
/// Gets or sets a delivery hint to signal to the recipient alternate
/// delivery paths for the activity.
/// The default delivery mode is "default". Possible values include:
/// 'normal', 'notification', 'expectReplies', 'ephemeral'.
/// The default delivery mode is "default". Possible values are defined in <see cref="DeliveryModes"/>.
/// </summary>
/// <value>
/// A delivery hint to signal to the recipient alternate
/// delivery paths for the activity.
/// </value>
[JsonProperty(PropertyName = "deliveryMode")]
public string DeliveryMode { get; set; }
@ -439,20 +570,35 @@ namespace Microsoft.Bot.Schema
/// Gets or sets list of phrases and references that speech and
/// language-priming systems should listen for.
/// </summary>
/// <value>
/// List of phrases and references that speech and language-priming systems should listen for.
/// </value>
[JsonProperty(PropertyName = "listenFor")]
#pragma warning disable CA2227 // Collection properties should be read only (we can't change this without breaking binary compat)
public IList<string> ListenFor { get; set; }
#pragma warning restore CA2227 // Collection properties should be read only
/// <summary>
/// Gets or sets the collection of text fragments to highlight when the
/// activity contains a ReplyToId value.
/// </summary>
/// <value>
/// The collection of text fragments to highlight when the
/// activity contains a ReplyToId value.
/// </value>
[JsonProperty(PropertyName = "textHighlights")]
#pragma warning disable CA2227 // Collection properties should be read only (we can't change this without breaking binary compat)
public IList<TextHighlight> TextHighlights { get; set; }
#pragma warning restore CA2227 // Collection properties should be read only
/// <summary>
/// Gets or sets an optional programmatic action accompanying this
/// request.
/// </summary>
/// <value>
/// An optional programmatic action accompanying this
/// request.
/// </value>
[JsonProperty(PropertyName = "semanticAction")]
public SemanticAction SemanticAction { get; set; }
@ -462,6 +608,12 @@ namespace Microsoft.Bot.Schema
/// instead populated by bots and clients based on cryptographically
/// verifiable data that asserts the identity of the callers (e.g. tokens).
/// </summary>
/// <value>
/// A string containing an IRI identifying the caller of a bot.
/// This field is not intended to be transmitted over the wire, but is
/// instead populated by bots and clients based on cryptographically
/// verifiable data that asserts the identity of the callers (e.g. tokens).
/// </value>
[JsonProperty(PropertyName = "callerId")]
public string CallerId { get; set; }
@ -470,5 +622,4 @@ namespace Microsoft.Bot.Schema
/// </summary>
partial void CustomInit();
}
#pragma warning restore SA1609 // PropertyDocumentationMustHaveValue
}

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

@ -51,7 +51,9 @@ namespace Microsoft.Bot.Schema
/// the JSON object is deserialized, but are instead stored in this property. Such properties
/// will be written to a JSON object when the instance is serialized.</remarks>
[JsonExtensionData(ReadData = true, WriteData = true)]
#pragma warning disable CA2227 // Collection properties should be read only (we can't change this without breaking binary compat)
public JObject Properties { get; set; } = new JObject();
#pragma warning restore CA2227 // Collection properties should be read only
/// <summary>
/// Creates an instance of the <see cref="Activity"/> class as an <see cref="IMessageActivity"/> object.
@ -378,8 +380,8 @@ namespace Microsoft.Bot.Schema
/// <seealso cref="Mention"/>
public Mention[] GetMentions()
{
return this.Entities?.Where(entity => string.Compare(entity.Type, "mention", ignoreCase: true) == 0)
.Select(e => e.Properties.ToObject<Mention>()).ToArray() ?? new Mention[0];
return this.Entities?.Where(entity => string.Compare(entity.Type, "mention", StringComparison.OrdinalIgnoreCase) == 0)
.Select(e => e.Properties.ToObject<Mention>()).ToArray() ?? Array.Empty<Mention>();
}
/// <summary>
@ -389,7 +391,9 @@ namespace Microsoft.Bot.Schema
/// <returns>The strongly-typed object; or the type's default value, if the <see cref="ChannelData"/> is null.</returns>
/// <seealso cref="ChannelData"/>
/// <seealso cref="TryGetChannelData{TypeT}(out TypeT)"/>
#pragma warning disable CA1715 // Identifiers should have correct prefix (we can't change it without breaking binary compatibility)
public TypeT GetChannelData<TypeT>()
#pragma warning restore CA1715 // Identifiers should have correct prefix
{
if (this.ChannelData == null)
{
@ -416,7 +420,9 @@ namespace Microsoft.Bot.Schema
/// </returns>
/// <seealso cref="ChannelData"/>
/// <seealso cref="GetChannelData{TypeT}"/>
#pragma warning disable CA1715 // Identifiers should have correct prefix (we can't change it without breaking binary compatibility)
public bool TryGetChannelData<TypeT>(out TypeT instance)
#pragma warning restore CA1715 // Identifiers should have correct prefix
{
instance = default(TypeT);
@ -430,7 +436,9 @@ namespace Microsoft.Bot.Schema
instance = this.GetChannelData<TypeT>();
return true;
}
#pragma warning disable CA1031 // Do not catch general exception types (we just return false here if the conversion fails for any reason)
catch
#pragma warning restore CA1031 // Do not catch general exception types
{
return false;
}
@ -442,7 +450,7 @@ namespace Microsoft.Bot.Schema
/// <returns>A conversation reference for the conversation that contains this activity.</returns>
public ConversationReference GetConversationReference()
{
ConversationReference reference = new ConversationReference
var reference = new ConversationReference
{
ActivityId = this.Id,
User = this.From,
@ -568,9 +576,5 @@ namespace Microsoft.Bot.Schema
return result;
}
partial void CustomInit()
{
}
}
}

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

@ -20,6 +20,8 @@ namespace Microsoft.Bot.Schema
/// the JSON object is deserialized, but are instead stored in this property. Such properties
/// will be written to a JSON object when the instance is serialized.</remarks>
[JsonExtensionData(ReadData = true, WriteData = true)]
#pragma warning disable CA2227 // Collection properties should be read only (we can't change this without breaking binary compat)
public JObject Properties { get; set; } = new JObject();
#pragma warning restore CA2227 // Collection properties should be read only
}
}

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

@ -17,5 +17,15 @@ namespace Microsoft.Bot.Schema
{
return new CardAction(title: input, value: input);
}
/// <summary>
/// Creates a <see cref="CardAction"/> from the given input.
/// </summary>
/// <param name="input">Represents the title and value for the <see cref="CardAction"/>.</param>
/// <returns>A new <see cref="CardAction"/> instance.</returns>
public static CardAction FromString(string input)
{
return new CardAction(title: input, value: input);
}
}
}

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

@ -20,6 +20,8 @@ namespace Microsoft.Bot.Schema
/// the JSON object is deserialized, but are instead stored in this property. Such properties
/// will be written to a JSON object when the instance is serialized.</remarks>
[JsonExtensionData(ReadData = true, WriteData = true)]
#pragma warning disable CA2227 // Collection properties should be read only (we can't change this without breaking binary compat)
public JObject Properties { get; set; } = new JObject();
#pragma warning restore CA2227 // Collection properties should be read only
}
}

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

@ -20,6 +20,8 @@ namespace Microsoft.Bot.Schema
/// the JSON object is deserialized, but are instead stored in this property. Such properties
/// will be written to a JSON object when the instance is serialized.</remarks>
[JsonExtensionData(ReadData = true, WriteData = true)]
#pragma warning disable CA2227 // Collection properties should be read only (we can't change this without breaking binary compat)
public JObject Properties { get; set; } = new JObject();
#pragma warning restore CA2227 // Collection properties should be read only
}
}

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

@ -21,7 +21,9 @@ namespace Microsoft.Bot.Schema
/// the JSON object is deserialized, but are instead stored in this property. Such properties
/// will be written to a JSON object when the instance is serialized.</remarks>
[JsonExtensionData(ReadData = true, WriteData = true)]
#pragma warning disable CA2227 // Collection properties should be read only (we can't change this without breaking binary compat)
public JObject Properties { get; set; } = new JObject();
#pragma warning restore CA2227 // Collection properties should be read only
/// <summary>
/// Retrieve internal payload.
@ -52,7 +54,7 @@ namespace Microsoft.Bot.Schema
return false;
}
return JsonConvert.SerializeObject(this).Equals(JsonConvert.SerializeObject(other));
return JsonConvert.SerializeObject(this).Equals(JsonConvert.SerializeObject(other), StringComparison.Ordinal);
}
public override bool Equals(object obj)

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

@ -6,7 +6,9 @@ namespace Microsoft.Bot.Schema
/// <summary>
/// Error codes to communicate when throwing an APIException.
/// </summary>
#pragma warning disable CA1052 // Static holder types should be Static or NotInheritable (this class should have been static but we can't change it without breaking binary compat)
public class ErrorCodes
#pragma warning restore CA1052 // Static holder types should be Static or NotInheritable
{
/// <summary>
/// Other error, not specified.

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

@ -1,4 +1,4 @@
// <auto-generated>
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@ -73,12 +73,6 @@ namespace Microsoft.Bot.Schema
[JsonProperty(PropertyName = "longitude")]
public double? Longitude { get; set; }
/// <summary>
/// Gets or sets the type of the thing
/// </summary>
[JsonProperty(PropertyName = "type")]
public string Type { get; set; }
/// <summary>
/// Gets or sets the name of the thing
/// </summary>

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

@ -17,7 +17,9 @@ namespace Microsoft.Bot.Schema
public string UserAgent { get; set; }
[JsonProperty(PropertyName = "messages")]
#pragma warning disable CA1819 // Properties should not return arrays (we can't change this without breaking binary compat).
public string[] Messages { get; set; }
#pragma warning restore CA1819 // Properties should not return arrays
[JsonProperty(PropertyName = "diagnostics")]
public object Diagnostics { get; set; }

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

@ -33,7 +33,9 @@ namespace Microsoft.Bot.Schema
/// <value>
/// Service URL where responses to this activity should be sent.
/// </value>
#pragma warning disable CA1056 // Uri properties should not be strings (we can't change this without breaking binary compat)
string ServiceUrl { get; set; }
#pragma warning restore CA1056 // Uri properties should not be strings
/// <summary>
/// Gets or sets timestamp when this message was sent (UTC).
@ -100,7 +102,9 @@ namespace Microsoft.Bot.Schema
/// <value>
/// Collection of Entity objects, each of which contains metadata about this activity. Each Entity object is typed.
/// </value>
#pragma warning disable CA2227 // Collection properties should be read only (we can't change this without breaking binary compat)
IList<Entity> Entities { get; set; }
#pragma warning restore CA2227 // Collection properties should be read only
/// <summary>
/// Gets or sets channel-specific payload.
@ -121,14 +125,18 @@ namespace Microsoft.Bot.Schema
/// <value>
/// Channel-specific payload.
/// </value>
#pragma warning disable CA1721 // Property names should not match get methods (we can't change this without breaking binary compat)
dynamic ChannelData { get; set; }
#pragma warning restore CA1721 // Property names should not match get methods
/// <summary>
/// Gets the channel data as strongly typed object.
/// </summary>
/// <typeparam name="TypeT">The expected type of the object.</typeparam>
/// <returns>The strongly typed channel data.</returns>
#pragma warning disable CA1715 // Identifiers should have correct prefix (we can't change this without breaking binary compat)
TypeT GetChannelData<TypeT>();
#pragma warning restore CA1715 // Identifiers should have correct prefix
/// <summary>
/// Try to get the channeldata as a strongly typed object.
@ -136,7 +144,9 @@ namespace Microsoft.Bot.Schema
/// <typeparam name="TypeT">Type T.</typeparam>
/// <param name="instance">instance.</param>
/// <returns>false if there is no valid channeldata available.</returns>
#pragma warning disable CA1715 // Identifiers should have correct prefix (we can't change this without breaking binary compat)
bool TryGetChannelData<TypeT>(out TypeT instance);
#pragma warning restore CA1715 // Identifiers should have correct prefix
/// <summary>
/// Return IMessageActivity if this is a message activity, null otherwise.

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

@ -14,13 +14,17 @@ namespace Microsoft.Bot.Schema
/// Gets or Sets Members added to the conversation.
/// </summary>
/// <value>List of ChannelAccount.</value>
#pragma warning disable CA2227 // Collection properties should be read only (we can't change this without breaking binary compat)
IList<ChannelAccount> MembersAdded { get; set; }
#pragma warning restore CA2227 // Collection properties should be read only
/// <summary>
/// Gets or Sets Members removed from the conversation.
/// </summary>
/// <value>List of ChannelAccount.</value>
#pragma warning disable CA2227 // Collection properties should be read only (we can't change this without breaking binary compat)
IList<ChannelAccount> MembersRemoved { get; set; }
#pragma warning restore CA2227 // Collection properties should be read only
/// <summary>
/// Gets or Sets The conversation's updated topic name.

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

@ -76,7 +76,9 @@ namespace Microsoft.Bot.Schema
/// <value>
/// Attachments.
/// </value>
#pragma warning disable CA2227 // Collection properties should be read only (we can't change this without breaking binary compat)
IList<Attachment> Attachments { get; set; }
#pragma warning restore CA2227 // Collection properties should be read only
/// <summary>
/// Gets or sets suggestedActions are used to express actions for interacting with a card like keyboards/quickReplies.

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

@ -16,7 +16,9 @@ namespace Microsoft.Bot.Schema
/// <value>
/// Reactions added to the activity.
/// </value>
#pragma warning disable CA2227 // Collection properties should be read only (we can't change this without breaking binary compat)
IList<MessageReaction> ReactionsAdded { get; set; }
#pragma warning restore CA2227 // Collection properties should be read only
/// <summary>
/// Gets or sets reactions removed from the activity.
@ -24,6 +26,8 @@ namespace Microsoft.Bot.Schema
/// <value>
/// Reactions removed from the activity.
/// </value>
#pragma warning disable CA2227 // Collection properties should be read only (we can't change this without breaking binary compat)
IList<MessageReaction> ReactionsRemoved { get; set; }
#pragma warning restore CA2227 // Collection properties should be read only
}
}

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

@ -18,6 +18,8 @@ namespace Microsoft.Bot.Schema
/// Gets or Sets Indicates the sections of text in the referenced message to highlight.
/// </summary>
/// <value>TextHighlights.</value>
#pragma warning disable CA2227 // Collection properties should be read only (we can't change this without breaking binary compat)
IList<TextHighlight> TextHighlights { get; set; }
#pragma warning restore CA2227 // Collection properties should be read only
}
}

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

@ -1,4 +1,4 @@
// <auto-generated>
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@ -58,12 +58,5 @@ namespace Microsoft.Bot.Schema
/// </summary>
[JsonProperty(PropertyName = "text")]
public string Text { get; set; }
/// <summary>
/// Gets or sets type of this entity (RFC 3987 IRI)
/// </summary>
[JsonProperty(PropertyName = "type")]
public string Type { get; set; }
}
}

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

@ -6,6 +6,8 @@
<PackageVersion Condition=" '$(IsBuildServer)' != '' ">$(ReleasePackageVersion)</PackageVersion>
<Configurations>Debug;Release</Configurations>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<DocumentationFile>bin\$(Configuration)\netstandard2.0\Microsoft.Bot.Schema.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
@ -14,21 +16,22 @@
<Summary>This library implements C# schema classes for using the Bot Framework.</Summary>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DocumentationFile>bin\$(Configuration)\netstandard2.0\Microsoft.Bot.Schema.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>Full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup>
<NoWarn>$(NoWarn);CS0108</NoWarn>
<!-- These documentation warnings excludes should be removed as part of https://github.com/microsoft/botbuilder-dotnet/issues/4052 -->
<NoWarn>$(NoWarn);CS1573;CS1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
</ItemGroup>
</Project>

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

@ -1,4 +1,4 @@
// <auto-generated>
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@ -73,12 +73,6 @@ namespace Microsoft.Bot.Schema
[JsonProperty(PropertyName = "hasMap")]
public object HasMap { get; set; }
/// <summary>
/// Gets or sets the type of the thing
/// </summary>
[JsonProperty(PropertyName = "type")]
public string Type { get; set; }
/// <summary>
/// Gets or sets the name of the thing
/// </summary>

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

@ -25,6 +25,8 @@ namespace Microsoft.Bot.Schema.Teams
public string ContinuationToken { get; set; }
[JsonProperty(PropertyName = "members")]
#pragma warning disable CA2227 // Collection properties should be read only (we can't change this without breaking binary compat)
public IList<TeamsChannelAccount> Members { get; set; }
#pragma warning restore CA2227 // Collection properties should be read only
}
}

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

@ -46,6 +46,8 @@ namespace Microsoft.Bot.Schema
/// Extension data for overflow of properties.
/// </value>
[JsonExtensionData(ReadData = true, WriteData = true)]
#pragma warning disable CA2227 // Collection properties should be read only (we can't change this without breaking binary compat)
public JObject Properties { get; set; } = new JObject();
#pragma warning restore CA2227 // Collection properties should be read only
}
}

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

@ -46,6 +46,8 @@ namespace Microsoft.Bot.Schema
/// Extension data for overflow of properties.
/// </value>
[JsonExtensionData(ReadData = true, WriteData = true)]
#pragma warning disable CA2227 // Collection properties should be read only (we can't change this without breaking binary compat)
public JObject Properties { get; set; } = new JObject();
#pragma warning restore CA2227 // Collection properties should be read only
}
}

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

@ -44,7 +44,9 @@ namespace Microsoft.Bot.Schema
/// The URL of the bot messaging endpoint.
/// </value>
[JsonProperty("botUrl")]
#pragma warning disable CA1056 // Uri properties should not be strings (we can't change this without breaking binary compat)
public string BotUrl { get; set; }
#pragma warning restore CA1056 // Uri properties should not be strings
/// <summary>
/// Gets or sets the bot's registered application ID.

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

@ -8,6 +8,8 @@
<Configurations>Debug;Release</Configurations>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Microsoft.Bot.Streaming.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
@ -17,17 +19,14 @@
<Summary>Streaming library for the Bot Framework SDK</Summary>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DocumentationFile>bin\$(Configuration)\netstandard2.0\Microsoft.Bot.Streaming.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>Full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup>
<CodeAnalysisRuleSet>$(SolutionDir)BotBuilder-DotNet.ruleset</CodeAnalysisRuleSet>
<!-- These documentation warnings excludes should be removed as part of https://github.com/microsoft/botbuilder-dotnet/issues/4052 -->
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>
<ItemGroup>

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

@ -5,6 +5,8 @@
<PackageVersion Condition=" '$(IsBuildServer)' == '' ">$(LocalPackageVersion)</PackageVersion>
<PackageVersion Condition=" '$(IsBuildServer)' != '' ">$(ReleasePackageVersion)</PackageVersion>
<Configurations>Debug;Release</Configurations>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Microsoft.Bot.Builder.Integration.ApplicationInsights.Core.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
@ -15,15 +17,16 @@
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Microsoft.Bot.Builder.Integration.ApplicationInsights.Core.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>Full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup>
<!-- These documentation warnings excludes should be removed as part of https://github.com/microsoft/botbuilder-dotnet/issues/4052 -->
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

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

@ -7,6 +7,8 @@
<PackageVersion Condition=" '$(IsBuildServer)' != '' ">$(ReleasePackageVersion)</PackageVersion>
<Configurations>Debug;Release</Configurations>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<DocumentationFile>bin\$(Configuration)\net461\Microsoft.Bot.Builder.Integration.ApplicationInsights.WebApi.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
@ -15,16 +17,17 @@
<Description>This library integrates the Microsoft Bot Builder SDK with Application Insights WebAPI.</Description>
<Summary>This library provides integration between the Microsoft Bot Builder SDK and Application Insights.</Summary>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DocumentationFile>bin\$(Configuration)\net461\Microsoft.Bot.Builder.Integration.ApplicationInsights.WebApi.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>Full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup>
<!-- These documentation warnings excludes should be removed as part of https://github.com/microsoft/botbuilder-dotnet/issues/4052 -->
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>
<PropertyGroup>
<AssemblyName>Microsoft.Bot.Builder.Integration.ApplicationInsights.WebApi</AssemblyName>
<RootNamespace>Microsoft.Bot.Builder.Integration.ApplicationInsights.WebApi</RootNamespace>

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

@ -6,6 +6,8 @@
<PackageVersion Condition=" '$(IsBuildServer)' != '' ">$(ReleasePackageVersion)</PackageVersion>
<Configurations>Debug;Release</Configurations>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Microsoft.Bot.Builder.Integration.AspNet.Core.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
@ -14,15 +16,16 @@
<Summary>This library provides integration between the Microsoft Bot Builder SDK and ASP.NET Core.</Summary>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Microsoft.Bot.Builder.Integration.AspNet.Core.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>Full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup>
<!-- These documentation warnings excludes should be removed as part of https://github.com/microsoft/botbuilder-dotnet/issues/4052 -->
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

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

@ -7,6 +7,8 @@
<PackageVersion Condition=" '$(IsBuildServer)' != '' ">$(ReleasePackageVersion)</PackageVersion>
<Configurations>Debug;Release</Configurations>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<DocumentationFile>bin\$(Configuration)\net461\Microsoft.Bot.Builder.Integration.AspNet.WebApi.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
@ -15,9 +17,10 @@
<Description>This library integrates the Microsoft Bot Builder SDK with ASP.NET WebAPI. It offers idiomatic configuration APIs in addition to providing all the plumbing to direct incoming bot messages to a configured bot.</Description>
<Summary>This library provides integration between the Microsoft Bot Builder SDK and ASP.NET WebAPI.</Summary>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DocumentationFile>bin\$(Configuration)\net461\Microsoft.Bot.Builder.Integration.AspNet.WebApi.xml</DocumentationFile>
<PropertyGroup>
<!-- These documentation warnings excludes should be removed as part of https://github.com/microsoft/botbuilder-dotnet/issues/4052 -->
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

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

@ -0,0 +1,10 @@
<Project>
<!-- Contains common properties that apply to projects under the Tests folder -->
<PropertyGroup>
<!-- For tests, we don't generate documentation. Supress related rules. -->
<NoWarn>$(NoWarn);SA0001;CS1573,CS1591,CS1712</NoWarn>
</PropertyGroup>
<!-- This ensures that Directory.Build.props in parent folders are merged with this one -->
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
</Project>

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

@ -12,7 +12,12 @@ namespace Microsoft.Bot.Schema.Tests
[TestMethod]
public void TestImplicitConversation()
{
SuggestedActions(new CardAction[] { "x", "y", "z" });
SuggestedActions(new CardAction[]
{
"x",
"y",
"z"
});
void SuggestedActions(IList<CardAction> actions)
{
@ -24,5 +29,13 @@ namespace Microsoft.Bot.Schema.Tests
Assert.AreEqual("z", actions[2].Value);
}
}
[TestMethod]
public void FromString()
{
var sut = CardAction.FromString("my action");
Assert.AreEqual("my action", sut.Title);
Assert.AreEqual("my action", sut.Value);
}
}
}