Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Services / IO / System / IO / RenamedEventArgs.cs / 1305376 / RenamedEventArgs.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.IO { using System.Diagnostics; using System.Security.Permissions; using System; using System.Runtime.Versioning; ////// 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 { [ResourceExposure(ResourceScope.Machine)] [ResourceConsumption(ResourceScope.Machine)] 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; using System.Runtime.Versioning; ////// 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 { [ResourceExposure(ResourceScope.Machine)] [ResourceConsumption(ResourceScope.Machine)] 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
- SourceInterpreter.cs
- VectorValueSerializer.cs
- CultureInfoConverter.cs
- iisPickupDirectory.cs
- Hash.cs
- DecimalMinMaxAggregationOperator.cs
- AuditLevel.cs
- CorrelationManager.cs
- ExpressionReplacer.cs
- TypeDescriptionProvider.cs
- XmlSchemaAttribute.cs
- BevelBitmapEffect.cs
- Image.cs
- EncryptedKeyHashIdentifierClause.cs
- ParserOptions.cs
- ConfigXmlAttribute.cs
- InitializationEventAttribute.cs
- ProviderMetadata.cs
- XmlAggregates.cs
- AttributeConverter.cs
- AttributeConverter.cs
- MdbDataFileEditor.cs
- ApplicationFileParser.cs
- DesignTimeHTMLTextWriter.cs
- Cell.cs
- AutoCompleteStringCollection.cs
- UrlPath.cs
- COSERVERINFO.cs
- SQLInt32.cs
- ColorTranslator.cs
- DbCommandDefinition.cs
- LocalizationComments.cs
- CodeCompileUnit.cs
- KeyValueConfigurationCollection.cs
- ProcessStartInfo.cs
- SqlBuffer.cs
- MergablePropertyAttribute.cs
- CalendarButtonAutomationPeer.cs
- HttpWebRequest.cs
- HGlobalSafeHandle.cs
- DataError.cs
- HashCodeCombiner.cs
- SetterBase.cs
- COM2PropertyDescriptor.cs
- BaseTemplateCodeDomTreeGenerator.cs
- ServiceDescriptions.cs
- VirtualPathProvider.cs
- XAMLParseException.cs
- GridViewColumnHeaderAutomationPeer.cs
- TextBounds.cs
- TraceSource.cs
- RIPEMD160.cs
- ListBase.cs
- HttpPostedFile.cs
- Style.cs
- SoapMessage.cs
- unsafenativemethodsother.cs
- BinaryParser.cs
- HorizontalAlignConverter.cs
- DebugView.cs
- As.cs
- PasswordDeriveBytes.cs
- DataGridPageChangedEventArgs.cs
- Component.cs
- SqlParameter.cs
- PasswordDeriveBytes.cs
- SectionInput.cs
- ResourceExpressionBuilder.cs
- ListViewHitTestInfo.cs
- ImageField.cs
- WindowsStreamSecurityUpgradeProvider.cs
- ManifestResourceInfo.cs
- DiscoveryExceptionDictionary.cs
- Parser.cs
- FacetDescriptionElement.cs
- GlyphInfoList.cs
- MessageQueueKey.cs
- NetNamedPipeBindingCollectionElement.cs
- AggregateNode.cs
- LocationSectionRecord.cs
- NumberFormatter.cs
- SimpleFieldTemplateFactory.cs
- ThreadExceptionEvent.cs
- TabRenderer.cs
- FileNotFoundException.cs
- ContentElement.cs
- CalculatedColumn.cs
- TimeSpanMinutesConverter.cs
- ObjectQueryExecutionPlan.cs
- RepeaterCommandEventArgs.cs
- Color.cs
- XmlQueryRuntime.cs
- EventManager.cs
- BitmapMetadata.cs
- DataGridCell.cs
- EditorPartChrome.cs
- PinnedBufferMemoryStream.cs
- SettingsAttributes.cs
- XmlSiteMapProvider.cs
- JsonServiceDocumentSerializer.cs