Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- SuppressMergeCheckAttribute.cs
- UserUseLicenseDictionaryLoader.cs
- OrderByQueryOptionExpression.cs
- MouseGesture.cs
- PermissionSetEnumerator.cs
- Int16Storage.cs
- VBCodeProvider.cs
- Stopwatch.cs
- DataGridViewBindingCompleteEventArgs.cs
- LayoutEvent.cs
- ValuePattern.cs
- XmlLoader.cs
- StreamDocument.cs
- EntityClassGenerator.cs
- RootNamespaceAttribute.cs
- StyleCollectionEditor.cs
- LineSegment.cs
- EventProviderClassic.cs
- ResourceLoader.cs
- Directory.cs
- TypeUsageBuilder.cs
- OperationPickerDialog.cs
- SapiRecoContext.cs
- BasePattern.cs
- HttpWebRequestElement.cs
- SoapServerProtocol.cs
- RsaEndpointIdentity.cs
- StateManagedCollection.cs
- ResourceKey.cs
- login.cs
- XhtmlBasicObjectListAdapter.cs
- QilName.cs
- DataBindingHandlerAttribute.cs
- DataService.cs
- ProcessModelInfo.cs
- RoleService.cs
- SmtpReplyReader.cs
- CodeStatement.cs
- DiscoveryClientElement.cs
- SystemBrushes.cs
- TextTreeFixupNode.cs
- NonceToken.cs
- BaseTransportHeaders.cs
- MultiSelectRootGridEntry.cs
- AnimatedTypeHelpers.cs
- SessionSymmetricTransportSecurityProtocolFactory.cs
- sqlcontext.cs
- X509CertificateValidationMode.cs
- IODescriptionAttribute.cs
- OleDbException.cs
- XmlQualifiedName.cs
- LabelInfo.cs
- TextSchema.cs
- ElapsedEventArgs.cs
- FrameworkElementFactory.cs
- XmlNode.cs
- PaperSize.cs
- PreProcessInputEventArgs.cs
- Attributes.cs
- SqlFlattener.cs
- TextDecorationLocationValidation.cs
- CommandEventArgs.cs
- AnnotationComponentManager.cs
- WriteableBitmap.cs
- TransformPatternIdentifiers.cs
- UriScheme.cs
- Converter.cs
- HttpFileCollection.cs
- Item.cs
- sortedlist.cs
- BrowserCapabilitiesFactoryBase.cs
- ServicePointManagerElement.cs
- ArgIterator.cs
- SafeLibraryHandle.cs
- AppDomainInstanceProvider.cs
- TranslateTransform.cs
- OleDbRowUpdatedEvent.cs
- HttpHandlerActionCollection.cs
- OleDbRowUpdatedEvent.cs
- Dictionary.cs
- AttachedPropertiesService.cs
- TreeNode.cs
- QuerySetOp.cs
- DataGridViewRow.cs
- StreamedFramingRequestChannel.cs
- TrackingRecordPreFilter.cs
- SerializableAttribute.cs
- FieldToken.cs
- HostingEnvironmentSection.cs
- _RequestCacheProtocol.cs
- CaseExpr.cs
- ListControlStringCollectionEditor.cs
- EdmScalarPropertyAttribute.cs
- SecurityResources.cs
- ComPersistableTypeElementCollection.cs
- DataGridViewCellStyleConverter.cs
- _ServiceNameStore.cs
- SafeThreadHandle.cs
- WebPartDisplayModeCollection.cs
- figurelength.cs