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
- ExpressionLexer.cs
- ValueTable.cs
- SecureUICommand.cs
- COMException.cs
- InputElement.cs
- HttpRuntime.cs
- BuilderPropertyEntry.cs
- CheckedPointers.cs
- BrushMappingModeValidation.cs
- RegexReplacement.cs
- AtomEntry.cs
- ToolStripItemImageRenderEventArgs.cs
- AttributeConverter.cs
- AppLevelCompilationSectionCache.cs
- TextOutput.cs
- Stream.cs
- RangeValidator.cs
- SingleStorage.cs
- XslTransform.cs
- HScrollProperties.cs
- Error.cs
- HandleCollector.cs
- BezierSegment.cs
- PageAsyncTaskManager.cs
- MarginsConverter.cs
- MenuItemStyle.cs
- DataBoundControl.cs
- ElementNotEnabledException.cs
- MemberJoinTreeNode.cs
- ISSmlParser.cs
- CodeNamespaceImport.cs
- XPathParser.cs
- JsonFormatGeneratorStatics.cs
- UnsafeNativeMethods.cs
- XmlAnyElementAttributes.cs
- ProbeDuplexAsyncResult.cs
- ExpressionBuilderContext.cs
- mda.cs
- XmlTextReader.cs
- NameObjectCollectionBase.cs
- CodeTypeConstructor.cs
- EntityPropertyMappingAttribute.cs
- DataColumnMappingCollection.cs
- XmlDocumentSchema.cs
- SizeAnimationBase.cs
- ImpersonateTokenRef.cs
- FrameworkContentElementAutomationPeer.cs
- OutOfMemoryException.cs
- IndentedWriter.cs
- SizeChangedEventArgs.cs
- TextView.cs
- BezierSegment.cs
- HttpCacheVary.cs
- InternalTypeHelper.cs
- ThreadStartException.cs
- ImageEditor.cs
- SeparatorAutomationPeer.cs
- OleDbTransaction.cs
- WebPartDisplayMode.cs
- SymbolMethod.cs
- ImageButton.cs
- DispatchWrapper.cs
- CharStorage.cs
- ImageCodecInfo.cs
- ReadOnlyKeyedCollection.cs
- CharacterMetricsDictionary.cs
- OdbcConnectionString.cs
- TypeInitializationException.cs
- JoinElimination.cs
- WmlMobileTextWriter.cs
- XmlSchemaRedefine.cs
- ThreadAttributes.cs
- PixelFormats.cs
- InvalidPropValue.cs
- BitmapEffectDrawingContextState.cs
- SelectionProcessor.cs
- CodeGotoStatement.cs
- CaseInsensitiveComparer.cs
- ValueChangedEventManager.cs
- DerivedKeySecurityTokenStub.cs
- SID.cs
- SchemaCollectionCompiler.cs
- LambdaCompiler.Unary.cs
- ConfigXmlComment.cs
- Missing.cs
- ArraySet.cs
- Literal.cs
- CriticalFinalizerObject.cs
- Timer.cs
- LineSegment.cs
- MissingMethodException.cs
- ADMembershipProvider.cs
- DecoderExceptionFallback.cs
- TableProviderWrapper.cs
- RequiredAttributeAttribute.cs
- AvTrace.cs
- DataGridPagerStyle.cs
- DbProviderFactories.cs
- SystemResourceKey.cs
- CancellationToken.cs