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
- ConcurrentQueue.cs
- ScrollProviderWrapper.cs
- COM2FontConverter.cs
- CompiledAction.cs
- XmlElementAttribute.cs
- CapabilitiesUse.cs
- RandomDelaySendsAsyncResult.cs
- CompilerCollection.cs
- DbLambda.cs
- AppendHelper.cs
- MonthChangedEventArgs.cs
- HttpRuntime.cs
- VisualStyleTypesAndProperties.cs
- DesigntimeLicenseContextSerializer.cs
- PtsPage.cs
- DrawingVisual.cs
- MatrixAnimationBase.cs
- CachedRequestParams.cs
- Margins.cs
- CookieParameter.cs
- OperationContractAttribute.cs
- OdbcRowUpdatingEvent.cs
- ListCollectionView.cs
- ThreadStaticAttribute.cs
- WebServiceErrorEvent.cs
- EditCommandColumn.cs
- DynamicArgumentDialog.cs
- DoubleAnimationUsingPath.cs
- HttpModuleAction.cs
- CallContext.cs
- RootProfilePropertySettingsCollection.cs
- DataServiceKeyAttribute.cs
- DataKeyArray.cs
- EdmComplexPropertyAttribute.cs
- EventLogger.cs
- OracleParameter.cs
- UIElementParaClient.cs
- DiscoveryEndpointElement.cs
- PaperSource.cs
- SHA256Cng.cs
- PasswordDeriveBytes.cs
- TextRangeSerialization.cs
- PrintingPermissionAttribute.cs
- Converter.cs
- TaskFileService.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- ResourceExpression.cs
- BrowserDefinition.cs
- OleAutBinder.cs
- BinaryNegotiation.cs
- LocalizabilityAttribute.cs
- WebBrowserContainer.cs
- XmlCodeExporter.cs
- SynchronizationHandlesCodeDomSerializer.cs
- DocumentApplicationJournalEntry.cs
- ObjectStateEntryDbDataRecord.cs
- X509CertificateCollection.cs
- SqlDependency.cs
- InstanceData.cs
- Error.cs
- SID.cs
- ScrollPattern.cs
- FontSource.cs
- ObjectSerializerFactory.cs
- VisualTreeHelper.cs
- InternalSafeNativeMethods.cs
- GridViewDeletedEventArgs.cs
- MessageDecoder.cs
- TimelineGroup.cs
- HandledEventArgs.cs
- XmlSchemaObjectCollection.cs
- XmlQueryStaticData.cs
- ObjectItemCollectionAssemblyCacheEntry.cs
- FrugalList.cs
- RegexWriter.cs
- GeneralTransform.cs
- PropertyInformationCollection.cs
- ProxyElement.cs
- DateTimePickerDesigner.cs
- StateRuntime.cs
- EditorPartCollection.cs
- StreamAsIStream.cs
- DataRelationPropertyDescriptor.cs
- SerialStream.cs
- SByteConverter.cs
- XPathNodeHelper.cs
- TextBoxAutomationPeer.cs
- MLangCodePageEncoding.cs
- InternalResources.cs
- _LocalDataStoreMgr.cs
- XhtmlBasicTextBoxAdapter.cs
- cookiecontainer.cs
- ThreadPool.cs
- HttpModuleActionCollection.cs
- CommandEventArgs.cs
- XmlBinaryReader.cs
- OdbcFactory.cs
- SamlAuthorizationDecisionClaimResource.cs
- HierarchicalDataBoundControlAdapter.cs
- KerberosSecurityTokenAuthenticator.cs