Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Cache / MemoryResponseElement.cs / 1305376 / MemoryResponseElement.cs
using System;
using System.Security.Permissions;
using System.Web;
using System.Web.Caching;
namespace System.Web.Caching {
[Serializable]
[AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Unrestricted)]
public class MemoryResponseElement: ResponseElement {
private byte[] _buffer;
private long _length;
public byte[] Buffer { get { return _buffer; } }
public long Length { get { return _length; } }
private MemoryResponseElement() { } // hide default constructor
public MemoryResponseElement(byte[] buffer, long length) {
if (buffer == null)
throw new ArgumentNullException("buffer");
if (length < 0 || length > buffer.Length)
throw new ArgumentOutOfRangeException("length");
_buffer = buffer;
_length = length;
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Security.Permissions;
using System.Web;
using System.Web.Caching;
namespace System.Web.Caching {
[Serializable]
[AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Unrestricted)]
public class MemoryResponseElement: ResponseElement {
private byte[] _buffer;
private long _length;
public byte[] Buffer { get { return _buffer; } }
public long Length { get { return _length; } }
private MemoryResponseElement() { } // hide default constructor
public MemoryResponseElement(byte[] buffer, long length) {
if (buffer == null)
throw new ArgumentNullException("buffer");
if (length < 0 || length > buffer.Length)
throw new ArgumentOutOfRangeException("length");
_buffer = buffer;
_length = length;
}
}
}
// 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
- XmlByteStreamWriter.cs
- AccessDataSourceWizardForm.cs
- CalendarButtonAutomationPeer.cs
- SearchExpression.cs
- DataGridColumnHeadersPresenter.cs
- dbdatarecord.cs
- TimeIntervalCollection.cs
- XmlDictionary.cs
- Token.cs
- UdpTransportBindingElement.cs
- TextFormatterContext.cs
- StrokeDescriptor.cs
- FolderLevelBuildProviderAppliesToAttribute.cs
- LiteralControl.cs
- ShaperBuffers.cs
- Brush.cs
- CodeEntryPointMethod.cs
- LineGeometry.cs
- DragDropManager.cs
- EnglishPluralizationService.cs
- ViewManager.cs
- WindowsRegion.cs
- PerformanceCounterTraceRecord.cs
- DSACryptoServiceProvider.cs
- RegularExpressionValidator.cs
- UniqueIdentifierService.cs
- StyleCollection.cs
- IODescriptionAttribute.cs
- future.cs
- DataBindingHandlerAttribute.cs
- SoapParser.cs
- ApplicationSettingsBase.cs
- DataTableMappingCollection.cs
- OleDbException.cs
- Expr.cs
- TransportBindingElementImporter.cs
- SourceLocation.cs
- PackageStore.cs
- ControlPager.cs
- Int16Storage.cs
- SelectionGlyph.cs
- SamlAssertionKeyIdentifierClause.cs
- AnyAllSearchOperator.cs
- HelpPage.cs
- LinkClickEvent.cs
- DeviceFilterEditorDialog.cs
- IsolatedStorageFile.cs
- ReferentialConstraint.cs
- Serializer.cs
- ObjectAssociationEndMapping.cs
- List.cs
- ListControlDesigner.cs
- MetaTableHelper.cs
- BuildManagerHost.cs
- CryptoApi.cs
- ElementMarkupObject.cs
- RemotingException.cs
- DataStreamFromComStream.cs
- StringComparer.cs
- GridViewItemAutomationPeer.cs
- grammarelement.cs
- SiblingIterators.cs
- ImageCodecInfoPrivate.cs
- DockProviderWrapper.cs
- Attributes.cs
- WebPartDescriptionCollection.cs
- _LocalDataStore.cs
- Condition.cs
- HttpServerVarsCollection.cs
- BaseParser.cs
- HttpDictionary.cs
- Formatter.cs
- TagNameToTypeMapper.cs
- DispatcherExceptionEventArgs.cs
- EventInfo.cs
- AuthenticationModuleElement.cs
- ThreadBehavior.cs
- BoundField.cs
- DotExpr.cs
- DocumentPageHost.cs
- NotifyParentPropertyAttribute.cs
- RefreshEventArgs.cs
- TextEditorMouse.cs
- TextRenderer.cs
- FirstMatchCodeGroup.cs
- AnnotationAdorner.cs
- WmlObjectListAdapter.cs
- DataRowComparer.cs
- DoubleAnimation.cs
- ListenerElementsCollection.cs
- XmlDataSource.cs
- Events.cs
- FixedDSBuilder.cs
- PropertyGridView.cs
- NativeActivityMetadata.cs
- StringFunctions.cs
- MetadataArtifactLoader.cs
- ListMarkerSourceInfo.cs
- TaiwanCalendar.cs
- UserNameSecurityTokenAuthenticator.cs