Skip to content

Instantly share code, notes, and snippets.

public class EWayOffsitePaymentSettings : IPaymentSettings
{
public string PaymentType
{
get { return "Sale"; }
set { }
}
public string[] ProcessorCreditCards
{
using Microsoft.TeamFoundation.Build.Client;
using Microsoft.TeamFoundation.Client;
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
TFS.module("Clickable",[],function(){ });
$(function() { $(".logo").replaceWith("<a class='header-item logo header-logo-onpremise' href='/tfs/'>"); });
<WebAccess version="11.0">
<plugin moreinfo="http://bzbetty.blogspot.co.nz/2012/11/very-simple-tfs-2012-web-access-plugin.html" name="Make Logo Clickable" vendor="Betty" version="0.0.0.3">
<modules>
<module loadAfter="TFS.Core" namespace="Clickable"></module>
</modules>
</plugin>
</WebAccess>
Add-Type -AssemblyName 'Microsoft.TeamFoundation.Client, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
Add-Type -AssemblyName 'Microsoft.TeamFoundation.Build.Client, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
$tfs = New-Object -TypeName Microsoft.TeamFoundation.Client.TfsTeamProjectCollection -ArgumentList $TfsServer
try {
$deployServiceType = [Microsoft.TeamFoundation.Build.Client.DeploymentService]
$deployService = $tfs.GetService($deployServiceType)
$deployService.CreateBuildDeployment($Uri, $Uri, $Quality)
}
Exception calling "CreateBuildDeployment" with "3" argument(s): "TF246021: An
error occurred while processing your request.
Technical information (for administrator):
SQL Server Error: 2601"
At E:\projects\BuildProcessTemplates\Deployment\Update-TfsBuildDetails.ps1:24
char:1
+ $deployService.CreateBuildDeployment($Uri, $Uri, $Quality)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : BuildServerException
Microsoft.TeamFoundation.Client.TeamFoundationServer teamFoundationServer = new Microsoft.TeamFoundation.Client.TeamFoundationServer("http://UrlToTFS");
FilteredIdentityService service = teamFoundationServer.GetService&lt;FilteredIdentityService&gt;(); ;
IIdentityManagementService2 service2 = teamFoundationServer.GetService&lt;IIdentityManagementService2&gt;();
foreach (var identity in service.SearchForUsers(""))
{
var user = UserPrincipal.FindByIdentity(new PrincipalContext(ContextType.Domain), identity.UniqueName);
if (user == null) continue;
var de = new System.DirectoryServices.DirectoryEntry("LDAP://" + user.DistinguishedName);
<WebAccess>
<plugin name="helloworld" vendor="betty" version="0.1" moreinfo="http://bzbetty.blogspot.com">
</WebAccess>
var _builtinPlugins = [{"namespace":"TFS.Diag.TracePoints","loadAfter":"TFS.Diag"},{"namespace":"TFS.TestManagement.Controls","loadAfter":"TFS.WorkItemTracking.Controls"},{"namespace":"TFS.TestManagement.Setup","loadAfter":"TFS.OM"},{"namespace":"TFS.VersionControl.Setup","loadAfter":"TFS.OM"},{"namespace":"TFS.Requirements.Setup","loadAfter":"TFS.OM"}];
public class MetadataProvider : DataAnnotationsModelMetadataProvider
{
private IConfigurationProvider _mapper;
public MetadataProvider(IConfigurationProvider mapper)
{
_mapper = mapper;
}
protected override System.Web.Mvc.ModelMetadata CreateMetadata(IEnumerable<Attribute> attributes, Type containerType, Func<object> modelAccessor, Type modelType, string propertyName)
{
//Grab attributes from the entity columns and copy them to the view model