Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / Services / IO / System / IO / RenamedEventArgs.cs / 1 / RenamedEventArgs.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.IO { using System.Diagnostics; using System.Security.Permissions; using System; ////// public class RenamedEventArgs : FileSystemEventArgs { private string oldName; private string oldFullPath; ///Provides data for the ///event. /// public RenamedEventArgs(WatcherChangeTypes changeType, string directory, string name, string oldName) : base(changeType, directory, name) { // Ensure that the directory name ends with a "\" if (!directory.EndsWith("\\", StringComparison.Ordinal)) { directory = directory + "\\"; } this.oldName = oldName; this.oldFullPath = directory + oldName; } ////// Initializes a new instance of the ////// class. /// /// public string OldFullPath { get { new FileIOPermission(FileIOPermissionAccess.Read, Path.GetPathRoot(oldFullPath)).Demand(); return oldFullPath; } } ////// Gets /// the previous fully qualified path of the affected file or directory. /// ////// public string OldName { get { return oldName; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ ///// Gets /// the old name of the affected file or directory. /// ///// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.IO { using System.Diagnostics; using System.Security.Permissions; using System; ////// public class RenamedEventArgs : FileSystemEventArgs { private string oldName; private string oldFullPath; ///Provides data for the ///event. /// public RenamedEventArgs(WatcherChangeTypes changeType, string directory, string name, string oldName) : base(changeType, directory, name) { // Ensure that the directory name ends with a "\" if (!directory.EndsWith("\\", StringComparison.Ordinal)) { directory = directory + "\\"; } this.oldName = oldName; this.oldFullPath = directory + oldName; } ////// Initializes a new instance of the ////// class. /// /// public string OldFullPath { get { new FileIOPermission(FileIOPermissionAccess.Read, Path.GetPathRoot(oldFullPath)).Demand(); return oldFullPath; } } ////// Gets /// the previous fully qualified path of the affected file or directory. /// ////// public string OldName { get { return oldName; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007./// Gets /// the old name of the affected file or directory. /// ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ResolveDuplex11AsyncResult.cs
- AspProxy.cs
- FlowDocumentView.cs
- wgx_render.cs
- OletxCommittableTransaction.cs
- WorkflowRuntimeServiceElementCollection.cs
- WindowsGraphicsCacheManager.cs
- XmlName.cs
- ExtendedPropertyDescriptor.cs
- SiteMembershipCondition.cs
- RelationshipConverter.cs
- PolyLineSegmentFigureLogic.cs
- RadialGradientBrush.cs
- _KerberosClient.cs
- EditorPartChrome.cs
- Panel.cs
- DynamicExpression.cs
- PersonalizationProvider.cs
- DispatcherExceptionEventArgs.cs
- DataGridViewCellMouseEventArgs.cs
- SoapClientMessage.cs
- QueueSurrogate.cs
- FusionWrap.cs
- Sql8ConformanceChecker.cs
- SmiSettersStream.cs
- EastAsianLunisolarCalendar.cs
- UIAgentCrashedException.cs
- UIElementPropertyUndoUnit.cs
- Int64AnimationBase.cs
- UnsupportedPolicyOptionsException.cs
- StreamResourceInfo.cs
- RemotingServices.cs
- DetailsViewInsertedEventArgs.cs
- EntityDataSourceDesignerHelper.cs
- TextServicesManager.cs
- _UriSyntax.cs
- TransformDescriptor.cs
- TrackingQuery.cs
- PasswordPropertyTextAttribute.cs
- XmlAttributeCollection.cs
- SqlConnectionHelper.cs
- HeaderedContentControl.cs
- FullTextBreakpoint.cs
- ClientSideProviderDescription.cs
- RSAOAEPKeyExchangeDeformatter.cs
- ValidatorCollection.cs
- EntityCollectionChangedParams.cs
- ViewLoader.cs
- FormatSettings.cs
- WebPartTransformerAttribute.cs
- ProtocolsConfigurationHandler.cs
- RenderOptions.cs
- basenumberconverter.cs
- GeometryValueSerializer.cs
- LicenseException.cs
- mediapermission.cs
- LostFocusEventManager.cs
- UnmanagedMarshal.cs
- PhoneCall.cs
- DateTimeAutomationPeer.cs
- XmlBaseWriter.cs
- NGCSerializationManagerAsync.cs
- ManagedCodeMarkers.cs
- Vector3DAnimation.cs
- MessagePropertyFilter.cs
- RefExpr.cs
- SimpleColumnProvider.cs
- CodeDelegateInvokeExpression.cs
- TPLETWProvider.cs
- SqlServices.cs
- Cursor.cs
- ConnectorDragDropGlyph.cs
- Roles.cs
- UserControlAutomationPeer.cs
- StrongNameKeyPair.cs
- CompilerCollection.cs
- InvalidAsynchronousStateException.cs
- PropertyChangingEventArgs.cs
- SerializationAttributes.cs
- ThreadAttributes.cs
- PaginationProgressEventArgs.cs
- ManagementEventArgs.cs
- NetNamedPipeBinding.cs
- MatrixAnimationUsingPath.cs
- Vector3D.cs
- PositiveTimeSpanValidator.cs
- ContextProperty.cs
- TableLayoutStyle.cs
- Int64Storage.cs
- MouseEvent.cs
- EntityCodeGenerator.cs
- XamlSerializerUtil.cs
- ConditionCollection.cs
- GraphicsContext.cs
- ArithmeticException.cs
- KeyedHashAlgorithm.cs
- CachedBitmap.cs
- DataListItemEventArgs.cs
- ListViewUpdateEventArgs.cs
- LinqDataSourceUpdateEventArgs.cs