Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- X509Utils.cs
- PackageRelationshipSelector.cs
- RuntimeEnvironment.cs
- ListViewDataItem.cs
- CodeAttributeDeclaration.cs
- HelpProvider.cs
- userdatakeys.cs
- CompoundFileIOPermission.cs
- ZipPackage.cs
- DataFormat.cs
- EntityDataSourceSelectingEventArgs.cs
- EntityParameterCollection.cs
- ScriptResourceAttribute.cs
- EntityDataSourceQueryBuilder.cs
- QilCloneVisitor.cs
- ThreadPoolTaskScheduler.cs
- Stream.cs
- TableItemStyle.cs
- UpdatePanelControlTrigger.cs
- HandleCollector.cs
- AsyncSerializedWorker.cs
- StringConverter.cs
- AssemblyBuilderData.cs
- ContentPropertyAttribute.cs
- FactoryGenerator.cs
- FontStretches.cs
- DataSourceControlBuilder.cs
- RestHandler.cs
- CodeParameterDeclarationExpression.cs
- ThrowHelper.cs
- DbCommandTree.cs
- AnimatedTypeHelpers.cs
- CfgArc.cs
- ProtectedConfigurationProviderCollection.cs
- TimeoutException.cs
- DataBindEngine.cs
- XmlObjectSerializerWriteContext.cs
- CatalogPartCollection.cs
- _SslSessionsCache.cs
- TableLayoutSettingsTypeConverter.cs
- CategoryNameCollection.cs
- HwndMouseInputProvider.cs
- ListItemParagraph.cs
- DSACryptoServiceProvider.cs
- Pen.cs
- FrameworkElementFactory.cs
- XmlReader.cs
- MethodImplAttribute.cs
- Animatable.cs
- DocumentStream.cs
- Italic.cs
- UIInitializationException.cs
- MetadataException.cs
- DataGridSortCommandEventArgs.cs
- WebPartVerb.cs
- ImageField.cs
- PaintEvent.cs
- CollectionBuilder.cs
- HttpFileCollectionWrapper.cs
- DataGridPagerStyle.cs
- SplitterCancelEvent.cs
- XmlSignatureManifest.cs
- SqlFactory.cs
- GraphicsPathIterator.cs
- BackStopAuthenticationModule.cs
- CircleHotSpot.cs
- _BufferOffsetSize.cs
- TraceHandler.cs
- BuiltInPermissionSets.cs
- SubclassTypeValidatorAttribute.cs
- HttpUnhandledOperationInvoker.cs
- TaskScheduler.cs
- KoreanLunisolarCalendar.cs
- TimeSpanStorage.cs
- WebResourceUtil.cs
- TransformerInfo.cs
- CodeNamespace.cs
- SqlFunctions.cs
- ApplicationManager.cs
- UserControl.cs
- documentation.cs
- BasicViewGenerator.cs
- SecurityPolicySection.cs
- DataObjectMethodAttribute.cs
- X509RecipientCertificateClientElement.cs
- BitmapScalingModeValidation.cs
- CalendarKeyboardHelper.cs
- CqlWriter.cs
- WebMessageFormatHelper.cs
- ObjectCloneHelper.cs
- StringInfo.cs
- TextSpan.cs
- MimeXmlImporter.cs
- EncoderFallback.cs
- StdValidatorsAndConverters.cs
- SelectionRange.cs
- FileClassifier.cs
- DesignerActionKeyboardBehavior.cs
- SqlDataSourceWizardForm.cs
- SqlCommandSet.cs