Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / CompMod / System / ComponentModel / IntSecurity.cs / 1 / IntSecurity.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.ComponentModel { using System; using System.Security; using System.Security.Permissions; [HostProtection(SharedState = true)] internal static class IntSecurity { public static readonly CodeAccessPermission UnmanagedCode = new SecurityPermission(SecurityPermissionFlag.UnmanagedCode); public static readonly CodeAccessPermission FullReflection = new ReflectionPermission(PermissionState.Unrestricted); public static string UnsafeGetFullPath(string fileName) { string full = fileName; FileIOPermission fiop = new FileIOPermission(PermissionState.None); fiop.AllFiles = FileIOPermissionAccess.PathDiscovery; fiop.Assert(); try { full = System.IO.Path.GetFullPath(fileName); } finally { CodeAccessPermission.RevertAssert(); } return full; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.ComponentModel { using System; using System.Security; using System.Security.Permissions; [HostProtection(SharedState = true)] internal static class IntSecurity { public static readonly CodeAccessPermission UnmanagedCode = new SecurityPermission(SecurityPermissionFlag.UnmanagedCode); public static readonly CodeAccessPermission FullReflection = new ReflectionPermission(PermissionState.Unrestricted); public static string UnsafeGetFullPath(string fileName) { string full = fileName; FileIOPermission fiop = new FileIOPermission(PermissionState.None); fiop.AllFiles = FileIOPermissionAccess.PathDiscovery; fiop.Assert(); try { full = System.IO.Path.GetFullPath(fileName); } finally { CodeAccessPermission.RevertAssert(); } return full; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- GridViewRow.cs
- ControlCollection.cs
- cookieexception.cs
- ButtonChrome.cs
- InvalidCommandTreeException.cs
- Attributes.cs
- ActivitySurrogateSelector.cs
- BeginEvent.cs
- DictionaryTraceRecord.cs
- ApplicationHost.cs
- TextServicesManager.cs
- SimpleMailWebEventProvider.cs
- LineInfo.cs
- HealthMonitoringSectionHelper.cs
- DocumentViewerHelper.cs
- _FtpDataStream.cs
- XmlElementList.cs
- ElementAction.cs
- Int64.cs
- Privilege.cs
- MultiPageTextView.cs
- ListBoxAutomationPeer.cs
- MsmqHostedTransportConfiguration.cs
- JoinSymbol.cs
- ItemsChangedEventArgs.cs
- MasterPageBuildProvider.cs
- InternalConfigSettingsFactory.cs
- CharacterHit.cs
- BitmapEffectGeneralTransform.cs
- MutexSecurity.cs
- IFormattable.cs
- TypeInitializationException.cs
- ZipArchive.cs
- ConstructorNeedsTagAttribute.cs
- WindowsFormsDesignerOptionService.cs
- SQLBinaryStorage.cs
- SingleKeyFrameCollection.cs
- FieldAccessException.cs
- DispatcherOperation.cs
- LoginUtil.cs
- SmtpReplyReaderFactory.cs
- BindingExpressionBase.cs
- CrossAppDomainChannel.cs
- InvokeHandlers.cs
- PrintDialog.cs
- LabelTarget.cs
- RuntimeConfig.cs
- WindowsContainer.cs
- AccessedThroughPropertyAttribute.cs
- CodeEntryPointMethod.cs
- XmlNamespaceManager.cs
- EllipseGeometry.cs
- HighlightVisual.cs
- DBConnection.cs
- CellCreator.cs
- InternalControlCollection.cs
- ContractMapping.cs
- LocationUpdates.cs
- Sql8ExpressionRewriter.cs
- CodeNamespaceImportCollection.cs
- IItemContainerGenerator.cs
- Debugger.cs
- HelpExampleGenerator.cs
- PersonalizationStateInfo.cs
- RankException.cs
- SQLDouble.cs
- ZipIOBlockManager.cs
- LowerCaseStringConverter.cs
- SqlDataSourceSelectingEventArgs.cs
- MatrixConverter.cs
- LinkClickEvent.cs
- hwndwrapper.cs
- LinkedResource.cs
- ColumnMapProcessor.cs
- Rectangle.cs
- cookiecollection.cs
- XmlReflectionImporter.cs
- ParserOptions.cs
- MimeBasePart.cs
- TransformGroup.cs
- RectAnimation.cs
- TimeStampChecker.cs
- XmlSchemaGroupRef.cs
- SqlParameter.cs
- CodeFieldReferenceExpression.cs
- MethodCallTranslator.cs
- ContractDescription.cs
- ObjectResult.cs
- PageCodeDomTreeGenerator.cs
- WebPartCloseVerb.cs
- Pkcs7Recipient.cs
- TraceListener.cs
- SerialPinChanges.cs
- BackgroundWorker.cs
- StylusShape.cs
- Drawing.cs
- ManipulationStartedEventArgs.cs
- NameNode.cs
- HtmlGenericControl.cs
- CancellationScope.cs