Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Shared / MS / Internal / securitycriticaldataClass.cs / 1 / securitycriticaldataClass.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // Description: // This is a helper struct 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. // The current implementation requires the consumer to use the data member only if IsValid is true // // History: // 10/25/05 : [....] 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 class SecurityCriticalDataClass{ /// /// Critical - as this accesses _value which is Critical. /// Safe - as the caller already got the critical value. /// [SecurityCritical, SecurityTreatAsSafe] internal SecurityCriticalDataClass(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
- DataGridViewTextBoxCell.cs
- XPathEmptyIterator.cs
- SoundPlayer.cs
- ForeignKeyConstraint.cs
- EntityConnectionStringBuilderItem.cs
- ResourceManager.cs
- WS2007HttpBinding.cs
- DbConnectionPoolCounters.cs
- DataGridViewIntLinkedList.cs
- XmlLinkedNode.cs
- DrawingGroup.cs
- PropertyMetadata.cs
- LogicalExpr.cs
- MaskedTextBoxTextEditorDropDown.cs
- DataServiceOperationContext.cs
- EndPoint.cs
- ReturnValue.cs
- ProfileSettingsCollection.cs
- ProcessHostConfigUtils.cs
- ExeConfigurationFileMap.cs
- IdentityModelDictionary.cs
- DataGridCell.cs
- DynamicResourceExtension.cs
- ListMarkerSourceInfo.cs
- CodeMemberField.cs
- Control.cs
- TryExpression.cs
- MatchAttribute.cs
- DropShadowBitmapEffect.cs
- DataGridClipboardCellContent.cs
- Bitmap.cs
- ResourceReader.cs
- TableCellCollection.cs
- ListViewItemEventArgs.cs
- TextRange.cs
- TimerElapsedEvenArgs.cs
- StylusEventArgs.cs
- StandardBindingOptionalReliableSessionElement.cs
- DrawingContextDrawingContextWalker.cs
- ZeroOpNode.cs
- DataColumn.cs
- TextServicesDisplayAttribute.cs
- PropertyRef.cs
- SqlLiftWhereClauses.cs
- DataConnectionHelper.cs
- formatter.cs
- AssociationSetEnd.cs
- ContentDisposition.cs
- Solver.cs
- IsolatedStorage.cs
- KeyValueConfigurationElement.cs
- SQLChars.cs
- QueryReaderSettings.cs
- ContextProperty.cs
- Utils.cs
- UriTemplateDispatchFormatter.cs
- EventItfInfo.cs
- DirectoryInfo.cs
- WindowsRichEdit.cs
- Axis.cs
- UnsafeNativeMethods.cs
- ScaleTransform3D.cs
- XmlQueryContext.cs
- ObjectAnimationBase.cs
- RoleManagerSection.cs
- StorageTypeMapping.cs
- Profiler.cs
- DbConnectionPoolOptions.cs
- ChangeBlockUndoRecord.cs
- BindableAttribute.cs
- SchemaImporterExtensionsSection.cs
- OrderedDictionary.cs
- Point3DCollection.cs
- PanelStyle.cs
- SchemaCollectionPreprocessor.cs
- InfocardChannelParameter.cs
- ReachDocumentReferenceCollectionSerializerAsync.cs
- XmlAttributeCollection.cs
- CombinedGeometry.cs
- COM2ExtendedUITypeEditor.cs
- InheritanceContextHelper.cs
- returneventsaver.cs
- ValueTypeFixupInfo.cs
- HtmlWindow.cs
- UpDownBaseDesigner.cs
- PingReply.cs
- SQLInt16Storage.cs
- ToolStripPanelRenderEventArgs.cs
- ScrollChrome.cs
- ButtonChrome.cs
- WebPartMinimizeVerb.cs
- DataGridPagingPage.cs
- ColumnCollection.cs
- ExtensionWindow.cs
- HttpCookieCollection.cs
- SizeAnimationUsingKeyFrames.cs
- MultipleViewPatternIdentifiers.cs
- RootBuilder.cs
- OdbcTransaction.cs
- AvtEvent.cs