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
- XmlSchemaAttributeGroup.cs
- TypeDescriptionProvider.cs
- WebEvents.cs
- AssemblyContextControlItem.cs
- WindowsFormsHostPropertyMap.cs
- DetailsViewModeEventArgs.cs
- __ConsoleStream.cs
- OdbcErrorCollection.cs
- SynchronizedPool.cs
- TraceLevelStore.cs
- SchemaManager.cs
- DataServiceQueryProvider.cs
- CharacterMetrics.cs
- XmlSchemaSimpleTypeRestriction.cs
- TemplatedMailWebEventProvider.cs
- TemplateKeyConverter.cs
- sqlser.cs
- ErrorWrapper.cs
- XmlAttributeProperties.cs
- NeutralResourcesLanguageAttribute.cs
- DirectoryInfo.cs
- Debug.cs
- AssemblyCache.cs
- DeviceContext2.cs
- DBSchemaTable.cs
- BaseCAMarshaler.cs
- LinqDataSourceHelper.cs
- SourceLineInfo.cs
- figurelengthconverter.cs
- SecureUICommand.cs
- RequestStatusBarUpdateEventArgs.cs
- FontDialog.cs
- TypeSystem.cs
- EnumerableRowCollectionExtensions.cs
- SizeF.cs
- VoiceChangeEventArgs.cs
- SpeechDetectedEventArgs.cs
- WindowsTitleBar.cs
- XamlRtfConverter.cs
- ButtonColumn.cs
- EmbeddedObject.cs
- mansign.cs
- Rect.cs
- SqlFlattener.cs
- PaintEvent.cs
- OperationResponse.cs
- InvalidMessageContractException.cs
- DCSafeHandle.cs
- InternalRelationshipCollection.cs
- CmsUtils.cs
- KeyValueSerializer.cs
- StructuredCompositeActivityDesigner.cs
- GraphicsPathIterator.cs
- CharKeyFrameCollection.cs
- DataPager.cs
- QilInvokeEarlyBound.cs
- LicenseException.cs
- InputScope.cs
- ColumnMapProcessor.cs
- CacheOutputQuery.cs
- XmlSchemaAnnotation.cs
- CapabilitiesPattern.cs
- KeyToListMap.cs
- DbgCompiler.cs
- Group.cs
- SectionInformation.cs
- SynchronizationLockException.cs
- ImportedPolicyConversionContext.cs
- PolygonHotSpot.cs
- _AutoWebProxyScriptHelper.cs
- RenderCapability.cs
- OdbcParameterCollection.cs
- Expressions.cs
- CompilerGlobalScopeAttribute.cs
- ExpressionConverter.cs
- DisableDpiAwarenessAttribute.cs
- SqlCommandBuilder.cs
- FilterableData.cs
- HebrewNumber.cs
- ColorConverter.cs
- SystemDiagnosticsSection.cs
- Transactions.cs
- RoutingBehavior.cs
- WindowsScrollBar.cs
- SecurityCriticalDataForSet.cs
- SessionIDManager.cs
- ResourceContainerWrapper.cs
- CodeDirectoryCompiler.cs
- BitmapScalingModeValidation.cs
- SiteMapDesignerDataSourceView.cs
- StoryFragments.cs
- ListItemConverter.cs
- CompositeActivityCodeGenerator.cs
- ByteStream.cs
- ECDiffieHellman.cs
- SQLUtility.cs
- SystemColors.cs
- SourceFileBuildProvider.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- mediapermission.cs