~ubuntu-branches/ubuntu/oneiric/monodevelop/oneiric

« back to all changes in this revision

Viewing changes to src/core/MonoDevelop.Core/MonoDevelop.Core/FileEventArgs.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2011-06-27 17:03:13 UTC
  • mto: (1.8.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 54.
  • Revision ID: james.westby@ubuntu.com-20110627170313-6cvz3s19x6e9hqe9
ImportĀ upstreamĀ versionĀ 2.5.92+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
using System.Collections.Generic;
1
2
//
2
3
// FileEventArgs.cs
3
4
//
28
29
 
29
30
namespace MonoDevelop.Core
30
31
{
31
 
        public class FileEventArgs : System.EventArgs
32
 
        {
33
 
                string fileName;
 
32
        public class FileEventArgs : EventArgsChain<FileEventInfo>
 
33
        {
 
34
                public FileEventArgs ()
 
35
                {
 
36
                }
 
37
                
 
38
                public FileEventArgs (FilePath fileName, bool isDirectory)
 
39
                {
 
40
                        Add (new FileEventInfo (fileName, isDirectory));
 
41
                }
 
42
                
 
43
                public FileEventArgs (IEnumerable<FilePath> files, bool isDirectory)
 
44
                {
 
45
                        foreach (var f in files)
 
46
                                Add (new FileEventInfo (f, isDirectory));
 
47
                }
 
48
        }
 
49
        
 
50
        public class FileEventInfo
 
51
        {
 
52
                FilePath fileName;
34
53
                bool   isDirectory;
35
54
                
36
 
                public string FileName {
 
55
                public FilePath FileName {
37
56
                        get {
38
57
                                return fileName;
39
58
                        }
45
64
                        }
46
65
                }
47
66
                
48
 
                public FileEventArgs(string fileName, bool isDirectory)
 
67
                public FileEventInfo (FilePath fileName, bool isDirectory)
49
68
                {
50
69
                        this.fileName = fileName;
51
70
                        this.isDirectory = isDirectory;
52
71
                }
53
72
        }
54
73
        
55
 
        public class FileCopyEventArgs : System.EventArgs
56
 
        {
57
 
                string sourceFile;
58
 
                string targetFile;
 
74
        public class FileCopyEventArgs : EventArgsChain<FileCopyEventInfo>
 
75
        {
 
76
                public FileCopyEventArgs (IEnumerable<FileCopyEventInfo> args): base (args)
 
77
                {
 
78
                }
 
79
                
 
80
                public FileCopyEventArgs (FilePath sourceFile, FilePath targetFile, bool isDirectory)
 
81
                {
 
82
                        Add (new FileCopyEventInfo (sourceFile, targetFile, isDirectory));
 
83
                }
 
84
                
 
85
                public FileCopyEventArgs ()
 
86
                {
 
87
                }
 
88
        }
 
89
        
 
90
        public class FileCopyEventInfo : System.EventArgs
 
91
        {
 
92
                FilePath sourceFile;
 
93
                FilePath targetFile;
59
94
                bool   isDirectory;
60
95
                
61
 
                public string SourceFile {
 
96
                public FilePath SourceFile {
62
97
                        get {
63
98
                                return sourceFile;
64
99
                        }
65
100
                }
66
101
                
67
 
                public string TargetFile {
 
102
                public FilePath TargetFile {
68
103
                        get {
69
104
                                return targetFile;
70
105
                        }
76
111
                        }
77
112
                }
78
113
                
79
 
                public FileCopyEventArgs (string sourceFile, string targetFile, bool isDirectory)
 
114
                public FileCopyEventInfo (FilePath sourceFile, FilePath targetFile, bool isDirectory)
80
115
                {
81
116
                        this.sourceFile = sourceFile;
82
117
                        this.targetFile = targetFile;