Code:
/ DotNET / DotNET / 8.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
- Material.cs
- NavigateUrlConverter.cs
- NotConverter.cs
- ScrollBar.cs
- TableItemStyle.cs
- TransformCryptoHandle.cs
- wmiutil.cs
- CommandHelpers.cs
- EntityRecordInfo.cs
- InteropAutomationProvider.cs
- TreeNodeBinding.cs
- MenuAdapter.cs
- RefType.cs
- DocumentReference.cs
- DataIdProcessor.cs
- RowToFieldTransformer.cs
- XamlToRtfParser.cs
- ItemMap.cs
- OleDragDropHandler.cs
- SelectionListDesigner.cs
- DataGridSortingEventArgs.cs
- NativeObjectSecurity.cs
- invalidudtexception.cs
- EventMappingSettings.cs
- HiddenFieldDesigner.cs
- SafeHandles.cs
- EventHandlingScope.cs
- Binding.cs
- IProvider.cs
- GroupAggregateExpr.cs
- ModulesEntry.cs
- BindingManagerDataErrorEventArgs.cs
- MethodCallConverter.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- RequestResizeEvent.cs
- EmptyTextWriter.cs
- ResXResourceReader.cs
- HtmlPanelAdapter.cs
- FormsAuthenticationConfiguration.cs
- KnownAssemblyEntry.cs
- WebPartConnectionsCancelVerb.cs
- CompareInfo.cs
- FixedLineResult.cs
- ModifierKeysConverter.cs
- GPPOINTF.cs
- TreeChangeInfo.cs
- ListSourceHelper.cs
- AuthenticatingEventArgs.cs
- CompositionDesigner.cs
- PtsCache.cs
- XmlDocumentViewSchema.cs
- Section.cs
- MeshGeometry3D.cs
- TextBoxView.cs
- SqlCacheDependency.cs
- OleDbConnection.cs
- Normalization.cs
- RegexCaptureCollection.cs
- shaperfactoryquerycacheentry.cs
- SqlHelper.cs
- FormViewPagerRow.cs
- RequiredFieldValidator.cs
- ReceiveErrorHandling.cs
- ContainerControlDesigner.cs
- TextElementEnumerator.cs
- SecurityTokenContainer.cs
- TypeSystem.cs
- ListChunk.cs
- PolicyStatement.cs
- TextElement.cs
- Panel.cs
- PathSegmentCollection.cs
- OracleString.cs
- FixUpCollection.cs
- HitTestWithPointDrawingContextWalker.cs
- PartialArray.cs
- BoolExpr.cs
- TripleDES.cs
- ActivityTrace.cs
- TextBoxBase.cs
- GridToolTip.cs
- MediaTimeline.cs
- CommandID.cs
- InstanceDescriptor.cs
- COM2AboutBoxPropertyDescriptor.cs
- EditorPart.cs
- RenderContext.cs
- MailMessageEventArgs.cs
- InputScopeConverter.cs
- DesignerCategoryAttribute.cs
- WebServiceTypeData.cs
- ClaimComparer.cs
- UnsettableComboBox.cs
- DataGridViewSortCompareEventArgs.cs
- XmlWrappingReader.cs
- TextDecorationLocationValidation.cs
- HtmlInputCheckBox.cs
- LocationUpdates.cs
- TemplateField.cs
- DataGridColumnHeaderCollection.cs