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
- SystemIPInterfaceStatistics.cs
- SizeKeyFrameCollection.cs
- DataGrid.cs
- TextRangeEdit.cs
- PolicyLevel.cs
- StrokeNodeOperations.cs
- TemplateBindingExtension.cs
- DataGridItemCollection.cs
- OleDbDataReader.cs
- _LocalDataStore.cs
- DBSchemaRow.cs
- OdbcFactory.cs
- TypeElementCollection.cs
- AnimationLayer.cs
- NameValueConfigurationCollection.cs
- WebZone.cs
- DecimalConstantAttribute.cs
- SkipQueryOptionExpression.cs
- SystemMulticastIPAddressInformation.cs
- Drawing.cs
- BindToObject.cs
- OperationSelectorBehavior.cs
- WorkflowOwnershipException.cs
- RawStylusInputCustomData.cs
- Pens.cs
- ToolboxComponentsCreatingEventArgs.cs
- SqlCacheDependency.cs
- BindingsSection.cs
- SortDescription.cs
- CryptoConfig.cs
- UtilityExtension.cs
- Misc.cs
- ManualResetEvent.cs
- FontUnit.cs
- BaseTemplatedMobileComponentEditor.cs
- HighContrastHelper.cs
- ParameterReplacerVisitor.cs
- CodeDelegateInvokeExpression.cs
- ApplicationSecurityManager.cs
- XmlSchemaComplexContentExtension.cs
- dsa.cs
- UiaCoreApi.cs
- Int16.cs
- DefaultTextStoreTextComposition.cs
- DetailsViewDeleteEventArgs.cs
- DictationGrammar.cs
- DesignerActionGlyph.cs
- TimeStampChecker.cs
- DeploymentSectionCache.cs
- _ProxyChain.cs
- ResolveNameEventArgs.cs
- PartialArray.cs
- filewebrequest.cs
- SocketException.cs
- AdRotator.cs
- DbModificationCommandTree.cs
- Rect3DValueSerializer.cs
- Menu.cs
- RawStylusActions.cs
- DetailsViewInsertedEventArgs.cs
- XmlNodeList.cs
- TextModifierScope.cs
- KerberosSecurityTokenProvider.cs
- CodePageUtils.cs
- ActivityBindForm.Designer.cs
- PersistChildrenAttribute.cs
- ProgressiveCrcCalculatingStream.cs
- ProfilePropertyMetadata.cs
- Win32.cs
- TypeSystem.cs
- DrawingAttributeSerializer.cs
- TransformValueSerializer.cs
- XmlFormatExtensionPrefixAttribute.cs
- HttpInputStream.cs
- _BasicClient.cs
- QilInvokeLateBound.cs
- StorageBasedPackageProperties.cs
- GridItemProviderWrapper.cs
- DoubleAnimationClockResource.cs
- Color.cs
- WindowsAuthenticationModule.cs
- SchemaElement.cs
- PerfService.cs
- WinEventQueueItem.cs
- BaseParser.cs
- PasswordDeriveBytes.cs
- NavigationProperty.cs
- DateTimeSerializationSection.cs
- LogEntrySerializer.cs
- LinkButton.cs
- InfoCardCryptoHelper.cs
- XmlAttribute.cs
- ValidatorAttribute.cs
- CodeVariableReferenceExpression.cs
- DoWorkEventArgs.cs
- DockProviderWrapper.cs
- UmAlQuraCalendar.cs
- CheckBox.cs
- AmbientLight.cs
- ParagraphResult.cs