Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- VirtualPath.cs
- PropertyCondition.cs
- BufferedResponseStream.cs
- ContentPlaceHolder.cs
- HelpInfo.cs
- EventLogException.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- HtmlFormAdapter.cs
- ResourceDescriptionAttribute.cs
- RtfControls.cs
- OdbcException.cs
- MethodBuilder.cs
- PolicyManager.cs
- FastPropertyAccessor.cs
- ServiceDeploymentInfo.cs
- ColumnWidthChangedEvent.cs
- PropertyNames.cs
- DBDataPermissionAttribute.cs
- EntityReference.cs
- CheckBoxBaseAdapter.cs
- RecommendedAsConfigurableAttribute.cs
- GenericIdentity.cs
- XmlResolver.cs
- ServiceReference.cs
- SpellCheck.cs
- BehaviorDragDropEventArgs.cs
- ReachPrintTicketSerializer.cs
- Light.cs
- DynamicMetaObjectBinder.cs
- SmtpDateTime.cs
- TypefaceCollection.cs
- SqlErrorCollection.cs
- Registration.cs
- StaticSiteMapProvider.cs
- MergeLocalizationDirectives.cs
- DetailsViewUpdatedEventArgs.cs
- ActivityExecutorSurrogate.cs
- NoneExcludedImageIndexConverter.cs
- TextSpanModifier.cs
- DesignerVerb.cs
- TerminatorSinks.cs
- UDPClient.cs
- RevocationPoint.cs
- ExtensionQuery.cs
- CapiHashAlgorithm.cs
- MarshalByRefObject.cs
- WhitespaceRuleReader.cs
- MenuItemBindingCollection.cs
- RectIndependentAnimationStorage.cs
- TextBoxAutomationPeer.cs
- StyleXamlParser.cs
- _RequestCacheProtocol.cs
- TextHidden.cs
- KeyTimeConverter.cs
- CardSpaceShim.cs
- ToolStripItem.cs
- Transaction.cs
- WinFormsSecurity.cs
- DataGridViewColumnTypeEditor.cs
- OpenCollectionAsyncResult.cs
- FieldNameLookup.cs
- MetadataCache.cs
- ValidationException.cs
- TransactionFormatter.cs
- FlowSwitch.cs
- RowToParametersTransformer.cs
- ActivityLocationReferenceEnvironment.cs
- SchemaContext.cs
- OdbcConnectionStringbuilder.cs
- OverflowException.cs
- CodeTypeMemberCollection.cs
- TimeSpanStorage.cs
- InputManager.cs
- CompilerGlobalScopeAttribute.cs
- ShadowGlyph.cs
- ProfileSection.cs
- ChannelTokenTypeConverter.cs
- TraceSection.cs
- ChannelServices.cs
- EditorAttribute.cs
- ToolStripRendererSwitcher.cs
- StatusInfoItem.cs
- Panel.cs
- ForeignKeyConstraint.cs
- DataGridViewMethods.cs
- GradientPanel.cs
- DetailsViewInsertEventArgs.cs
- ToolStripSplitButton.cs
- ForeignKeyConstraint.cs
- MenuBase.cs
- ContentType.cs
- SwitchLevelAttribute.cs
- ResourcesBuildProvider.cs
- BooleanAnimationUsingKeyFrames.cs
- FontUnit.cs
- LocalizationParserHooks.cs
- NativeMethodsOther.cs
- DataSourceCacheDurationConverter.cs
- Matrix.cs
- SQLInt16Storage.cs