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
- PostBackTrigger.cs
- WebEventCodes.cs
- ProfileService.cs
- DataServiceBehavior.cs
- UriSection.cs
- ElapsedEventArgs.cs
- DockingAttribute.cs
- Vector3DAnimation.cs
- BigIntegerStorage.cs
- EventLogPermission.cs
- ThaiBuddhistCalendar.cs
- SoapSchemaMember.cs
- BitmapSource.cs
- EventPrivateKey.cs
- Odbc32.cs
- UIElement3D.cs
- TemplateEditingVerb.cs
- FramingChannels.cs
- HyperLinkColumn.cs
- SoapAttributeOverrides.cs
- AccessDataSource.cs
- SessionStateModule.cs
- WebRequestModulesSection.cs
- EventLogPermissionAttribute.cs
- SafeEventLogReadHandle.cs
- StrokeRenderer.cs
- QueryOutputWriter.cs
- UmAlQuraCalendar.cs
- DataControlFieldCell.cs
- New.cs
- IntellisenseTextBox.cs
- RemotingConfiguration.cs
- ConfigXmlComment.cs
- EdmRelationshipRoleAttribute.cs
- CompilerScopeManager.cs
- CodeArrayIndexerExpression.cs
- HWStack.cs
- TextWriter.cs
- PathData.cs
- Component.cs
- Renderer.cs
- TimeIntervalCollection.cs
- ObjectStateManagerMetadata.cs
- KeyboardInputProviderAcquireFocusEventArgs.cs
- AuthenticationConfig.cs
- SoapWriter.cs
- StoreAnnotationsMap.cs
- BindingSourceDesigner.cs
- DbXmlEnabledProviderManifest.cs
- PerformanceCounterManager.cs
- PerfCounters.cs
- TypeElement.cs
- controlskin.cs
- NavigationPropertyEmitter.cs
- TrueReadOnlyCollection.cs
- WindowsRebar.cs
- ContentElement.cs
- DocumentOutline.cs
- ComplusTypeValidator.cs
- PermissionToken.cs
- SortDescription.cs
- Page.cs
- DbProviderServices.cs
- EntityConnectionStringBuilder.cs
- ParameterCollection.cs
- TraceSection.cs
- ConstructorBuilder.cs
- _UriSyntax.cs
- ArgumentElement.cs
- PageTheme.cs
- WebPartsPersonalizationAuthorization.cs
- MessageSecurityOverTcp.cs
- PkcsMisc.cs
- Identity.cs
- Query.cs
- Label.cs
- ObjectDataSourceFilteringEventArgs.cs
- SourceFileBuildProvider.cs
- DataViewSettingCollection.cs
- PriorityBinding.cs
- ResourceExpressionBuilder.cs
- SqlCharStream.cs
- MachineKeyConverter.cs
- CustomDictionarySources.cs
- MultipleViewProviderWrapper.cs
- XmlAggregates.cs
- XPathNavigator.cs
- XmlException.cs
- FormViewRow.cs
- ClientConfigurationSystem.cs
- DetailsViewModeEventArgs.cs
- WindowsFormsSynchronizationContext.cs
- StatusBarDrawItemEvent.cs
- GetUserPreferenceRequest.cs
- _AutoWebProxyScriptEngine.cs
- AspNetRouteServiceHttpHandler.cs
- SupportingTokenParameters.cs
- EntityType.cs
- HttpHandlerAction.cs
- NonParentingControl.cs