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
- State.cs
- KeyConverter.cs
- ICspAsymmetricAlgorithm.cs
- XmlSchemaObjectCollection.cs
- NameTable.cs
- SqlMethodTransformer.cs
- FilterQuery.cs
- GlobalProxySelection.cs
- SAPIEngineTypes.cs
- Bits.cs
- InstallerTypeAttribute.cs
- MetadataCache.cs
- ConfigurationProperty.cs
- XmlSchemaValidationException.cs
- TrackingMemoryStream.cs
- PenContext.cs
- BitmapVisualManager.cs
- ColorMatrix.cs
- SecurityState.cs
- ColumnReorderedEventArgs.cs
- TdsRecordBufferSetter.cs
- OleDbStruct.cs
- EntityModelSchemaGenerator.cs
- GridViewRow.cs
- ProcessModelSection.cs
- XmlChoiceIdentifierAttribute.cs
- DataGridHyperlinkColumn.cs
- SamlAuthenticationStatement.cs
- StringStorage.cs
- WmlControlAdapter.cs
- MetadataItemEmitter.cs
- ArrowControl.xaml.cs
- TraceSwitch.cs
- ReadOnlyObservableCollection.cs
- IsolatedStorageFilePermission.cs
- BinaryMethodMessage.cs
- ErrorFormatter.cs
- SystemTcpStatistics.cs
- BamlTreeNode.cs
- DbConnectionPoolIdentity.cs
- GACIdentityPermission.cs
- ServiceOperationHelpers.cs
- codemethodreferenceexpression.cs
- HTMLTagNameToTypeMapper.cs
- DataGridViewComboBoxEditingControl.cs
- XmlWhitespace.cs
- safePerfProviderHandle.cs
- ToolStripStatusLabel.cs
- PathFigureCollection.cs
- BaseParser.cs
- LineServicesRun.cs
- WebPartTransformerCollection.cs
- ConnectionPointGlyph.cs
- URLString.cs
- HttpInputStream.cs
- UserInitiatedNavigationPermission.cs
- AsymmetricSignatureFormatter.cs
- RequestCacheManager.cs
- FilterException.cs
- GZipDecoder.cs
- CodeBinaryOperatorExpression.cs
- XmlDomTextWriter.cs
- Propagator.JoinPropagator.JoinPredicateVisitor.cs
- StreamInfo.cs
- DragDropHelper.cs
- BoundingRectTracker.cs
- ProgressBar.cs
- ExtentKey.cs
- OdbcPermission.cs
- ClientRuntimeConfig.cs
- Int32CollectionValueSerializer.cs
- DecoderExceptionFallback.cs
- DBCommandBuilder.cs
- AssemblyBuilder.cs
- EntityDataSourceEntitySetNameItem.cs
- CSharpCodeProvider.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- TimerElapsedEvenArgs.cs
- MessageDroppedTraceRecord.cs
- SymbolType.cs
- UserControl.cs
- DependencyPropertyKind.cs
- EventMappingSettingsCollection.cs
- WorkItem.cs
- HybridCollection.cs
- EntityDataSourceWizardForm.cs
- SynchronizedInputProviderWrapper.cs
- LogRecordSequence.cs
- OutputCacheModule.cs
- DecoderReplacementFallback.cs
- TargetControlTypeCache.cs
- HwndSource.cs
- ControlUtil.cs
- AppearanceEditorPart.cs
- MgmtConfigurationRecord.cs
- SqlDuplicator.cs
- HttpCapabilitiesBase.cs
- XmlSchemaAll.cs
- ProtocolElement.cs
- ResourcePool.cs