Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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;
///
/// Provides data for the event.
///
public class RenamedEventArgs : FileSystemEventArgs {
private string oldName;
private string oldFullPath;
///
///
/// Initializes a new instance of the
/// class.
///
///
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;
}
///
///
/// Gets
/// the previous fully qualified path of the affected file or directory.
///
///
public string OldFullPath {
get {
new FileIOPermission(FileIOPermissionAccess.Read, Path.GetPathRoot(oldFullPath)).Demand();
return oldFullPath;
}
}
///
///
/// Gets
/// the old name of the affected file or directory.
///
///
public string OldName {
get {
return oldName;
}
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CheckoutException.cs
- BuilderPropertyEntry.cs
- ArrayElementGridEntry.cs
- UpDownBaseDesigner.cs
- Compilation.cs
- SpecialNameAttribute.cs
- Transform3D.cs
- MethodExpr.cs
- NativeMethods.cs
- Model3DCollection.cs
- InternalDispatchObject.cs
- PropertyValueUIItem.cs
- SegmentInfo.cs
- DateTimeHelper.cs
- DrawingState.cs
- BulletedListEventArgs.cs
- RepeaterItemEventArgs.cs
- OdbcUtils.cs
- CheckBox.cs
- Context.cs
- serverconfig.cs
- PropertyNames.cs
- Label.cs
- BooleanKeyFrameCollection.cs
- TextEditorTyping.cs
- NativeMethods.cs
- DesignerTransactionCloseEvent.cs
- TabPageDesigner.cs
- SettingsPropertyWrongTypeException.cs
- HealthMonitoringSectionHelper.cs
- WindowsFormsHelpers.cs
- SamlSecurityToken.cs
- PictureBox.cs
- TempFiles.cs
- StateFinalizationDesigner.cs
- TextElementEnumerator.cs
- EventMappingSettings.cs
- ControlBindingsCollection.cs
- XsltLoader.cs
- X509AsymmetricSecurityKey.cs
- ItemPager.cs
- MembershipSection.cs
- ArrayTypeMismatchException.cs
- HealthMonitoringSection.cs
- Span.cs
- BrowserDefinitionCollection.cs
- HtmlWindow.cs
- PowerStatus.cs
- SelectedPathEditor.cs
- TextDecorationCollectionConverter.cs
- PageContentCollection.cs
- TextBlock.cs
- InvokeProviderWrapper.cs
- MetafileHeader.cs
- HostSecurityManager.cs
- XmlSchemaComplexType.cs
- MsmqTransportSecurityElement.cs
- HwndTarget.cs
- DataGridViewCellStyle.cs
- IpcChannel.cs
- DecimalKeyFrameCollection.cs
- MemoryFailPoint.cs
- ConfigurationSchemaErrors.cs
- CheckBoxAutomationPeer.cs
- WebPartUtil.cs
- SimpleFieldTemplateFactory.cs
- WeakReadOnlyCollection.cs
- DataViewListener.cs
- ScriptManager.cs
- DesignerActionUIStateChangeEventArgs.cs
- PeerNearMe.cs
- WindowCollection.cs
- DbLambda.cs
- FrameworkObject.cs
- CodeDomConfigurationHandler.cs
- CustomServiceCredentials.cs
- ToolTipAutomationPeer.cs
- AuthorizationRuleCollection.cs
- SpellCheck.cs
- CacheRequest.cs
- BaseComponentEditor.cs
- ToolStripArrowRenderEventArgs.cs
- Viewport3DAutomationPeer.cs
- DESCryptoServiceProvider.cs
- SessionSwitchEventArgs.cs
- GiveFeedbackEventArgs.cs
- MissingMemberException.cs
- SecureConversationVersion.cs
- Matrix3DStack.cs
- BaseTemplateBuildProvider.cs
- FigureParagraph.cs
- HotCommands.cs
- WindowsTitleBar.cs
- CodeDOMProvider.cs
- DeobfuscatingStream.cs
- OSFeature.cs
- backend.cs
- TripleDESCryptoServiceProvider.cs
- GenericEnumConverter.cs
- SimpleHandlerBuildProvider.cs