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
- XmlSchemaComplexContentExtension.cs
- PerformanceCounter.cs
- BasePropertyDescriptor.cs
- ScriptControlDescriptor.cs
- PageWrapper.cs
- TypeSystemProvider.cs
- SystemIcmpV6Statistics.cs
- MethodToken.cs
- FormViewInsertedEventArgs.cs
- FindProgressChangedEventArgs.cs
- BaseCollection.cs
- MarkupObject.cs
- ServiceChannelProxy.cs
- BuilderInfo.cs
- XmlUtil.cs
- BindingCollection.cs
- TaskScheduler.cs
- ActivationArguments.cs
- PageBuildProvider.cs
- EntityDataSourceQueryBuilder.cs
- RijndaelManagedTransform.cs
- DataGridViewSortCompareEventArgs.cs
- SqlBulkCopyColumnMappingCollection.cs
- Int32.cs
- ServicesExceptionNotHandledEventArgs.cs
- DataGridRelationshipRow.cs
- InvalidComObjectException.cs
- IISUnsafeMethods.cs
- DiscoveryProxy.cs
- BStrWrapper.cs
- CursorInteropHelper.cs
- ListenerHandler.cs
- ViewGenResults.cs
- sqlinternaltransaction.cs
- ProfileModule.cs
- ReachDocumentSequenceSerializerAsync.cs
- ActivityAction.cs
- HitTestResult.cs
- RegexTree.cs
- AutomationElementCollection.cs
- DynamicField.cs
- BufferedGraphicsContext.cs
- PointCollection.cs
- StringUtil.cs
- EndSelectCardRequest.cs
- KeyGesture.cs
- XPathNavigatorException.cs
- Graphics.cs
- PeerInputChannel.cs
- LoadWorkflowCommand.cs
- SourceFileBuildProvider.cs
- StringFormat.cs
- Semaphore.cs
- EpmCustomContentSerializer.cs
- XmlC14NWriter.cs
- TokenFactoryBase.cs
- WebPartCancelEventArgs.cs
- FrameworkElementAutomationPeer.cs
- RegexInterpreter.cs
- DiscoveryInnerClientAdhocCD1.cs
- PackageRelationship.cs
- EventPropertyMap.cs
- PeerResolverMode.cs
- CultureTableRecord.cs
- ProfileGroupSettingsCollection.cs
- ControlType.cs
- SessionEndedEventArgs.cs
- Style.cs
- FixedBufferAttribute.cs
- AjaxFrameworkAssemblyAttribute.cs
- XmlDocumentType.cs
- CodeAttachEventStatement.cs
- SqlSelectStatement.cs
- SortedList.cs
- HierarchicalDataBoundControl.cs
- DocumentApplication.cs
- DateTimeFormat.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- BoundingRectTracker.cs
- Matrix.cs
- EntityModelBuildProvider.cs
- VirtualPathProvider.cs
- GiveFeedbackEvent.cs
- RoamingStoreFileUtility.cs
- Group.cs
- ExpandSegment.cs
- MsmqHostedTransportManager.cs
- BaseTemplateBuildProvider.cs
- UpdateDelegates.Generated.cs
- SoapAttributeAttribute.cs
- BlobPersonalizationState.cs
- TileBrush.cs
- PropertyInfoSet.cs
- SpoolingTaskBase.cs
- CatalogZoneBase.cs
- LingerOption.cs
- AdornerLayer.cs
- M3DUtil.cs
- DataGridViewColumnEventArgs.cs
- RequestTimeoutManager.cs