Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / Services / IO / System / IO / RenamedEventArgs.cs / 1 / RenamedEventArgs.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.IO { using System.Diagnostics; using System.Security.Permissions; using System; ////// public class RenamedEventArgs : FileSystemEventArgs { private string oldName; private string oldFullPath; ///Provides data for the ///event. /// public RenamedEventArgs(WatcherChangeTypes changeType, string directory, string name, string oldName) : base(changeType, directory, name) { // Ensure that the directory name ends with a "\" if (!directory.EndsWith("\\", StringComparison.Ordinal)) { directory = directory + "\\"; } this.oldName = oldName; this.oldFullPath = directory + oldName; } ////// Initializes a new instance of the ////// class. /// /// public string OldFullPath { get { new FileIOPermission(FileIOPermissionAccess.Read, Path.GetPathRoot(oldFullPath)).Demand(); return oldFullPath; } } ////// Gets /// the previous fully qualified path of the affected file or directory. /// ////// public string OldName { get { return oldName; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ ///// Gets /// the old name of the affected file or directory. /// ///// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.IO { using System.Diagnostics; using System.Security.Permissions; using System; ////// public class RenamedEventArgs : FileSystemEventArgs { private string oldName; private string oldFullPath; ///Provides data for the ///event. /// public RenamedEventArgs(WatcherChangeTypes changeType, string directory, string name, string oldName) : base(changeType, directory, name) { // Ensure that the directory name ends with a "\" if (!directory.EndsWith("\\", StringComparison.Ordinal)) { directory = directory + "\\"; } this.oldName = oldName; this.oldFullPath = directory + oldName; } ////// Initializes a new instance of the ////// class. /// /// public string OldFullPath { get { new FileIOPermission(FileIOPermissionAccess.Read, Path.GetPathRoot(oldFullPath)).Demand(); return oldFullPath; } } ////// Gets /// the previous fully qualified path of the affected file or directory. /// ////// public string OldName { get { return oldName; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007./// Gets /// the old name of the affected file or directory. /// ///
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ToolStripSettings.cs
- CompleteWizardStep.cs
- mil_commands.cs
- CultureInfoConverter.cs
- CurrentChangedEventManager.cs
- ThreadInterruptedException.cs
- DeclaredTypeElement.cs
- DoubleUtil.cs
- XmlAttributes.cs
- CodeThrowExceptionStatement.cs
- OrderedDictionaryStateHelper.cs
- CompilationUtil.cs
- CharAnimationBase.cs
- VisualTreeFlattener.cs
- TextBoxRenderer.cs
- EventMetadata.cs
- EntityDesignPluralizationHandler.cs
- ScriptComponentDescriptor.cs
- MDIControlStrip.cs
- ModuleConfigurationInfo.cs
- connectionpool.cs
- CompressEmulationStream.cs
- ResetableIterator.cs
- FileDataSourceCache.cs
- QilInvokeEarlyBound.cs
- Condition.cs
- ConfigUtil.cs
- ScriptingProfileServiceSection.cs
- ObjectConverter.cs
- SystemIPInterfaceProperties.cs
- FloaterBaseParagraph.cs
- XPathSelectionIterator.cs
- Predicate.cs
- RoutingConfiguration.cs
- SchemaTypeEmitter.cs
- BitmapSource.cs
- AnnouncementEndpointElement.cs
- SqlPersonalizationProvider.cs
- EditingCoordinator.cs
- XamlBrushSerializer.cs
- StyleCollection.cs
- VirtualPath.cs
- Attachment.cs
- StrongName.cs
- PasswordDeriveBytes.cs
- RuleSettings.cs
- FragmentQuery.cs
- Style.cs
- ToolZoneDesigner.cs
- UInt32Storage.cs
- CommunicationException.cs
- SchemaMerger.cs
- CacheEntry.cs
- CreatingCookieEventArgs.cs
- SelectionUIHandler.cs
- SoapIgnoreAttribute.cs
- OleAutBinder.cs
- AddressingVersion.cs
- ComAdminWrapper.cs
- UserNameSecurityToken.cs
- SectionUpdates.cs
- RawStylusInputReport.cs
- _NestedMultipleAsyncResult.cs
- BinHexDecoder.cs
- NetPipeSectionData.cs
- SocketException.cs
- Freezable.cs
- AttributeQuery.cs
- ISAPIRuntime.cs
- SqlParameter.cs
- While.cs
- ReferencedCollectionType.cs
- PolicyChain.cs
- GlobalItem.cs
- IImplicitResourceProvider.cs
- StreamResourceInfo.cs
- MetafileHeaderWmf.cs
- ContextProperty.cs
- CompatibleComparer.cs
- CompositeControl.cs
- CompilerTypeWithParams.cs
- SemaphoreSlim.cs
- ByteStreamGeometryContext.cs
- PrintPreviewDialog.cs
- MappingMetadataHelper.cs
- ComponentCommands.cs
- _SingleItemRequestCache.cs
- XmlWrappingReader.cs
- UriExt.cs
- ClientTarget.cs
- AnnotationAdorner.cs
- Input.cs
- XmlDataImplementation.cs
- QuaternionRotation3D.cs
- ScrollBarRenderer.cs
- VScrollBar.cs
- StateDesigner.LayoutSelectionGlyph.cs
- EdmScalarPropertyAttribute.cs
- TextTrailingWordEllipsis.cs
- Dispatcher.cs