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
- DataSetFieldSchema.cs
- NaturalLanguageHyphenator.cs
- QilTypeChecker.cs
- wmiprovider.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- PrivilegeNotHeldException.cs
- TextElementEnumerator.cs
- DispatcherOperation.cs
- NamespaceCollection.cs
- SocketPermission.cs
- WhitespaceRule.cs
- XmlHierarchicalDataSourceView.cs
- NodeInfo.cs
- StorageEndPropertyMapping.cs
- RegularExpressionValidator.cs
- ClientScriptManager.cs
- SamlAuthenticationStatement.cs
- TimeSpanValidatorAttribute.cs
- ContextStack.cs
- SQLInt64Storage.cs
- SID.cs
- SafeReversePInvokeHandle.cs
- WebPartEditorOkVerb.cs
- hresults.cs
- AddInController.cs
- Matrix.cs
- OnOperation.cs
- StateManagedCollection.cs
- Int32EqualityComparer.cs
- NotConverter.cs
- WmpBitmapEncoder.cs
- ProxyHwnd.cs
- BoolExpressionVisitors.cs
- EventTrigger.cs
- UrlMapping.cs
- RectAnimation.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- ImageAnimator.cs
- StorageRoot.cs
- XhtmlBasicPhoneCallAdapter.cs
- Delegate.cs
- WindowAutomationPeer.cs
- SplineQuaternionKeyFrame.cs
- CustomMenuItemCollection.cs
- SegmentInfo.cs
- MenuAutomationPeer.cs
- DataGridViewTextBoxEditingControl.cs
- ImageKeyConverter.cs
- UxThemeWrapper.cs
- ContractBase.cs
- WorkItem.cs
- PersonalizationProviderCollection.cs
- ModuleBuilderData.cs
- StringWriter.cs
- CurrentTimeZone.cs
- WebPartChrome.cs
- DataGridViewImageCell.cs
- SqlProviderServices.cs
- Sorting.cs
- SelectionWordBreaker.cs
- Maps.cs
- XMLSyntaxException.cs
- uribuilder.cs
- Certificate.cs
- UnsafeMethods.cs
- ResourceManager.cs
- UTF7Encoding.cs
- XmlCharType.cs
- MobileTextWriter.cs
- StrokeCollection2.cs
- ListenerElementsCollection.cs
- PackageStore.cs
- Variable.cs
- RowCache.cs
- Size.cs
- SecureConversationVersion.cs
- XamlParser.cs
- NetworkStream.cs
- ProfileGroupSettingsCollection.cs
- Config.cs
- PostBackOptions.cs
- DataTableNameHandler.cs
- SchemaNamespaceManager.cs
- Durable.cs
- EffectiveValueEntry.cs
- LoadWorkflowByInstanceKeyCommand.cs
- XmlToDatasetMap.cs
- ValidatorCompatibilityHelper.cs
- DataGridItemEventArgs.cs
- storepermissionattribute.cs
- Polygon.cs
- AutomationPropertyInfo.cs
- FlowDocument.cs
- BatchParser.cs
- XmlMemberMapping.cs
- WrapperEqualityComparer.cs
- CodeSnippetCompileUnit.cs
- XmlDocumentSerializer.cs
- LocatorGroup.cs
- MessageDecoder.cs