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
- SplitContainer.cs
- DbSource.cs
- FakeModelItemImpl.cs
- SchemaImporterExtensionElement.cs
- CompositeFontParser.cs
- OleServicesContext.cs
- SystemException.cs
- Imaging.cs
- Normalization.cs
- RelatedImageListAttribute.cs
- SettingsProviderCollection.cs
- XmlDataSourceView.cs
- MachineKey.cs
- FactoryGenerator.cs
- TracedNativeMethods.cs
- TreeSet.cs
- ForceCopyBuildProvider.cs
- MenuCommands.cs
- RtfToXamlReader.cs
- ItemsControlAutomationPeer.cs
- BuildResult.cs
- ClientBuildManagerCallback.cs
- Point4DConverter.cs
- SiblingIterators.cs
- XslCompiledTransform.cs
- SystemNetHelpers.cs
- DefaultMemberAttribute.cs
- SemanticBasicElement.cs
- OledbConnectionStringbuilder.cs
- TableParagraph.cs
- TextEndOfSegment.cs
- BackoffTimeoutHelper.cs
- CodeTypeReferenceCollection.cs
- Style.cs
- Parameter.cs
- HtmlFormWrapper.cs
- ThreadSafeList.cs
- IriParsingElement.cs
- ProtocolsConfiguration.cs
- RegexCapture.cs
- ThicknessAnimationUsingKeyFrames.cs
- XPathAxisIterator.cs
- FontWeight.cs
- RunClient.cs
- DataRowCollection.cs
- FrameworkElementAutomationPeer.cs
- SmiMetaData.cs
- LocatorPartList.cs
- SchemaImporterExtension.cs
- PropertyCondition.cs
- ServiceOperationParameter.cs
- SkipQueryOptionExpression.cs
- IPHostEntry.cs
- ChameleonKey.cs
- infer.cs
- QueryReaderSettings.cs
- login.cs
- AppDomainManager.cs
- BaseCollection.cs
- DefaultEventAttribute.cs
- translator.cs
- AttributeUsageAttribute.cs
- FormsAuthenticationConfiguration.cs
- Emitter.cs
- DateTimeOffsetConverter.cs
- securitycriticaldataClass.cs
- TriState.cs
- MappingMetadataHelper.cs
- TimeSpanMinutesConverter.cs
- VirtualDirectoryMapping.cs
- FileChangeNotifier.cs
- SpeakInfo.cs
- XmlSchemaResource.cs
- StateFinalizationDesigner.cs
- WpfWebRequestHelper.cs
- ManagedFilter.cs
- GifBitmapDecoder.cs
- FormViewInsertedEventArgs.cs
- TableChangeProcessor.cs
- Line.cs
- Padding.cs
- ListenerHandler.cs
- OracleParameterCollection.cs
- EntityClassGenerator.cs
- TreeWalker.cs
- DebugInfoGenerator.cs
- Task.cs
- EntityClassGenerator.cs
- mda.cs
- TypeTypeConverter.cs
- Converter.cs
- ExpandableObjectConverter.cs
- DynamicRendererThreadManager.cs
- TemplateNameScope.cs
- DbProviderServices.cs
- PagePropertiesChangingEventArgs.cs
- PersonalizationAdministration.cs
- DataGridCheckBoxColumn.cs
- AccessibleObject.cs
- SimplePropertyEntry.cs