Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / Services / IO / System / IO / FileSystemEventArgs.cs / 1 / FileSystemEventArgs.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.IO {
using System.Diagnostics;
using System.Security.Permissions;
using System;
///
/// Provides data for the directory events: , , .
///
public class FileSystemEventArgs : EventArgs {
private WatcherChangeTypes changeType;
private string name;
private string fullPath;
///
/// Initializes a new instance of the class.
///
public FileSystemEventArgs(WatcherChangeTypes changeType, string directory, string name)
{
this.changeType = changeType;
this.name = name;
// Ensure that the directory name ends with a "\"
if (!directory.EndsWith("\\", StringComparison.Ordinal)) {
directory = directory + "\\";
}
this.fullPath = directory + name;
}
///
///
/// Gets
/// one of the
/// values.
///
///
public WatcherChangeTypes ChangeType {
get {
return changeType;
}
}
///
///
/// Gets
/// the
/// fully qualifed path of the affected file or directory.
///
///
public string FullPath {
get {
return fullPath;
}
}
///
///
/// Gets
/// the name of the affected file or directory.
///
///
public string Name {
get {
return name;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.IO {
using System.Diagnostics;
using System.Security.Permissions;
using System;
///
/// Provides data for the directory events: , , .
///
public class FileSystemEventArgs : EventArgs {
private WatcherChangeTypes changeType;
private string name;
private string fullPath;
///
/// Initializes a new instance of the class.
///
public FileSystemEventArgs(WatcherChangeTypes changeType, string directory, string name)
{
this.changeType = changeType;
this.name = name;
// Ensure that the directory name ends with a "\"
if (!directory.EndsWith("\\", StringComparison.Ordinal)) {
directory = directory + "\\";
}
this.fullPath = directory + name;
}
///
///
/// Gets
/// one of the
/// values.
///
///
public WatcherChangeTypes ChangeType {
get {
return changeType;
}
}
///
///
/// Gets
/// the
/// fully qualifed path of the affected file or directory.
///
///
public string FullPath {
get {
return fullPath;
}
}
///
///
/// Gets
/// the name of the affected file or directory.
///
///
public string Name {
get {
return name;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ToolStripTemplateNode.cs
- GeometryValueSerializer.cs
- ThreadInterruptedException.cs
- TablePatternIdentifiers.cs
- datacache.cs
- NotImplementedException.cs
- XmlWriter.cs
- XmlSiteMapProvider.cs
- DBCSCodePageEncoding.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- DataGridAutoGeneratingColumnEventArgs.cs
- LinqDataSourceSelectEventArgs.cs
- smtpconnection.cs
- PerfProviderCollection.cs
- MaskedTextBox.cs
- WebCategoryAttribute.cs
- WebPartDisplayMode.cs
- AttachmentService.cs
- TreeViewHitTestInfo.cs
- TemplateField.cs
- IdentifierCollection.cs
- ReadOnlyDataSource.cs
- IdentitySection.cs
- WebPartZoneBase.cs
- ControlCollection.cs
- EntityDataSourceSelectingEventArgs.cs
- Menu.cs
- TextTreeTextElementNode.cs
- SQLDecimal.cs
- DataGridViewCellPaintingEventArgs.cs
- CreateUserErrorEventArgs.cs
- StrongNameIdentityPermission.cs
- DetailsViewUpdatedEventArgs.cs
- EntityTypeEmitter.cs
- Number.cs
- CheckBoxPopupAdapter.cs
- KeyedCollection.cs
- ExpressionNode.cs
- Setter.cs
- LayoutTableCell.cs
- Ref.cs
- TextEffect.cs
- ToolStripDropDownButton.cs
- MetadataArtifactLoaderCompositeFile.cs
- PointLight.cs
- ServicesUtilities.cs
- AccessDataSource.cs
- CompilationSection.cs
- _AutoWebProxyScriptEngine.cs
- QfeChecker.cs
- IPAddressCollection.cs
- InvalidateEvent.cs
- PowerEase.cs
- InputLangChangeRequestEvent.cs
- CultureSpecificStringDictionary.cs
- TextEditorParagraphs.cs
- OpCodes.cs
- JsonGlobals.cs
- ObjectListSelectEventArgs.cs
- XmlDownloadManager.cs
- CodeGroup.cs
- ToolStripSettings.cs
- CheckBoxField.cs
- DbProviderFactory.cs
- TextRangeEditLists.cs
- HelpEvent.cs
- SelectionGlyph.cs
- RegexStringValidator.cs
- OutputCacheProviderCollection.cs
- SplineKeyFrames.cs
- ElementProxy.cs
- ResourceBinder.cs
- SearchExpression.cs
- KeyTime.cs
- ComboBox.cs
- AppearanceEditorPart.cs
- RecipientInfo.cs
- FormatterServicesNoSerializableCheck.cs
- MatrixTransform3D.cs
- ElementNotAvailableException.cs
- HTMLTagNameToTypeMapper.cs
- XmlObjectSerializerReadContext.cs
- NullableDecimalSumAggregationOperator.cs
- ProgressPage.cs
- LinkDescriptor.cs
- PreservationFileReader.cs
- ScriptingRoleServiceSection.cs
- DataGridViewCellMouseEventArgs.cs
- XPathScanner.cs
- PageRequestManager.cs
- RoleGroupCollection.cs
- FunctionNode.cs
- CompilerGlobalScopeAttribute.cs
- SystemColorTracker.cs
- FragmentNavigationEventArgs.cs
- CategoryAttribute.cs
- FlowDocumentView.cs
- Quaternion.cs
- SoundPlayer.cs
- ContextMarshalException.cs