Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Shared / MS / Internal / securitycriticaldataClass.cs / 1 / securitycriticaldataClass.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // Description: // This is a helper struct 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. // The current implementation requires the consumer to use the data member only if IsValid is true // // History: // 10/25/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 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 class SecurityCriticalDataClass{ /// /// Critical - as this accesses _value which is Critical. /// Safe - as the caller already got the critical value. /// [SecurityCritical, SecurityTreatAsSafe] internal SecurityCriticalDataClass(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
- ConfigurationSection.cs
- SchemaElementDecl.cs
- CallContext.cs
- OdbcTransaction.cs
- ApplicationContext.cs
- TimerTable.cs
- HtmlUtf8RawTextWriter.cs
- NotImplementedException.cs
- TextDecoration.cs
- Decoder.cs
- __ConsoleStream.cs
- securitycriticaldata.cs
- ComplexLine.cs
- PerformanceCounter.cs
- VectorCollectionConverter.cs
- MouseOverProperty.cs
- ProxyWebPartConnectionCollection.cs
- ConfigurationException.cs
- ApplicationHost.cs
- CodeExporter.cs
- EventDescriptor.cs
- XmlDocumentType.cs
- WindowCollection.cs
- XPathDocumentBuilder.cs
- OdbcParameter.cs
- EventLogPermissionHolder.cs
- PresentationAppDomainManager.cs
- QueryCacheEntry.cs
- RenderOptions.cs
- UInt32Storage.cs
- DetailsViewDeleteEventArgs.cs
- EmptyStringExpandableObjectConverter.cs
- MouseEventArgs.cs
- AppearanceEditorPart.cs
- PageOutputQuality.cs
- EventLogEntryCollection.cs
- TimeStampChecker.cs
- InternalMappingException.cs
- TemplatePropertyEntry.cs
- DocumentPageHost.cs
- __Error.cs
- AttributeData.cs
- SqlEnums.cs
- PersonalizablePropertyEntry.cs
- Matrix3DConverter.cs
- TypeUtils.cs
- SimpleTableProvider.cs
- DeploymentSectionCache.cs
- Base64Stream.cs
- ZoneButton.cs
- FunctionNode.cs
- CompilerLocalReference.cs
- SmtpAuthenticationManager.cs
- ColorBlend.cs
- SessionSymmetricMessageSecurityProtocolFactory.cs
- FocusWithinProperty.cs
- DataPagerFieldCommandEventArgs.cs
- CfgArc.cs
- BoundField.cs
- LogFlushAsyncResult.cs
- _UncName.cs
- CalloutQueueItem.cs
- BinaryNegotiation.cs
- GorillaCodec.cs
- RadioButtonFlatAdapter.cs
- XmlSchemaObjectTable.cs
- Win32.cs
- SchemaSetCompiler.cs
- Soap12ProtocolReflector.cs
- ContractListAdapter.cs
- NavigationCommands.cs
- Emitter.cs
- CodeEventReferenceExpression.cs
- HttpModuleAction.cs
- WebPartEditVerb.cs
- HostedHttpRequestAsyncResult.cs
- ComponentChangedEvent.cs
- DbConvert.cs
- SchemaSetCompiler.cs
- CipherData.cs
- FieldBuilder.cs
- LookupBindingPropertiesAttribute.cs
- Tokenizer.cs
- ToolboxCategory.cs
- Task.cs
- BrowserDefinitionCollection.cs
- TileBrush.cs
- CompoundFileReference.cs
- InstanceDataCollectionCollection.cs
- DataGridViewAutoSizeModeEventArgs.cs
- Subtract.cs
- StaticFileHandler.cs
- ReadOnlyDataSourceView.cs
- ZoneLinkButton.cs
- Expressions.cs
- SignatureHelper.cs
- DocumentViewerBase.cs
- MenuItem.cs
- SymmetricAlgorithm.cs
- CompilerParameters.cs