Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Services / IO / System / IO / RenamedEventArgs.cs / 1305376 / RenamedEventArgs.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.IO { using System.Diagnostics; using System.Security.Permissions; using System; using System.Runtime.Versioning; ////// 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 { [ResourceExposure(ResourceScope.Machine)] [ResourceConsumption(ResourceScope.Machine)] 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; using System.Runtime.Versioning; ////// 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 { [ResourceExposure(ResourceScope.Machine)] [ResourceConsumption(ResourceScope.Machine)] 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
- WindowsEditBoxRange.cs
- SqlTrackingQuery.cs
- XmlConverter.cs
- _FtpDataStream.cs
- Range.cs
- CompatibleIComparer.cs
- Durable.cs
- loginstatus.cs
- AudioSignalProblemOccurredEventArgs.cs
- FormViewModeEventArgs.cs
- _LocalDataStoreMgr.cs
- Trace.cs
- ChangeBlockUndoRecord.cs
- VirtualPath.cs
- AssemblySettingAttributes.cs
- XmlSchemaSequence.cs
- Ipv6Element.cs
- Calendar.cs
- AutomationPeer.cs
- Component.cs
- DynamicActivity.cs
- BamlLocalizableResource.cs
- TimeoutConverter.cs
- SimpleWorkerRequest.cs
- HitTestParameters.cs
- TextMetrics.cs
- EventMappingSettingsCollection.cs
- ServiceObjectContainer.cs
- XmlSchemaSearchPattern.cs
- FilteredDataSetHelper.cs
- NetworkInterface.cs
- OSFeature.cs
- FixedDocument.cs
- FixUp.cs
- VarInfo.cs
- KerberosRequestorSecurityToken.cs
- ControlAdapter.cs
- PrintPageEvent.cs
- ScrollableControlDesigner.cs
- securestring.cs
- SystemIPv6InterfaceProperties.cs
- CodeDOMUtility.cs
- LineServicesCallbacks.cs
- DataSourceControl.cs
- TextDecorations.cs
- ResourceWriter.cs
- CodeTypeReference.cs
- Serialization.cs
- InfoCardBaseException.cs
- DataFieldCollectionEditor.cs
- Marshal.cs
- SourceLocation.cs
- DefaultPrintController.cs
- EncryptedPackageFilter.cs
- DataControlFieldHeaderCell.cs
- AspNetHostingPermission.cs
- Pointer.cs
- WpfKnownMember.cs
- Metadata.cs
- BindingSource.cs
- UIElementHelper.cs
- SingleObjectCollection.cs
- ThreadStartException.cs
- Rotation3D.cs
- HijriCalendar.cs
- CommandPlan.cs
- ControlSerializer.cs
- RoleManagerEventArgs.cs
- DataGridColumnHeader.cs
- DivideByZeroException.cs
- FontCollection.cs
- AgileSafeNativeMemoryHandle.cs
- ClosableStream.cs
- SingleKeyFrameCollection.cs
- DisplayMemberTemplateSelector.cs
- MetadataArtifactLoaderResource.cs
- designeractionlistschangedeventargs.cs
- HttpPostProtocolReflector.cs
- EdmType.cs
- RegexEditorDialog.cs
- CodeFieldReferenceExpression.cs
- Configuration.cs
- Bitmap.cs
- SqlServer2KCompatibilityAnnotation.cs
- DataGridView.cs
- FontFamilyConverter.cs
- DragEventArgs.cs
- CapabilitiesAssignment.cs
- CodeComment.cs
- externdll.cs
- IpcClientManager.cs
- TrackBarDesigner.cs
- ListView.cs
- HtmlTableCell.cs
- ConstrainedDataObject.cs
- XmlSchemaAttribute.cs
- compensatingcollection.cs
- AppDomainAttributes.cs
- remotingproxy.cs
- DataColumnMapping.cs