New test.
[mono.git] / mcs / class / Microsoft.Build.Engine / Microsoft.Build.BuildEngine / Project.cs
1 //
2 // Project.cs: Project class
3 //
4 // Author:
5 //   Marek Sieradzki (marek.sieradzki@gmail.com)
6 //
7 // (C) 2005 Marek Sieradzki
8 //
9 // Permission is hereby granted, free of charge, to any person obtaining
10 // a copy of this software and associated documentation files (the
11 // "Software"), to deal in the Software without restriction, including
12 // without limitation the rights to use, copy, modify, merge, publish,
13 // distribute, sublicense, and/or sell copies of the Software, and to
14 // permit persons to whom the Software is furnished to do so, subject to
15 // the following conditions:
16 //
17 // The above copyright notice and this permission notice shall be
18 // included in all copies or substantial portions of the Software.
19 //
20 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27
28 #if NET_2_0
29
30 using System;
31 using System.Collections;
32 using System.Collections.Generic;
33 using System.Collections.Specialized;
34 using System.IO;
35 using System.Text;
36 using System.Xml;
37 using System.Xml.Schema;
38 using Microsoft.Build.Framework;
39 using Mono.XBuild.Framework;
40
41 namespace Microsoft.Build.BuildEngine {
42         public class Project {
43         
44                 bool                            buildEnabled;
45                 //IDictionary                   conditionedProperties;
46                 Dictionary <string, List <string>>      conditionedProperties;
47                 string[]                        defaultTargets;
48                 Encoding                        encoding;
49                 BuildItemGroup                  evaluatedItems;
50                 BuildItemGroup                  evaluatedItemsIgnoringCondition;
51                 Dictionary <string, BuildItemGroup>     evaluatedItemsByName;
52                 Dictionary <string, BuildItemGroup>     evaluatedItemsByNameIgnoringCondition;
53                 BuildPropertyGroup              evaluatedProperties;
54                 string                          firstTargetName;
55                 string                          fullFileName;
56                 BuildPropertyGroup              globalProperties;
57                 GroupingCollection              groups;
58                 bool                            isDirty;
59                 bool                            isValidated;
60                 BuildItemGroupCollection        itemGroups;
61                 ImportCollection                imports;
62                 string                          initialTargets;
63                 Engine                          parentEngine;
64                 BuildPropertyGroupCollection    propertyGroups;
65                 string                          schemaFile;
66                 TaskDatabase                    taskDatabase;
67                 TargetCollection                targets;
68                 DateTime                        timeOfLastDirty;
69                 UsingTaskCollection             usingTasks;
70                 XmlDocument                     xmlDocument;
71                 bool                            unloaded;
72
73                 public Project ()
74                         : this (Engine.GlobalEngine)
75                 {
76                 }
77
78                 public Project (Engine engine)
79                 {
80                         parentEngine  = engine;
81                         xmlDocument = new XmlDocument ();
82                         groups = new GroupingCollection ();
83                         imports = new ImportCollection (this);
84                         usingTasks = new UsingTaskCollection (this);
85                         itemGroups = new BuildItemGroupCollection (groups);
86                         propertyGroups = new BuildPropertyGroupCollection (groups);
87                         targets = new TargetCollection (this);
88                         
89                         taskDatabase = new TaskDatabase ();
90                         if (engine.DefaultTasksRegistered == true)
91                                 taskDatabase.CopyTasks (engine.DefaultTasks);
92                         
93                         globalProperties = new BuildPropertyGroup ();
94                         fullFileName = String.Empty;
95
96                         foreach (BuildProperty bp in parentEngine.GlobalProperties) {
97                                 GlobalProperties.AddProperty (bp.Clone (true));
98                         }
99
100                         // You can evaluate an empty project.
101                         Evaluate ();
102                 }
103
104                 [MonoTODO]
105                 public void AddNewImport (string importLocation,
106                                           string importCondition)
107                 {
108                         throw new NotImplementedException ();
109                 }
110
111                 [MonoTODO]
112                 public BuildItem AddNewItem (string itemName,
113                                              string itemInclude)
114                 {
115                         return AddNewItem (itemName, itemInclude, false);
116                 }
117                 
118                 [MonoTODO]
119                 public BuildItem AddNewItem (string itemName,
120                                              string itemInclude,
121                                              bool treatItemIncludeAsLiteral)
122                 {
123                         throw new NotImplementedException ();
124                 }
125
126                 [MonoTODO]
127                 public BuildItemGroup AddNewItemGroup ()
128                 {
129                         throw new NotImplementedException ();
130                 }
131
132                 [MonoTODO]
133                 public BuildPropertyGroup AddNewPropertyGroup (bool insertAtEndOfProject)
134                 {
135                         throw new NotImplementedException ();
136                 }
137                 
138                 [MonoTODO]
139                 public void AddNewUsingTaskFromAssemblyFile (string taskName,
140                                                              string assemblyFile)
141                 {
142                         throw new NotImplementedException ();
143                 }
144                 
145                 [MonoTODO]
146                 public void AddNewUsingTaskFromAssemblyName (string taskName,
147                                                              string assemblyName)
148                 {
149                         throw new NotImplementedException ();
150                 }
151                 
152                 [MonoTODO]
153                 public bool Build ()
154                 {
155                         return true;
156                 }
157                 
158                 [MonoTODO]
159                 public bool Build (string targetName)
160                 {
161                         if (targets.Exists (targetName) == false)
162                                 throw new Exception (String.Format ("Target {0} does not exist.", targetName));
163                         
164                         return this.targets [targetName].Build ();
165                 }
166                 
167                 [MonoTODO]
168                 public bool Build (string[] targetNames)
169                 {
170                         return Build (targetNames, new Hashtable ());
171                 }
172                 
173                 [MonoTODO]
174                 public bool Build (string[] targetNames,
175                                    IDictionary targetOutputs)
176                 {
177                         return Build (targetNames, new Hashtable (), BuildSettings.None);
178                 }
179                 
180                 [MonoTODO]
181                 public bool Build (string[] targetNames,
182                                    IDictionary targetOutputs,
183                                    BuildSettings buildFlags)
184                 
185                 {
186                         CheckUnloaded ();
187                         if (targetNames.Length == 0) {
188                                 if (defaultTargets.Length != 0) {
189                                         targetNames = defaultTargets;
190                                 }
191                                 else if (firstTargetName != null) {
192                                         targetNames = new string [1] { firstTargetName};
193                                 }
194                                 else
195                                         return false;
196                         }
197                         foreach (string target in targetNames) {
198                                 if (Build (target) == false) {
199                                         return false;
200                                 }
201                         }
202                         return true;
203                 }
204
205                 [MonoTODO]
206                 public string[] GetConditionedPropertyValues (string propertyName)
207                 {
208                         if (conditionedProperties.ContainsKey (propertyName))
209                                 return conditionedProperties [propertyName].ToArray ();
210                         else
211                                 return new string [0];
212                 }
213
214                 public BuildItemGroup GetEvaluatedItemsByName (string itemName)
215                 {
216                         if (evaluatedItemsByName.ContainsKey (itemName))
217                                 return evaluatedItemsByName [itemName];
218                         else
219                                 return null;
220                 }
221
222                 public BuildItemGroup GetEvaluatedItemsByNameIgnoringCondition (string itemName)
223                 {
224                         if (evaluatedItemsByNameIgnoringCondition.ContainsKey (itemName))
225                                 return evaluatedItemsByNameIgnoringCondition [itemName];
226                         else
227                                 return null;
228                 }
229
230                 public string GetEvaluatedProperty (string propertyName)
231                 {
232                         return (string) evaluatedProperties [propertyName];
233                 }
234
235                 [MonoTODO]
236                 public string GetProjectExtensions (string id)
237                 {
238                         throw new NotImplementedException ();
239                 }
240
241                 // Does the actual loading.
242                 private void DoLoad (TextReader textReader)
243                 {
244                         ParentEngine.RemoveLoadedProject (this);
245
246                         XmlReaderSettings settings = new XmlReaderSettings ();
247
248                         if (SchemaFile != null) {
249                                 settings.Schemas.Add (null, SchemaFile);
250                                 settings.ValidationType = ValidationType.Schema;
251                                 settings.ValidationEventHandler += new ValidationEventHandler (ValidationCallBack);
252                         }
253
254                         XmlReader xmlReader = XmlReader.Create (textReader, settings);
255                         xmlDocument.Load (xmlReader);
256
257                         if (xmlDocument.DocumentElement.GetAttribute ("xmlns") != "http://schemas.microsoft.com/developer/msbuild/2003") {
258                                 throw new InvalidProjectFileException (
259                                         @"The default XML namespace of the project must be the MSBuild XML namespace." + 
260                                         " If the project is authored in the MSBuild 2003 format, please add " +
261                                         "xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\" to the <Project> element. " +
262                                         "If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format.  ");
263                         }
264                         ProcessXml ();
265                         ParentEngine.AddLoadedProject (this);
266                 }
267
268                 public void Load (string projectFileName)
269                 {
270                         this.fullFileName = Path.GetFullPath (projectFileName);
271                         try {
272                                 DoLoad (new StreamReader (projectFileName));
273                         } catch {
274                                 Console.WriteLine ("Failure to load: {0}", projectFileName);
275                         }
276                 }
277                 
278                 [MonoTODO]
279                 public void Load (TextReader textReader)
280                 {
281                         fullFileName = String.Empty;
282                         DoLoad (textReader);
283                 }
284
285                 public void LoadXml (string projectXml)
286                 {
287                         fullFileName = String.Empty;
288                         DoLoad (new StringReader (projectXml));
289                 }
290
291                 internal void Unload ()
292                 {
293                         unloaded = true;
294                 }
295
296                 internal void CheckUnloaded ()
297                 {
298                         if (unloaded)
299                                 throw new InvalidOperationException ("This project object is no longer valid.");
300                 }
301
302                 private void ProcessXml ()
303                 {
304                         XmlElement xmlElement = xmlDocument.DocumentElement;
305                         if (xmlElement.Name != "Project")
306                                 throw new InvalidProjectFileException ("Invalid root element.");
307                         if (xmlElement.GetAttributeNode ("DefaultTargets") != null)
308                                 defaultTargets = xmlElement.GetAttribute ("DefaultTargets").Split (';');
309                         else
310                                 defaultTargets = new string [0];
311                         
312                         ProcessElements (xmlElement, null);
313                         
314                         isDirty = false;
315                         Evaluate ();
316                 }
317
318                 private void InitializeProperties ()
319                 {
320                         BuildProperty bp;
321
322                         foreach (BuildProperty gp in GlobalProperties) {
323                                 bp = new BuildProperty (gp.Name, gp.Value, PropertyType.Global);
324                                 EvaluatedProperties.AddProperty (bp);
325                         }
326                         
327                         foreach (DictionaryEntry de in Environment.GetEnvironmentVariables ()) {
328                                 bp = new BuildProperty ((string) de.Key, (string) de.Value, PropertyType.Environment);
329                                 EvaluatedProperties.AddProperty (bp);
330                         }
331
332                         bp = new BuildProperty ("MSBuildBinPath", parentEngine.BinPath, PropertyType.Reserved);
333                         EvaluatedProperties.AddProperty (bp);
334                 }
335
336                 internal void Evaluate ()
337                 {
338                         evaluatedItems = new BuildItemGroup (null, this);
339                         evaluatedItemsIgnoringCondition = new BuildItemGroup (null, this);
340                         evaluatedItemsByName = new Dictionary <string, BuildItemGroup> (StringComparer.InvariantCultureIgnoreCase);
341                         evaluatedItemsByNameIgnoringCondition = new Dictionary <string, BuildItemGroup> (StringComparer.InvariantCultureIgnoreCase);
342                         evaluatedProperties = new BuildPropertyGroup ();
343
344                         InitializeProperties ();
345
346                         // FIXME: questionable order of evaluation
347                         
348                         foreach (Import import in Imports)
349                                 import.Evaluate ();
350                         
351                         foreach (BuildPropertyGroup bpg in PropertyGroups) {
352                                 if (bpg.Condition == String.Empty)
353                                         bpg.Evaluate ();
354                                 else {
355                                         ConditionExpression ce = ConditionParser.ParseCondition (bpg.Condition);
356                                         if (ce.BoolEvaluate (this))
357                                                 bpg.Evaluate ();
358                                 }
359                         }
360                         
361                         foreach (BuildItemGroup big in ItemGroups) {
362                                 if (big.Condition == String.Empty)
363                                         big.Evaluate ();
364                                 else {
365                                         ConditionExpression ce = ConditionParser.ParseCondition (big.Condition);
366                                         if (ce.BoolEvaluate (this))
367                                                 big.Evaluate ();
368                                 }
369                         }
370                         
371                         foreach (UsingTask usingTask in UsingTasks)
372                                 usingTask.Evaluate ();
373                 }
374
375                 public void MarkProjectAsDirty ()
376                 {
377                         isDirty = true;
378                 }
379
380                 [MonoTODO]
381                 public void RemoveAllItemGroups ()
382                 {
383                         throw new NotImplementedException ();
384                 }
385
386                 [MonoTODO]
387                 public void RemoveAllPropertyGroups ()
388                 {
389                         throw new NotImplementedException ();
390                 }
391
392                 [MonoTODO]
393                 public void RemoveItem (BuildItem itemToRemove)
394                 {
395                         throw new NotImplementedException ();
396                 }
397
398                 [MonoTODO]
399                 public void RemoveItemGroup (BuildItemGroup itemGroupToRemove)
400                 {
401                         throw new NotImplementedException ();
402                 }
403                 
404                 [MonoTODO]
405                 // NOTE: does not modify imported projects
406                 public void RemoveItemGroupsWithMatchingCondition (string matchingCondition)
407                 {
408                         throw new NotImplementedException ();
409                 }
410
411                 [MonoTODO]
412                 public void RemoveItemsByName (string itemName)
413                 {
414                         throw new NotImplementedException ();
415                 }
416
417                 [MonoTODO]
418                 public void RemovePropertyGroup (BuildPropertyGroup propertyGroupToRemove)
419                 {
420                         throw new NotImplementedException ();
421                 }
422                 
423                 [MonoTODO]
424                 // NOTE: does not modify imported projects
425                 public void RemovePropertyGroupsWithMatchingCondition (string matchCondition)
426                 {
427                         throw new NotImplementedException ();
428                 }
429
430                 [MonoTODO]
431                 public void ResetBuildStatus ()
432                 {
433                         throw new NotImplementedException ();
434                 }
435
436                 public void Save (string projectFileName)
437                 {
438                         Save (projectFileName, Encoding.Default);
439                 }
440
441                 public void Save (string projectFileName, Encoding encoding)
442                 {
443                         xmlDocument.Save (projectFileName);
444                 }
445
446                 public void Save (TextWriter outTextWriter)
447                 {
448                         xmlDocument.Save (outTextWriter);
449                 }
450
451                 [MonoTODO]
452                 public void SetImportedProperty (string propertyName,
453                                                  string propertyValue,
454                                                  string condition,
455                                                  Project importProject)
456                 {
457                         SetImportedProperty (propertyName, propertyValue, condition, importProject,
458                                 PropertyPosition.UseExistingOrCreateAfterLastPropertyGroup);
459                 }
460
461                 [MonoTODO]
462                 public void SetImportedProperty (string propertyName,
463                                                  string propertyValue,
464                                                  string condition,
465                                                  Project importedProject,
466                                                  PropertyPosition position)
467                 {
468                         SetImportedProperty (propertyName, propertyValue, condition, importedProject,
469                                 PropertyPosition.UseExistingOrCreateAfterLastPropertyGroup, false);
470                 }
471
472                 [MonoTODO]
473                 public void SetImportedProperty (string propertyName,
474                                                  string propertyValue,
475                                                  string condition,
476                                                  Project importedProject,
477                                                  PropertyPosition position,
478                                                  bool treatPropertyValueAsLiteral)
479                 {
480                         throw new NotImplementedException ();
481                 }
482
483                 [MonoTODO]
484                 public void SetProjectExtensions (string id, string xmlText)
485                 {
486                         throw new NotImplementedException ();
487                 }
488                 
489                 [MonoTODO]
490                 public void SetProperty (string propertyName,
491                                          string propertyValue)
492                 {
493                         SetProperty (propertyName, propertyValue, "true",
494                                 PropertyPosition.UseExistingOrCreateAfterLastPropertyGroup, false);
495                 }
496
497                 [MonoTODO]
498                 public void SetProperty (string propertyName,
499                                          string propertyValue,
500                                          string condition)
501                 {
502                         SetProperty (propertyName, propertyValue, condition,
503                                 PropertyPosition.UseExistingOrCreateAfterLastPropertyGroup);
504                 }
505
506                 [MonoTODO]
507                 public void SetProperty (string propertyName,
508                                          string propertyValue,
509                                          string condition,
510                                          PropertyPosition position)
511                 {
512                         SetProperty (propertyName, propertyValue, condition,
513                                 PropertyPosition.UseExistingOrCreateAfterLastPropertyGroup, false);
514                 }
515
516                 [MonoTODO]
517                 public void SetProperty (string propertyName,
518                                          string propertyValue,
519                                          string condition,
520                                          PropertyPosition position,
521                                          bool treatPropertyValueAsLiteral)
522                 {
523                         throw new NotImplementedException ();
524                 }
525
526                 internal void ProcessElements (XmlElement rootElement, ImportedProject ip)
527                 {
528                         foreach (XmlNode xn in rootElement.ChildNodes) {
529                                 if (xn is XmlElement) {
530                                         XmlElement xe = (XmlElement) xn;
531                                         switch (xe.Name) {
532                                         case "ProjectExtensions":
533                                                 AddProjectExtensions (xe);
534                                                 break;
535                                         case "Warning":
536                                         case "Message":
537                                         case "Error":
538                                                 AddMessage (xe);
539                                                 break;
540                                         case "Target":
541                                                 AddTarget (xe, ip);
542                                                 break;
543                                         case "UsingTask":
544                                                 AddUsingTask (xe, ip);
545                                                 break;
546                                         case "Import":
547                                                 AddImport (xe, ip);
548                                                 break;
549                                         case "ItemGroup":
550                                                 AddItemGroup (xe);
551                                                 break;
552                                         case "PropertyGroup":
553                                                 AddPropertyGroup (xe);
554                                                 break;
555                                         case  "Choose":
556                                                 AddChoose (xe);
557                                                 break;
558                                         default:
559                                                 throw new InvalidProjectFileException ("Invalid element in project file.");
560                                         }
561                                 }
562                         }
563                 }
564                 
565                 private void AddProjectExtensions (XmlElement xmlElement)
566                 {
567                         if (xmlElement == null)
568                                 throw new ArgumentNullException ("xmlElement");
569                 }
570                 
571                 private void AddMessage (XmlElement xmlElement)
572                 {
573                         if (xmlElement == null)
574                                 throw new ArgumentNullException ("xmlElement");
575                 }
576                 
577                 private void AddTarget (XmlElement xmlElement, ImportedProject importedProject)
578                 {
579                         if (xmlElement == null)
580                                 throw new ArgumentNullException ("xmlElement");
581                         Target target = new Target (xmlElement, this);
582                         targets.AddTarget (target);
583                         if (importedProject == null) {
584                                 target.IsImported = false;
585                                 if (firstTargetName == null)
586                                         firstTargetName = target.Name;
587                         } else
588                                 target.IsImported = true;
589                 }
590                 
591                 private void AddUsingTask (XmlElement xmlElement, ImportedProject importedProject)
592                 {
593                         UsingTask usingTask;
594
595                         usingTask = new UsingTask (xmlElement, this, importedProject);
596                         UsingTasks.Add (usingTask);
597                 }
598                 
599                 private void AddImport (XmlElement xmlElement, ImportedProject importingProject)
600                 {
601                         Import import;
602                         
603                         import = new Import (xmlElement, this, importingProject);
604                         Imports.Add (import);
605                 }
606                 
607                 private void AddItemGroup (XmlElement xmlElement)
608                 {
609                         if (xmlElement == null)
610                                 throw new ArgumentNullException ("xmlElement");
611                         BuildItemGroup big = new BuildItemGroup (xmlElement, this);
612                         ItemGroups.Add (big);
613                         //big.Evaluate ();
614                 }
615                 
616                 private void AddPropertyGroup (XmlElement xmlElement)
617                 {
618                         if (xmlElement == null)
619                                 throw new ArgumentNullException ("xmlElement");
620                         BuildPropertyGroup bpg = new BuildPropertyGroup (xmlElement, this);
621                         PropertyGroups.Add (bpg);
622                         //bpg.Evaluate ();
623                 }
624                 
625                 private void AddChoose (XmlElement xmlElement)
626                 {
627                         if (xmlElement == null)
628                                 throw new ArgumentNullException ("xmlElement");
629                                 
630                         BuildChoose bc = new BuildChoose (xmlElement, this);
631                         groups.Add (bc);
632                         
633                 }
634                 
635                 private static void ValidationCallBack (object sender, ValidationEventArgs e)
636                 {
637                         Console.WriteLine ("Validation Error: {0}", e.Message);
638                 }
639                 
640                 public bool BuildEnabled {
641                         get {
642                                 return buildEnabled;
643                         }
644                         set {
645                                 buildEnabled = value;
646                         }
647                 }
648
649                 public Encoding Encoding {
650                         get { return encoding; }
651                 }
652
653                 public string DefaultTargets {
654                         get {
655                                 return xmlDocument.DocumentElement.GetAttribute ("DefaultTargets");
656                         }
657                         set {
658                                 xmlDocument.DocumentElement.SetAttribute ("DefaultTargets", value);
659                                 defaultTargets = value.Split (';');
660                         }
661                 }
662
663                 public BuildItemGroup EvaluatedItems {
664                         get { return evaluatedItems; }
665                 }
666
667                 public BuildItemGroup EvaluatedItemsIgnoringCondition {
668                         get { return evaluatedItemsIgnoringCondition; }
669                 }
670                 
671                 internal IDictionary EvaluatedItemsByName {
672                         get { return evaluatedItemsByName; }
673                 }
674                 
675                 internal IDictionary EvaluatedItemsByNameIgnoringCondition {
676                         get { return evaluatedItemsByNameIgnoringCondition; }
677                 }
678
679                 public BuildPropertyGroup EvaluatedProperties {
680                         get { return evaluatedProperties; }
681                 }
682
683                 public string FullFileName {
684                         get { return fullFileName; }
685                         set { fullFileName = value; }
686                 }
687
688                 public BuildPropertyGroup GlobalProperties {
689                         get { return globalProperties; }
690                         set {
691                                 if (value == null) {
692                                         throw new ArgumentNullException ("value");
693                                 }
694                                 if (value.FromXml) {
695                                         throw new InvalidOperationException ("Can't do that.");
696                                 }
697                                 globalProperties = value;
698                         }
699                 }
700
701                 public bool IsDirty {
702                         get { return isDirty; }
703                 }
704
705                 public bool IsValidated {
706                         get { return isValidated; }
707                         set { isValidated = value; }
708                 }
709
710                 public BuildItemGroupCollection ItemGroups {
711                         get { return itemGroups; }
712                 }
713                 
714                 public ImportCollection Imports {
715                         get { return imports; }
716                 }
717                 
718                 public string InitialTargets {
719                         get { return initialTargets; }
720                         set { initialTargets = value; }
721                 }
722
723                 public Engine ParentEngine {
724                         get { return parentEngine; }
725                 }
726
727                 public BuildPropertyGroupCollection PropertyGroups {
728                         get { return propertyGroups; }
729                 }
730
731                 public string SchemaFile {
732                         get { return schemaFile; }
733                         set { schemaFile = value; }
734                 }
735
736                 public TargetCollection Targets {
737                         get { return targets; }
738                 }
739
740                 public DateTime TimeOfLastDirty {
741                         get { return timeOfLastDirty; }
742                 }
743                 
744                 public UsingTaskCollection UsingTasks {
745                         get { return usingTasks; }
746                 }
747
748                 [MonoTODO]
749                 public string Xml {
750                         get { return xmlDocument.InnerXml; }
751                 }
752                 
753                 internal TaskDatabase TaskDatabase {
754                         get { return taskDatabase; }
755                 }
756         }
757 }
758
759 #endif