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
- AdapterDictionary.cs
- Update.cs
- HwndMouseInputProvider.cs
- documentsequencetextcontainer.cs
- DataGridSortingEventArgs.cs
- ActivityWithResultValueSerializer.cs
- MsmqIntegrationSecurity.cs
- QilReplaceVisitor.cs
- BitmapPalette.cs
- sqlnorm.cs
- SchemaComplexType.cs
- TemplatePartAttribute.cs
- WebPartManager.cs
- DataGridView.cs
- XslCompiledTransform.cs
- MatchSingleFxEngineOpcode.cs
- ValidatorCompatibilityHelper.cs
- Renderer.cs
- MemoryFailPoint.cs
- SqlHelper.cs
- FamilyCollection.cs
- ClientConfigurationSystem.cs
- ComplexBindingPropertiesAttribute.cs
- TextEvent.cs
- AppendHelper.cs
- COM2PictureConverter.cs
- DesignerExtenders.cs
- ConstantProjectedSlot.cs
- RuntimeWrappedException.cs
- SRDisplayNameAttribute.cs
- DefaultPropertiesToSend.cs
- XmlSchemaInfo.cs
- DbMetaDataFactory.cs
- MetadataArtifactLoader.cs
- NumericUpDown.cs
- Multiply.cs
- XmlSchemaObjectTable.cs
- TextStore.cs
- FormViewModeEventArgs.cs
- FormatPage.cs
- StylusShape.cs
- DataSourceListEditor.cs
- DataGridToolTip.cs
- WorkflowRuntimeService.cs
- x509utils.cs
- StylusShape.cs
- SqlWebEventProvider.cs
- StrongNameIdentityPermission.cs
- LinqDataSourceDeleteEventArgs.cs
- DataShape.cs
- PaginationProgressEventArgs.cs
- RowUpdatingEventArgs.cs
- WebPartConnectionsConnectVerb.cs
- EncryptedKeyIdentifierClause.cs
- SqlXml.cs
- XmlParserContext.cs
- ToolStripHighContrastRenderer.cs
- ProfileEventArgs.cs
- LassoHelper.cs
- HMACSHA256.cs
- HttpCachePolicyElement.cs
- NativeMethods.cs
- XmlSerializableReader.cs
- DataMisalignedException.cs
- ConnectionManagementElement.cs
- SQlBooleanStorage.cs
- FullTrustAssemblyCollection.cs
- SByte.cs
- SqlDataSourceStatusEventArgs.cs
- OrderablePartitioner.cs
- ComponentTray.cs
- SystemIPv6InterfaceProperties.cs
- Freezable.cs
- Grant.cs
- StatusBarPanel.cs
- StreamGeometry.cs
- ConnectionStringSettingsCollection.cs
- InvokeProviderWrapper.cs
- VirtualPathUtility.cs
- TransformConverter.cs
- ApplicationInfo.cs
- AnimationStorage.cs
- CodeCompileUnit.cs
- ByteStorage.cs
- PrintDocument.cs
- VersionUtil.cs
- XmlComplianceUtil.cs
- ComponentResourceKeyConverter.cs
- ParentControlDesigner.cs
- _LocalDataStoreMgr.cs
- FamilyCollection.cs
- httpstaticobjectscollection.cs
- ProtocolsConfiguration.cs
- CompilerState.cs
- SystemInfo.cs
- ButtonDesigner.cs
- Typography.cs
- BindingExpressionBase.cs
- AsynchronousChannelMergeEnumerator.cs
- FileUpload.cs