Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Shared / MS / Internal / securitycriticaldata.cs / 1305600 / securitycriticaldata.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // Description: // This is a helper class to facilate the storage of Security critical data ( aka "Plutonium") // It's primary purpose is to do put a [SecurityCritical] on all access to the data. // // What is "critical data" ? This is any data created that required an Assert for it's creation. // As an example - the creation of an HwndWrapper during Dispatcher.Attach. // // History: // 10/25/04 : marka Created. // //--------------------------------------------------------------------------- using System ; using System.Security ; #if WINDOWS_BASE using MS.Internal.WindowsBase; #elif PRESENTATION_CORE using MS.Internal.PresentationCore; #elif PRESENTATIONFRAMEWORK using MS.Internal.PresentationFramework; #elif DRT using MS.Internal.Drt; #else #error Attempt to use FriendAccessAllowedAttribute from an unknown assembly. using MS.Internal.YourAssemblyName; #endif namespace MS.Internal { [FriendAccessAllowed] internal struct SecurityCriticalData{ /// /// Critical - as this accesses _value which is Critical. /// Safe - as the caller already got the critical value. /// [SecurityCritical, SecurityTreatAsSafe] internal SecurityCriticalData(T value) { _value = value; } //// Critical "by definition" - this class is intended only to store critical data. // internal T Value { [SecurityCritical] get { return _value; } } ////// Critical - by definition as this is a wrapper for Critical data. /// [SecurityCritical] private T _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
- DataGridLinkButton.cs
- StylusTip.cs
- DesignerOptionService.cs
- StyleSelector.cs
- FunctionMappingTranslator.cs
- SafePointer.cs
- AnchoredBlock.cs
- SystemUnicastIPAddressInformation.cs
- JobInputBins.cs
- SqlBuffer.cs
- DataTableCollection.cs
- BaseConfigurationRecord.cs
- StyleModeStack.cs
- ErrorWebPart.cs
- AutoResetEvent.cs
- EditorZoneBase.cs
- TypeUsage.cs
- AdornerPresentationContext.cs
- EncryptedKeyIdentifierClause.cs
- SqlServer2KCompatibilityCheck.cs
- ObjectToken.cs
- XmlDataSourceView.cs
- ExtensionFile.cs
- SynchronousChannel.cs
- Activity.cs
- SafeProcessHandle.cs
- XslAst.cs
- ReaderWriterLockWrapper.cs
- OleDbCommand.cs
- SrgsDocumentParser.cs
- DateTimeUtil.cs
- FrameworkElement.cs
- UIElementPropertyUndoUnit.cs
- CustomErrorCollection.cs
- SqlGatherConsumedAliases.cs
- HostProtectionPermission.cs
- SafeArrayRankMismatchException.cs
- FocusTracker.cs
- ProxyWebPartConnectionCollection.cs
- BinaryFormatterWriter.cs
- IpcServerChannel.cs
- WorkflowEventArgs.cs
- ApplicationCommands.cs
- UpdatePanelControlTrigger.cs
- Encoder.cs
- DataKey.cs
- HttpServerVarsCollection.cs
- ResumeStoryboard.cs
- Membership.cs
- WbmpConverter.cs
- WindowsFont.cs
- GroupStyle.cs
- Win32.cs
- AsnEncodedData.cs
- TextDocumentView.cs
- ReturnEventArgs.cs
- WindowsStatusBar.cs
- DrawingVisual.cs
- FactoryGenerator.cs
- WindowsProgressbar.cs
- InputElement.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- ListControl.cs
- listitem.cs
- ExpressionLexer.cs
- DefaultValueTypeConverter.cs
- UrlAuthFailedErrorFormatter.cs
- PageAsyncTask.cs
- DashStyle.cs
- MeasurementDCInfo.cs
- HandlerFactoryCache.cs
- TypeDescriptionProvider.cs
- ExtenderControl.cs
- HandlerWithFactory.cs
- HotSpotCollection.cs
- SQLDecimalStorage.cs
- DataGridLinkButton.cs
- WebPartChrome.cs
- Rule.cs
- FrameworkReadOnlyPropertyMetadata.cs
- Command.cs
- FunctionDescription.cs
- SerializationAttributes.cs
- ServerIdentity.cs
- HighlightComponent.cs
- ImplicitInputBrush.cs
- XPathQilFactory.cs
- EventLogHandle.cs
- TriggerActionCollection.cs
- HealthMonitoringSection.cs
- XamlVector3DCollectionSerializer.cs
- Error.cs
- cookiecollection.cs
- DrawingContextDrawingContextWalker.cs
- UrlAuthorizationModule.cs
- UnsafeNativeMethodsCLR.cs
- CachedCompositeFamily.cs
- PowerStatus.cs
- StorageSetMapping.cs
- FileFormatException.cs