Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Channels / HttpResponseMessageProperty.cs / 1 / HttpResponseMessageProperty.cs
//----------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//---------------------------------------------------------------------------
namespace System.ServiceModel.Channels
{
using System;
using System.Net;
public sealed class HttpResponseMessageProperty
{
WebHeaderCollection headers;
WebHeaderCollection originalHeaders;
HttpStatusCode statusCode;
string statusDescription;
bool suppressEntityBody;
internal HttpResponseMessageProperty(WebHeaderCollection originalHeaders)
: this()
{
this.originalHeaders = originalHeaders;
}
public HttpResponseMessageProperty()
{
this.statusCode = HttpStatusCode.OK;
this.statusDescription = null; // null means use description from status code
this.suppressEntityBody = false;
}
public static string Name
{
get { return "httpResponse"; }
}
public WebHeaderCollection Headers
{
get
{
if (this.headers == null)
{
this.headers = new WebHeaderCollection();
if (this.originalHeaders != null)
{
this.headers.Add(originalHeaders);
this.originalHeaders = null;
}
}
return this.headers;
}
}
public HttpStatusCode StatusCode
{
get
{
return this.statusCode;
}
set
{
int valueInt = (int)value;
if (valueInt < 100 || valueInt > 599)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("value", value,
SR.GetString(SR.ValueMustBeInRange, 100, 599)));
}
this.statusCode = value;
}
}
public string StatusDescription
{
get
{
return this.statusDescription;
}
set
{
this.statusDescription = value;
}
}
public bool SuppressEntityBody
{
get
{
return this.suppressEntityBody;
}
set
{
this.suppressEntityBody = value;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TypedServiceChannelBuilder.cs
- GeneralTransformGroup.cs
- ObjectQueryState.cs
- DoubleCollectionValueSerializer.cs
- CompositionTarget.cs
- XamlFigureLengthSerializer.cs
- TargetPerspective.cs
- StrokeNode.cs
- ConsoleKeyInfo.cs
- TextSchema.cs
- XmlTextReaderImpl.cs
- PageTrueTypeFont.cs
- ResXBuildProvider.cs
- ByteStream.cs
- DefaultBindingPropertyAttribute.cs
- ConfigXmlAttribute.cs
- TransformPatternIdentifiers.cs
- ThreadPool.cs
- PointAnimationBase.cs
- ServerIdentity.cs
- WCFServiceClientProxyGenerator.cs
- DiscoveryClientProtocol.cs
- ObjectConverter.cs
- BindingMAnagerBase.cs
- DefaultParameterValueAttribute.cs
- EnumConverter.cs
- FilteredXmlReader.cs
- RuntimeConfig.cs
- SchemaComplexType.cs
- ToolStripPanelRow.cs
- QuaternionRotation3D.cs
- DocumentOrderQuery.cs
- TimeSpanValidatorAttribute.cs
- TriggerCollection.cs
- DatatypeImplementation.cs
- FieldAccessException.cs
- DefaultAsyncDataDispatcher.cs
- SecurityTokenParametersEnumerable.cs
- ItemTypeToolStripMenuItem.cs
- transactioncontext.cs
- SubMenuStyleCollection.cs
- BamlResourceSerializer.cs
- PersonalizationStateInfoCollection.cs
- ToolTipService.cs
- CodeConditionStatement.cs
- dbdatarecord.cs
- PropertyReferenceExtension.cs
- BuildDependencySet.cs
- SQLDateTime.cs
- ArraySortHelper.cs
- HideDisabledControlAdapter.cs
- CngAlgorithm.cs
- PenContext.cs
- ProtocolState.cs
- recordstate.cs
- RegexInterpreter.cs
- WebServiceData.cs
- FieldValue.cs
- ServiceMemoryGates.cs
- DeclaredTypeElement.cs
- DetailsViewInsertedEventArgs.cs
- PropertyChangedEventManager.cs
- StylusPointCollection.cs
- ObjectIDGenerator.cs
- DependencyPropertyValueSerializer.cs
- SqlConnectionManager.cs
- FlowPanelDesigner.cs
- CodeLinePragma.cs
- TextRangeEdit.cs
- GeometryConverter.cs
- String.cs
- AnimationClockResource.cs
- ClrProviderManifest.cs
- TrustSection.cs
- ManagementObjectCollection.cs
- OdbcConnectionPoolProviderInfo.cs
- GeometryDrawing.cs
- EndOfStreamException.cs
- XmlRawWriter.cs
- PointConverter.cs
- RuleSettings.cs
- Mappings.cs
- StorageEntitySetMapping.cs
- SqlMethods.cs
- VSDExceptions.cs
- Size.cs
- BitmapPalette.cs
- SchemaImporter.cs
- DummyDataSource.cs
- XmlKeywords.cs
- EdmSchemaError.cs
- SqlUtils.cs
- XmlQueryTypeFactory.cs
- XamlInt32CollectionSerializer.cs
- UnmanagedMarshal.cs
- BasePropertyDescriptor.cs
- MachineKeySection.cs
- SQlBooleanStorage.cs
- OperationFormatStyle.cs
- SafeNativeMethods.cs