refactor to enable copying of samples from mseng
This commit is contained in:
Родитель
8185416b83
Коммит
45d8c7b33b
|
@ -1,19 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{0CDA3AB5-3C7A-43D2-875C-66ED734CF864}</ProjectGuid>
|
||||
<ProjectGuid>{8F5EBE82-72C7-44DA-B334-2091AED734BF}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>Microsoft.TeamServices.Samples.Client.Runner</RootNamespace>
|
||||
<AssemblyName>Microsoft.TeamServices.Samples.Client.Runner</AssemblyName>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Microsoft.VisualStudio.Services.WebApi.Samples.Client.Utils</RootNamespace>
|
||||
<AssemblyName>Microsoft.VisualStudio.Services.WebApi.Samples.Client.Utils</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
|
@ -21,9 +20,10 @@
|
|||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
|
@ -31,7 +31,25 @@
|
|||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject>Microsoft.TeamServices.Samples.Client.Runner.Runner</StartupObject>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory, Version=3.13.5.907, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.3.13.5\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory.Platform, Version=3.13.5.907, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.3.13.5\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.IdentityModel.Logging, Version=1.1.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>.\packages\Microsoft.IdentityModel.Logging.1.1.3\lib\net451\Microsoft.IdentityModel.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.IdentityModel.Tokens, Version=5.1.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>.\packages\Microsoft.IdentityModel.Tokens.5.1.3\lib\net451\Microsoft.IdentityModel.Tokens.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ServiceBus, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\WindowsAzure.ServiceBus.3.3.2\lib\net45-full\Microsoft.ServiceBus.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.TeamFoundation.Build2.WebApi, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.TeamFoundationServer.Client.15.121.0-preview\lib\net45\Microsoft.TeamFoundation.Build2.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
|
@ -68,19 +86,37 @@
|
|||
<Reference Include="Microsoft.TeamFoundation.WorkItemTracking.WebApi, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.TeamFoundationServer.Client.15.121.0-preview\lib\net45\Microsoft.TeamFoundation.WorkItemTracking.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualStudio.Services.Client.Interactive, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.VisualStudio.Services.InteractiveClient.15.121.0-preview\lib\net45\Microsoft.VisualStudio.Services.Client.Interactive.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualStudio.Services.Common, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.VisualStudio.Services.Client.15.121.0-preview\lib\net45\Microsoft.VisualStudio.Services.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualStudio.Services.WebApi, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.VisualStudio.Services.Client.15.121.0-preview\lib\net45\Microsoft.VisualStudio.Services.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.Composition" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<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>
|
||||
<Reference Include="System.IdentityModel.Tokens.Jwt, Version=4.0.20622.1351, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.IdentityModel.Tokens.Jwt.4.0.2.206221351\lib\net45\System.IdentityModel.Tokens.Jwt.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http.Formatting, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.2\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.Threading.Tasks.Dataflow, Version=4.5.24.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>.\packages\Microsoft.Tpl.Dataflow.4.5.24\lib\portable-net45+win8+wpa81\System.Threading.Tasks.Dataflow.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
<Reference Include="System.Web.Http, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>.\packages\Microsoft.AspNet.WebApi.Core.5.2.2\lib\net45\System.Web.Http.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
|
@ -90,20 +126,25 @@
|
|||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="ClientSample.cs" />
|
||||
<Compile Include="ClientSampleContext.cs" />
|
||||
<Compile Include="ClientSampleHelpers.cs" />
|
||||
<Compile Include="ClientSampleHttpLogger.cs" />
|
||||
<Compile Include="ClientSampleRunner.cs" />
|
||||
<Compile Include="ClientSampleUtils.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Microsoft.TeamServices.Samples.Client\Microsoft.TeamServices.Samples.Client.csproj">
|
||||
<Project>{545851e1-9bd9-4939-8af4-9a8910cf5c34}</Project>
|
||||
<Name>Microsoft.TeamServices.Samples.Client</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- 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">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
|
@ -0,0 +1,41 @@
|
|||
<?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-9.0.0.0" newVersion="9.0.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<system.serviceModel>
|
||||
<extensions>
|
||||
<!-- In this extension section we are introducing all known service bus extensions. User can remove the ones they don't need. -->
|
||||
<behaviorExtensions>
|
||||
<add name="connectionStatusBehavior" type="Microsoft.ServiceBus.Configuration.ConnectionStatusElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add name="transportClientEndpointBehavior" type="Microsoft.ServiceBus.Configuration.TransportClientEndpointBehaviorElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add name="serviceRegistrySettings" type="Microsoft.ServiceBus.Configuration.ServiceRegistrySettingsElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
</behaviorExtensions>
|
||||
<bindingElementExtensions>
|
||||
<add name="netMessagingTransport" type="Microsoft.ServiceBus.Messaging.Configuration.NetMessagingTransportExtensionElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add name="tcpRelayTransport" type="Microsoft.ServiceBus.Configuration.TcpRelayTransportElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add name="httpRelayTransport" type="Microsoft.ServiceBus.Configuration.HttpRelayTransportElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add name="httpsRelayTransport" type="Microsoft.ServiceBus.Configuration.HttpsRelayTransportElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add name="onewayRelayTransport" type="Microsoft.ServiceBus.Configuration.RelayedOnewayTransportElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
</bindingElementExtensions>
|
||||
<bindingExtensions>
|
||||
<add name="basicHttpRelayBinding" type="Microsoft.ServiceBus.Configuration.BasicHttpRelayBindingCollectionElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add name="webHttpRelayBinding" type="Microsoft.ServiceBus.Configuration.WebHttpRelayBindingCollectionElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add name="ws2007HttpRelayBinding" type="Microsoft.ServiceBus.Configuration.WS2007HttpRelayBindingCollectionElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add name="netTcpRelayBinding" type="Microsoft.ServiceBus.Configuration.NetTcpRelayBindingCollectionElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add name="netOnewayRelayBinding" type="Microsoft.ServiceBus.Configuration.NetOnewayRelayBindingCollectionElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add name="netEventRelayBinding" type="Microsoft.ServiceBus.Configuration.NetEventRelayBindingCollectionElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add name="netMessagingBinding" type="Microsoft.ServiceBus.Messaging.Configuration.NetMessagingBindingCollectionElement, Microsoft.ServiceBus, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
</bindingExtensions>
|
||||
</extensions>
|
||||
</system.serviceModel>
|
||||
<appSettings>
|
||||
<!-- Service Bus specific app setings for messaging connections -->
|
||||
<add key="Microsoft.ServiceBus.ConnectionString" value="Endpoint=sb://[your namespace].servicebus.windows.net;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=[your secret]" />
|
||||
</appSettings>
|
||||
</configuration>
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.2" targetFramework="net452" />
|
||||
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="3.13.5" targetFramework="net452" />
|
||||
<package id="Microsoft.TeamFoundation.DistributedTask.Common.Contracts" version="15.121.0-preview" targetFramework="net452" />
|
||||
<package id="Microsoft.TeamFoundationServer.Client" version="15.121.0-preview" targetFramework="net452" />
|
||||
<package id="Microsoft.VisualStudio.Services.Client" version="15.121.0-preview" targetFramework="net452" />
|
||||
<package id="Microsoft.VisualStudio.Services.InteractiveClient" version="15.121.0-preview" targetFramework="net452" />
|
||||
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net452" />
|
||||
<package id="System.IdentityModel.Tokens.Jwt" version="4.0.2.206221351" targetFramework="net452" />
|
||||
<package id="WindowsAzure.ServiceBus" version="3.3.2" targetFramework="net452" />
|
||||
</packages>
|
|
@ -0,0 +1,34 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.26430.16
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClientSamples", "ClientSamples\ClientSamples.csproj", "{545851E1-9BD9-4939-8AF4-9A8910CF5C34}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClientSampleUtils", "ClientSampleUtils\ClientSampleUtils.csproj", "{8F5EBE82-72C7-44DA-B334-2091AED734BF}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{6FEB3108-E18A-4189-8399-4CECDA84A1F9}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
contribute.md = contribute.md
|
||||
README.md = README.md
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{545851E1-9BD9-4939-8AF4-9A8910CF5C34}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{545851E1-9BD9-4939-8AF4-9A8910CF5C34}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{545851E1-9BD9-4939-8AF4-9A8910CF5C34}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{545851E1-9BD9-4939-8AF4-9A8910CF5C34}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8F5EBE82-72C7-44DA-B334-2091AED734BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8F5EBE82-72C7-44DA-B334-2091AED734BF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8F5EBE82-72C7-44DA-B334-2091AED734BF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8F5EBE82-72C7-44DA-B334-2091AED734BF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -1,204 +1,187 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{545851E1-9BD9-4939-8AF4-9A8910CF5C34}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Microsoft.TeamServices.Samples.Client</RootNamespace>
|
||||
<AssemblyName>Microsoft.TeamServices.Samples.Client</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory, Version=3.13.9.1126, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.3.13.9\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory.Platform, Version=3.13.9.1126, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.3.13.9\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.IdentityModel.Logging, Version=1.1.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.IdentityModel.Logging.1.1.3\lib\net451\Microsoft.IdentityModel.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.IdentityModel.Tokens, Version=5.1.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.IdentityModel.Tokens.5.1.3\lib\net451\Microsoft.IdentityModel.Tokens.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ServiceBus, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\WindowsAzure.ServiceBus.4.1.1\lib\net45\Microsoft.ServiceBus.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.TeamFoundation.Build2.WebApi, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.TeamFoundationServer.Client.15.121.0-preview\lib\net45\Microsoft.TeamFoundation.Build2.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.TeamFoundation.Chat.WebApi, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.TeamFoundationServer.Client.15.121.0-preview\lib\net45\Microsoft.TeamFoundation.Chat.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.TeamFoundation.Common, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.VisualStudio.Services.Client.15.121.0-preview\lib\net45\Microsoft.TeamFoundation.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.TeamFoundation.Core.WebApi, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.TeamFoundationServer.Client.15.121.0-preview\lib\net45\Microsoft.TeamFoundation.Core.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.TeamFoundation.Dashboards.WebApi, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.TeamFoundationServer.Client.15.121.0-preview\lib\net45\Microsoft.TeamFoundation.Dashboards.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.TeamFoundation.DistributedTask.Common.Contracts, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.TeamFoundation.DistributedTask.Common.Contracts.15.121.0-preview\lib\net45\Microsoft.TeamFoundation.DistributedTask.Common.Contracts.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.TeamFoundation.Policy.WebApi, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.TeamFoundationServer.Client.15.121.0-preview\lib\net45\Microsoft.TeamFoundation.Policy.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.TeamFoundation.SourceControl.WebApi, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.TeamFoundationServer.Client.15.121.0-preview\lib\net45\Microsoft.TeamFoundation.SourceControl.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.TeamFoundation.Test.WebApi, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.TeamFoundationServer.Client.15.121.0-preview\lib\net45\Microsoft.TeamFoundation.Test.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.TeamFoundation.TestManagement.WebApi, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.TeamFoundationServer.Client.15.121.0-preview\lib\net45\Microsoft.TeamFoundation.TestManagement.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.TeamFoundation.Work.WebApi, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.TeamFoundationServer.Client.15.121.0-preview\lib\net45\Microsoft.TeamFoundation.Work.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.TeamFoundation.WorkItemTracking.WebApi, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.TeamFoundationServer.Client.15.121.0-preview\lib\net45\Microsoft.TeamFoundation.WorkItemTracking.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualStudio.Services.Client.Interactive, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.VisualStudio.Services.InteractiveClient.15.121.0-preview\lib\net45\Microsoft.VisualStudio.Services.Client.Interactive.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualStudio.Services.Common, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.VisualStudio.Services.Client.15.121.0-preview\lib\net45\Microsoft.VisualStudio.Services.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualStudio.Services.Notifications.WebApi, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.VisualStudio.Services.Notifications.WebApi.15.121.0-preview\lib\net45\Microsoft.VisualStudio.Services.Notifications.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualStudio.Services.ReleaseManagement.WebApi, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.VisualStudio.Services.Release.Client.15.121.0-preview\lib\net45\Microsoft.VisualStudio.Services.ReleaseManagement.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualStudio.Services.WebApi, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.VisualStudio.Services.Client.15.121.0-preview\lib\net45\Microsoft.VisualStudio.Services.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.Composition" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.IdentityModel.Tokens.Jwt, Version=5.1.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.IdentityModel.Tokens.Jwt.5.1.3\lib\net451\System.IdentityModel.Tokens.Jwt.dll</HintPath>
|
||||
</Reference>
|
||||
<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>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.Threading.Tasks.Dataflow, Version=4.5.24.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Tpl.Dataflow.4.5.24\lib\portable-net45+win8+wpa81\System.Threading.Tasks.Dataflow.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
<Reference Include="System.Web.Http, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.2.2\lib\net45\System.Web.Http.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Auth\*.cs" />
|
||||
<Compile Include="Build\BuildsSample.cs" />
|
||||
<Compile Include="ClientSample.cs" />
|
||||
<Compile Include="ClientSampleContext.cs" />
|
||||
<Compile Include="ClientSampleHelpers.cs" />
|
||||
<Compile Include="ClientSampleHttpLogger.cs" />
|
||||
<Compile Include="ClientSampleUtils.cs" />
|
||||
<Compile Include="Graph\DescriptorsSample.cs" />
|
||||
<Compile Include="Graph\MembershipStatesSample.cs" />
|
||||
<Compile Include="Graph\StorageKeySample.cs" />
|
||||
<Compile Include="Graph\SubjectLookupSample.cs" />
|
||||
<Compile Include="ProjectsAndTeams\ProcessesSample.cs" />
|
||||
<Compile Include="ProjectsAndTeams\ProjectCollectionsSample.cs" />
|
||||
<Compile Include="ProjectsAndTeams\ProjectsSample.cs" />
|
||||
<Compile Include="ProjectsAndTeams\TeamsSample.cs" />
|
||||
<Compile Include="Git\*.cs" />
|
||||
<Compile Include="Graph\GroupsSample.cs" />
|
||||
<Compile Include="Graph\UsersSample.cs" />
|
||||
<Compile Include="Notification\*.cs" />
|
||||
<Compile Include="Release\ReleasesSample.cs" />
|
||||
<Compile Include="Security\AccessControlListsSample.cs" />
|
||||
<Compile Include="Security\TokenHelpers.cs" />
|
||||
<Compile Include="Security\SecurityNamespacesSample.cs" />
|
||||
<Compile Include="Tfvc\ChangesetChangesSample.cs" />
|
||||
<Compile Include="Tfvc\BranchesSample.cs" />
|
||||
<Compile Include="Tfvc\ChangesetsSample.cs" />
|
||||
<Compile Include="WorkItemTracking\AttachmentsSample.cs" />
|
||||
<Compile Include="WorkItemTracking\BatchSample.cs" />
|
||||
<Compile Include="WorkItemTracking\ClassificationNodesSample.cs" />
|
||||
<Compile Include="WorkItemTracking\CommentsSample.cs" />
|
||||
<Compile Include="WorkItemTracking\TagsSample.cs" />
|
||||
<Compile Include="WorkItemTracking\RevisionsSample.cs" />
|
||||
<Compile Include="WorkItemTracking\UpdatesSample.cs" />
|
||||
<Compile Include="WorkItemTracking\WorkItemTypeCategoriesSample.cs" />
|
||||
<Compile Include="WorkItemTracking\FieldsSample.cs" />
|
||||
<Compile Include="WorkItemTracking\QueriesSample.cs" />
|
||||
<Compile Include="WorkItemTracking\RecycleBinSample.cs" />
|
||||
<Compile Include="WorkItemTracking\ReportingSample.cs" />
|
||||
<Compile Include="WorkItemTracking\WorkItemsSample.cs" />
|
||||
<Compile Include="Work\*.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<Compile Include="Graph\MembershipSample.cs" />
|
||||
<None Include="packages.config">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="WorkItemTracking\SampleFile.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="WorkItemTracking\SampleFile.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Git\WordList.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{545851E1-9BD9-4939-8AF4-9A8910CF5C34}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Microsoft.VisualStudio.Services.WebApi.Samples.Client</RootNamespace>
|
||||
<AssemblyName>Microsoft.VisualStudio.Services.WebApi.Samples.Client</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory, Version=3.13.9.1126, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.3.13.9\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory.Platform, Version=3.13.9.1126, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.3.13.9\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.IdentityModel.Logging, Version=1.1.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.IdentityModel.Logging.1.1.3\lib\net451\Microsoft.IdentityModel.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.IdentityModel.Tokens, Version=5.1.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.IdentityModel.Tokens.5.1.3\lib\net451\Microsoft.IdentityModel.Tokens.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ServiceBus, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\WindowsAzure.ServiceBus.4.1.1\lib\net45\Microsoft.ServiceBus.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.TeamFoundation.Build2.WebApi, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.TeamFoundationServer.Client.15.121.0-preview\lib\net45\Microsoft.TeamFoundation.Build2.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.TeamFoundation.Chat.WebApi, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.TeamFoundationServer.Client.15.121.0-preview\lib\net45\Microsoft.TeamFoundation.Chat.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.TeamFoundation.Common, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.VisualStudio.Services.Client.15.121.0-preview\lib\net45\Microsoft.TeamFoundation.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.TeamFoundation.Core.WebApi, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.TeamFoundationServer.Client.15.121.0-preview\lib\net45\Microsoft.TeamFoundation.Core.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.TeamFoundation.Dashboards.WebApi, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.TeamFoundationServer.Client.15.121.0-preview\lib\net45\Microsoft.TeamFoundation.Dashboards.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.TeamFoundation.DistributedTask.Common.Contracts, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.TeamFoundation.DistributedTask.Common.Contracts.15.121.0-preview\lib\net45\Microsoft.TeamFoundation.DistributedTask.Common.Contracts.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.TeamFoundation.Policy.WebApi, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.TeamFoundationServer.Client.15.121.0-preview\lib\net45\Microsoft.TeamFoundation.Policy.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.TeamFoundation.SourceControl.WebApi, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.TeamFoundationServer.Client.15.121.0-preview\lib\net45\Microsoft.TeamFoundation.SourceControl.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.TeamFoundation.Test.WebApi, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.TeamFoundationServer.Client.15.121.0-preview\lib\net45\Microsoft.TeamFoundation.Test.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.TeamFoundation.TestManagement.WebApi, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.TeamFoundationServer.Client.15.121.0-preview\lib\net45\Microsoft.TeamFoundation.TestManagement.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.TeamFoundation.Work.WebApi, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.TeamFoundationServer.Client.15.121.0-preview\lib\net45\Microsoft.TeamFoundation.Work.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.TeamFoundation.WorkItemTracking.WebApi, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.TeamFoundationServer.Client.15.121.0-preview\lib\net45\Microsoft.TeamFoundation.WorkItemTracking.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualStudio.Services.Client.Interactive, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.VisualStudio.Services.InteractiveClient.15.121.0-preview\lib\net45\Microsoft.VisualStudio.Services.Client.Interactive.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualStudio.Services.Common, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.VisualStudio.Services.Client.15.121.0-preview\lib\net45\Microsoft.VisualStudio.Services.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualStudio.Services.Notifications.WebApi, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.VisualStudio.Services.Notifications.WebApi.15.121.0-preview\lib\net45\Microsoft.VisualStudio.Services.Notifications.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualStudio.Services.ReleaseManagement.WebApi, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.VisualStudio.Services.Release.Client.15.121.0-preview\lib\net45\Microsoft.VisualStudio.Services.ReleaseManagement.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualStudio.Services.WebApi, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.VisualStudio.Services.Client.15.121.0-preview\lib\net45\Microsoft.VisualStudio.Services.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.Composition" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.IdentityModel.Tokens.Jwt, Version=5.1.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.IdentityModel.Tokens.Jwt.5.1.3\lib\net451\System.IdentityModel.Tokens.Jwt.dll</HintPath>
|
||||
</Reference>
|
||||
<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>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.Threading.Tasks.Dataflow, Version=4.5.24.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Tpl.Dataflow.4.5.24\lib\portable-net45+win8+wpa81\System.Threading.Tasks.Dataflow.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
<Reference Include="System.Web.Http, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.2.2\lib\net45\System.Web.Http.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Build\BuildsSample.cs" />
|
||||
<Compile Include="Git\*.cs" />
|
||||
<Compile Include="Graph\*.cs" />
|
||||
<Compile Include="Notification\*.cs" />
|
||||
<Compile Include="ProjectsAndTeams\*.cs" />
|
||||
<Compile Include="Release\*.cs" />
|
||||
<Compile Include="Security\*.cs" />
|
||||
<Compile Include="Tfvc\*.cs" />
|
||||
<Compile Include="WorkItemTracking\AttachmentsSample.cs" />
|
||||
<Compile Include="WorkItemTracking\Batch.cs" />
|
||||
<Compile Include="WorkItemTracking\BatchSample.cs" />
|
||||
<Compile Include="WorkItemTracking\ClassificationNodesSample.cs" />
|
||||
<Compile Include="WorkItemTracking\CommentsSample.cs" />
|
||||
<Compile Include="WorkItemTracking\FieldsSample.cs" />
|
||||
<Compile Include="WorkItemTracking\QueriesSample.cs" />
|
||||
<Compile Include="WorkItemTracking\RecycleBinSample.cs" />
|
||||
<Compile Include="WorkItemTracking\ReportingSample.cs" />
|
||||
<Compile Include="WorkItemTracking\RevisionsSample.cs" />
|
||||
<Compile Include="WorkItemTracking\Sample.cs" />
|
||||
<Compile Include="WorkItemTracking\TagsSample.cs" />
|
||||
<Compile Include="WorkItemTracking\UpdatesSample.cs" />
|
||||
<Compile Include="WorkItemTracking\WorkItemsSample.cs" />
|
||||
<Compile Include="WorkItemTracking\WorkItemTypeCategoriesSample.cs" />
|
||||
<Compile Include="Work\*.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="WorkItemTracking\SampleFile.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="WorkItemTracking\SampleFile.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Git\WordList.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ClientSampleUtils\ClientSampleUtils.csproj">
|
||||
<Project>{8f5ebe82-72c7-44da-b334-2091aed734bf}</Project>
|
||||
<Name>ClientSampleUtils</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- 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">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
-->
|
||||
</Project>
|
|
@ -1,10 +1,10 @@
|
|||
using Microsoft.VisualStudio.Services.Security;
|
||||
using Microsoft.VisualStudio.Services.Security.Client;
|
||||
using Microsoft.VisualStudio.Services.Security;
|
||||
using Microsoft.VisualStudio.Services.Security.Client;
|
||||
using Microsoft.VisualStudio.Services.WebApi;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
|
||||
namespace Microsoft.TeamServices.Samples.Client.Security
|
||||
{
|
||||
[ClientSample(LocationResourceIds.SecurityServiceArea, "securitynamespaces")]
|
||||
|
@ -16,15 +16,15 @@ namespace Microsoft.TeamServices.Samples.Client.Security
|
|||
VssConnection connection = this.Context.Connection;
|
||||
SecurityHttpClient securityClient = connection.GetClient<SecurityHttpClient>();
|
||||
|
||||
IEnumerable<SecurityNamespaceDescription> namespaces = securityClient.QuerySecurityNamespacesAsync(Guid.Empty).Result;
|
||||
|
||||
Console.WriteLine("Listing all security namespaces");
|
||||
IEnumerable<SecurityNamespaceDescription> namespaces = securityClient.QuerySecurityNamespacesAsync(Guid.Empty).Result;
|
||||
|
||||
Console.WriteLine("Listing all security namespaces");
|
||||
foreach (SecurityNamespaceDescription ns in namespaces)
|
||||
{
|
||||
Console.WriteLine("{0} ({1}) - {2} permissions", ns.DisplayName ?? ns.Name, ns.NamespaceId, ns.Actions.Count());
|
||||
}
|
||||
|
||||
return namespaces;
|
||||
return namespaces;
|
||||
}
|
||||
|
||||
[ClientSampleMethod]
|
||||
|
@ -33,15 +33,15 @@ namespace Microsoft.TeamServices.Samples.Client.Security
|
|||
VssConnection connection = this.Context.Connection;
|
||||
SecurityHttpClient securityClient = connection.GetClient<SecurityHttpClient>();
|
||||
|
||||
IEnumerable<SecurityNamespaceDescription> namespaces = securityClient.QuerySecurityNamespacesAsync(Guid.Empty, localOnly: true).Result;
|
||||
|
||||
Console.WriteLine("Listing local security namespaces");
|
||||
IEnumerable<SecurityNamespaceDescription> namespaces = securityClient.QuerySecurityNamespacesAsync(Guid.Empty, localOnly: true).Result;
|
||||
|
||||
Console.WriteLine("Listing local security namespaces");
|
||||
foreach (SecurityNamespaceDescription ns in namespaces)
|
||||
{
|
||||
Console.WriteLine("{0} ({1}) - {2} permissions", ns.DisplayName ?? ns.Name, ns.NamespaceId, ns.Actions.Count());
|
||||
}
|
||||
|
||||
return namespaces;
|
||||
return namespaces;
|
||||
}
|
||||
|
||||
[ClientSampleMethod]
|
||||
|
@ -54,20 +54,20 @@ namespace Microsoft.TeamServices.Samples.Client.Security
|
|||
SecurityNamespaceDescription gitNamespace = namespaces.First();
|
||||
|
||||
Console.WriteLine("{0}", gitNamespace.DisplayName);
|
||||
foreach (ActionDefinition actionDef in gitNamespace.Actions)
|
||||
{
|
||||
string knownBit = "";
|
||||
|
||||
if (actionDef.Bit == gitNamespace.ReadPermission)
|
||||
{
|
||||
knownBit += " [Read]";
|
||||
}
|
||||
if (actionDef.Bit == gitNamespace.WritePermission)
|
||||
{
|
||||
knownBit += " [Write]";
|
||||
}
|
||||
|
||||
Console.WriteLine("\"{0}\" ({1}){2}", actionDef.DisplayName ?? actionDef.Name, actionDef.Bit, knownBit);
|
||||
foreach (ActionDefinition actionDef in gitNamespace.Actions)
|
||||
{
|
||||
string knownBit = "";
|
||||
|
||||
if (actionDef.Bit == gitNamespace.ReadPermission)
|
||||
{
|
||||
knownBit += " [Read]";
|
||||
}
|
||||
if (actionDef.Bit == gitNamespace.WritePermission)
|
||||
{
|
||||
knownBit += " [Write]";
|
||||
}
|
||||
|
||||
Console.WriteLine("\"{0}\" ({1}){2}", actionDef.DisplayName ?? actionDef.Name, actionDef.Bit, knownBit);
|
||||
}
|
||||
|
||||
return gitNamespace;
|
|
@ -17,16 +17,16 @@ namespace Microsoft.TeamServices.Samples.Client.Tfvc
|
|||
VssConnection connection = this.Context.Connection;
|
||||
TfvcHttpClient tfvcClient = connection.GetClient<TfvcHttpClient>();
|
||||
|
||||
IEnumerable<TfvcBranch> branches = tfvcClient.GetBranchesAsync(includeParent: true, includeChildren: true).Result;
|
||||
|
||||
IEnumerable<TfvcBranch> branches = tfvcClient.GetBranchesAsync(includeParent: true, includeChildren: true).Result;
|
||||
|
||||
foreach (TfvcBranch branch in branches)
|
||||
{
|
||||
Console.WriteLine("{0} ({2}): {1}", branch.Path, branch.Description ?? "<no description>", branch.Owner.DisplayName);
|
||||
}
|
||||
|
||||
if (branches.Count() == 0)
|
||||
{
|
||||
Console.WriteLine("No branches found.");
|
||||
if (branches.Count() == 0)
|
||||
{
|
||||
Console.WriteLine("No branches found.");
|
||||
}
|
||||
|
||||
return branches;
|
|
@ -18,13 +18,13 @@ namespace Microsoft.TeamServices.Samples.Client.Tfvc
|
|||
TfvcHttpClient tfvcClient = connection.GetClient<TfvcHttpClient>();
|
||||
|
||||
TfvcChangesetRef latestChangeset;
|
||||
using (new ClientSampleHttpLoggerOutputSuppression())
|
||||
{
|
||||
latestChangeset = tfvcClient.GetChangesetsAsync(top: 1).Result.First();
|
||||
using (new ClientSampleHttpLoggerOutputSuppression())
|
||||
{
|
||||
latestChangeset = tfvcClient.GetChangesetsAsync(top: 1).Result.First();
|
||||
}
|
||||
|
||||
IEnumerable<TfvcChange> changes = tfvcClient.GetChangesetChangesAsync(id: latestChangeset.ChangesetId).Result;
|
||||
|
||||
IEnumerable<TfvcChange> changes = tfvcClient.GetChangesetChangesAsync(id: latestChangeset.ChangesetId).Result;
|
||||
|
||||
foreach (TfvcChange change in changes)
|
||||
{
|
||||
Console.WriteLine("{0}: {1}", change.ChangeType, change.Item.Path);
|
До Ширина: | Высота: | Размер: 14 KiB После Ширина: | Высота: | Размер: 14 KiB |
|
@ -53,5 +53,18 @@
|
|||
<appSettings>
|
||||
<!-- Service Bus specific app setings for messaging connections -->
|
||||
<add key="Microsoft.ServiceBus.ConnectionString" value="Endpoint=sb://[your namespace].servicebus.windows.net;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=[your secret]" />
|
||||
<add key="ClientSettingsProvider.ServiceUri" value="" />
|
||||
</appSettings>
|
||||
<system.web>
|
||||
<membership defaultProvider="ClientAuthenticationMembershipProvider">
|
||||
<providers>
|
||||
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
|
||||
</providers>
|
||||
</membership>
|
||||
<roleManager defaultProvider="ClientRoleProvider" enabled="true">
|
||||
<providers>
|
||||
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
|
||||
</providers>
|
||||
</roleManager>
|
||||
</system.web>
|
||||
</configuration>
|
|
@ -1,30 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
|
||||
</startup>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.IdentityModel.Clients.ActiveDirectory" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.13.9.1126" newVersion="3.13.9.1126" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.IdentityModel.Tokens.Jwt" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.1.3.0" newVersion="5.1.3.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.IdentityModel.Clients.ActiveDirectory.Platform" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.13.9.1126" newVersion="3.13.9.1126" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
|
@ -1,36 +0,0 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("ClientSamples.Runner")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("ClientSamples.Runner")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2017")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("0cda3ab5-3c7a-43d2-875c-66ed734cf864")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// 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")]
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net452" />
|
||||
<package id="Microsoft.TeamFoundation.DistributedTask.Common.Contracts" version="15.121.0-preview" targetFramework="net452" />
|
||||
<package id="Microsoft.TeamFoundationServer.Client" version="15.121.0-preview" targetFramework="net452" />
|
||||
<package id="Microsoft.VisualStudio.Services.Client" version="15.121.0-preview" targetFramework="net452" />
|
||||
<package id="Newtonsoft.Json" version="10.0.2" targetFramework="net452" />
|
||||
</packages>
|
|
@ -1,127 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\MSTest.TestAdapter.1.1.18\build\net45\MSTest.TestAdapter.props" Condition="Exists('..\packages\MSTest.TestAdapter.1.1.18\build\net45\MSTest.TestAdapter.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{AAA30379-02BF-447C-829C-225E2D2B1069}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Microsoft.TeamServices.Samples.Client.Test</RootNamespace>
|
||||
<AssemblyName>Microsoft.TeamServices.Samples.Client.Test</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">15.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
|
||||
<IsCodedUITest>False</IsCodedUITest>
|
||||
<TestProjectType>UnitTest</TestProjectType>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.TeamFoundation.Build2.WebApi, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.TeamFoundationServer.Client.15.121.0-preview\lib\net45\Microsoft.TeamFoundation.Build2.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.TeamFoundation.Chat.WebApi, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.TeamFoundationServer.Client.15.121.0-preview\lib\net45\Microsoft.TeamFoundation.Chat.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.TeamFoundation.Common, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.VisualStudio.Services.Client.15.121.0-preview\lib\net45\Microsoft.TeamFoundation.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.TeamFoundation.Core.WebApi, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.TeamFoundationServer.Client.15.121.0-preview\lib\net45\Microsoft.TeamFoundation.Core.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.TeamFoundation.Dashboards.WebApi, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.TeamFoundationServer.Client.15.121.0-preview\lib\net45\Microsoft.TeamFoundation.Dashboards.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.TeamFoundation.DistributedTask.Common.Contracts, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.TeamFoundation.DistributedTask.Common.Contracts.15.121.0-preview\lib\net45\Microsoft.TeamFoundation.DistributedTask.Common.Contracts.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.TeamFoundation.Policy.WebApi, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.TeamFoundationServer.Client.15.121.0-preview\lib\net45\Microsoft.TeamFoundation.Policy.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.TeamFoundation.SourceControl.WebApi, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.TeamFoundationServer.Client.15.121.0-preview\lib\net45\Microsoft.TeamFoundation.SourceControl.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.TeamFoundation.Test.WebApi, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.TeamFoundationServer.Client.15.121.0-preview\lib\net45\Microsoft.TeamFoundation.Test.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.TeamFoundation.TestManagement.WebApi, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.TeamFoundationServer.Client.15.121.0-preview\lib\net45\Microsoft.TeamFoundation.TestManagement.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.TeamFoundation.Work.WebApi, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.TeamFoundationServer.Client.15.121.0-preview\lib\net45\Microsoft.TeamFoundation.Work.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.TeamFoundation.WorkItemTracking.WebApi, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.TeamFoundationServer.Client.15.121.0-preview\lib\net45\Microsoft.TeamFoundation.WorkItemTracking.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualStudio.Services.Common, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.VisualStudio.Services.Client.15.121.0-preview\lib\net45\Microsoft.VisualStudio.Services.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualStudio.Services.Notifications.WebApi, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.VisualStudio.Services.Notifications.WebApi.15.121.0-preview\lib\net45\Microsoft.VisualStudio.Services.Notifications.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualStudio.Services.WebApi, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.VisualStudio.Services.Client.15.121.0-preview\lib\net45\Microsoft.VisualStudio.Services.WebApi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MSTest.TestFramework.1.1.18\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MSTest.TestFramework.1.1.18\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<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>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Notification\SubscriptionsTest.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="TestBase.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Microsoft.TeamServices.Samples.Client\Microsoft.TeamServices.Samples.Client.csproj">
|
||||
<Project>{545851e1-9bd9-4939-8af4-9a8910cf5c34}</Project>
|
||||
<Name>Microsoft.TeamServices.Samples.Client</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<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\MSTest.TestAdapter.1.1.18\build\net45\MSTest.TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.1.1.18\build\net45\MSTest.TestAdapter.props'))" />
|
||||
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.1.1.18\build\net45\MSTest.TestAdapter.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.1.1.18\build\net45\MSTest.TestAdapter.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\MSTest.TestAdapter.1.1.18\build\net45\MSTest.TestAdapter.targets" Condition="Exists('..\packages\MSTest.TestAdapter.1.1.18\build\net45\MSTest.TestAdapter.targets')" />
|
||||
</Project>
|
|
@ -1,27 +0,0 @@
|
|||
using System;
|
||||
using System.Text;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Microsoft.VisualStudio.Services.Notifications.WebApi;
|
||||
using Microsoft.TeamServices.Samples.Client.Notification;
|
||||
|
||||
namespace Microsoft.TeamServices.Samples.Client.Tests.Integration.Notification
|
||||
{
|
||||
[TestClass]
|
||||
public class SubscriptionTests : TestBase<SubscriptionsSample>
|
||||
{
|
||||
public SubscriptionTests()
|
||||
{
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void Test_QueryCreateUpdateDeleteSubscription()
|
||||
{
|
||||
NotificationSubscription sub = ClientSample.CreateUpdateDeleteSubscription();
|
||||
|
||||
Assert.AreEqual("Someone is waiting on one of my pull requests", sub.Description);
|
||||
Assert.AreEqual(SubscriptionStatus.PendingDeletion, sub.Status);
|
||||
Assert.AreEqual(GetCurrentUserId(), Guid.Parse(sub.Subscriber.Id));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
[assembly: AssemblyTitle("ClientSamples.Tests.Integration")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("ClientSamples.Tests.Integration")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2017")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
[assembly: Guid("aaa30379-02bf-447c-829c-225e2d2b1069")]
|
||||
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -1,65 +0,0 @@
|
|||
using Microsoft.VisualStudio.Services.Common;
|
||||
using Microsoft.VisualStudio.Services.Profile.Client;
|
||||
using Microsoft.VisualStudio.Services.WebApi;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Microsoft.TeamServices.Samples.Client.Tests.Integration
|
||||
{
|
||||
public class TestBase<T> where T : ClientSample, new()
|
||||
{
|
||||
private TestContext testContextInstance;
|
||||
|
||||
/// <summary>
|
||||
///Gets or sets the test context which provides
|
||||
///information about and functionality for the current test run.
|
||||
///</summary>
|
||||
public TestContext TestContext
|
||||
{
|
||||
get
|
||||
{
|
||||
return testContextInstance;
|
||||
}
|
||||
set
|
||||
{
|
||||
testContextInstance = value;
|
||||
}
|
||||
}
|
||||
|
||||
internal T ClientSample { get; private set; }
|
||||
|
||||
internal VssConnection Connection
|
||||
{
|
||||
get
|
||||
{
|
||||
return ClientSample.Context.Connection;
|
||||
}
|
||||
private set
|
||||
{
|
||||
Connection = value;
|
||||
}
|
||||
}
|
||||
|
||||
[TestInitialize]
|
||||
public void Initialize()
|
||||
{
|
||||
string connectionUrl = TestContext.Properties["connectionUrl"] as string;
|
||||
string userName = TestContext.Properties["password"] as string;
|
||||
string password = TestContext.Properties["password"] as string;
|
||||
|
||||
ClientSampleContext context = new ClientSampleContext(new Uri(connectionUrl), new VssBasicCredential(userName, password));
|
||||
|
||||
ClientSample = new T();
|
||||
ClientSample.Context = context;
|
||||
}
|
||||
|
||||
protected Guid GetCurrentUserId()
|
||||
{
|
||||
return Connection.AuthorizedIdentity.Id;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
<?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-10.0.0.0" newVersion="10.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.IdentityModel.Clients.ActiveDirectory" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.13.9.1126" newVersion="3.13.9.1126" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.IdentityModel.Tokens.Jwt" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.1.3.0" newVersion="5.1.3.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.IdentityModel.Clients.ActiveDirectory.Platform" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.13.9.1126" newVersion="3.13.9.1126" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
|
@ -1,11 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net452" />
|
||||
<package id="Microsoft.TeamFoundation.DistributedTask.Common.Contracts" version="15.121.0-preview" targetFramework="net452" />
|
||||
<package id="Microsoft.TeamFoundationServer.Client" version="15.121.0-preview" targetFramework="net452" />
|
||||
<package id="Microsoft.VisualStudio.Services.Client" version="15.121.0-preview" targetFramework="net452" />
|
||||
<package id="Microsoft.VisualStudio.Services.Notifications.WebApi" version="15.121.0-preview" targetFramework="net452" />
|
||||
<package id="MSTest.TestAdapter" version="1.1.18" targetFramework="net452" />
|
||||
<package id="MSTest.TestFramework" version="1.1.18" targetFramework="net452" />
|
||||
<package id="Newtonsoft.Json" version="10.0.2" targetFramework="net452" />
|
||||
</packages>
|
|
@ -1,41 +0,0 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.26223.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.TeamServices.Samples.Client", "Microsoft.TeamServices.Samples.Client\Microsoft.TeamServices.Samples.Client.csproj", "{545851E1-9BD9-4939-8AF4-9A8910CF5C34}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.TeamServices.Samples.Client.Test", "Microsoft.TeamServices.Samples.Client.Test\Microsoft.TeamServices.Samples.Client.Test.csproj", "{AAA30379-02BF-447C-829C-225E2D2B1069}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.TeamServices.Samples.Client.Runner", "Microsoft.TeamServices.Samples.Client.Runner\Microsoft.TeamServices.Samples.Client.Runner.csproj", "{0CDA3AB5-3C7A-43D2-875C-66ED734CF864}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{6FEB3108-E18A-4189-8399-4CECDA84A1F9}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
contribute.md = contribute.md
|
||||
license.md = license.md
|
||||
README.md = README.md
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{545851E1-9BD9-4939-8AF4-9A8910CF5C34}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{545851E1-9BD9-4939-8AF4-9A8910CF5C34}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{545851E1-9BD9-4939-8AF4-9A8910CF5C34}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{545851E1-9BD9-4939-8AF4-9A8910CF5C34}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{AAA30379-02BF-447C-829C-225E2D2B1069}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{AAA30379-02BF-447C-829C-225E2D2B1069}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AAA30379-02BF-447C-829C-225E2D2B1069}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AAA30379-02BF-447C-829C-225E2D2B1069}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{0CDA3AB5-3C7A-43D2-875C-66ED734CF864}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0CDA3AB5-3C7A-43D2-875C-66ED734CF864}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0CDA3AB5-3C7A-43D2-875C-66ED734CF864}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0CDA3AB5-3C7A-43D2-875C-66ED734CF864}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -1,116 +0,0 @@
|
|||
using Microsoft.IdentityModel.Clients.ActiveDirectory;
|
||||
using Microsoft.TeamFoundation.Core.WebApi;
|
||||
using Microsoft.VisualStudio.Services.Common;
|
||||
using Microsoft.VisualStudio.Services.OAuth;
|
||||
using Microsoft.VisualStudio.Services.WebApi;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using AadAuthenticationContext = Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext;
|
||||
|
||||
namespace Microsoft.TeamServices.Samples.Client.Auth
|
||||
{
|
||||
public class InteractiveAuthSample
|
||||
{
|
||||
// This is the hard coded Resource ID for Visual Studio Team Services, do not change this value
|
||||
internal const string VSTSResourceId = "499b84ac-1321-427f-aa17-267ca6975798";
|
||||
|
||||
// This is the hard coded Resource ID for Graph, do not change this value
|
||||
internal const string GraphResourceId = "https://graph.windows.net";
|
||||
|
||||
// Redirect URI default value for native/mobile apps
|
||||
// https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-protocols-oauth-code
|
||||
internal const string RedirectUri = "urn:ietf:wg:oauth:2.0:oob";
|
||||
|
||||
public InteractiveAuthSample()
|
||||
{
|
||||
}
|
||||
|
||||
public IEnumerable<TeamProjectReference> InteractiveADAL(string vstsAccountName, string applicationId)
|
||||
{
|
||||
AuthenticationContext authenticationContext = new AadAuthenticationContext("https://login.windows.net/common", validateAuthority: true);
|
||||
var authenticationResultTask = authenticationContext.AcquireTokenAsync(VSTSResourceId, applicationId, new Uri(RedirectUri), new PlatformParameters(PromptBehavior.Auto));
|
||||
AuthenticationResult authenticationResult = authenticationResultTask.Result;
|
||||
|
||||
VssOAuthAccessTokenCredential oAuthCredential = new VssOAuthAccessTokenCredential(authenticationResult.AccessToken);
|
||||
|
||||
return ListProjectsViaClientLibrary(vstsAccountName, oAuthCredential);
|
||||
}
|
||||
|
||||
public IEnumerable<TeamProjectReference> InteractiveADALExchangeGraphTokenForVSTSToken(string vstsAccountName, string applicationId)
|
||||
{
|
||||
AuthenticationContext authenticationContext = new AadAuthenticationContext("https://login.windows.net/common", validateAuthority: true);
|
||||
var authenticationResultTask = authenticationContext.AcquireTokenAsync(GraphResourceId, applicationId, new Uri(RedirectUri), new PlatformParameters(PromptBehavior.Auto));
|
||||
AuthenticationResult authenticationResult = authenticationResultTask.Result;
|
||||
|
||||
authenticationResultTask = authenticationContext.AcquireTokenSilentAsync(VSTSResourceId, applicationId);
|
||||
authenticationResult = authenticationResultTask.Result;
|
||||
|
||||
VssOAuthAccessTokenCredential oAuthCredential = new VssOAuthAccessTokenCredential(authenticationResult.AccessToken);
|
||||
|
||||
return ListProjectsViaClientLibrary(vstsAccountName, oAuthCredential);
|
||||
}
|
||||
|
||||
public IEnumerable<TeamProjectReference> NonInteractivePersonalAccessToken(string vstsAccountName, string personalAccessToken)
|
||||
{
|
||||
VssBasicCredential credentials = new VssBasicCredential("", personalAccessToken);
|
||||
|
||||
return ListProjectsViaClientLibrary(vstsAccountName, credentials);
|
||||
}
|
||||
|
||||
public IEnumerable<TeamProjectReference> DeviceCodeADAL(string vstsAccountName, string applicationId)
|
||||
{
|
||||
Guid tenant = GetAccountTenant(vstsAccountName);
|
||||
AuthenticationContext authenticationContext = new AadAuthenticationContext("https://login.windows.net/" + tenant, validateAuthority: true);
|
||||
DeviceCodeResult codeResult = authenticationContext.AcquireDeviceCodeAsync(VSTSResourceId, applicationId).Result;
|
||||
Console.WriteLine("You need to sign in.");
|
||||
Console.WriteLine("Message: " + codeResult.Message + "\n");
|
||||
AuthenticationResult authenticationResult = authenticationContext.AcquireTokenByDeviceCodeAsync(codeResult).Result;
|
||||
|
||||
VssOAuthAccessTokenCredential oAuthCredential = new VssOAuthAccessTokenCredential(authenticationResult.AccessToken);
|
||||
|
||||
return ListProjectsViaClientLibrary(vstsAccountName, oAuthCredential);
|
||||
}
|
||||
|
||||
internal IEnumerable<TeamProjectReference> ListProjectsViaClientLibrary(string vstsAccountName, VssCredentials credentials)
|
||||
{
|
||||
// Create instance of VssConnection using passed credentials
|
||||
VssConnection connection = new VssConnection(new Uri(String.Format("https://{0}.visualstudio.com", vstsAccountName)), credentials);
|
||||
ProjectHttpClient projectHttpClient = connection.GetClient<ProjectHttpClient>();
|
||||
|
||||
IEnumerable<TeamProjectReference> projects = projectHttpClient.GetProjects().Result;
|
||||
|
||||
return projects;
|
||||
}
|
||||
|
||||
// MSA backed accounts will return Guid.Empty
|
||||
private static Guid GetAccountTenant(string vstsAccountName)
|
||||
{
|
||||
Guid tenantGuid = Guid.Empty;
|
||||
using (var client = new HttpClient())
|
||||
{
|
||||
client.BaseAddress = new Uri(String.Format("https://{0}.visualstudio.com", vstsAccountName));
|
||||
client.DefaultRequestHeaders.Accept.Clear();
|
||||
client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json"));
|
||||
client.DefaultRequestHeaders.Add("User-Agent", "VSTSAuthSample-AuthenticateADALNonInteractive");
|
||||
client.DefaultRequestHeaders.Add("X-TFS-FedAuthRedirect", "Suppress");
|
||||
HttpResponseMessage response = client.GetAsync("_apis/connectiondata").Result;
|
||||
|
||||
// Get the tenant from the Login URL
|
||||
var wwwAuthenticateHeaderResults = response.Headers.WwwAuthenticate.ToList();
|
||||
var bearerResult = wwwAuthenticateHeaderResults.Where(p => p.Scheme == "Bearer");
|
||||
foreach (var item in wwwAuthenticateHeaderResults)
|
||||
{
|
||||
if (item.Scheme.StartsWith("Bearer"))
|
||||
{
|
||||
tenantGuid = Guid.Parse(item.Parameter.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries)[2]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return tenantGuid;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,518 +0,0 @@
|
|||
using Microsoft.TeamFoundation.WorkItemTracking.WebApi;
|
||||
using Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models;
|
||||
using Microsoft.VisualStudio.Services.Common;
|
||||
using Microsoft.VisualStudio.Services.WebApi;
|
||||
using Microsoft.VisualStudio.Services.WebApi.Patch;
|
||||
using Microsoft.VisualStudio.Services.WebApi.Patch.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace VstsClientLibrariesSamples.WorkItemTracking
|
||||
{
|
||||
public class Sample
|
||||
{
|
||||
readonly IConfiguration _configuration;
|
||||
private VssBasicCredential _credentials;
|
||||
private Uri _uri;
|
||||
|
||||
public Sample(IConfiguration configuration)
|
||||
{
|
||||
_configuration = configuration;
|
||||
_credentials = new VssBasicCredential("", _configuration.PersonalAccessToken);
|
||||
_uri = new Uri(_configuration.UriString);
|
||||
}
|
||||
|
||||
public string CreateBug()
|
||||
{
|
||||
string project = _configuration.Project;
|
||||
|
||||
JsonPatchDocument patchDocument = new JsonPatchDocument();
|
||||
|
||||
// add fields to your patch document
|
||||
patchDocument.Add(
|
||||
new JsonPatchOperation()
|
||||
{
|
||||
Operation = Operation.Add,
|
||||
Path = "/fields/System.Title",
|
||||
Value = "Authorization Errors"
|
||||
}
|
||||
);
|
||||
|
||||
patchDocument.Add(
|
||||
new JsonPatchOperation()
|
||||
{
|
||||
Operation = Operation.Add,
|
||||
Path = "/fields/Microsoft.VSTS.TCM.ReproSteps",
|
||||
Value = "Our authorization logic needs to allow for users with Microsoft accounts (formerly Live Ids) - http:// msdn.microsoft.com/en-us/library/live/hh826547.aspx"
|
||||
}
|
||||
);
|
||||
|
||||
patchDocument.Add(
|
||||
new JsonPatchOperation()
|
||||
{
|
||||
Operation = Operation.Add,
|
||||
Path = "/fields/Microsoft.VSTS.Common.Priority",
|
||||
Value = "1"
|
||||
}
|
||||
);
|
||||
|
||||
patchDocument.Add(
|
||||
new JsonPatchOperation()
|
||||
{
|
||||
Operation = Operation.Add,
|
||||
Path = "/fields/Microsoft.VSTS.Common.Severity",
|
||||
Value = "2 - High"
|
||||
}
|
||||
);
|
||||
|
||||
VssConnection connection = new VssConnection(_uri, _credentials);
|
||||
WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient<WorkItemTrackingHttpClient>();
|
||||
|
||||
// create the bug
|
||||
WorkItem result = workItemTrackingHttpClient.CreateWorkItemAsync(patchDocument, project, "Bug").Result;
|
||||
|
||||
patchDocument = null;
|
||||
|
||||
return "success";
|
||||
}
|
||||
|
||||
public string UpdateBug()
|
||||
{
|
||||
var _id = _configuration.WorkItemId;
|
||||
|
||||
JsonPatchDocument patchDocument = new JsonPatchDocument();
|
||||
|
||||
patchDocument.Add(
|
||||
new JsonPatchOperation()
|
||||
{
|
||||
Operation = Operation.Add,
|
||||
Path = "/fields/System.History",
|
||||
Value = "Tracking that we changed the priority and severity of this bug to high"
|
||||
}
|
||||
);
|
||||
|
||||
patchDocument.Add(
|
||||
new JsonPatchOperation()
|
||||
{
|
||||
Operation = Operation.Add,
|
||||
Path = "/fields/Microsoft.VSTS.Common.Priority",
|
||||
Value = "1"
|
||||
}
|
||||
);
|
||||
|
||||
patchDocument.Add(
|
||||
new JsonPatchOperation()
|
||||
{
|
||||
Operation = Operation.Add,
|
||||
Path = "/fields/Microsoft.VSTS.Common.Severity",
|
||||
Value = "1 - Critical"
|
||||
}
|
||||
);
|
||||
|
||||
VssConnection connection = new VssConnection(_uri, _credentials);
|
||||
WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient<WorkItemTrackingHttpClient>();
|
||||
WorkItem result = workItemTrackingHttpClient.UpdateWorkItemAsync(patchDocument, _id).Result;
|
||||
|
||||
patchDocument = null;
|
||||
|
||||
return "success";
|
||||
}
|
||||
|
||||
public string CreateBugByPassingRules()
|
||||
{
|
||||
string project = _configuration.Project;
|
||||
|
||||
JsonPatchDocument patchDocument = new JsonPatchDocument();
|
||||
|
||||
// add fields to your patch document
|
||||
patchDocument.Add(
|
||||
new JsonPatchOperation()
|
||||
{
|
||||
Operation = Operation.Add,
|
||||
Path = "/fields/System.Title",
|
||||
Value = "Imported bug from my other system (client lib)"
|
||||
}
|
||||
);
|
||||
|
||||
patchDocument.Add(
|
||||
new JsonPatchOperation()
|
||||
{
|
||||
Operation = Operation.Add,
|
||||
Path = "/fields/Microsoft.VSTS.TCM.ReproSteps",
|
||||
Value = "Our authorization logic needs to allow for users with Microsoft accounts (formerly Live Ids) - http:// msdn.microsoft.com/en-us/library/live/hh826547.aspx"
|
||||
}
|
||||
);
|
||||
|
||||
patchDocument.Add(
|
||||
new JsonPatchOperation()
|
||||
{
|
||||
Operation = Operation.Add,
|
||||
Path = "/fields/System.CreatedBy",
|
||||
Value = "Some User"
|
||||
}
|
||||
);
|
||||
|
||||
patchDocument.Add(
|
||||
new JsonPatchOperation()
|
||||
{
|
||||
Operation = Operation.Add,
|
||||
Path = "/fields/System.ChangedBy",
|
||||
Value = "Some User"
|
||||
}
|
||||
);
|
||||
|
||||
patchDocument.Add(
|
||||
new JsonPatchOperation()
|
||||
{
|
||||
Operation = Operation.Add,
|
||||
Path = "/fields/System.CreatedDate",
|
||||
Value = "4/15/2016"
|
||||
}
|
||||
);
|
||||
|
||||
patchDocument.Add(
|
||||
new JsonPatchOperation()
|
||||
{
|
||||
Operation = Operation.Add,
|
||||
Path = "/fields/System.History",
|
||||
Value = "Data imported from source"
|
||||
}
|
||||
);
|
||||
|
||||
VssConnection connection = new VssConnection(_uri, _credentials);
|
||||
WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient<WorkItemTrackingHttpClient>();
|
||||
|
||||
// create the bug
|
||||
WorkItem result = workItemTrackingHttpClient.CreateWorkItemAsync(patchDocument, project, "Bug", null, true).Result;
|
||||
|
||||
patchDocument = null;
|
||||
|
||||
return "success";
|
||||
}
|
||||
|
||||
public string AddCommentsToBug()
|
||||
{
|
||||
var _id = _configuration.WorkItemId;
|
||||
|
||||
JsonPatchDocument patchDocument = new JsonPatchDocument();
|
||||
|
||||
patchDocument.Add(
|
||||
new JsonPatchOperation()
|
||||
{
|
||||
Operation = Operation.Add,
|
||||
Path = "/fields/System.History",
|
||||
Value = "Adding 'hello world' comment to this bug"
|
||||
}
|
||||
);
|
||||
|
||||
VssConnection connection = new VssConnection(_uri, _credentials);
|
||||
WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient<WorkItemTrackingHttpClient>();
|
||||
WorkItem result = workItemTrackingHttpClient.UpdateWorkItemAsync(patchDocument, _id).Result;
|
||||
|
||||
patchDocument = null;
|
||||
|
||||
return "success";
|
||||
}
|
||||
|
||||
public string AddLinkToBug()
|
||||
{
|
||||
var _id = _configuration.WorkItemId;
|
||||
var _linkToId = _configuration.WorkItemIds.Split(',')[0];
|
||||
|
||||
JsonPatchDocument patchDocument = new JsonPatchDocument();
|
||||
|
||||
patchDocument.Add(new JsonPatchOperation()
|
||||
{
|
||||
Operation = Operation.Add,
|
||||
Path = "/relations/-",
|
||||
Value = new
|
||||
{
|
||||
rel = "System.LinkTypes.Dependency-forward",
|
||||
url = _configuration.UriString + "/_apis/wit/workItems/" + _linkToId.ToString(),
|
||||
attributes = new { comment = "Making a new link for the dependency" }
|
||||
}
|
||||
});
|
||||
|
||||
VssConnection connection = new VssConnection(_uri, _credentials);
|
||||
WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient<WorkItemTrackingHttpClient>();
|
||||
|
||||
try
|
||||
{
|
||||
WorkItem result = workItemTrackingHttpClient.UpdateWorkItemAsync(patchDocument, _id).Result;
|
||||
return "success";
|
||||
}
|
||||
catch (Microsoft.VisualStudio.Services.Common.VssServiceException ex)
|
||||
{
|
||||
return ex.Message;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return ex.InnerException.Message;
|
||||
}
|
||||
}
|
||||
|
||||
public string AddHyperLinkToBug()
|
||||
{
|
||||
var _id = _configuration.WorkItemId;
|
||||
|
||||
JsonPatchDocument patchDocument = new JsonPatchDocument();
|
||||
|
||||
patchDocument.Add(new JsonPatchOperation()
|
||||
{
|
||||
Operation = Operation.Add,
|
||||
Path = "/relations/-",
|
||||
Value = new
|
||||
{
|
||||
rel = "Hyperlink",
|
||||
url = "http://www.visualstudio.com/team-services",
|
||||
attributes = new { comment = "Visual Studio Team Services" }
|
||||
}
|
||||
});
|
||||
|
||||
VssConnection connection = new VssConnection(_uri, _credentials);
|
||||
WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient<WorkItemTrackingHttpClient>();
|
||||
|
||||
try
|
||||
{
|
||||
WorkItem result = workItemTrackingHttpClient.UpdateWorkItemAsync(patchDocument, _id).Result;
|
||||
return "success";
|
||||
}
|
||||
catch (Microsoft.VisualStudio.Services.Common.VssServiceException ex)
|
||||
{
|
||||
return ex.Message;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return ex.InnerException.Message;
|
||||
}
|
||||
}
|
||||
|
||||
public string AddAttachmentToBug()
|
||||
{
|
||||
var _id = _configuration.WorkItemId;
|
||||
var _filePath = _configuration.FilePath;
|
||||
|
||||
VssConnection connection = new VssConnection(_uri, _credentials);
|
||||
WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient<WorkItemTrackingHttpClient>();
|
||||
|
||||
// upload attachment to attachment store and
|
||||
// get a reference to that file
|
||||
AttachmentReference attachmentReference = workItemTrackingHttpClient.CreateAttachmentAsync(_filePath).Result;
|
||||
|
||||
JsonPatchDocument patchDocument = new JsonPatchDocument();
|
||||
|
||||
patchDocument.Add(new JsonPatchOperation()
|
||||
{
|
||||
Operation = Operation.Add,
|
||||
Path = "/relations/-",
|
||||
Value = new
|
||||
{
|
||||
rel = "AttachedFile",
|
||||
url = attachmentReference.Url,
|
||||
attributes = new { comment = "adding attachement to work item" }
|
||||
}
|
||||
});
|
||||
|
||||
WorkItem result = workItemTrackingHttpClient.UpdateWorkItemAsync(patchDocument, _id).Result;
|
||||
|
||||
return "success";
|
||||
}
|
||||
|
||||
public string QueryWorkItems_Query()
|
||||
{
|
||||
string project = _configuration.Project;
|
||||
string query = _configuration.Query;
|
||||
|
||||
VssConnection connection = new VssConnection(_uri, _credentials);
|
||||
WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient<WorkItemTrackingHttpClient>();
|
||||
|
||||
QueryHierarchyItem queryItem;
|
||||
|
||||
try
|
||||
{
|
||||
// get the query object based on the query name and project
|
||||
queryItem = workItemTrackingHttpClient.GetQueryAsync(project, query).Result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return ex.InnerException.Message;
|
||||
}
|
||||
|
||||
// now we have the query id, so lets execute the query and get the results
|
||||
WorkItemQueryResult workItemQueryResult = workItemTrackingHttpClient.QueryByIdAsync(queryItem.Id).Result;
|
||||
|
||||
// some error handling
|
||||
if (workItemQueryResult == null)
|
||||
{
|
||||
return "failure";
|
||||
}
|
||||
else if (workItemQueryResult.WorkItems.Count() == 0)
|
||||
{
|
||||
return "no records found for query '" + query + "'";
|
||||
}
|
||||
else
|
||||
{
|
||||
// need to get the list of our work item id's and put them into an array
|
||||
List<int> list = new List<int>();
|
||||
foreach (var item in workItemQueryResult.WorkItems)
|
||||
{
|
||||
list.Add(item.Id);
|
||||
}
|
||||
int[] arr = list.ToArray();
|
||||
|
||||
// build a list of the fields we want to see
|
||||
string[] fields = new string[3];
|
||||
fields[0] = "System.Id";
|
||||
fields[1] = "System.Title";
|
||||
fields[2] = "System.State";
|
||||
|
||||
var workItems = workItemTrackingHttpClient.GetWorkItemsAsync(arr, fields, workItemQueryResult.AsOf).Result;
|
||||
|
||||
return "success";
|
||||
}
|
||||
}
|
||||
|
||||
public string QueryWorkItems_Wiql()
|
||||
{
|
||||
string project = _configuration.Project;
|
||||
|
||||
// create a query to get your list of work items needed
|
||||
Wiql wiql = new Wiql()
|
||||
{
|
||||
Query = "Select [State], [Title] " +
|
||||
"From WorkItems " +
|
||||
"Where [Work Item Type] = 'Bug' " +
|
||||
"And [System.TeamProject] = '" + project + "' " +
|
||||
"And [System.State] = 'New' " +
|
||||
"Order By [State] Asc, [Changed Date] Desc"
|
||||
};
|
||||
|
||||
VssConnection connection = new VssConnection(_uri, _credentials);
|
||||
WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient<WorkItemTrackingHttpClient>();
|
||||
|
||||
// execute the query
|
||||
WorkItemQueryResult workItemQueryResult = workItemTrackingHttpClient.QueryByWiqlAsync(wiql).Result;
|
||||
|
||||
// check to make sure we have some results
|
||||
if (workItemQueryResult == null || workItemQueryResult.WorkItems.Count() == 0)
|
||||
{
|
||||
return "Wiql '" + wiql.Query + "' did not find any results";
|
||||
}
|
||||
else
|
||||
{
|
||||
// need to get the list of our work item id's and put them into an array
|
||||
List<int> list = new List<int>();
|
||||
foreach (var item in workItemQueryResult.WorkItems)
|
||||
{
|
||||
list.Add(item.Id);
|
||||
}
|
||||
int[] arr = list.ToArray();
|
||||
|
||||
// build a list of the fields we want to see
|
||||
string[] fields = new string[3];
|
||||
fields[0] = "System.Id";
|
||||
fields[1] = "System.Title";
|
||||
fields[2] = "System.State";
|
||||
|
||||
var workItems = workItemTrackingHttpClient.GetWorkItemsAsync(arr, fields, workItemQueryResult.AsOf).Result;
|
||||
return "success";
|
||||
}
|
||||
}
|
||||
|
||||
public string QueryAndUpdateWorkItems()
|
||||
{
|
||||
string project = _configuration.Project;
|
||||
|
||||
// create a query to get your list of work items needed
|
||||
Wiql wiql = new Wiql()
|
||||
{
|
||||
Query = "Select [State], [Title] " +
|
||||
"From WorkItems " +
|
||||
"Where [Work Item Type] = 'Bug' " +
|
||||
"And [System.TeamProject] = '" + project + "' " +
|
||||
"And [System.State] = 'New' " +
|
||||
"Order By [State] Asc, [Changed Date] Desc"
|
||||
};
|
||||
|
||||
|
||||
// create a patchDocument that is used to update the work items
|
||||
JsonPatchDocument patchDocument = new JsonPatchDocument();
|
||||
|
||||
// change the backlog priority
|
||||
patchDocument.Add(
|
||||
new JsonPatchOperation()
|
||||
{
|
||||
Operation = Operation.Add,
|
||||
Path = "/fields/Microsoft.VSTS.Common.BacklogPriority",
|
||||
Value = "2",
|
||||
From = _configuration.Identity
|
||||
}
|
||||
);
|
||||
|
||||
// move the state to active
|
||||
patchDocument.Add(
|
||||
new JsonPatchOperation()
|
||||
{
|
||||
Operation = Operation.Add,
|
||||
Path = "/fields/System.State",
|
||||
Value = "Active",
|
||||
From = _configuration.Identity
|
||||
}
|
||||
);
|
||||
|
||||
// add some comments
|
||||
patchDocument.Add(
|
||||
new JsonPatchOperation()
|
||||
{
|
||||
Operation = Operation.Add,
|
||||
Path = "/fields/System.History",
|
||||
Value = "comment from client lib sample code",
|
||||
From = _configuration.Identity
|
||||
}
|
||||
);
|
||||
|
||||
VssConnection connection = new VssConnection(_uri, _credentials);
|
||||
WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient<WorkItemTrackingHttpClient>();
|
||||
|
||||
// execute the query
|
||||
WorkItemQueryResult workItemQueryResult = workItemTrackingHttpClient.QueryByWiqlAsync(wiql).Result;
|
||||
|
||||
// check to make sure we have some results
|
||||
if (workItemQueryResult == null || workItemQueryResult.WorkItems.Count() == 0)
|
||||
{
|
||||
throw new NullReferenceException("Wiql '" + wiql.Query + "' did not find any results");
|
||||
}
|
||||
|
||||
// loop thru the work item results and update each work item
|
||||
foreach (WorkItemReference workItemReference in workItemQueryResult.WorkItems)
|
||||
{
|
||||
WorkItem result = workItemTrackingHttpClient.UpdateWorkItemAsync(patchDocument, workItemReference.Id).Result;
|
||||
}
|
||||
|
||||
wiql = null;
|
||||
patchDocument = null;
|
||||
|
||||
return "success";
|
||||
}
|
||||
|
||||
public string GetListOfWorkItemFields(string fieldName)
|
||||
{
|
||||
VssConnection connection = new VssConnection(_uri, _credentials);
|
||||
WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient<WorkItemTrackingHttpClient>();
|
||||
|
||||
List<WorkItemField> result = workItemTrackingHttpClient.GetFieldsAsync(null).Result;
|
||||
|
||||
var item = result.Find(x => x.Name == fieldName);
|
||||
|
||||
if (item == null)
|
||||
{
|
||||
return "field not found";
|
||||
}
|
||||
else
|
||||
{
|
||||
return item.ReferenceName;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче