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
- DesignerActionUI.cs
- XmlQualifiedName.cs
- Panel.cs
- IInstanceContextProvider.cs
- RecoverInstanceLocksCommand.cs
- ContextBase.cs
- DeviceContext2.cs
- ObjectQueryState.cs
- Int16Animation.cs
- InternalCache.cs
- BufferBuilder.cs
- RegexEditorDialog.cs
- FileSystemEventArgs.cs
- XmlSchemaObjectCollection.cs
- WebPartDescription.cs
- ConfigXmlDocument.cs
- TrackingProfileCache.cs
- TemplateBindingExpression.cs
- XmlElementCollection.cs
- SqlUserDefinedTypeAttribute.cs
- GridViewColumnCollection.cs
- DataGridViewCellParsingEventArgs.cs
- CallbackValidatorAttribute.cs
- GradientStopCollection.cs
- errorpatternmatcher.cs
- Window.cs
- RootBuilder.cs
- DecoderFallback.cs
- Point3DCollection.cs
- Visual3D.cs
- WindowsListViewItem.cs
- AssociationSetEnd.cs
- SpeechRecognizer.cs
- Grammar.cs
- SequentialWorkflowHeaderFooter.cs
- PublisherIdentityPermission.cs
- SafeEventLogWriteHandle.cs
- BidOverLoads.cs
- DataGridViewColumnEventArgs.cs
- ObjectRef.cs
- UpnEndpointIdentityExtension.cs
- GridViewRowCollection.cs
- WebPartDisplayModeCancelEventArgs.cs
- PipelineModuleStepContainer.cs
- TextRangeEditTables.cs
- AgileSafeNativeMemoryHandle.cs
- CounterCreationDataConverter.cs
- TextElement.cs
- ResourceCollectionInfo.cs
- DbConnectionInternal.cs
- NullableFloatAverageAggregationOperator.cs
- SQLByteStorage.cs
- WaitingCursor.cs
- hresults.cs
- ContextQuery.cs
- Utils.cs
- SizeAnimationUsingKeyFrames.cs
- XmlSchemaAll.cs
- AutomationPropertyInfo.cs
- TextServicesCompartmentContext.cs
- PanelStyle.cs
- DispatcherExceptionEventArgs.cs
- DataObject.cs
- ValidationErrorCollection.cs
- CodeCastExpression.cs
- StylusEditingBehavior.cs
- WebColorConverter.cs
- ReceiveMessageRecord.cs
- WebPartCatalogCloseVerb.cs
- VisualTreeHelper.cs
- SemanticBasicElement.cs
- UnsafeNetInfoNativeMethods.cs
- LinearGradientBrush.cs
- OleDbInfoMessageEvent.cs
- safesecurityhelperavalon.cs
- ControlParameter.cs
- ErasingStroke.cs
- PageParser.cs
- KeyMatchBuilder.cs
- SQLByteStorage.cs
- NativeCppClassAttribute.cs
- BitHelper.cs
- PermissionToken.cs
- EntityUtil.cs
- EdmComplexTypeAttribute.cs
- XmlTextReaderImpl.cs
- PropertyOverridesDialog.cs
- Panel.cs
- XmlDocumentFragment.cs
- PathFigureCollection.cs
- TypeToArgumentTypeConverter.cs
- XmlSerializationReader.cs
- PageSettings.cs
- DispatcherSynchronizationContext.cs
- TableAutomationPeer.cs
- Nullable.cs
- IDReferencePropertyAttribute.cs
- RightsManagementEncryptionTransform.cs
- ReferenceEqualityComparer.cs
- ColumnMapCopier.cs