Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Services / Web / System / Web / Services / Description / HttpGetProtocolReflector.cs / 1305376 / HttpGetProtocolReflector.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.Services.Description {
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Serialization;
using System.Xml.Schema;
using System.Collections;
using System;
using System.Reflection;
internal class HttpGetProtocolReflector : HttpProtocolReflector {
public override string ProtocolName {
get { return "HttpGet"; }
}
protected override void BeginClass() {
if (IsEmptyBinding)
return;
HttpBinding httpBinding = new HttpBinding();
httpBinding.Verb = "GET";
Binding.Extensions.Add(httpBinding);
HttpAddressBinding httpAddressBinding = new HttpAddressBinding();
httpAddressBinding.Location = ServiceUrl;
Port.Extensions.Add(httpAddressBinding);
}
protected override bool ReflectMethod() {
if (!ReflectUrlParameters()) return false;
if (!ReflectMimeReturn()) return false;
HttpOperationBinding httpOperationBinding = new HttpOperationBinding();
httpOperationBinding.Location = MethodUrl;
OperationBinding.Extensions.Add(httpOperationBinding);
return true;
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.Services.Description {
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Serialization;
using System.Xml.Schema;
using System.Collections;
using System;
using System.Reflection;
internal class HttpGetProtocolReflector : HttpProtocolReflector {
public override string ProtocolName {
get { return "HttpGet"; }
}
protected override void BeginClass() {
if (IsEmptyBinding)
return;
HttpBinding httpBinding = new HttpBinding();
httpBinding.Verb = "GET";
Binding.Extensions.Add(httpBinding);
HttpAddressBinding httpAddressBinding = new HttpAddressBinding();
httpAddressBinding.Location = ServiceUrl;
Port.Extensions.Add(httpAddressBinding);
}
protected override bool ReflectMethod() {
if (!ReflectUrlParameters()) return false;
if (!ReflectMimeReturn()) return false;
HttpOperationBinding httpOperationBinding = new HttpOperationBinding();
httpOperationBinding.Location = MethodUrl;
OperationBinding.Extensions.Add(httpOperationBinding);
return true;
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- RegionData.cs
- Content.cs
- AnnotationResourceChangedEventArgs.cs
- HtmlLabelAdapter.cs
- XmlProcessingInstruction.cs
- HighContrastHelper.cs
- SafeHandles.cs
- WebBrowserEvent.cs
- Calendar.cs
- XmlSchemaElement.cs
- ListItemCollection.cs
- MatrixConverter.cs
- SocketElement.cs
- ADMembershipProvider.cs
- FolderNameEditor.cs
- IItemProperties.cs
- PackageRelationshipCollection.cs
- ProjectionPlanCompiler.cs
- unsafeIndexingFilterStream.cs
- ConfigsHelper.cs
- SystemIPGlobalProperties.cs
- ControlBindingsCollection.cs
- GenericTextProperties.cs
- ImageMetadata.cs
- StorageConditionPropertyMapping.cs
- DataGridTemplateColumn.cs
- TreeNodeBinding.cs
- WeakReadOnlyCollection.cs
- Pen.cs
- WmlMobileTextWriter.cs
- DBSqlParserColumnCollection.cs
- PrintDialog.cs
- MediaContext.cs
- KeyInstance.cs
- SmtpCommands.cs
- StretchValidation.cs
- ITextView.cs
- WebPartZoneBase.cs
- RunWorkerCompletedEventArgs.cs
- SplitterPanel.cs
- WebPartConnectionsCloseVerb.cs
- ListViewEditEventArgs.cs
- DynamicExpression.cs
- EntityClassGenerator.cs
- EncryptedXml.cs
- DatePickerTextBox.cs
- WebPartEditVerb.cs
- SafeHandles.cs
- DefaultValidator.cs
- MediaElement.cs
- _NegotiateClient.cs
- Style.cs
- DefaultClaimSet.cs
- ImageDrawing.cs
- RuntimeCompatibilityAttribute.cs
- serverconfig.cs
- RequestValidator.cs
- FontFaceLayoutInfo.cs
- CloseCollectionAsyncResult.cs
- KeyedPriorityQueue.cs
- ExpressionBuilderCollection.cs
- AttachedPropertiesService.cs
- DataObjectEventArgs.cs
- MimeObjectFactory.cs
- MexHttpBindingElement.cs
- BrowserDefinition.cs
- ParallelDesigner.cs
- SimpleHandlerBuildProvider.cs
- XsltFunctions.cs
- XhtmlBasicCalendarAdapter.cs
- DataGridViewColumnDividerDoubleClickEventArgs.cs
- BitmapScalingModeValidation.cs
- Mutex.cs
- XmlSerializerVersionAttribute.cs
- WebExceptionStatus.cs
- GenerateTemporaryTargetAssembly.cs
- SpotLight.cs
- MsmqDiagnostics.cs
- _OverlappedAsyncResult.cs
- ParallelTimeline.cs
- UserControl.cs
- ObjectDataSourceWizardForm.cs
- TraceSection.cs
- Facet.cs
- ScriptReferenceBase.cs
- SelectionRangeConverter.cs
- ComponentEditorPage.cs
- Zone.cs
- UnsafeNativeMethods.cs
- RelationshipEndMember.cs
- WebPartConnectionsCloseVerb.cs
- Win32.cs
- ProcessModelSection.cs
- RawStylusActions.cs
- WebBaseEventKeyComparer.cs
- MailDefinition.cs
- RIPEMD160.cs
- BinaryOperationBinder.cs
- ErrorTableItemStyle.cs
- OdbcErrorCollection.cs