Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- PersonalizationDictionary.cs
- _IPv6Address.cs
- TogglePatternIdentifiers.cs
- MenuItemAutomationPeer.cs
- AlternateView.cs
- TypeConverterBase.cs
- XmlName.cs
- FrameworkElement.cs
- WithParamAction.cs
- KeyInterop.cs
- RangeBase.cs
- MsmqIntegrationSecurity.cs
- DataTableReaderListener.cs
- ButtonFieldBase.cs
- InputMethodStateChangeEventArgs.cs
- TimerEventSubscription.cs
- WebControlParameterProxy.cs
- NTAccount.cs
- Component.cs
- WorkerRequest.cs
- MetadataItemEmitter.cs
- KeyValueSerializer.cs
- MoveSizeWinEventHandler.cs
- CodeGenerator.cs
- ChangeTracker.cs
- PanelStyle.cs
- HtmlInputReset.cs
- IsolatedStorageFilePermission.cs
- DoWorkEventArgs.cs
- ListViewTableRow.cs
- QuaternionAnimationUsingKeyFrames.cs
- DefaultEventAttribute.cs
- SQLBinaryStorage.cs
- WebPartDesigner.cs
- SelectiveScrollingGrid.cs
- BmpBitmapEncoder.cs
- RijndaelManagedTransform.cs
- AssociationType.cs
- Visual.cs
- SolidColorBrush.cs
- TableMethodGenerator.cs
- FixedSOMTextRun.cs
- XmlTextAttribute.cs
- ClientSettingsProvider.cs
- ViewStateModeByIdAttribute.cs
- MailAddress.cs
- WindowsGrip.cs
- DateTimeConverter2.cs
- AsymmetricKeyExchangeDeformatter.cs
- System.Data_BID.cs
- Size.cs
- SHA256.cs
- NumericUpDownAcceleration.cs
- XmlUTF8TextWriter.cs
- SizeF.cs
- NamespaceList.cs
- DataTemplate.cs
- Tablet.cs
- ComboBoxItem.cs
- ReferentialConstraint.cs
- EditorAttributeInfo.cs
- AccessDataSource.cs
- DesignerFrame.cs
- CommandHelper.cs
- HtmlEmptyTagControlBuilder.cs
- ProtocolImporter.cs
- XmlIlVisitor.cs
- RawStylusInputCustomData.cs
- StringResourceManager.cs
- Exception.cs
- TimeManager.cs
- Attributes.cs
- SafeNativeMethods.cs
- X509ChainElement.cs
- SlotInfo.cs
- MessagePropertyDescription.cs
- InkCollectionBehavior.cs
- TrackingRecord.cs
- DrawingGroup.cs
- ReaderContextStackData.cs
- DataGridItem.cs
- DataRecordObjectView.cs
- BasicKeyConstraint.cs
- XmlSchemaSimpleContentRestriction.cs
- BlurEffect.cs
- TCPClient.cs
- SystemException.cs
- DiffuseMaterial.cs
- SecureConversationServiceElement.cs
- IPEndPointCollection.cs
- LowerCaseStringConverter.cs
- SessionStateContainer.cs
- BookmarkCallbackWrapper.cs
- WSSecurityOneDotZeroReceiveSecurityHeader.cs
- StateChangeEvent.cs
- PackagePartCollection.cs
- CodeSnippetCompileUnit.cs
- ProxyHelper.cs
- HttpHeaderCollection.cs
- GenericPrincipal.cs