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
- TargetParameterCountException.cs
- ResourceDefaultValueAttribute.cs
- ResourceSet.cs
- FacetValueContainer.cs
- ByteKeyFrameCollection.cs
- LinearGradientBrush.cs
- X509ChainPolicy.cs
- ConsoleEntryPoint.cs
- ParameterRetriever.cs
- Condition.cs
- EdmPropertyAttribute.cs
- SiteOfOriginPart.cs
- TrimSurroundingWhitespaceAttribute.cs
- CorrelationQueryBehavior.cs
- TdsValueSetter.cs
- CodeDefaultValueExpression.cs
- CollectionBuilder.cs
- DesignerLoader.cs
- ZipIOFileItemStream.cs
- PriorityQueue.cs
- XmlDeclaration.cs
- Location.cs
- TextWriter.cs
- XmlSchemaComplexContentExtension.cs
- EventBindingService.cs
- PenLineCapValidation.cs
- RecognitionEventArgs.cs
- SortQuery.cs
- HostAdapter.cs
- PackWebResponse.cs
- DataGridViewAdvancedBorderStyle.cs
- ToolStripItemDesigner.cs
- EmptyEnumerator.cs
- HtmlInputPassword.cs
- XamlTypeMapper.cs
- sqlstateclientmanager.cs
- _ShellExpression.cs
- PEFileReader.cs
- KoreanCalendar.cs
- WebConfigurationManager.cs
- ToolboxItemCollection.cs
- SubMenuStyleCollection.cs
- RSAOAEPKeyExchangeFormatter.cs
- TriggerCollection.cs
- DateTimeFormat.cs
- Query.cs
- SoapExtensionTypeElement.cs
- GAC.cs
- Page.cs
- UnknownBitmapEncoder.cs
- UrlPath.cs
- EntityContainerEmitter.cs
- EncodingInfo.cs
- DateTimeConverter2.cs
- OperatingSystem.cs
- MatrixTransform.cs
- Choices.cs
- GlyphRun.cs
- Thickness.cs
- SamlAttribute.cs
- XmlSchemaDocumentation.cs
- XmlMapping.cs
- _AuthenticationState.cs
- ScrollContentPresenter.cs
- XmlNodeReader.cs
- CodeExporter.cs
- CacheRequest.cs
- DateTimeEditor.cs
- IndependentAnimationStorage.cs
- FormatControl.cs
- Cell.cs
- SignatureDescription.cs
- NGCSerializerAsync.cs
- XmlSchemaDatatype.cs
- WarningException.cs
- CompiledXpathExpr.cs
- OdbcEnvironment.cs
- JavascriptCallbackMessageInspector.cs
- EntityDataSourceConfigureObjectContext.cs
- WorkflowMessageEventHandler.cs
- IDispatchConstantAttribute.cs
- LocatorBase.cs
- StoreAnnotationsMap.cs
- Odbc32.cs
- NaturalLanguageHyphenator.cs
- DeflateEmulationStream.cs
- PathSegment.cs
- ToolStripItemDesigner.cs
- Utils.cs
- SkipStoryboardToFill.cs
- DeploymentExceptionMapper.cs
- DecoderReplacementFallback.cs
- SemanticTag.cs
- BitmapInitialize.cs
- ListParagraph.cs
- ThaiBuddhistCalendar.cs
- OSEnvironmentHelper.cs
- WebPartConnection.cs
- HeaderCollection.cs
- UrlAuthFailedErrorFormatter.cs