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
- WmlLabelAdapter.cs
- AdornedElementPlaceholder.cs
- TypefaceMetricsCache.cs
- ObjectDataSourceFilteringEventArgs.cs
- httpapplicationstate.cs
- SerializationStore.cs
- prompt.cs
- securitycriticaldata.cs
- objectquery_tresulttype.cs
- SequenceNumber.cs
- DateTimeParse.cs
- TemplateXamlTreeBuilder.cs
- ProxySimple.cs
- ActivityWithResultConverter.cs
- DataGridViewUtilities.cs
- DBDataPermissionAttribute.cs
- NumberSubstitution.cs
- BamlStream.cs
- ListViewItem.cs
- TrayIconDesigner.cs
- AnimationClock.cs
- DataGridState.cs
- SkinBuilder.cs
- NextPreviousPagerField.cs
- KeyPullup.cs
- BooleanProjectedSlot.cs
- DeobfuscatingStream.cs
- DataGridViewHeaderCell.cs
- ParamArrayAttribute.cs
- DatePickerAutomationPeer.cs
- BasicExpressionVisitor.cs
- TimeoutException.cs
- ProviderSettings.cs
- EnumType.cs
- AutoResetEvent.cs
- TrackingExtract.cs
- GridViewPageEventArgs.cs
- PropVariant.cs
- MappingItemCollection.cs
- DBPropSet.cs
- Scene3D.cs
- PagerStyle.cs
- BinaryParser.cs
- WebPartTransformer.cs
- Command.cs
- EdmType.cs
- SQLRoleProvider.cs
- Win32.cs
- DataGridViewAccessibleObject.cs
- PerspectiveCamera.cs
- StyleSelector.cs
- File.cs
- PointLightBase.cs
- PenContext.cs
- ValueSerializerAttribute.cs
- ListCollectionView.cs
- HwndHost.cs
- StorageAssociationTypeMapping.cs
- ImageKeyConverter.cs
- DispatcherHookEventArgs.cs
- BamlRecordReader.cs
- Utilities.cs
- Rotation3DAnimationUsingKeyFrames.cs
- HtmlControl.cs
- ButtonBaseAdapter.cs
- PropertyMap.cs
- DropDownHolder.cs
- DrawingAttributesDefaultValueFactory.cs
- CapabilitiesPattern.cs
- JumpItem.cs
- UserControl.cs
- DateTimeSerializationSection.cs
- ControlCodeDomSerializer.cs
- OrderByBuilder.cs
- TableLayoutSettingsTypeConverter.cs
- ByteStream.cs
- ActivityMarkupSerializer.cs
- Header.cs
- Authorization.cs
- Panel.cs
- TransformedBitmap.cs
- SqlInternalConnectionSmi.cs
- BehaviorDragDropEventArgs.cs
- PtsContext.cs
- SQLMoneyStorage.cs
- _DigestClient.cs
- BaseValidator.cs
- SimpleTypesSurrogate.cs
- Parameter.cs
- TreeSet.cs
- TimeSpanOrInfiniteConverter.cs
- _AutoWebProxyScriptWrapper.cs
- EmbeddedObject.cs
- XslAstAnalyzer.cs
- DependencyPropertyKind.cs
- StateWorkerRequest.cs
- ParameterModifier.cs
- HttpProtocolImporter.cs
- XD.cs
- CompatibleComparer.cs