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
- CalendarDay.cs
- CodeCompiler.cs
- InstanceNotReadyException.cs
- CorrelationManager.cs
- DataTrigger.cs
- CertificateElement.cs
- LoginName.cs
- SmtpReplyReaderFactory.cs
- BuildProvider.cs
- TypeElementCollection.cs
- ValidationHelper.cs
- IntSecurity.cs
- CLRBindingWorker.cs
- RemotingConfiguration.cs
- ZipIOCentralDirectoryBlock.cs
- TransformProviderWrapper.cs
- ListViewDataItem.cs
- HtmlTableCell.cs
- JavaScriptString.cs
- RouteValueDictionary.cs
- RequestSecurityTokenResponse.cs
- ParentUndoUnit.cs
- WebReferenceOptions.cs
- ViewBase.cs
- Positioning.cs
- CompilerState.cs
- RadioButtonStandardAdapter.cs
- TableHeaderCell.cs
- PropertyValueChangedEvent.cs
- GAC.cs
- Quaternion.cs
- OutgoingWebRequestContext.cs
- PrimitiveCodeDomSerializer.cs
- TableHeaderCell.cs
- MediaTimeline.cs
- DataGridAddNewRow.cs
- DesignerSerializationManager.cs
- BitmapFrame.cs
- TextBox.cs
- CompositeFontInfo.cs
- RowCache.cs
- SignatureHelper.cs
- CustomErrorCollection.cs
- HyperLinkColumn.cs
- SpellerInterop.cs
- RoleServiceManager.cs
- Viewport3DVisual.cs
- InfoCardRSAPKCS1KeyExchangeFormatter.cs
- WebServiceClientProxyGenerator.cs
- MDIWindowDialog.cs
- SchemaConstraints.cs
- XmlDictionaryReaderQuotasElement.cs
- SoapObjectReader.cs
- SudsParser.cs
- WebHttpBindingCollectionElement.cs
- HtmlGenericControl.cs
- Profiler.cs
- FixedDSBuilder.cs
- HttpListenerRequest.cs
- FormatterServices.cs
- ActivityDesignerAccessibleObject.cs
- WebPartHelpVerb.cs
- listitem.cs
- IgnoreFlushAndCloseStream.cs
- EntityType.cs
- Hyperlink.cs
- Stacktrace.cs
- ObjectViewListener.cs
- RegexStringValidator.cs
- CharConverter.cs
- TextWriter.cs
- DataGridGeneralPage.cs
- AsnEncodedData.cs
- ObfuscateAssemblyAttribute.cs
- MailDefinitionBodyFileNameEditor.cs
- RelatedView.cs
- BitmapEffect.cs
- StructuredTypeEmitter.cs
- ContextProperty.cs
- SRef.cs
- XsltException.cs
- LingerOption.cs
- WindowsAuthenticationEventArgs.cs
- DataGridBoundColumn.cs
- RSAOAEPKeyExchangeFormatter.cs
- ApplicationServiceManager.cs
- DataGridViewCellCancelEventArgs.cs
- ComponentDispatcherThread.cs
- PopOutPanel.cs
- ValueTypeFieldReference.cs
- MouseCaptureWithinProperty.cs
- SimpleApplicationHost.cs
- BindToObject.cs
- TextBoxBase.cs
- ToolStripSplitStackLayout.cs
- FigureParagraph.cs
- ApplyImportsAction.cs
- LocatorBase.cs
- WebFaultException.cs
- SrgsToken.cs