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
- BigInt.cs
- ImageField.cs
- HwndStylusInputProvider.cs
- VisualTransition.cs
- DTCTransactionManager.cs
- ColorContextHelper.cs
- PlatformCulture.cs
- HighlightVisual.cs
- TypeConverterHelper.cs
- ToolBarButton.cs
- HtmlGenericControl.cs
- SafeBitVector32.cs
- SqlTypeSystemProvider.cs
- XmlSecureResolver.cs
- WebHttpSecurityElement.cs
- ReaderWriterLockWrapper.cs
- PerspectiveCamera.cs
- IdSpace.cs
- DependencyPropertyAttribute.cs
- MdImport.cs
- SqlCacheDependencyDatabase.cs
- RequestCachePolicy.cs
- RbTree.cs
- IDReferencePropertyAttribute.cs
- DiscoveryDocumentSearchPattern.cs
- AppDomainProtocolHandler.cs
- ProxyElement.cs
- SqlNodeTypeOperators.cs
- NullPackagingPolicy.cs
- ScrollProperties.cs
- DBSchemaRow.cs
- ObjectAssociationEndMapping.cs
- DataGridItemEventArgs.cs
- DecoderExceptionFallback.cs
- InvalidOleVariantTypeException.cs
- RequestCachePolicyConverter.cs
- RuleSettings.cs
- ButtonField.cs
- SchemaNotation.cs
- Image.cs
- Queue.cs
- Message.cs
- ErrorActivity.cs
- Shared.cs
- TextTreeText.cs
- CachingHintValidation.cs
- WebPartConnectionsDisconnectVerb.cs
- DataRecordObjectView.cs
- DatatypeImplementation.cs
- DataGridToolTip.cs
- Compensate.cs
- CodeBinaryOperatorExpression.cs
- NodeLabelEditEvent.cs
- ContentPresenter.cs
- SplitterCancelEvent.cs
- GenericUriParser.cs
- DesignerWithHeader.cs
- MessageHeaderDescription.cs
- GroupJoinQueryOperator.cs
- IfJoinedCondition.cs
- CryptoApi.cs
- LogLogRecord.cs
- TextEmbeddedObject.cs
- FixedDocument.cs
- MemberHolder.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- NamespaceEmitter.cs
- MetadataSource.cs
- IdentifierService.cs
- UIElement3D.cs
- PtsPage.cs
- ParamArrayAttribute.cs
- CodeEntryPointMethod.cs
- TokenBasedSetEnumerator.cs
- SendMailErrorEventArgs.cs
- DispatcherBuilder.cs
- assertwrapper.cs
- ClientFormsAuthenticationCredentials.cs
- M3DUtil.cs
- CircleHotSpot.cs
- DiscriminatorMap.cs
- PolyLineSegmentFigureLogic.cs
- LongCountAggregationOperator.cs
- RawStylusInputReport.cs
- HtmlInputReset.cs
- LocalizableAttribute.cs
- DefaultParameterValueAttribute.cs
- HtmlInputPassword.cs
- EntityClientCacheKey.cs
- GenericIdentity.cs
- State.cs
- Models.cs
- HttpModuleActionCollection.cs
- ApplicationSettingsBase.cs
- ControlBuilderAttribute.cs
- TextElementCollectionHelper.cs
- Executor.cs
- AffineTransform3D.cs
- TemplateEditingVerb.cs
- WindowsPen.cs