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
- ControlParameter.cs
- FixedTextBuilder.cs
- ConfigurationValidatorAttribute.cs
- X509Extension.cs
- DispatcherFrame.cs
- PathFigureCollectionValueSerializer.cs
- PathGeometry.cs
- RuntimeEnvironment.cs
- HashHelper.cs
- ArrayConverter.cs
- WebPartVerbCollection.cs
- SerializationBinder.cs
- FlowNode.cs
- AttributeData.cs
- HitTestDrawingContextWalker.cs
- EntityProxyFactory.cs
- BinaryReader.cs
- BuildProvider.cs
- ExceptionRoutedEventArgs.cs
- _NestedMultipleAsyncResult.cs
- Int16KeyFrameCollection.cs
- JoinTreeSlot.cs
- ExpressionBuilderContext.cs
- TypeElementCollection.cs
- BaseAutoFormat.cs
- _NegoStream.cs
- CellLabel.cs
- LocalizationParserHooks.cs
- Delay.cs
- reliableinputsessionchannel.cs
- StreamWithDictionary.cs
- FileDialog_Vista_Interop.cs
- DirectoryObjectSecurity.cs
- WebPartCloseVerb.cs
- RuntimeHelpers.cs
- URIFormatException.cs
- AlignmentYValidation.cs
- MouseEvent.cs
- ResolveMatchesMessageCD1.cs
- TextParagraph.cs
- NetStream.cs
- SqlRowUpdatingEvent.cs
- CanExpandCollapseAllConverter.cs
- FixedSOMImage.cs
- SQLMoney.cs
- HostedHttpTransportManager.cs
- xml.cs
- EventMap.cs
- Ref.cs
- PreviewKeyDownEventArgs.cs
- EncoderBestFitFallback.cs
- OleDbException.cs
- SimpleWebHandlerParser.cs
- WmpBitmapEncoder.cs
- VariableDesigner.xaml.cs
- WebPartPersonalization.cs
- RSAPKCS1KeyExchangeFormatter.cs
- ActivationProxy.cs
- wgx_render.cs
- FusionWrap.cs
- ValueTable.cs
- TaskbarItemInfo.cs
- GACMembershipCondition.cs
- StickyNoteAnnotations.cs
- ImageCodecInfo.cs
- AttributeTableBuilder.cs
- StateElement.cs
- MimeTextImporter.cs
- TemplatedWizardStep.cs
- Rijndael.cs
- ListItemConverter.cs
- EntityDataSourceChangingEventArgs.cs
- Schema.cs
- DataPagerFieldItem.cs
- AuthenticateEventArgs.cs
- HMACMD5.cs
- ApplicationActivator.cs
- TableLayoutPanelResizeGlyph.cs
- BooleanStorage.cs
- MenuItem.cs
- Stopwatch.cs
- DodSequenceMerge.cs
- OutputCacheProfile.cs
- CopyAttributesAction.cs
- GraphicsState.cs
- HtmlInputPassword.cs
- FormatException.cs
- Border.cs
- UnsafeNativeMethods.cs
- IncrementalReadDecoders.cs
- StylusPlugin.cs
- ScrollItemProviderWrapper.cs
- AuthenticationModulesSection.cs
- ProjectionPathBuilder.cs
- DigestTraceRecordHelper.cs
- CodeSnippetExpression.cs
- ListComponentEditorPage.cs
- Control.cs
- SystemException.cs
- ConcurrentQueue.cs