Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Shared / MS / Internal / securitycriticaldata.cs / 1305600 / securitycriticaldata.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // Description: // This is a helper class to facilate the storage of Security critical data ( aka "Plutonium") // It's primary purpose is to do put a [SecurityCritical] on all access to the data. // // What is "critical data" ? This is any data created that required an Assert for it's creation. // As an example - the creation of an HwndWrapper during Dispatcher.Attach. // // History: // 10/25/04 : marka 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 DRT using MS.Internal.Drt; #else #error Attempt to use FriendAccessAllowedAttribute from an unknown assembly. using MS.Internal.YourAssemblyName; #endif namespace MS.Internal { [FriendAccessAllowed] internal struct SecurityCriticalData{ /// /// Critical - as this accesses _value which is Critical. /// Safe - as the caller already got the critical value. /// [SecurityCritical, SecurityTreatAsSafe] internal SecurityCriticalData(T value) { _value = value; } //// Critical "by definition" - this class is intended only to store critical data. // internal T Value { [SecurityCritical] get { return _value; } } ////// Critical - by definition as this is a wrapper for Critical data. /// [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
- IndependentAnimationStorage.cs
- InputBindingCollection.cs
- OutputCacheSettingsSection.cs
- BuildResult.cs
- DataControlFieldCell.cs
- XNodeValidator.cs
- Int32KeyFrameCollection.cs
- CommandID.cs
- Utils.cs
- ListViewGroup.cs
- processwaithandle.cs
- PersonalizationState.cs
- FileInfo.cs
- XmlSchemaParticle.cs
- SkipQueryOptionExpression.cs
- ArraySortHelper.cs
- SmtpAuthenticationManager.cs
- StrokeSerializer.cs
- CharacterMetricsDictionary.cs
- HandleRef.cs
- precedingquery.cs
- DbConnectionFactory.cs
- ColorBlend.cs
- FacetDescriptionElement.cs
- XmlSchemaImporter.cs
- SizeChangedEventArgs.cs
- altserialization.cs
- KeyProperty.cs
- BigInt.cs
- TextOnlyOutput.cs
- SelectionPattern.cs
- HttpCachePolicyElement.cs
- PopupControlService.cs
- RecordManager.cs
- XmlSortKey.cs
- HashCodeCombiner.cs
- ClearTypeHintValidation.cs
- SafeLocalMemHandle.cs
- LinkLabel.cs
- WebCategoryAttribute.cs
- ReliableOutputConnection.cs
- CountAggregationOperator.cs
- DirtyTextRange.cs
- COSERVERINFO.cs
- MemberProjectedSlot.cs
- DynamicField.cs
- SynchronizationContext.cs
- StringPropertyBuilder.cs
- BindMarkupExtensionSerializer.cs
- WebPartConnectionsConfigureVerb.cs
- SmiSettersStream.cs
- CodeTryCatchFinallyStatement.cs
- _RequestCacheProtocol.cs
- PreservationFileWriter.cs
- RadioButtonDesigner.cs
- MetadataArtifactLoaderCompositeFile.cs
- RelOps.cs
- LabelDesigner.cs
- _PooledStream.cs
- FrameSecurityDescriptor.cs
- SystemWebExtensionsSectionGroup.cs
- DataGridViewComboBoxEditingControl.cs
- WmlCalendarAdapter.cs
- MouseEventArgs.cs
- DataBindingExpressionBuilder.cs
- XmlValidatingReader.cs
- DeferredElementTreeState.cs
- ScaleTransform.cs
- MapPathBasedVirtualPathProvider.cs
- HostedTcpTransportManager.cs
- TokenCreationParameter.cs
- CompositeFontInfo.cs
- KeyPressEvent.cs
- InputProcessorProfiles.cs
- HostedNamedPipeTransportManager.cs
- EventLogEntry.cs
- storepermission.cs
- FixedSOMPageConstructor.cs
- CompositeActivityValidator.cs
- BitmapEncoder.cs
- ConnectorDragDropGlyph.cs
- Quaternion.cs
- LongValidator.cs
- XPathQilFactory.cs
- EdmRelationshipRoleAttribute.cs
- DataGridViewIntLinkedList.cs
- MessageQueuePermissionEntryCollection.cs
- SkipStoryboardToFill.cs
- NavigationHelper.cs
- XmlComment.cs
- ComboBoxRenderer.cs
- Simplifier.cs
- SlipBehavior.cs
- CalendarAutoFormat.cs
- PropertyGridView.cs
- HttpListenerTimeoutManager.cs
- LinkButton.cs
- TextCompositionEventArgs.cs
- ResourceExpression.cs
- HttpContextWrapper.cs