Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / wpf / src / Shared / MS / Internal / SecurityCriticalDataForSet.cs / 1 / 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. //---------------------------------------------------------------------------- // //// 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
- TransformConverter.cs
- WriteFileContext.cs
- ToolTip.cs
- Style.cs
- Rfc2898DeriveBytes.cs
- CalculatedColumn.cs
- MetadataUtilsSmi.cs
- ViewBox.cs
- OutputCacheSection.cs
- MaskedTextBox.cs
- EntityContainerEmitter.cs
- ReturnEventArgs.cs
- DefaultBinder.cs
- WebPartAuthorizationEventArgs.cs
- StylusButtonCollection.cs
- StretchValidation.cs
- HttpCachePolicy.cs
- Point3DValueSerializer.cs
- XmlSchemaComplexContentRestriction.cs
- CommandPlan.cs
- WindowsFont.cs
- FragmentQueryKB.cs
- NetworkInformationException.cs
- __TransparentProxy.cs
- XmlWriter.cs
- UIAgentAsyncEndRequest.cs
- SystemResourceHost.cs
- ImplicitInputBrush.cs
- MultipleViewProviderWrapper.cs
- DataRowChangeEvent.cs
- OrderedHashRepartitionEnumerator.cs
- AppLevelCompilationSectionCache.cs
- DataServiceBehavior.cs
- XmlSchemas.cs
- IDReferencePropertyAttribute.cs
- StringDictionaryCodeDomSerializer.cs
- ContextMenu.cs
- PageRequestManager.cs
- CngUIPolicy.cs
- TableCell.cs
- OdbcConnectionFactory.cs
- UrlMappingsSection.cs
- InvalidCastException.cs
- PropertyChangedEventManager.cs
- DataSourceControlBuilder.cs
- SerializationInfoEnumerator.cs
- MethodImplAttribute.cs
- Compress.cs
- PreviewPrintController.cs
- SqlFlattener.cs
- ISAPIApplicationHost.cs
- SystemBrushes.cs
- EditorZoneAutoFormat.cs
- ConstNode.cs
- TraceContext.cs
- DesignTimeDataBinding.cs
- _HeaderInfo.cs
- ChildDocumentBlock.cs
- TypeConverterValueSerializer.cs
- KeyValuePairs.cs
- ReverseInheritProperty.cs
- WeakRefEnumerator.cs
- ProfileProvider.cs
- ThreadWorkerController.cs
- DataSourceProvider.cs
- ForEach.cs
- MetadataAssemblyHelper.cs
- oledbconnectionstring.cs
- UnmanagedMemoryStream.cs
- ControlCollection.cs
- XmlWrappingWriter.cs
- EdgeModeValidation.cs
- BaseEntityWrapper.cs
- SQLByteStorage.cs
- EntityRecordInfo.cs
- RegistryKey.cs
- AttributeQuery.cs
- ServiceObjectContainer.cs
- Size.cs
- SystemSounds.cs
- PropertyChangeTracker.cs
- RegionInfo.cs
- UnsafeNativeMethods.cs
- FolderNameEditor.cs
- AttachedAnnotationChangedEventArgs.cs
- UrlAuthFailedErrorFormatter.cs
- KeySpline.cs
- ThumbButtonInfoCollection.cs
- RawKeyboardInputReport.cs
- DBProviderConfigurationHandler.cs
- DataSpaceManager.cs
- SafeTimerHandle.cs
- WebResourceAttribute.cs
- SupportingTokenSpecification.cs
- DataGridTextColumn.cs
- SHA512.cs
- DBSqlParserColumnCollection.cs
- Brush.cs
- MetadataArtifactLoaderCompositeFile.cs
- ObjectKeyFrameCollection.cs