Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Shared / MS / Internal / securitycriticaldata.cs / 1 / 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 : [....] 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
- StaticFileHandler.cs
- ContextStaticAttribute.cs
- Context.cs
- Int16.cs
- InkCollectionBehavior.cs
- HebrewCalendar.cs
- MessagePropertyVariants.cs
- QuotedPairReader.cs
- ReferencedCollectionType.cs
- XD.cs
- ClientSettings.cs
- RealizedColumnsBlock.cs
- HttpPostedFile.cs
- SmtpCommands.cs
- ScopedKnownTypes.cs
- IconConverter.cs
- ImportFileRequest.cs
- TypeDelegator.cs
- PropertyTab.cs
- SqlFactory.cs
- DataSourceCacheDurationConverter.cs
- ObjectDataSourceDisposingEventArgs.cs
- LabelAutomationPeer.cs
- InvalidEnumArgumentException.cs
- SqlDataSourceParameterParser.cs
- CompilerState.cs
- ActionMismatchAddressingException.cs
- ResourceCategoryAttribute.cs
- CodeTypeDeclarationCollection.cs
- SQLDecimalStorage.cs
- BitSet.cs
- UmAlQuraCalendar.cs
- EpmCustomContentWriterNodeData.cs
- TransactionScope.cs
- HtmlProps.cs
- Path.cs
- ConfigurationErrorsException.cs
- PathSegmentCollection.cs
- ECDsa.cs
- HtmlElementErrorEventArgs.cs
- ResourceDisplayNameAttribute.cs
- ObjectReaderCompiler.cs
- LogExtent.cs
- UserControlCodeDomTreeGenerator.cs
- DataBindingCollection.cs
- DataGridViewRowPostPaintEventArgs.cs
- ConnectionString.cs
- JsonServiceDocumentSerializer.cs
- UnsafeMethods.cs
- MaterializeFromAtom.cs
- TypeResolver.cs
- DeferredElementTreeState.cs
- Literal.cs
- XmlLanguage.cs
- CheckPair.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- TracingConnectionInitiator.cs
- ScriptingProfileServiceSection.cs
- ClockController.cs
- ClientBuildManagerCallback.cs
- ArgumentsParser.cs
- Transform3DCollection.cs
- SamlAuthorityBinding.cs
- OwnerDrawPropertyBag.cs
- TrackBarRenderer.cs
- DrawingGroup.cs
- SqlXml.cs
- GPPOINT.cs
- ChtmlSelectionListAdapter.cs
- PointCollection.cs
- ObsoleteAttribute.cs
- DecimalAnimationUsingKeyFrames.cs
- RelatedCurrencyManager.cs
- ReturnType.cs
- WebPartConnectVerb.cs
- SessionState.cs
- IssuanceLicense.cs
- SafeWaitHandle.cs
- SqlStatistics.cs
- Frame.cs
- DataBoundLiteralControl.cs
- ListViewItem.cs
- XpsSerializationException.cs
- ToolStripCustomTypeDescriptor.cs
- TextServicesDisplayAttributePropertyRanges.cs
- LoginAutoFormat.cs
- Choices.cs
- securitycriticaldataformultiplegetandset.cs
- CompareInfo.cs
- WebConfigurationHost.cs
- ListBox.cs
- AnnotationDocumentPaginator.cs
- ToolboxComponentsCreatedEventArgs.cs
- NameSpaceExtractor.cs
- CodeCastExpression.cs
- XmlArrayAttribute.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- ToolStripPanelDesigner.cs
- InternalConfigHost.cs
- TypeHelpers.cs