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
- Frame.cs
- TokenBasedSet.cs
- XmlDataCollection.cs
- CodePrimitiveExpression.cs
- SystemIPv4InterfaceProperties.cs
- PrimarySelectionAdorner.cs
- EditorAttribute.cs
- CodeDomExtensionMethods.cs
- OdbcFactory.cs
- EllipticalNodeOperations.cs
- AudioDeviceOut.cs
- ContextDataSourceContextData.cs
- DataServiceOperationContext.cs
- HyperLinkColumn.cs
- ThemeableAttribute.cs
- PageFunction.cs
- ControlDesigner.cs
- CodeDelegateInvokeExpression.cs
- PriorityBinding.cs
- ProcessInputEventArgs.cs
- RotateTransform3D.cs
- ConstNode.cs
- RuntimeConfigurationRecord.cs
- ToolStripComboBox.cs
- PassportIdentity.cs
- SyndicationFeedFormatter.cs
- TreeViewAutomationPeer.cs
- TableRow.cs
- GlobalAllocSafeHandle.cs
- MarshalByValueComponent.cs
- Options.cs
- DefaultParameterValueAttribute.cs
- ConnectionInterfaceCollection.cs
- DataGridToolTip.cs
- EntityDataSourceContextCreatingEventArgs.cs
- NameValueFileSectionHandler.cs
- AutomationElement.cs
- SqlClientFactory.cs
- DataSourceProvider.cs
- LongMinMaxAggregationOperator.cs
- RightNameExpirationInfoPair.cs
- ServiceActivationException.cs
- SmiMetaData.cs
- MethodImplAttribute.cs
- XmlSchemaObject.cs
- UnsafeCollabNativeMethods.cs
- EventDescriptorCollection.cs
- FocusWithinProperty.cs
- EntityTransaction.cs
- SafeJobHandle.cs
- OptimalBreakSession.cs
- HttpHandlerAction.cs
- TextProperties.cs
- RuntimeArgumentHandle.cs
- MenuItemAutomationPeer.cs
- DataBindingCollectionConverter.cs
- HttpProfileBase.cs
- XmlSchemaAttributeGroup.cs
- ValidatorCollection.cs
- WebRequestModulesSection.cs
- Models.cs
- BrowserDefinition.cs
- StateMachineHistory.cs
- PageStatePersister.cs
- ParserContext.cs
- BasicKeyConstraint.cs
- CodeMemberProperty.cs
- ButtonPopupAdapter.cs
- MouseActionValueSerializer.cs
- ResolveResponseInfo.cs
- TreeNodeBindingCollection.cs
- WinFormsSpinner.cs
- XmlnsCache.cs
- Code.cs
- DefaultTraceListener.cs
- ComplexObject.cs
- XmlDataCollection.cs
- SecureEnvironment.cs
- UIElementHelper.cs
- FilteredReadOnlyMetadataCollection.cs
- WebServicesInteroperability.cs
- HtmlInputReset.cs
- BasicAsyncResult.cs
- EditorZoneBase.cs
- SqlNotificationEventArgs.cs
- ClassGenerator.cs
- Int64Converter.cs
- NoClickablePointException.cs
- StorageScalarPropertyMapping.cs
- RectangleHotSpot.cs
- XmlFormatReaderGenerator.cs
- DataGrid.cs
- ProcessModule.cs
- MaterialGroup.cs
- Int16Animation.cs
- AttachedPropertiesService.cs
- TableRowCollection.cs
- GridViewRow.cs
- NameSpaceExtractor.cs
- mansign.cs