Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Shared / MS / Internal / SecurityCriticalDataForSet.cs / 1 / 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. //---------------------------------------------------------------------------- // //// 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
- ReturnType.cs
- HostSecurityManager.cs
- PeerPresenceInfo.cs
- AppDomainAttributes.cs
- WebPartActionVerb.cs
- ActivityBindForm.Designer.cs
- Vector3DCollection.cs
- SemanticAnalyzer.cs
- AsyncDataRequest.cs
- ProfilePropertyNameValidator.cs
- TypeDependencyAttribute.cs
- ReversePositionQuery.cs
- ToolStrip.cs
- EUCJPEncoding.cs
- HttpInputStream.cs
- PrintingPermissionAttribute.cs
- StateDesigner.cs
- BoundPropertyEntry.cs
- XmlSchemaFacet.cs
- GC.cs
- SwitchAttribute.cs
- WebServiceTypeData.cs
- ListBoxAutomationPeer.cs
- XmlRawWriter.cs
- SchemaManager.cs
- RequestCachingSection.cs
- HttpListenerTimeoutManager.cs
- Types.cs
- DataObjectPastingEventArgs.cs
- LicFileLicenseProvider.cs
- ColorContextHelper.cs
- DoubleAnimationUsingPath.cs
- EnumerableWrapperWeakToStrong.cs
- XmlSchemaComplexContentExtension.cs
- Duration.cs
- OrderedEnumerableRowCollection.cs
- cache.cs
- FlowDocumentPage.cs
- Internal.cs
- HashMembershipCondition.cs
- XmlSchemaComplexContentRestriction.cs
- TreeBuilderBamlTranslator.cs
- IntranetCredentialPolicy.cs
- TextRangeEditLists.cs
- PropertyPathWorker.cs
- X509ChainElement.cs
- FamilyMapCollection.cs
- newinstructionaction.cs
- UTF7Encoding.cs
- WindowsButton.cs
- PKCS1MaskGenerationMethod.cs
- ScriptingWebServicesSectionGroup.cs
- CodeDelegateInvokeExpression.cs
- BindingBase.cs
- ElementNotEnabledException.cs
- MemberDescriptor.cs
- MediaContext.cs
- BitHelper.cs
- GroupByExpressionRewriter.cs
- WebServiceFault.cs
- SemaphoreSecurity.cs
- SchemeSettingElement.cs
- WebBrowserBase.cs
- UpdatePanel.cs
- DictionaryCustomTypeDescriptor.cs
- EntitySetDataBindingList.cs
- Ref.cs
- UIElementHelper.cs
- JsonClassDataContract.cs
- RawStylusInputReport.cs
- JsonSerializer.cs
- ExpressionLink.cs
- SizeKeyFrameCollection.cs
- FontEditor.cs
- DocumentCollection.cs
- HttpValueCollection.cs
- BamlReader.cs
- _UncName.cs
- ServiceObjectContainer.cs
- WrappedIUnknown.cs
- ScriptReference.cs
- MultiPropertyDescriptorGridEntry.cs
- PersonalizableAttribute.cs
- WmfPlaceableFileHeader.cs
- InputDevice.cs
- DataRow.cs
- DBConcurrencyException.cs
- KeySplineConverter.cs
- DataGridViewCheckBoxColumn.cs
- PropertyTabAttribute.cs
- CachedResourceDictionaryExtension.cs
- VectorKeyFrameCollection.cs
- MediaPlayer.cs
- AppSettings.cs
- ViewValidator.cs
- SystemWebCachingSectionGroup.cs
- LicenseProviderAttribute.cs
- HttpRuntime.cs
- AnimationStorage.cs
- LambdaCompiler.Expressions.cs