Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Shared / MS / Internal / securitycriticaldataClass.cs / 1305600 / 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 : akaza 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
- LinkArea.cs
- WebBrowserSiteBase.cs
- XmlNodeList.cs
- TableAdapterManagerHelper.cs
- ListenerElementsCollection.cs
- RandomNumberGenerator.cs
- CompensationDesigner.cs
- Bidi.cs
- NameTable.cs
- FlagsAttribute.cs
- ProcessThread.cs
- DynamicActionMessageFilter.cs
- NativeDirectoryServicesQueryAPIs.cs
- XmlQueryRuntime.cs
- NegotiateStream.cs
- Cell.cs
- SubqueryRules.cs
- XmlEntityReference.cs
- XamlToRtfParser.cs
- ItemCheckedEvent.cs
- StructuralCache.cs
- NativeMethods.cs
- WpfWebRequestHelper.cs
- VirtualPathUtility.cs
- DataServicePagingProviderWrapper.cs
- ClientScriptManager.cs
- ToolStripItemImageRenderEventArgs.cs
- NativeMethods.cs
- SendAgentStatusRequest.cs
- DBCommand.cs
- SocketException.cs
- ToolBarButton.cs
- TableLayoutPanelCodeDomSerializer.cs
- SafeLocalMemHandle.cs
- ListenerChannelContext.cs
- GridViewRowCollection.cs
- QueryCacheEntry.cs
- DesignerLinkAdapter.cs
- IncrementalHitTester.cs
- QilTargetType.cs
- AssemblyContextControlItem.cs
- Translator.cs
- SqlTriggerAttribute.cs
- Label.cs
- XmlCharCheckingWriter.cs
- KeyFrames.cs
- XhtmlMobileTextWriter.cs
- DataGridClipboardHelper.cs
- CellTreeSimplifier.cs
- SqlDataSourceQueryConverter.cs
- AmbientProperties.cs
- DesignOnlyAttribute.cs
- NumberSubstitution.cs
- BrowserCapabilitiesCodeGenerator.cs
- HtmlTableRowCollection.cs
- CodeDefaultValueExpression.cs
- DesignRelationCollection.cs
- HandleCollector.cs
- XmlnsCache.cs
- TreeBuilderXamlTranslator.cs
- ProviderConnectionPoint.cs
- ListMarkerSourceInfo.cs
- WebZone.cs
- AnnotationDocumentPaginator.cs
- SocketInformation.cs
- AssemblyResourceLoader.cs
- StaticContext.cs
- StretchValidation.cs
- InputLanguage.cs
- HtmlWindow.cs
- Operand.cs
- RecordManager.cs
- ParseChildrenAsPropertiesAttribute.cs
- XmlDataImplementation.cs
- ViewSimplifier.cs
- SynchronousChannel.cs
- AsmxEndpointPickerExtension.cs
- XmlSchemaAttributeGroup.cs
- OutputCacheProfileCollection.cs
- PriorityBinding.cs
- ApplicationInfo.cs
- ReadonlyMessageFilter.cs
- ToolboxItemAttribute.cs
- SocketException.cs
- OutputCacheSection.cs
- NamedPipeConnectionPoolSettings.cs
- LinearGradientBrush.cs
- BooleanExpr.cs
- DBSchemaRow.cs
- CacheDependency.cs
- X509SecurityTokenAuthenticator.cs
- ResourcePart.cs
- SettingsAttributes.cs
- EpmSyndicationContentSerializer.cs
- SqlMethodAttribute.cs
- SecurityRuntime.cs
- ProfessionalColorTable.cs
- XmlStreamNodeWriter.cs
- IntSecurity.cs
- SessionStateSection.cs