Instead of using the proxy generation features of Visual Studio you can create a custom proxy in .NET 3.0 to handle all of your needs in a more maintainable manor and with less code. This method works best when you have access to the interfaces that created the service.
Here is an example:
Namespace TeamFoundation.Proxies Public Class TeamServersClient Inherits System.ServiceModel.DuplexClientBase(Of Services.Contracts.ITeamServers) Implements RDdotNet.Proxies.IClientProxy Implements Services.Contracts.ITeamServers Public Sub New(ByVal callbackInstance As System.ServiceModel.InstanceContext, ByVal binding As System.ServiceModel.Channels.Binding, ByVal remoteAddress As System.ServiceModel.EndpointAddress) MyBase.New(callbackInstance, binding, remoteAddress) End Sub Public Sub AddServer(ByVal TeamServerName As String, ByVal TeamServerUri As String) Implements Services.Contracts.ITeamServers.AddServer MyBase.Channel.AddServer(TeamServerName, TeamServerUri) End Sub Public Function GetServers() As String() Implements Services.Contracts.ITeamServers.GetServers Return MyBase.Channel.GetServers End Function Public Sub RemoveServer(ByVal TeamServerName As String) Implements Services.Contracts.ITeamServers.RemoveServer MyBase.Channel.RemoveServer(TeamServerName) End Sub Public Function ServceUrl() As System.Uri Implements Services.Contracts.ITeamServers.ServceUrl Return MyBase.Channel.ServceUrl() End Function End Class End Namespace
Because your classes implements the service’s interface when that interface changes you will be notified in Visual Studio that this has happened. This is a boon during development as changes can happen often.
This particular class is a duplex proxy, so communication can go both ways. You can download the source code for this from here .
Smart Classifications
Each classification [Concepts, Categories, & Tags] was assigned using AI-powered semantic analysis and scored across relevance, depth, and alignment. Final decisions? Still human. Always traceable. Hover to see how it applies.
What to read next
Custom WCF Proxy
Explains how to create custom WCF proxies in .NET to avoid redundant class generation and object conversion when consuming Windows …
Creating WCF Service Host Programmatically
Explains how to programmatically create and configure a WCF Service Host in .NET, including base addresses, endpoints, bindings, and service …
Creating a managed service factory
Explains how to build a managed service factory to access and manage local or remote services across multiple servers, supporting flexible …
Team Foundation Server 2010 Event Handling with Subscribers
Explains how to create and deploy server-side event subscribers in Team Foundation Server 2010 using the ISubscriber interface to handle and …
Detecting agile theatre with real delivery signals
Why Most Companies Operating Models Fail in Dynamic Markets
A concise comparison of Predictive and Adaptive Operating Models, explaining why traditional structures fail in dynamic markets and how …
Don’t Manage Dependencies, Remove Them
Explains why dependencies are a sign of poor system design and outlines steps to eliminate them by aligning teams, clarifying ownership, and …
The Estimation Trap: How Tracking Accuracy Undermines Trust, Flow, and Value in Software Delivery
Tracking estimation accuracy in software delivery leads to mistrust, fear, and distorted behaviours. Focus on customer value, flow, and …
Flow of Value vs Flow of Work – Misnomer or Useful Shorthand?
Compares “flow of value” and “flow of work” in Kanban, explaining why only validated outcomes count as value and stressing the need for …
Why Outsourcing DevOps Fails, and How Real Engineering Excellence Starts With Your Team
Avoid DevOps vendor lock-in, discover how true engineering excellence starts with partnership, not outsourcing. Ready to transform your …