Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Shared / MS / Internal / SecurityCriticalDataForSet.cs / 2 / SecurityCriticalDataForSet.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // Description: // This is a helper class to facilate the storage of data that's Critical for set. // The data itself is not information disclosure but the value controls a critical // operation. // // For example a filepath variable might control what part of the file system the // code gets access to. // // History: // 01/30/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 PRESENTATIONUI using MS.Internal.PresentationUI; #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] // Built into Base, also used by Core and Framework. [Serializable] internal struct SecurityCriticalDataForSet{ /// /// Critical - "by definition" - this class is intended only for data that's /// Critical for setting. /// [SecurityCritical] internal SecurityCriticalDataForSet(T value) { _value = value; } ////// Critical - Setter is Critical "by definition" - this class is intended only /// for data that's Critical for setting. /// Safe - get is safe by definition. /// Not Safe - set is not safe by definition. /// internal T Value { #if DEBUG [System.Diagnostics.DebuggerStepThrough] #endif [SecurityCritical, SecurityTreatAsSafe] get { return _value; } #if DEBUG [System.Diagnostics.DebuggerStepThrough] #endif [SecurityCritical] set { _value = value; } } ////// Critical - by definition as this data is Critical for set. /// > [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
- Message.cs
- Base64Stream.cs
- SoapSchemaImporter.cs
- PropertyInfoSet.cs
- precedingsibling.cs
- SamlAssertionKeyIdentifierClause.cs
- AppearanceEditorPart.cs
- ResetableIterator.cs
- SystemFonts.cs
- BitmapMetadata.cs
- MembershipValidatePasswordEventArgs.cs
- WebConfigurationManager.cs
- ChannelAcceptor.cs
- XmlElementElement.cs
- GenericXmlSecurityTokenAuthenticator.cs
- hresults.cs
- XmlSerializerSection.cs
- WrappedReader.cs
- AddingNewEventArgs.cs
- ProxyElement.cs
- HttpFileCollection.cs
- IndexedEnumerable.cs
- SqlAggregateChecker.cs
- DoubleLink.cs
- DragStartedEventArgs.cs
- PrtTicket_Base.cs
- EntityDataSourceStatementEditorForm.cs
- Brush.cs
- ProcessModelInfo.cs
- MarkupObject.cs
- XsdDateTime.cs
- DbConnectionClosed.cs
- AssertFilter.cs
- DynamicValidator.cs
- CodeIdentifier.cs
- HtmlTableCell.cs
- SiteMembershipCondition.cs
- FileSecurity.cs
- AssemblyNameProxy.cs
- AlignmentXValidation.cs
- InfoCardRSACryptoProvider.cs
- FixedSOMFixedBlock.cs
- FontFamilyConverter.cs
- SafeSystemMetrics.cs
- ProfileServiceManager.cs
- EnumerableRowCollectionExtensions.cs
- WebConfigurationHostFileChange.cs
- CodeTypeDeclarationCollection.cs
- WindowsScrollBarBits.cs
- HtmlHistory.cs
- TextParagraphView.cs
- ResXResourceReader.cs
- MembershipUser.cs
- TaskScheduler.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- _Win32.cs
- TextContainerChangedEventArgs.cs
- CompareValidator.cs
- XmlBoundElement.cs
- ButtonColumn.cs
- AdRotator.cs
- Point4D.cs
- ScrollProviderWrapper.cs
- ToolStripGrip.cs
- XPathDocumentBuilder.cs
- EntityModelSchemaGenerator.cs
- PropertyToken.cs
- ContextProperty.cs
- ProviderSettings.cs
- sitestring.cs
- AnnouncementEndpointElement.cs
- OptionalMessageQuery.cs
- RequestCachePolicyConverter.cs
- X509ClientCertificateAuthenticationElement.cs
- OleDbPropertySetGuid.cs
- SerializationAttributes.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- ImageSource.cs
- JapaneseCalendar.cs
- translator.cs
- AndCondition.cs
- FrameworkElementAutomationPeer.cs
- EndPoint.cs
- FontClient.cs
- ServiceControllerDesigner.cs
- XmlExtensionFunction.cs
- COM2IPerPropertyBrowsingHandler.cs
- LinqTreeNodeEvaluator.cs
- WebPartConnectionsConfigureVerb.cs
- WindowHideOrCloseTracker.cs
- LinearKeyFrames.cs
- Set.cs
- XmlSchemaCollection.cs
- HtmlEmptyTagControlBuilder.cs
- SQLInt64Storage.cs
- WebPartConnectionsCancelEventArgs.cs
- MsmqIntegrationMessageProperty.cs
- WindowInteropHelper.cs
- DataGridViewRowCollection.cs
- CodeDOMUtility.cs