Files
dotnet-bot adf899c629 Adding System.Data..., System.ServiceModel..., and System.Web...
Adding reference source for
System.Data
System.Data.DataSetExtensions
System.Data.Entity
System.Data.Entity.Design
System.Data.Linq
System.Data.SqlXml
System.ServiceModel
System.ServiceModel.Activation
System.ServiceModel.Activities
System.ServiceModel.Channels
System.ServiceModel.Discovery
System.ServiceModel.Internals
System.ServiceModel.Routing
System.ServiceModel.WasHosting
System.ServiceModel.Web
System.Web
System.Web.ApplicationServices
System.Web.DynamicData
System.Web.Entity
System.Web.Entity.Design
System.Web.Extensions
System.Web.Mobile
System.Web.Routing
System.Web.Services
System.Xml
System.Xml.Linq
2016-05-03 00:07:37 +02:00

53 lines
1.9 KiB
C#

//----------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//----------------------------------------------------------------
namespace System.ServiceModel.Discovery.VersionCD1
{
using System.Runtime;
using System.Collections.ObjectModel;
sealed class ProbeRequestResponseCD1AsyncResult : ProbeRequestResponseAsyncResult<ProbeMessageCD1, ProbeMatchesMessageCD1>
{
internal ProbeRequestResponseCD1AsyncResult(ProbeMessageCD1 probeMessage,
IDiscoveryServiceImplementation discoveryServiceImpl,
AsyncCallback callback,
object state)
: base(probeMessage, discoveryServiceImpl, callback, state)
{
}
public static ProbeMatchesMessageCD1 End(IAsyncResult result)
{
ProbeRequestResponseCD1AsyncResult thisPtr = AsyncResult.End<ProbeRequestResponseCD1AsyncResult>(result);
return thisPtr.End();
}
protected override bool ValidateContent(ProbeMessageCD1 probeMessage)
{
if ((probeMessage == null) || (probeMessage.Probe == null))
{
if (TD.DiscoveryMessageWithNoContentIsEnabled())
{
TD.DiscoveryMessageWithNoContent(null, ProtocolStrings.TracingStrings.Probe);
}
return false;
}
return true;
}
protected override FindCriteria GetFindCriteria(ProbeMessageCD1 probeMessage)
{
return probeMessage.Probe.ToFindCriteria();
}
protected override ProbeMatchesMessageCD1 GetProbeResponse(
DiscoveryMessageSequence discoveryMessageSequence,
Collection<EndpointDiscoveryMetadata> matchingEndpoints)
{
return ProbeMatchesMessageCD1.Create(discoveryMessageSequence, matchingEndpoints);
}
}
}