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
- SimpleWorkerRequest.cs
- QueryReaderSettings.cs
- SystemIPAddressInformation.cs
- FontStyle.cs
- SevenBitStream.cs
- ClientConfigurationHost.cs
- SQLMoneyStorage.cs
- TypeInfo.cs
- DataGridSortCommandEventArgs.cs
- ValueUtilsSmi.cs
- AsyncResult.cs
- LinqDataSourceInsertEventArgs.cs
- RoutingEndpointTrait.cs
- CompositeTypefaceMetrics.cs
- EntityDataSourceWizardForm.cs
- DefinitionProperties.cs
- DataGridTablesFactory.cs
- WebConfigurationHostFileChange.cs
- Context.cs
- StylusShape.cs
- User.cs
- SortedDictionary.cs
- BehaviorEditorPart.cs
- HtmlMobileTextWriter.cs
- RootAction.cs
- EntitySqlQueryState.cs
- sqlmetadatafactory.cs
- WebSysDescriptionAttribute.cs
- PropVariant.cs
- AnalyzedTree.cs
- EditorZone.cs
- ScopedKnownTypes.cs
- TraceHandler.cs
- AlternationConverter.cs
- TraceLog.cs
- MobileControlsSectionHelper.cs
- DataGridState.cs
- AutomationPropertyInfo.cs
- TextHidden.cs
- DataControlExtensions.cs
- DocComment.cs
- COAUTHIDENTITY.cs
- hresults.cs
- XmlSchemaAll.cs
- CodeMemberProperty.cs
- SqlException.cs
- ParameterElementCollection.cs
- NestedContainer.cs
- DataControlFieldHeaderCell.cs
- Function.cs
- XmlSchemaDatatype.cs
- OverrideMode.cs
- Bits.cs
- PlainXmlSerializer.cs
- EntityStoreSchemaFilterEntry.cs
- ComplexLine.cs
- ExpressionBuilderContext.cs
- XmlSchemaProviderAttribute.cs
- X509ServiceCertificateAuthentication.cs
- NullableIntAverageAggregationOperator.cs
- QueryContinueDragEventArgs.cs
- Odbc32.cs
- Events.cs
- FixedSOMContainer.cs
- RadioButtonRenderer.cs
- Freezable.cs
- ConfigurationSchemaErrors.cs
- ReceiveSecurityHeader.cs
- FixedSOMTable.cs
- FileUpload.cs
- DockProviderWrapper.cs
- MoveSizeWinEventHandler.cs
- JsonQueryStringConverter.cs
- DefaultMemberAttribute.cs
- MutexSecurity.cs
- InputBindingCollection.cs
- TextOutput.cs
- ScrollViewer.cs
- InfiniteIntConverter.cs
- Rect3D.cs
- SlipBehavior.cs
- DetailsViewDeletedEventArgs.cs
- MobileControlsSectionHelper.cs
- WorkflowCommandExtensionItem.cs
- FontNamesConverter.cs
- ListViewPagedDataSource.cs
- Operand.cs
- GeometryCombineModeValidation.cs
- VectorCollectionConverter.cs
- JsonReaderWriterFactory.cs
- DataGridViewSelectedColumnCollection.cs
- GatewayIPAddressInformationCollection.cs
- CursorInteropHelper.cs
- WebPartConnectionCollection.cs
- FamilyTypefaceCollection.cs
- GenericTypeParameterBuilder.cs
- SqlEnums.cs
- Win32SafeHandles.cs
- DescendentsWalker.cs
- Propagator.Evaluator.cs