Skip to content

Commit

Permalink
Cleaning up nuget references and nuspecs.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrimc62 committed Oct 4, 2016
1 parent 7cbde9e commit 087a747
Show file tree
Hide file tree
Showing 15 changed files with 271 additions and 322 deletions.
234 changes: 117 additions & 117 deletions CSharp/Library/FormFlow/Confirmation.cs
Original file line number Diff line number Diff line change
@@ -1,126 +1,126 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license.
//
// Microsoft Bot Framework: http://botframework.com
//
// Bot Builder SDK Github:
// https://github.com/Microsoft/BotBuilder
//
// Copyright (c) Microsoft Corporation
// All rights reserved.
//
// MIT License:
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

using System;
using System.Collections.Generic;
using System.Linq;
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license.
//
// Microsoft Bot Framework: http://botframework.com
//
// Bot Builder SDK Github:
// https://github.com/Microsoft/BotBuilder
//
// Copyright (c) Microsoft Corporation
// All rights reserved.
//
// MIT License:
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Microsoft.Bot.Builder.FormFlow.Advanced
{
/// <summary>
/// Confirmation
/// </summary>
/// <typeparam name="T">Form state.</typeparam>
public class Confirmation<T> : Field<T>
where T : class
{
/// <summary>
/// Construct a confirmation.
/// </summary>
/// <param name="prompt">Confirmation prompt expressed using \ref patterns.</param>
/// <param name="condition">Delegate for whether confirmation applies.</param>
/// <param name="dependencies">Fields that must have values before confirmation can run.</param>
/// <param name="form">Form that contains confirmation.</param>
public Confirmation(PromptAttribute prompt, ActiveDelegate<T> condition, IEnumerable<string> dependencies, IForm<T> form)
: base("confirmation" + form.Steps.Count, FieldRole.Confirm)
{
SetPrompt(prompt);
SetType(typeof(bool));
SetDependencies(dependencies.ToArray());
SetActive(condition);
SetFieldDescription(new DescribeAttribute(form.Configuration.Confirmation) { IsLocalizable = false });
var noStep = (dependencies.Any() ? new NextStep(dependencies) : new NextStep());
_next = (value, state) => (bool)value ? new NextStep() : noStep;
}

namespace Microsoft.Bot.Builder.FormFlow.Advanced
{
/// <summary>
/// Confirmation
/// </summary>
/// <typeparam name="T">Form state.</typeparam>
public class Confirmation<T> : Field<T>
where T : class
{
/// <summary>
/// Construct a confirmation.
/// </summary>
/// <param name="prompt">Confirmation prompt expressed using \ref patterns.</param>
/// <param name="condition">Delegate for whether confirmation applies.</param>
/// <param name="dependencies">Fields that must have values before confirmation can run.</param>
/// <param name="form">Form that contains confirmation.</param>
public Confirmation(PromptAttribute prompt, ActiveDelegate<T> condition, IEnumerable<string> dependencies, IForm<T> form)
: base("confirmation" + form.Steps.Count, FieldRole.Confirm)
{
SetPrompt(prompt);
SetType(typeof(bool));
SetDependencies(dependencies.ToArray());
SetActive(condition);
SetFieldDescription(new DescribeAttribute(form.Configuration.Confirmation) { IsLocalizable = false });
var noStep = (dependencies.Any() ? new NextStep(dependencies) : new NextStep());
_next = (value, state) => (bool)value ? new NextStep() : noStep;
}

/// <summary>
/// Construct a confirmation dynamically.
/// </summary>
/// <param name="generateMessage">Delegate for building confirmation.</param>
/// <param name="condition">Delegate to see if confirmation is active.</param>
/// <param name="dependencies">Fields that must have values before confirmation can run.</param>
/// <param name="form">Form that contains confirmation.</param>
/// <param name="dependencies">Fields that must have values before confirmation can run.</param>
/// <param name="form">Form that contains confirmation.</param>
public Confirmation(MessageDelegate<T> generateMessage, ActiveDelegate<T> condition, IEnumerable<string> dependencies, IForm<T> form)
: base("confirmation" + form.Steps.Count, FieldRole.Confirm)
{
SetDefine(async (state, field) => { field.SetPrompt(await generateMessage(state)); return true; });
SetType(typeof(bool));
SetDependencies(dependencies.ToArray());
SetActive(condition);
SetFieldDescription(new DescribeAttribute(form.Configuration.Confirmation) { IsLocalizable = false });
var noStep = (dependencies.Any() ? new NextStep(dependencies) : new NextStep());
: base("confirmation" + form.Steps.Count, FieldRole.Confirm)
{
SetDefine(async (state, field) => { field.SetPrompt(await generateMessage(state)); return true; });
SetType(typeof(bool));
SetDependencies(dependencies.ToArray());
SetActive(condition);
SetFieldDescription(new DescribeAttribute(form.Configuration.Confirmation) { IsLocalizable = false });
var noStep = (dependencies.Any() ? new NextStep(dependencies) : new NextStep());
SetNext((value, state) => (bool)value ? new NextStep() : noStep);
}

public override object GetValue(T state)
{
return null;
}

public override IEnumerable<string> Dependencies
{
get
{
return _dependencies;
}
}

#region IFieldPrompt
public override bool Active(T state)
{
return _condition(state);
}

public override NextStep Next(object value, T state)
{
return _next((bool)value, state);
}

public override void SetValue(T state, object value)
{
throw new NotImplementedException();
}

public override bool IsUnknown(T state)
{
return true;
}

public override void SetUnknown(T state)
{
throw new NotImplementedException();
}
#endregion
}
}
}

public override object GetValue(T state)
{
return null;
}

public override IEnumerable<string> Dependencies
{
get
{
return _dependencies;
}
}

#region IFieldPrompt
public override bool Active(T state)
{
return _condition(state);
}

public override NextStep Next(object value, T state)
{
return _next((bool)value, state);
}

public override void SetValue(T state, object value)
{
throw new NotImplementedException();
}

public override bool IsUnknown(T state)
{
return true;
}

public override void SetUnknown(T state)
{
throw new NotImplementedException();
}
#endregion
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,16 @@
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>
Provide Microsoft Azure extensions to the Microsoft Bot Builder. In particular this include:
* Activity logger for table storage which allows recording and retrieving conversation activities.
* Activity logger for table storage which allows recording and retrieving conversation activities.
</description>
<projectUrl>https://github.com/Microsoft/BotBuilder</projectUrl>
<iconUrl>http://docs.botframework.com/images/bot_icon.png</iconUrl>
<summary>Microsoft Azure extensions for Microsoft.Bot.Builder.</summary>
<language>en-US</language>
<dependencies>
<dependency id="Microsoft.Azure.KeyVault.Core" version="1.0.0"/>
<dependency id="Microsoft.Bot.Builder" version="3.0.0"/>
<dependency id="Microsoft.Data.Edm" version="5.6.4" />
<dependency id="Microsoft.Data.OData" version="5.6.4" />
<dependency id="Microsoft.Data.Services.Client" version="5.6.4" />
<dependency id="Microsoft.Rest.ClientRuntime" version="2.3.2" />
<dependency id="Microsoft.Bot.Builder" version="3.3"/>
<dependency id="Microsoft.Bot.Builder.History" version="3.0"/>
<dependency id="Newtonsoft.Json" version="8.0.3" />
<dependency id="System.Spatial" version="5.6.4" />
<dependency id="WindowsAzure.Storage" version="7.2.1" />
</dependencies>
</metadata>
Expand Down
20 changes: 10 additions & 10 deletions CSharp/Library/Microsoft.Bot.Builder.Calling/app.config
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="createpackage.cmd" />
<None Include="Microsoft.Bot.Builder.History.nuspec" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("3.0.0.0")]
[assembly: AssemblyFileVersion("3.0.0.0")]
11 changes: 11 additions & 0 deletions CSharp/Library/Microsoft.Bot.Builder.History/app.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
19 changes: 0 additions & 19 deletions CSharp/Library/Microsoft.Bot.Builder.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Microsoft.Net.Compilers.1.2.1\build\Microsoft.Net.Compilers.props" Condition="Exists('..\packages\Microsoft.Net.Compilers.1.2.1\build\Microsoft.Net.Compilers.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand Down Expand Up @@ -54,10 +53,6 @@
<HintPath>..\packages\Microsoft.Rest.ClientRuntime.2.3.2\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Configuration, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.WindowsAzure.ConfigurationManager.3.2.1\lib\net40\Microsoft.WindowsAzure.Configuration.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
Expand All @@ -66,17 +61,9 @@
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Net" />
<Reference Include="System.Net.Http.Formatting, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Net.Http.WebRequest" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
Expand Down Expand Up @@ -241,12 +228,6 @@
<Target Name="MATPrerequisite" BeforeTargets="PrepareForBuild" Condition="!Exists('$(MSBuildExtensionsPath)\Microsoft\Multilingual App Toolkit\Microsoft.Multilingual.ResxResources.targets')" Label="MultilingualAppToolkit">
<Warning Text="$(MSBuildProjectFile) is Multilingual build enabled, but the Multilingual App Toolkit is unavailable during the build. If building with Visual Studio, please check to ensure that toolkit is properly installed." />
</Target>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.Net.Compilers.1.2.1\build\Microsoft.Net.Compilers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Net.Compilers.1.2.1\build\Microsoft.Net.Compilers.props'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
5 changes: 2 additions & 3 deletions CSharp/Library/Microsoft.Bot.Builder.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
<dependencies>
<dependency id="Autofac" version="3.5.2"/>
<dependency id="Chronic.Signed" version="0.3.2" />
<dependency id="Microsoft.AspNet.WebApi.Client" version="5.2.3" />
<dependency id="Microsoft.AspNet.WebApi.Core" version="5.2.3" />
<dependency id="Microsoft.AspNet.WebAPI.Core" version="5.2.3" />
<dependency id="Microsoft.Rest.ClientRuntime" version="2.3.2" />
<dependency id="Newtonsoft.Json" version="8.0.3" />
<dependency id="System.IdentityModel.Tokens.Jwt" version="4.0.2.206221351" />
Expand All @@ -38,7 +37,7 @@
<file src="bin\release\Microsoft.Bot.Connector.dll" target="lib\net46"/>
<file src="bin\release\Microsoft.Bot.Connector.xml" target="lib\net46" />
<file src="bin\release\Microsoft.Bot.Builder.pdb" target="lib\net46" />
<file src="bin\release\Microsoft.Bot.Connector.pdb" target="lib\net46" />
<file src="bin\release\Microsoft.Bot.Connector.pdb" target="lib\net46" />
<file src="**\*.cs" exclude="**\obj\**\*.cs;Microsoft.Bot.Builder.FormFlow.Json\**\*.cs" target="src" />
<file src="..\tools\rview\bin\release\RView.exe" target="tools"/>
<file src="bin\release\ar\*.dll" target="lib\net46\ar"/>
Expand Down
Loading

0 comments on commit 087a747

Please sign in to comment.