Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- BinaryMethodMessage.cs
- StructuralCache.cs
- FormsAuthenticationEventArgs.cs
- ArcSegment.cs
- UsernameTokenFactoryCredential.cs
- ConfigXmlElement.cs
- SpecialNameAttribute.cs
- XPathChildIterator.cs
- Int64KeyFrameCollection.cs
- EncoderNLS.cs
- HandlerWithFactory.cs
- ExpressionBuilder.cs
- ITextView.cs
- TransformedBitmap.cs
- NameObjectCollectionBase.cs
- FlagsAttribute.cs
- MSHTMLHost.cs
- EntityContainerEntitySetDefiningQuery.cs
- Matrix3D.cs
- ConcurrentDictionary.cs
- DocumentPageViewAutomationPeer.cs
- PopupRoot.cs
- ExpressionVisitor.cs
- StickyNote.cs
- XhtmlBasicValidatorAdapter.cs
- WebPartTransformerAttribute.cs
- DelegateCompletionCallbackWrapper.cs
- BufferedStream2.cs
- DataSetViewSchema.cs
- HwndStylusInputProvider.cs
- CapabilitiesPattern.cs
- PolyBezierSegment.cs
- GlyphRun.cs
- MetabaseServerConfig.cs
- ApplicationSecurityManager.cs
- LookupNode.cs
- ExecutionContext.cs
- FileDetails.cs
- ImageFormatConverter.cs
- ErrorTableItemStyle.cs
- RouteValueExpressionBuilder.cs
- BlockUIContainer.cs
- InvalidMessageContractException.cs
- QueueNameHelper.cs
- CompModSwitches.cs
- TrackPoint.cs
- InstanceNormalEvent.cs
- ColumnProvider.cs
- RegexCompiler.cs
- WCFServiceClientProxyGenerator.cs
- SqlNodeAnnotations.cs
- NullableFloatSumAggregationOperator.cs
- RotateTransform.cs
- WindowsSysHeader.cs
- ErrorFormatter.cs
- Encoder.cs
- ReadContentAsBinaryHelper.cs
- Pens.cs
- COM2PropertyDescriptor.cs
- TextPointerBase.cs
- _SingleItemRequestCache.cs
- CompilerTypeWithParams.cs
- SecurityDocument.cs
- SqlProvider.cs
- HoistedLocals.cs
- InternalConfigEventArgs.cs
- Win32MouseDevice.cs
- SafeNativeMethods.cs
- HitTestWithGeometryDrawingContextWalker.cs
- indexingfiltermarshaler.cs
- InputBindingCollection.cs
- FrameworkContentElement.cs
- CodeTypeConstructor.cs
- PtsPage.cs
- TreeNodeConverter.cs
- FormViewDeletedEventArgs.cs
- RangeValueProviderWrapper.cs
- NoneExcludedImageIndexConverter.cs
- HtmlLink.cs
- WebPartDeleteVerb.cs
- TaiwanCalendar.cs
- MappedMetaModel.cs
- CommandBinding.cs
- NavigationProperty.cs
- ClientRoleProvider.cs
- ErrorProvider.cs
- UriTemplateLiteralPathSegment.cs
- DataGridView.cs
- WebPartHeaderCloseVerb.cs
- DatePicker.cs
- XmlLoader.cs
- Misc.cs
- AssemblyResourceLoader.cs
- ProcessHostMapPath.cs
- SqlXmlStorage.cs
- MimePart.cs
- DocumentXPathNavigator.cs
- WindowsMenu.cs
- KeyPressEvent.cs
- Sql8ConformanceChecker.cs