Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Cache / SRef.cs / 1305376 / SRef.cs
using System;
using System.Globalization;
using System.Reflection;
using System.Security.Permissions;
using System.Web;
namespace System.Web.Caching {
internal class SRef {
private static Type s_type = Type.GetType("System.SizedReference", true, false);
private Object _sizedRef;
internal SRef(Object target) {
_sizedRef = HttpRuntime.CreateNonPublicInstance(s_type, new object[] {target});
}
internal long ApproximateSize {
[PermissionSet(SecurityAction.Assert, Unrestricted=true)]
get {
object o = s_type.InvokeMember("ApproximateSize",
BindingFlags.Public | BindingFlags.Instance | BindingFlags.GetProperty,
null, // binder
_sizedRef, // target
null, // args
CultureInfo.InvariantCulture);
return (long) o;
}
}
[PermissionSet(SecurityAction.Assert, Unrestricted=true)]
internal void Dispose() {
s_type.InvokeMember("Dispose",
BindingFlags.Public | BindingFlags.Instance | BindingFlags.InvokeMethod,
null, // binder
_sizedRef, // target
null, // args
CultureInfo.InvariantCulture);
}
}
}
// 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
- DiscreteKeyFrames.cs
- TreeNode.cs
- BrowserCapabilitiesCompiler.cs
- RuntimeWrappedException.cs
- XhtmlBasicValidationSummaryAdapter.cs
- DesignTimeVisibleAttribute.cs
- XPathNodeList.cs
- ClaimSet.cs
- FileSystemInfo.cs
- ListViewHitTestInfo.cs
- streamingZipPartStream.cs
- ListViewHitTestInfo.cs
- MaskedTextBoxTextEditor.cs
- HttpDictionary.cs
- HtmlInputCheckBox.cs
- IPAddress.cs
- Expander.cs
- DocumentCollection.cs
- TextServicesManager.cs
- ColorEditor.cs
- ErrorStyle.cs
- Evidence.cs
- PartitionResolver.cs
- Literal.cs
- EmptyStringExpandableObjectConverter.cs
- PrePostDescendentsWalker.cs
- x509store.cs
- RowSpanVector.cs
- CharacterMetricsDictionary.cs
- PersonalizationStateInfoCollection.cs
- DelegateSerializationHolder.cs
- TraceListener.cs
- UnsafeNativeMethods.cs
- DesignerSerializerAttribute.cs
- ContentType.cs
- CrossContextChannel.cs
- MetaData.cs
- ExecutionContext.cs
- WebPartMenuStyle.cs
- XmlBoundElement.cs
- ShowExpandedMultiValueConverter.cs
- ResXResourceSet.cs
- TableRow.cs
- ADMembershipProvider.cs
- OutputCacheProfile.cs
- srgsitem.cs
- XmlProcessingInstruction.cs
- ThemeConfigurationDialog.cs
- RuleCache.cs
- SemaphoreSecurity.cs
- TextPattern.cs
- LicenseProviderAttribute.cs
- DbConnectionPoolOptions.cs
- CngKeyCreationParameters.cs
- PointLightBase.cs
- CacheChildrenQuery.cs
- HttpFileCollection.cs
- RemotingServices.cs
- SHA256.cs
- httpstaticobjectscollection.cs
- PreservationFileWriter.cs
- TraceHwndHost.cs
- XmlSchemas.cs
- StringBuilder.cs
- CodeGenerator.cs
- LayoutTable.cs
- ColorContextHelper.cs
- Matrix.cs
- FlowPosition.cs
- PixelShader.cs
- GradientStopCollection.cs
- EventSetter.cs
- PrinterSettings.cs
- FilteredAttributeCollection.cs
- XamlToRtfWriter.cs
- SpecialFolderEnumConverter.cs
- SectionUpdates.cs
- EventLogEntry.cs
- ApplicationServicesHostFactory.cs
- WmfPlaceableFileHeader.cs
- TrackingParameters.cs
- ColumnPropertiesGroup.cs
- FontNameConverter.cs
- DiscardableAttribute.cs
- RandomNumberGenerator.cs
- RenderContext.cs
- PolygonHotSpot.cs
- UrlMappingCollection.cs
- _ProxyChain.cs
- SmiMetaData.cs
- DoWorkEventArgs.cs
- SelectionRangeConverter.cs
- SemaphoreSecurity.cs
- MailHeaderInfo.cs
- DataServiceBehavior.cs
- TextEditorCopyPaste.cs
- _BaseOverlappedAsyncResult.cs
- EventLogEntryCollection.cs
- CompilerScope.cs
- SymbolType.cs