Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / IntSecurity.cs / 1305376 / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SID.cs
- ListenerAdaptersInstallComponent.cs
- UriGenerator.cs
- LabelAutomationPeer.cs
- TransformCryptoHandle.cs
- StringCollection.cs
- SpellerError.cs
- SchemaNames.cs
- Screen.cs
- MenuItemAutomationPeer.cs
- __ComObject.cs
- SafeBitVector32.cs
- AspNetRouteServiceHttpHandler.cs
- XmlAttribute.cs
- DummyDataSource.cs
- HttpApplicationStateWrapper.cs
- ChangeBlockUndoRecord.cs
- OdbcDataReader.cs
- ImageSource.cs
- SecurityPolicySection.cs
- MatrixTransform.cs
- PackageRelationshipSelector.cs
- TemplateParser.cs
- SqlServer2KCompatibilityAnnotation.cs
- GridEntry.cs
- HttpListenerRequest.cs
- BoundField.cs
- DataRowChangeEvent.cs
- _SslSessionsCache.cs
- FontCacheUtil.cs
- PenLineJoinValidation.cs
- WebPartCatalogAddVerb.cs
- PropertyEmitterBase.cs
- SqlClientWrapperSmiStream.cs
- SoapAttributeAttribute.cs
- ComboBox.cs
- CallTemplateAction.cs
- ExpressionConverter.cs
- _DisconnectOverlappedAsyncResult.cs
- FacetValues.cs
- SmtpNegotiateAuthenticationModule.cs
- WindowsAuthenticationEventArgs.cs
- SHA256CryptoServiceProvider.cs
- ThreadStartException.cs
- EmptyStringExpandableObjectConverter.cs
- ContentValidator.cs
- ProxyGenerator.cs
- DataGridViewCellPaintingEventArgs.cs
- AppSettingsSection.cs
- SQLGuid.cs
- DataProviderNameConverter.cs
- PkcsMisc.cs
- DesignTimeDataBinding.cs
- Literal.cs
- Color.cs
- ControlSerializer.cs
- Metafile.cs
- XmlSchemaComplexContentRestriction.cs
- SortedDictionary.cs
- SafeRightsManagementSessionHandle.cs
- FileSystemWatcher.cs
- EntityDataSourceReferenceGroup.cs
- CustomAttribute.cs
- AudioFileOut.cs
- FileAuthorizationModule.cs
- SkewTransform.cs
- IntSecurity.cs
- RTLAwareMessageBox.cs
- ExpressionsCollectionEditor.cs
- OrderedDictionary.cs
- UnauthorizedWebPart.cs
- TlsSspiNegotiation.cs
- WinHttpWebProxyFinder.cs
- WhereQueryOperator.cs
- CacheOutputQuery.cs
- MessageSecurityException.cs
- HashHelper.cs
- SqlDependencyListener.cs
- CachedPathData.cs
- ObjectDataSourceStatusEventArgs.cs
- ProcessThread.cs
- fixedPageContentExtractor.cs
- HebrewCalendar.cs
- WriteFileContext.cs
- SelectionPatternIdentifiers.cs
- Setter.cs
- StaticExtension.cs
- PropertyPushdownHelper.cs
- XmlNodeList.cs
- DrawingGroupDrawingContext.cs
- StatusBar.cs
- ConnectionPoolManager.cs
- RelationshipEndCollection.cs
- DictionaryTraceRecord.cs
- AnnotationResourceCollection.cs
- MetaForeignKeyColumn.cs
- ByeMessageCD1.cs
- PersonalizationAdministration.cs
- ConfigurationPropertyCollection.cs
- WorkflowTraceTransfer.cs