mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-17 11:21:39 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9435de91f2 | ||
|
|
1281853553 | ||
|
|
6922ed8629 | ||
|
|
cd3c79413a | ||
|
|
bc36fbe193 | ||
|
|
53d8062782 | ||
|
|
44983be8f2 | ||
|
|
015444e23d | ||
|
|
f4433694ac | ||
|
|
a02076baf6 | ||
|
|
0a3a379ee0 | ||
|
|
fbbe941b69 | ||
|
|
61963ca6b1 | ||
|
|
50cc972397 | ||
|
|
340361ff91 | ||
|
|
de6a0113fb | ||
|
|
636f9ec0b9 | ||
|
|
e5e8c141c5 | ||
|
|
764f9cbd32 | ||
|
|
a96b9dd614 | ||
|
|
b4c110c021 | ||
|
|
1f505f2ebb | ||
|
|
3e62b6e207 | ||
|
|
83e5c48472 | ||
|
|
abc05b767c | ||
|
|
7019e2b39f | ||
|
|
137efe9736 | ||
|
|
4752df3669 | ||
|
|
a2d3a480e9 | ||
|
|
e79c9e9135 | ||
|
|
bd511fa11e | ||
|
|
f8539f3cf6 | ||
|
|
614da57287 | ||
|
|
c8778b1133 | ||
|
|
f3692b8819 | ||
|
|
ae25c90d61 | ||
|
|
ff47ddc6db | ||
|
|
88ac3e5d4d | ||
|
|
9746e8d9f8 | ||
|
|
10bcc0d354 | ||
|
|
cf3562d2c8 | ||
|
|
2388926d50 | ||
|
|
d6be15f97b | ||
|
|
ad8e7c929f | ||
|
|
1638105782 | ||
|
|
ad939942b5 | ||
|
|
e2110645f1 | ||
|
|
55f3721a38 | ||
|
|
82d9fb288c | ||
|
|
9196c64c2a | ||
|
|
3dfc36e4ac | ||
|
|
044461a63b | ||
|
|
fd05675b35 | ||
|
|
2e9eca05b9 | ||
|
|
eefdcf1d3a | ||
|
|
8546da29ca | ||
|
|
793bbb9a87 | ||
|
|
5ff0b3b636 | ||
|
|
51eb841a56 | ||
|
|
c3026122e9 | ||
|
|
6bf88caf77 | ||
|
|
8b336154f7 | ||
|
|
9ecf360a2b | ||
|
|
9c72742bf8 | ||
|
|
5faf9e26c8 | ||
|
|
6bc4446f02 | ||
|
|
32942d4014 | ||
|
|
66c0b04951 | ||
|
|
7cbff8d169 | ||
|
|
a58017ca8e | ||
|
|
6efa57b2c2 | ||
|
|
6373d04e93 | ||
|
|
b8cd87e608 | ||
|
|
9fa7633b1f | ||
|
|
8ea6fd8ac5 | ||
|
|
29bc8d9b9c | ||
|
|
d1df969755 | ||
|
|
33e0667472 | ||
|
|
2ee0c254a4 | ||
|
|
5ddf92f33c | ||
|
|
4960cd6133 | ||
|
|
dd1a9c331a | ||
|
|
352bb2461b | ||
|
|
4ef6555a3a | ||
|
|
1e25dd1757 | ||
|
|
995a774521 | ||
|
|
4aeb0b7347 | ||
|
|
0e2108e5e0 | ||
|
|
3f246aa0b2 | ||
|
|
0222d30eab | ||
|
|
35c0bb794e | ||
|
|
d12e49a9b3 | ||
|
|
97426e608b | ||
|
|
daa4a4f0f5 | ||
|
|
b3cc72b9a7 | ||
|
|
32029f1171 | ||
|
|
44882b1925 | ||
|
|
b7ad6a07a8 | ||
|
|
2bb4353929 | ||
|
|
88df658060 | ||
|
|
6ca75c627b | ||
|
|
393f7c7f3e | ||
|
|
07268b7ab8 | ||
|
|
241a34d604 | ||
|
|
da1bdf6b34 | ||
|
|
f0737b398c | ||
|
|
f373840a8a | ||
|
|
2d1dba2a8f | ||
|
|
a8cee6b88e | ||
|
|
76debbe013 | ||
|
|
92bb5751a7 | ||
|
|
39a7dcb400 | ||
|
|
276ca3613f | ||
|
|
7e9785dc4e | ||
|
|
968a511c89 | ||
|
|
7cce646657 | ||
|
|
b033bff618 | ||
|
|
9c94be9d30 | ||
|
|
0e4b34fdd7 | ||
|
|
f784b407c4 | ||
|
|
a246a51c0f | ||
|
|
21a92702c3 | ||
|
|
dffda4000e | ||
|
|
736891c361 | ||
|
|
62e371b81b | ||
|
|
4f64a73a44 | ||
|
|
a147386bc4 | ||
|
|
d87a79de52 | ||
|
|
14a9dbdd34 | ||
|
|
fc7ffed3ac | ||
|
|
7cf63b69e6 | ||
|
|
3bb319b61d | ||
|
|
6148e4b997 | ||
|
|
39c0feba1c | ||
|
|
89881c9b4d | ||
|
|
47c388364d | ||
|
|
8ad829ac4e | ||
|
|
93e489abf2 | ||
|
|
742ff74e50 | ||
|
|
abff177b4b | ||
|
|
5524ab9825 | ||
|
|
d51f05c88b | ||
|
|
35f3c96490 | ||
|
|
c1d9d1a6b6 | ||
|
|
8bb319b1e6 | ||
|
|
37ac996882 | ||
|
|
0afd473342 | ||
|
|
4b750612a8 | ||
|
|
5d17d13bee | ||
|
|
475c172dae | ||
|
|
323ff14b65 | ||
|
|
4a6df0b082 | ||
|
|
8141307e4b | ||
|
|
27b145e24f | ||
|
|
bdaf7bb33c | ||
|
|
378032bf64 | ||
|
|
a19eb0760b | ||
|
|
5cfc62f415 | ||
|
|
1ed1c4bed1 | ||
|
|
616f648f0d | ||
|
|
4fccd4d599 | ||
|
|
bd4f80e803 | ||
|
|
9e9b3f913d | ||
|
|
a2a168e5f3 | ||
|
|
5f982b1908 | ||
|
|
f00202d3e3 | ||
|
|
b4d4033040 | ||
|
|
68deb6335e | ||
|
|
cb965a9d3a | ||
|
|
86262ef424 | ||
|
|
acfa4856b9 | ||
|
|
be8711a7e6 | ||
|
|
7e6a0ff51e | ||
|
|
c989e10293 | ||
|
|
b04d809478 | ||
|
|
219276c182 | ||
|
|
64ff652330 | ||
|
|
75e3ca80bc | ||
|
|
aa48b6f714 | ||
|
|
2603a2e4fd | ||
|
|
05550e7c66 | ||
|
|
99349445b1 | ||
|
|
d768dd0125 | ||
|
|
e376d9156b | ||
|
|
85349b801f | ||
|
|
41d1be9f34 | ||
|
|
ac19d5bfaf | ||
|
|
ae7d005dfc | ||
|
|
04427d962d | ||
|
|
57bc2f6ffb | ||
|
|
059a6a685b | ||
|
|
4ac77ca819 | ||
|
|
d703e86b4b | ||
|
|
6870a59952 | ||
|
|
721dadd34b | ||
|
|
b7061d3e57 | ||
|
|
2f4099863e | ||
|
|
96e0c59371 | ||
|
|
1e910229a8 | ||
|
|
c74031105a | ||
|
|
279678d726 | ||
|
|
46db32524d | ||
|
|
0563034987 | ||
|
|
0baf32151f | ||
|
|
8bd9eebf1f | ||
|
|
b9a5b85c16 | ||
|
|
c98be1ad12 | ||
|
|
67b1fcec06 | ||
|
|
4643f66d1a | ||
|
|
e3aa857b74 | ||
|
|
350fcbd003 | ||
|
|
c6799b1f41 | ||
|
|
f260ff4299 | ||
|
|
7122b78d60 | ||
|
|
52971cce4c | ||
|
|
5dc77749e7 | ||
|
|
472b3e6fca | ||
|
|
59b4c5bc3d | ||
|
|
f105c6d4e7 | ||
|
|
2e637c4cba | ||
|
|
8d44e61042 | ||
|
|
eac9866b2c | ||
|
|
7ada4aec7b | ||
|
|
dacb11a24c | ||
|
|
5c44041365 | ||
|
|
56b901df8f | ||
|
|
582bd35450 | ||
|
|
6057352d91 | ||
|
|
3b450189bb | ||
|
|
7878c22bbf | ||
|
|
674372dd15 | ||
|
|
af804a9305 | ||
|
|
7e2eff0be7 | ||
|
|
7de999655d | ||
|
|
1b84abfcab | ||
|
|
8286cbf198 | ||
|
|
db7d7c47cb | ||
|
|
9445d6e22c | ||
|
|
209c253e3f | ||
|
|
e449d41158 | ||
|
|
9b4a07a69e | ||
|
|
28766cfe96 | ||
|
|
a95adaf53d | ||
|
|
7ae2112edc | ||
|
|
79b99d358b | ||
|
|
12fedc8ee6 | ||
|
|
27589a4031 | ||
|
|
049efb2da8 |
No files matched your search
+2
-2
@@ -57,11 +57,11 @@ function setup ()
|
||||
CROSS_DLL_DIR="$CROSS_DIR/bin"
|
||||
PATH=$CROSS_BIN_DIR:$PATH
|
||||
|
||||
MONO_VERSION=`grep AM_INIT_AUTOMAKE configure.in | cut -d ',' -f 2|tr -d '\)'`
|
||||
MONO_VERSION=`grep AM_INIT_AUTOMAKE configure.in | cut -d ',' -f 2|tr -d '\)'|tr -d '\('`
|
||||
|
||||
if [ -d ./.git ]; then
|
||||
MONO_GIT_COMMIT="`git log -1 --format=format:%t`"
|
||||
MONO_GIT_BRANCH="`git branch|grep '\*'|cut -d ' ' -f 2`"
|
||||
MONO_GIT_BRANCH="`git branch|grep '\*'|cut -d ' ' -f 2|tr -d '\)'|tr -d '\('`"
|
||||
MONO_RELEASE="$MONO_VERSION-$MONO_GIT_BRANCH-$MONO_GIT_COMMIT"
|
||||
else
|
||||
MONO_RELEASE="$MONO_VERSION"
|
||||
|
||||
+5
-1
@@ -6,7 +6,7 @@ AC_CANONICAL_SYSTEM
|
||||
m4_ifdef([_A][M_PROG_TAR],[_A][M_SET_OPTION([tar-ustar])])
|
||||
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_INIT_AUTOMAKE(mono,2.10.4)
|
||||
AM_INIT_AUTOMAKE(mono,2.10.9)
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
API_VER=2.0
|
||||
@@ -2105,9 +2105,13 @@ if test "x$enable_llvm" = "xyes"; then
|
||||
llvm_version=`$LLVM_CONFIG --version`
|
||||
major_version=`echo $llvm_version | cut -c 1`
|
||||
minor_version=`echo $llvm_version | cut -c 3`
|
||||
AC_MSG_CHECKING(LLVM version)
|
||||
AC_MSG_RESULT($llvm_version)
|
||||
if echo $llvm_version | grep -q 'mono'; then
|
||||
AC_DEFINE(LLVM_MONO_BRANCH, 1, [Whenever we are using the mono branch of LLVM])
|
||||
LLVM_CXXFLAGS="$LLVM_CXXFLAGS -DLLVM_MONO_BRANCH"
|
||||
else
|
||||
AC_MSG_ERROR([Compiling with stock LLVM is not supported, please use the Mono LLVM repo at https://github.com/mono/llvm, with the GIT branch which matches this version of mono, i.e. 'mono-2-10' for Mono 2.10.])
|
||||
fi
|
||||
|
||||
AC_DEFINE_UNQUOTED(LLVM_MAJOR_VERSION, $major_version, [Major version of LLVM libraries])
|
||||
|
||||
@@ -58,6 +58,7 @@ case $host in
|
||||
;;
|
||||
*-*-linux-android*)
|
||||
platform_android=yes
|
||||
AC_DEFINE(PLATFORM_ANDROID,1,[Targeting the Android platform])
|
||||
PATHSEP='/'
|
||||
SEARCHSEP=':'
|
||||
OS="UNIX"
|
||||
|
||||
+8
-9
@@ -24,6 +24,7 @@
|
||||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#include <config.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <glib.h>
|
||||
@@ -111,28 +112,26 @@ g_log_set_fatal_mask (const gchar *log_domain, GLogLevelFlags fatal_mask)
|
||||
void
|
||||
g_logv (const gchar *log_domain, GLogLevelFlags log_level, const gchar *format, va_list args)
|
||||
{
|
||||
#if PLATFORM_ANDROID
|
||||
__android_log_vprint (to_android_priority (log_level), log_domain, format, args);
|
||||
#else
|
||||
char *msg;
|
||||
|
||||
vasprintf (&msg, format, args);
|
||||
#if PLATFORM_ANDROID
|
||||
__android_log_print (to_android_priority (log_level),
|
||||
/* TODO: provide a proper app name */
|
||||
"mono", "%s%s%s",
|
||||
log_domain != NULL ? log_domain : "",
|
||||
log_domain != NULL ? ": " : "",
|
||||
msg);
|
||||
#else
|
||||
printf ("%s%s%s\n",
|
||||
log_domain != NULL ? log_domain : "",
|
||||
log_domain != NULL ? ": " : "",
|
||||
msg);
|
||||
#endif
|
||||
free (msg);
|
||||
if (log_level & fatal){
|
||||
fflush (stdout);
|
||||
fflush (stderr);
|
||||
abort ();
|
||||
}
|
||||
#endif
|
||||
if (log_level & fatal){
|
||||
abort ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -569,6 +569,9 @@ void GC_stop_world()
|
||||
thread_act_array_t act_list, prev_list;
|
||||
mach_msg_type_number_t listcount, prevcount;
|
||||
|
||||
if (GC_notify_event)
|
||||
GC_notify_event (GC_EVENT_PRE_STOP_WORLD);
|
||||
|
||||
# if DEBUG_THREADS
|
||||
GC_printf1("Stopping the world from 0x%lx\n", mach_thread_self());
|
||||
# endif
|
||||
@@ -639,6 +642,9 @@ void GC_stop_world()
|
||||
#endif
|
||||
|
||||
mach_port_deallocate(my_task, my_thread);
|
||||
|
||||
if (GC_notify_event)
|
||||
GC_notify_event (GC_EVENT_POST_STOP_WORLD);
|
||||
}
|
||||
|
||||
/* Caller holds allocation lock, and has held it continuously since */
|
||||
@@ -654,6 +660,9 @@ void GC_start_world()
|
||||
mach_msg_type_number_t listcount;
|
||||
struct thread_basic_info info;
|
||||
mach_msg_type_number_t outCount = THREAD_INFO_MAX;
|
||||
|
||||
if (GC_notify_event)
|
||||
GC_notify_event (GC_EVENT_PRE_START_WORLD);
|
||||
|
||||
# if DEBUG_THREADS
|
||||
GC_printf0("World starting\n");
|
||||
@@ -700,6 +709,10 @@ void GC_start_world()
|
||||
vm_deallocate(my_task, (vm_address_t)act_list, sizeof(thread_t) * listcount);
|
||||
|
||||
mach_port_deallocate(my_task, my_thread);
|
||||
|
||||
if (GC_notify_event)
|
||||
GC_notify_event (GC_EVENT_POST_START_WORLD);
|
||||
|
||||
# if DEBUG_THREADS
|
||||
GC_printf0("World started\n");
|
||||
# endif
|
||||
|
||||
@@ -26,6 +26,8 @@ PLATFORM_MAKE_CORLIB_CMP = yes
|
||||
PLATFORM_CHANGE_SEPARATOR_CMD=tr '/' '\\\\'
|
||||
PLATFORM_PATH_SEPARATOR = ;
|
||||
|
||||
override CURDIR:=$(shell cygpath -m $(CURDIR))
|
||||
|
||||
## not so simple :-)
|
||||
#PLATFORM_AOT_SUFFIX = .dll
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ EXTRA_DISTFILES = \
|
||||
$(RESOURCE_FILES)
|
||||
|
||||
Commons.Xml.Relaxng.Rnc/RncParser.cs: Commons.Xml.Relaxng.Rnc/RncParser.jay $(topdir)/jay/skeleton.cs
|
||||
$(topdir)/jay/jay -ctv < $(topdir)/jay/skeleton.cs Commons.Xml.Relaxng.Rnc/RncParser.jay > Commons.Xml.Relaxng.Rnc/RncParser.cs
|
||||
$(topdir)/jay/jay -ctv < $(topdir)/jay/skeleton.cs $(CURDIR)/Commons.Xml.Relaxng.Rnc/RncParser.jay > Commons.Xml.Relaxng.Rnc/RncParser.cs
|
||||
|
||||
BUILT_SOURCES = Commons.Xml.Relaxng.Rnc/RncParser.cs
|
||||
|
||||
|
||||
@@ -144,6 +144,7 @@ mobile_dirs := \
|
||||
System.Transactions \
|
||||
System.Data \
|
||||
Mono.Cairo \
|
||||
System.Numerics \
|
||||
Mono.Data.Sqlite
|
||||
|
||||
net_3_5_only_dirs := \
|
||||
@@ -156,6 +157,7 @@ net_4_0_dirs := \
|
||||
System.Dynamic \
|
||||
System.Numerics \
|
||||
Microsoft.CSharp \
|
||||
Microsoft.Build \
|
||||
System.Windows.Forms.DataVisualization \
|
||||
System.ComponentModel.Composition \
|
||||
System.Xaml \
|
||||
|
||||
@@ -23,9 +23,11 @@ Microsoft.Build.Framework/IBuildEngine.cs
|
||||
Microsoft.Build.Framework/IBuildEngine2.cs
|
||||
Microsoft.Build.Framework/IEventSource.cs
|
||||
Microsoft.Build.Framework/ILogger.cs
|
||||
Microsoft.Build.Framework/INodeLogger.cs
|
||||
Microsoft.Build.Framework/ITask.cs
|
||||
Microsoft.Build.Framework/ITaskHost.cs
|
||||
Microsoft.Build.Framework/ITaskItem.cs
|
||||
Microsoft.Build.Framework/ITaskItem2.cs
|
||||
Microsoft.Build.Framework/LoadInSeparateAppDomainAttribute.cs
|
||||
Microsoft.Build.Framework/LoggerException.cs
|
||||
Microsoft.Build.Framework/LoggerVerbosity.cs
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
//
|
||||
// INodeLogger.cs:
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge ([email protected])
|
||||
//
|
||||
// Copyright (C) 2011 Xamarin Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#if NET_4_0
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
||||
namespace Microsoft.Build.Framework
|
||||
{
|
||||
[System.Runtime.InteropServices.ComVisible (true)]
|
||||
public interface INodeLogger : ILogger
|
||||
{
|
||||
void Initialize (IEventSource eventSource, int nodeCount);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,50 @@
|
||||
//
|
||||
// ITaskItem2.cs:
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge ([email protected])
|
||||
//
|
||||
// Copyright (C) 2011 Xamarin Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
#if NET_4_0
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
||||
namespace Microsoft.Build.Framework
|
||||
{
|
||||
[System.Runtime.InteropServices.GuidAttribute ("ac6d5a59-f877-461b-88e3-b2f06fce0cb9")]
|
||||
[System.Runtime.InteropServices.ComVisible (true)]
|
||||
public interface ITaskItem2 : ITaskItem
|
||||
{
|
||||
string EvaluatedIncludeEscaped { get; set; }
|
||||
|
||||
string GetMetadataValueEscaped (string metadataName);
|
||||
|
||||
void SetMetadataValueLiteral (string metadataName, string metadataValue);
|
||||
|
||||
IDictionary CloneCustomMetadataEscaped ();
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,5 @@
|
||||
obj/
|
||||
bin/
|
||||
*.vs10x
|
||||
*.docstates
|
||||
*.suo
|
||||
@@ -0,0 +1,64 @@
|
||||
//
|
||||
// AssemblyInfo.cs
|
||||
//
|
||||
// Author:
|
||||
// Leszek Ciesielski ([email protected])
|
||||
//
|
||||
// (C) 2011 Leszek Ciesielski
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Resources;
|
||||
using System.Runtime;
|
||||
using System.Security;
|
||||
using System.Security.Permissions;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
// General Information about the Microsoft.Build assembly
|
||||
|
||||
[assembly: AssemblyTitle ("Microsoft.Build.dll")]
|
||||
[assembly: AssemblyDescription ("Microsoft.Build.dll")]
|
||||
[assembly: AssemblyDefaultAlias ("Microsoft.Build.dll")]
|
||||
|
||||
[assembly: AssemblyCompany (Consts.MonoCompany)]
|
||||
[assembly: AssemblyProduct (Consts.MonoProduct)]
|
||||
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
|
||||
[assembly: AssemblyVersion (Consts.FxVersion)]
|
||||
[assembly: SatelliteContractVersion (Consts.FxVersion)]
|
||||
[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
|
||||
|
||||
[assembly: NeutralResourcesLanguage ("en-US")]
|
||||
|
||||
[assembly: ComVisible (false)]
|
||||
[assembly: CLSCompliant (true)]
|
||||
[assembly: AssemblyDelaySign (true)]
|
||||
[assembly: AssemblyKeyFile("../msfinal.pub")]
|
||||
|
||||
[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
|
||||
[assembly: CompilationRelaxations (CompilationRelaxations.NoStringInterning)]
|
||||
[assembly: Debuggable (DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
|
||||
[assembly: RuntimeCompatibility (WrapNonExceptionThrows = true)]
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
thisdir = class/Microsoft.Build
|
||||
SUBDIRS =
|
||||
include ../../build/rules.make
|
||||
|
||||
LIBRARY = Microsoft.Build.dll
|
||||
|
||||
ifneq (4.0, $(FRAMEWORK_VERSION))
|
||||
LIBRARY_NAME = dummy-Microsoft.Build.dll
|
||||
NO_INSTALL = yes
|
||||
NO_TEST = yes
|
||||
NO_SIGN_ASSEMBLY = yes
|
||||
endif
|
||||
|
||||
LIB_MCS_FLAGS = \
|
||||
/r:$(corlib) \
|
||||
/r:System.dll \
|
||||
/r:System.Core.dll \
|
||||
/r:System.Xml.dll \
|
||||
/r:Microsoft.Build.Engine.dll \
|
||||
/r:Microsoft.Build.Framework.dll
|
||||
|
||||
include ../../build/library.make
|
||||
|
||||
export TESTING_MONO=a
|
||||
XBUILD_DIR=../../tools/xbuild
|
||||
include $(XBUILD_DIR)/xbuild_targets.make
|
||||
@@ -0,0 +1,74 @@
|
||||
//
|
||||
// ProjectChooseElement.cs
|
||||
//
|
||||
// Author:
|
||||
// Leszek Ciesielski ([email protected])
|
||||
//
|
||||
// (C) 2011 Leszek Ciesielski
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.Build.Exceptions;
|
||||
using Microsoft.Build.Internal;
|
||||
|
||||
namespace Microsoft.Build.Construction
|
||||
{
|
||||
[System.Diagnostics.DebuggerDisplayAttribute ("ProjectChooseElement (#Children={Count} "
|
||||
+ "HasOtherwise={OtherwiseElement != null})")]
|
||||
public class ProjectChooseElement : ProjectElementContainer
|
||||
{
|
||||
internal ProjectChooseElement (ProjectRootElement containingProject)
|
||||
{
|
||||
ContainingProject = containingProject;
|
||||
}
|
||||
public override string Condition { get { return null; } set { throw new InvalidOperationException(
|
||||
"Can not set Condition."); } }
|
||||
public ProjectOtherwiseElement OtherwiseElement {
|
||||
get { return LastChild as ProjectOtherwiseElement; }
|
||||
}
|
||||
public ICollection<ProjectWhenElement> WhenElements {
|
||||
get { return new CollectionFromEnumerable<ProjectWhenElement> (
|
||||
new FilteredEnumerable<ProjectWhenElement> (Children)); }
|
||||
}
|
||||
internal override string XmlName {
|
||||
get { return "Choose"; }
|
||||
}
|
||||
internal override ProjectElement LoadChildElement (string name)
|
||||
{
|
||||
switch (name) {
|
||||
case "Otherwise":
|
||||
var other = ContainingProject.CreateOtherwiseElement ();
|
||||
AppendChild (other);
|
||||
return other;
|
||||
case "When":
|
||||
var when = ContainingProject.CreateWhenElement (null);
|
||||
PrependChild (when);
|
||||
return when;
|
||||
default:
|
||||
throw new InvalidProjectFileException (string.Format (
|
||||
"Child \"{0}\" is not a known node type.", name));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
//
|
||||
// ProjectCommentElement.cs
|
||||
//
|
||||
// Author:
|
||||
// Leszek Ciesielski ([email protected])
|
||||
//
|
||||
// (C) 2011 Leszek Ciesielski
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Xml;
|
||||
|
||||
namespace Microsoft.Build.Construction
|
||||
{
|
||||
internal class ProjectCommentElement : ProjectElement
|
||||
{
|
||||
internal ProjectCommentElement (ProjectRootElement containingProject)
|
||||
{
|
||||
ContainingProject = containingProject;
|
||||
}
|
||||
|
||||
string comment;
|
||||
public string Comment { get { return comment ?? String.Empty; } set { comment = value; } }
|
||||
|
||||
internal override string XmlName {
|
||||
get { return String.Empty; }
|
||||
}
|
||||
|
||||
internal override void Load (XmlReader reader)
|
||||
{
|
||||
LoadValue (reader);
|
||||
}
|
||||
|
||||
internal override void LoadAttribute (string name, string value)
|
||||
{
|
||||
}
|
||||
|
||||
internal override void LoadValue (XmlReader reader)
|
||||
{
|
||||
if (reader.NodeType == XmlNodeType.Comment) {
|
||||
Comment = reader.Value;
|
||||
}
|
||||
}
|
||||
|
||||
internal override void Save (XmlWriter writer)
|
||||
{
|
||||
this.SaveValue (writer);
|
||||
}
|
||||
|
||||
internal override void SaveValue (XmlWriter writer)
|
||||
{
|
||||
if (!String.IsNullOrEmpty (Comment)) {
|
||||
writer.WriteComment (Comment);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
//
|
||||
// ProjectElement.cs
|
||||
//
|
||||
// Author:
|
||||
// Leszek Ciesielski ([email protected])
|
||||
//
|
||||
// (C) 2011 Leszek Ciesielski
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml;
|
||||
using Microsoft.Build.Exceptions;
|
||||
|
||||
namespace Microsoft.Build.Construction
|
||||
{
|
||||
public abstract class ProjectElement
|
||||
{
|
||||
internal ProjectElement ()
|
||||
{
|
||||
linkedListNode = new LinkedListNode<ProjectElement> (this);
|
||||
}
|
||||
public ProjectRootElement ContainingProject { get; internal set; }
|
||||
public ProjectElement PreviousSibling {
|
||||
get { return LinkedListNode.Previous == null ? null : LinkedListNode.Previous.Value; }
|
||||
internal set { }
|
||||
}
|
||||
public ProjectElementContainer Parent { get; internal set; }
|
||||
public ProjectElement NextSibling {
|
||||
get { return LinkedListNode.Next == null ? null : LinkedListNode.Next.Value; }
|
||||
internal set { }
|
||||
}
|
||||
string label;
|
||||
public string Label { get { return label ?? String.Empty; } set { label = value; } }
|
||||
string condition;
|
||||
public virtual string Condition { get { return condition ?? String.Empty; } set { condition = value; } }
|
||||
public IEnumerable<ProjectElementContainer> AllParents {
|
||||
get {
|
||||
var parent = Parent;
|
||||
while (parent != null) {
|
||||
yield return parent;
|
||||
parent = parent.Parent;
|
||||
}
|
||||
}
|
||||
}
|
||||
readonly LinkedListNode<ProjectElement> linkedListNode;
|
||||
internal LinkedListNode<ProjectElement> LinkedListNode { get { return linkedListNode; } }
|
||||
internal virtual void Load (XmlReader reader)
|
||||
{
|
||||
reader.ReadToFollowing (XmlName);
|
||||
while (reader.MoveToNextAttribute ()) {
|
||||
LoadAttribute (reader.Name, reader.Value);
|
||||
}
|
||||
LoadValue (reader);
|
||||
}
|
||||
internal virtual void LoadAttribute (string name, string value)
|
||||
{
|
||||
switch (name) {
|
||||
case "xmlns":
|
||||
break;
|
||||
case "Label":
|
||||
Label = value;
|
||||
break;
|
||||
case "Condition":
|
||||
Condition = value;
|
||||
break;
|
||||
default:
|
||||
throw new InvalidProjectFileException (string.Format (
|
||||
"Attribute \"{0}\" is not known on node \"{1}\" [type {2}].", name, XmlName,
|
||||
GetType ()));
|
||||
}
|
||||
}
|
||||
internal virtual void LoadValue (XmlReader reader)
|
||||
{
|
||||
}
|
||||
internal abstract string XmlName { get; }
|
||||
internal virtual void Save (XmlWriter writer)
|
||||
{
|
||||
writer.WriteStartElement (XmlName);
|
||||
SaveValue (writer);
|
||||
writer.WriteEndElement ();
|
||||
}
|
||||
internal virtual void SaveValue (XmlWriter writer)
|
||||
{
|
||||
SaveAttribute (writer, "Label", Label);
|
||||
SaveAttribute (writer, "Condition", Condition);
|
||||
}
|
||||
internal void SaveAttribute (XmlWriter writer, string attributeName, string attributeValue)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace (attributeValue))
|
||||
writer.WriteAttributeString (attributeName, attributeValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
//
|
||||
// ProjectElementContainer.cs
|
||||
//
|
||||
// Author:
|
||||
// Leszek Ciesielski ([email protected])
|
||||
//
|
||||
// (C) 2011 Leszek Ciesielski
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Xml;
|
||||
using Microsoft.Build.Internal;
|
||||
|
||||
namespace Microsoft.Build.Construction
|
||||
{
|
||||
public abstract class ProjectElementContainer : ProjectElement
|
||||
{
|
||||
internal ProjectElementContainer () {}
|
||||
LinkedList<ProjectElement> children = new LinkedList<ProjectElement> ();
|
||||
|
||||
public IEnumerable<ProjectElement> AllChildren {
|
||||
get {
|
||||
foreach (var child in Children) {
|
||||
var container = child as ProjectElementContainer;
|
||||
if (container != null)
|
||||
foreach (var containersChild in container.AllChildren)
|
||||
yield return containersChild;
|
||||
yield return child;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public ICollection<ProjectElement> Children {
|
||||
get { return new CollectionFromEnumerable<ProjectElement> (
|
||||
children.Where (p => !(p is ProjectCommentElement))); }
|
||||
}
|
||||
|
||||
public ICollection<ProjectElement> ChildrenReversed {
|
||||
get { return new CollectionFromEnumerable<ProjectElement> (
|
||||
new ReverseEnumerable<ProjectElement> (children)); }
|
||||
}
|
||||
|
||||
public int Count {
|
||||
get { return children.Count; }
|
||||
}
|
||||
public ProjectElement FirstChild {
|
||||
get { return children.First == null ? null : children.First.Value; }
|
||||
private set { }
|
||||
}
|
||||
public ProjectElement LastChild {
|
||||
get { return children.Last == null ? null: children.Last.Value; }
|
||||
private set { }
|
||||
}
|
||||
|
||||
public void AppendChild (ProjectElement child)
|
||||
{
|
||||
children.AddLast (child.LinkedListNode);
|
||||
child.Parent = this;
|
||||
}
|
||||
|
||||
public void InsertAfterChild (ProjectElement child, ProjectElement reference)
|
||||
{
|
||||
if (reference == null) {
|
||||
PrependChild (child);
|
||||
} else {
|
||||
child.Parent = this;
|
||||
children.AddAfter (reference.LinkedListNode, child.LinkedListNode);
|
||||
}
|
||||
}
|
||||
|
||||
public void InsertBeforeChild (ProjectElement child, ProjectElement reference)
|
||||
{
|
||||
if (reference == null) {
|
||||
AppendChild (child);
|
||||
} else {
|
||||
child.Parent = this;
|
||||
children.AddBefore (reference.LinkedListNode, child.LinkedListNode);
|
||||
}
|
||||
}
|
||||
|
||||
public void PrependChild (ProjectElement child)
|
||||
{
|
||||
children.AddFirst (child.LinkedListNode);
|
||||
child.Parent = this;
|
||||
}
|
||||
|
||||
public void RemoveAllChildren ()
|
||||
{
|
||||
foreach (var child in children)
|
||||
RemoveChild (child);
|
||||
}
|
||||
|
||||
public void RemoveChild (ProjectElement child)
|
||||
{
|
||||
child.Parent = null;
|
||||
children.Remove (child.LinkedListNode);
|
||||
}
|
||||
|
||||
internal override void SaveValue (XmlWriter writer)
|
||||
{
|
||||
base.SaveValue (writer);
|
||||
foreach (var child in children)
|
||||
child.Save (writer);
|
||||
}
|
||||
|
||||
internal override void LoadValue (XmlReader reader)
|
||||
{
|
||||
while (reader.Read ()) {
|
||||
if (reader.NodeType == XmlNodeType.Element) {
|
||||
var child = LoadChildElement (reader.Name);
|
||||
child.Load (reader.ReadSubtree ());
|
||||
} else if (reader.NodeType == XmlNodeType.Comment) {
|
||||
var commentElement = new ProjectCommentElement (ContainingProject);
|
||||
commentElement.Load (reader);
|
||||
AppendChild (commentElement);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal abstract ProjectElement LoadChildElement (string name);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
//
|
||||
// ProjectExtensionsElement.cs
|
||||
//
|
||||
// Author:
|
||||
// Leszek Ciesielski ([email protected])
|
||||
//
|
||||
// (C) 2011 Leszek Ciesielski
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Xml;
|
||||
using System.Text;
|
||||
|
||||
namespace Microsoft.Build.Construction
|
||||
{
|
||||
public class ProjectExtensionsElement : ProjectElement
|
||||
{
|
||||
internal ProjectExtensionsElement (ProjectRootElement containingProject)
|
||||
{
|
||||
ContainingProject = containingProject;
|
||||
}
|
||||
public override string Condition {
|
||||
get { return null; }
|
||||
set {
|
||||
throw new InvalidOperationException ("Can not set Condition.");
|
||||
}
|
||||
}
|
||||
public string Content {
|
||||
get { return element.InnerXml; }
|
||||
set { element.InnerXml = value; }
|
||||
}
|
||||
public string this[string name] {
|
||||
get {
|
||||
var child = element[name];
|
||||
return child == null ? string.Empty : child.InnerXml;
|
||||
}
|
||||
set {
|
||||
var child = element[name];
|
||||
if (child == null) {
|
||||
if (string.IsNullOrEmpty (name))
|
||||
return;
|
||||
child = document.CreateElement (name);
|
||||
element.AppendChild (child);
|
||||
}
|
||||
if (string.IsNullOrEmpty (value))
|
||||
element.RemoveChild (child);
|
||||
else
|
||||
child.InnerXml = value;
|
||||
}
|
||||
}
|
||||
internal override void Load (XmlReader reader)
|
||||
{
|
||||
while (reader.Read () && reader.NodeType != XmlNodeType.Element)
|
||||
;
|
||||
using (XmlReader subReader = reader.ReadSubtree ()) {
|
||||
document = new XmlDocument ();
|
||||
document.Load (subReader);
|
||||
element = document.DocumentElement;
|
||||
}
|
||||
}
|
||||
internal override void SaveValue (XmlWriter writer)
|
||||
{
|
||||
element.WriteContentTo (writer);
|
||||
}
|
||||
internal override string XmlName {
|
||||
get { return "ProjectExtensions"; }
|
||||
}
|
||||
XmlDocument document;
|
||||
XmlElement element;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
//
|
||||
// ProjectImportElement.cs
|
||||
//
|
||||
// Author:
|
||||
// Leszek Ciesielski ([email protected])
|
||||
//
|
||||
// (C) 2011 Leszek Ciesielski
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Xml;
|
||||
namespace Microsoft.Build.Construction
|
||||
{
|
||||
[System.Diagnostics.DebuggerDisplayAttribute ("Project={Project} Condition={Condition}")]
|
||||
public class ProjectImportElement : ProjectElement
|
||||
{
|
||||
internal ProjectImportElement (string project, ProjectRootElement containingProject)
|
||||
: this(containingProject)
|
||||
{
|
||||
Project = project;
|
||||
}
|
||||
|
||||
internal ProjectImportElement (ProjectRootElement containingProject)
|
||||
{
|
||||
ContainingProject = containingProject;
|
||||
}
|
||||
|
||||
string project;
|
||||
public string Project { get { return project ?? String.Empty; } set { project = value; } }
|
||||
|
||||
internal override string XmlName {
|
||||
get { return "Import"; }
|
||||
}
|
||||
|
||||
internal override void SaveValue (XmlWriter writer)
|
||||
{
|
||||
SaveAttribute (writer, "Project", Project);
|
||||
base.SaveValue (writer);
|
||||
}
|
||||
|
||||
internal override void LoadAttribute (string name, string value)
|
||||
{
|
||||
switch (name) {
|
||||
case "Project":
|
||||
Project = value;
|
||||
break;
|
||||
default:
|
||||
base.LoadAttribute (name, value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
//
|
||||
// ProjectImportGroupElement.cs
|
||||
//
|
||||
// Author:
|
||||
// Leszek Ciesielski ([email protected])
|
||||
//
|
||||
// (C) 2011 Leszek Ciesielski
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Build.Internal;
|
||||
|
||||
namespace Microsoft.Build.Construction
|
||||
{
|
||||
[System.Diagnostics.DebuggerDisplayAttribute ("#Imports={Count} Condition={Condition} Label={Label}")]
|
||||
public class ProjectImportGroupElement : ProjectElementContainer
|
||||
{
|
||||
internal ProjectImportGroupElement (ProjectRootElement containingProject)
|
||||
{
|
||||
ContainingProject = containingProject;
|
||||
}
|
||||
public ICollection<ProjectImportElement> Imports {
|
||||
get { return new CollectionFromEnumerable<ProjectImportElement> (
|
||||
new FilteredEnumerable<ProjectImportElement> (Children)); }
|
||||
}
|
||||
public ProjectImportElement AddImport (string project)
|
||||
{
|
||||
var import = ContainingProject.CreateImportElement (project);
|
||||
AppendChild (import);
|
||||
return import;
|
||||
}
|
||||
internal override string XmlName { get { return "ImportGroup"; } }
|
||||
internal override ProjectElement LoadChildElement (string name)
|
||||
{
|
||||
return AddImport (null);
|
||||
}
|
||||
}
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
//
|
||||
// ProjectItemDefinitionElement.cs
|
||||
//
|
||||
// Author:
|
||||
// Leszek Ciesielski ([email protected])
|
||||
//
|
||||
// (C) 2011 Leszek Ciesielski
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.Build.Internal;
|
||||
|
||||
namespace Microsoft.Build.Construction
|
||||
{
|
||||
[System.Diagnostics.DebuggerDisplayAttribute ("{ItemType} #Metadata={Count} Condition={Condition}")]
|
||||
public class ProjectItemDefinitionElement : ProjectElementContainer
|
||||
{
|
||||
internal ProjectItemDefinitionElement (string itemType, ProjectRootElement containingProject)
|
||||
{
|
||||
ItemType = itemType;
|
||||
ContainingProject = containingProject;
|
||||
}
|
||||
public string ItemType { get; private set; }
|
||||
public ICollection<ProjectMetadataElement> Metadata {
|
||||
get { return new CollectionFromEnumerable<ProjectMetadataElement> (
|
||||
new FilteredEnumerable<ProjectMetadataElement> (Children)); }
|
||||
}
|
||||
public ProjectMetadataElement AddMetadata (string name, string unevaluatedValue)
|
||||
{
|
||||
var metadata = ContainingProject.CreateMetadataElement (name);
|
||||
metadata.Value = unevaluatedValue;
|
||||
AppendChild (metadata);
|
||||
return metadata;
|
||||
}
|
||||
internal override string XmlName {
|
||||
get { return ItemType; }
|
||||
}
|
||||
internal override ProjectElement LoadChildElement (string name)
|
||||
{
|
||||
return AddMetadata (name, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
//
|
||||
// ProjectItemDefinitionGroupElement.cs
|
||||
//
|
||||
// Author:
|
||||
// Leszek Ciesielski ([email protected])
|
||||
//
|
||||
// (C) 2011 Leszek Ciesielski
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.Build.Internal;
|
||||
|
||||
namespace Microsoft.Build.Construction
|
||||
{
|
||||
[System.Diagnostics.DebuggerDisplayAttribute ("#ItemDefinitions={Count} Condition={Condition} Label={Label}")]
|
||||
public class ProjectItemDefinitionGroupElement : ProjectElementContainer
|
||||
{
|
||||
internal ProjectItemDefinitionGroupElement (ProjectRootElement containingProject)
|
||||
{
|
||||
ContainingProject = containingProject;
|
||||
}
|
||||
public ICollection<ProjectItemDefinitionElement> ItemDefinitions {
|
||||
get { return new CollectionFromEnumerable<ProjectItemDefinitionElement> (
|
||||
new FilteredEnumerable<ProjectItemDefinitionElement> (Children)); }
|
||||
}
|
||||
public ProjectItemDefinitionElement AddItemDefinition (string itemType)
|
||||
{
|
||||
var definition = ContainingProject.CreateItemDefinitionElement (itemType);
|
||||
AppendChild (definition);
|
||||
return definition;
|
||||
}
|
||||
internal override string XmlName {
|
||||
get { return "ItemDefinitionGroup"; }
|
||||
}
|
||||
internal override ProjectElement LoadChildElement (string name)
|
||||
{
|
||||
return AddItemDefinition (name);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
//
|
||||
// ProjectItemElementa.cs
|
||||
//
|
||||
// Author:
|
||||
// Leszek Ciesielski ([email protected])
|
||||
//
|
||||
// (C) 2011 Leszek Ciesielski
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.Build.Internal;
|
||||
using System.Xml;
|
||||
|
||||
namespace Microsoft.Build.Construction
|
||||
{
|
||||
[System.Diagnostics.DebuggerDisplayAttribute ("{ItemType} Include={Include} Exclude={Exclude} "
|
||||
+ "#Metadata={Count} Condition={Condition}")]
|
||||
public class ProjectItemElement : ProjectElementContainer
|
||||
{
|
||||
internal ProjectItemElement (string itemType, ProjectRootElement containingProject)
|
||||
{
|
||||
ItemType = itemType;
|
||||
ContainingProject = containingProject;
|
||||
}
|
||||
string exclude;
|
||||
public string Exclude { get { return exclude ?? String.Empty; } set { exclude = value; } }
|
||||
public bool HasMetadata {
|
||||
get {
|
||||
var metadata = Metadata.FirstOrDefault ();
|
||||
return metadata != null;
|
||||
}
|
||||
}
|
||||
string include;
|
||||
public string Include { get { return include ?? String.Empty; } set { include = value; } }
|
||||
string itemType;
|
||||
public string ItemType { get { return itemType ?? String.Empty; } set { itemType = value; } }
|
||||
public ICollection<ProjectMetadataElement> Metadata {
|
||||
get { return new CollectionFromEnumerable<ProjectMetadataElement> (
|
||||
new FilteredEnumerable<ProjectMetadataElement> (Children)); }
|
||||
}
|
||||
string @remove;
|
||||
public string Remove { get { return @remove ?? String.Empty; } set { @remove = value; } }
|
||||
public ProjectMetadataElement AddMetadata (string name, string unevaluatedValue)
|
||||
{
|
||||
var metadata = ContainingProject.CreateMetadataElement (name, unevaluatedValue);
|
||||
AppendChild (metadata);
|
||||
return metadata;
|
||||
}
|
||||
internal override string XmlName {
|
||||
get { return ItemType; }
|
||||
}
|
||||
internal override void SaveValue (XmlWriter writer)
|
||||
{
|
||||
SaveAttribute (writer, "Include", Include);
|
||||
SaveAttribute (writer, "Exclude", Exclude);
|
||||
SaveAttribute (writer, "Remove", Remove);
|
||||
base.SaveValue (writer);
|
||||
}
|
||||
internal override void LoadAttribute (string name, string value)
|
||||
{
|
||||
switch (name) {
|
||||
case "Include":
|
||||
Include = value;
|
||||
break;
|
||||
case "Exclude":
|
||||
Exclude = value;
|
||||
break;
|
||||
case "Remove":
|
||||
Remove = value;
|
||||
break;
|
||||
default:
|
||||
base.LoadAttribute (name, value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
internal override ProjectElement LoadChildElement (string name)
|
||||
{
|
||||
var metadata = ContainingProject.CreateMetadataElement (name);
|
||||
AppendChild (metadata);
|
||||
return metadata;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
//
|
||||
// ProjectItemGroupElement.cs
|
||||
//
|
||||
// Author:
|
||||
// Leszek Ciesielski ([email protected])
|
||||
//
|
||||
// (C) 2011 Leszek Ciesielski
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.Build.Internal;
|
||||
using System;
|
||||
|
||||
namespace Microsoft.Build.Construction
|
||||
{
|
||||
[System.Diagnostics.DebuggerDisplayAttribute ("#Items={Count} Condition={Condition} Label={Label}")]
|
||||
public class ProjectItemGroupElement : ProjectElementContainer
|
||||
{
|
||||
public ProjectItemElement AddItem (string itemType, string include)
|
||||
{
|
||||
return AddItem (itemType, include, null);
|
||||
}
|
||||
|
||||
public ProjectItemElement AddItem (string itemType, string include,
|
||||
IEnumerable<KeyValuePair<string, string>> metadata)
|
||||
{
|
||||
var item = ContainingProject.CreateItemElement (itemType, include);
|
||||
if (metadata != null)
|
||||
foreach (var data in metadata)
|
||||
item.AddMetadata (data.Key, data.Value);
|
||||
var lastChild = LastChild;
|
||||
foreach (var existingItem in Items) {
|
||||
var compare = string.Compare (item.ItemType, existingItem.ItemType,
|
||||
StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
if (compare == 0) {
|
||||
if (string.Compare (item.Include, existingItem.Include,
|
||||
StringComparison.OrdinalIgnoreCase) >= 0)
|
||||
continue;
|
||||
lastChild = existingItem.PreviousSibling;
|
||||
break;
|
||||
}
|
||||
|
||||
if (compare < 0) {
|
||||
lastChild = existingItem.PreviousSibling;
|
||||
break;
|
||||
}
|
||||
}
|
||||
InsertAfterChild (item, lastChild);
|
||||
return item;
|
||||
}
|
||||
|
||||
internal ProjectItemGroupElement (ProjectRootElement containingProject)
|
||||
{
|
||||
ContainingProject = containingProject;
|
||||
}
|
||||
|
||||
public ICollection<ProjectItemElement> Items {
|
||||
get { return new CollectionFromEnumerable<ProjectItemElement> (
|
||||
new FilteredEnumerable<ProjectItemElement> (Children)); }
|
||||
}
|
||||
|
||||
internal override string XmlName {
|
||||
get { return "ItemGroup"; }
|
||||
}
|
||||
|
||||
internal override ProjectElement LoadChildElement (string name)
|
||||
{
|
||||
var item = ContainingProject.CreateItemElement (name);
|
||||
AppendChild (item);
|
||||
return item;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
//
|
||||
// ProjectMetadataElement.cs
|
||||
//
|
||||
// Author:
|
||||
// Leszek Ciesielski ([email protected])
|
||||
//
|
||||
// (C) 2011 Leszek Ciesielski
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml;
|
||||
|
||||
namespace Microsoft.Build.Construction
|
||||
{
|
||||
[System.Diagnostics.DebuggerDisplayAttribute ("{Name} Value={Value} Condition={Condition}")]
|
||||
public class ProjectMetadataElement : ProjectElement
|
||||
{
|
||||
internal ProjectMetadataElement (string name, ProjectRootElement containingProject)
|
||||
{
|
||||
Name = name;
|
||||
ContainingProject = containingProject;
|
||||
}
|
||||
string name;
|
||||
public string Name { get { return name ?? String.Empty; } set { name = value; } }
|
||||
string internalValue;
|
||||
public string Value { get { return internalValue ?? String.Empty; } set { internalValue = value; } }
|
||||
internal override string XmlName {
|
||||
get { return Name; }
|
||||
}
|
||||
internal override void SaveValue (XmlWriter writer)
|
||||
{
|
||||
base.SaveValue (writer);
|
||||
if (!string.IsNullOrWhiteSpace (Value))
|
||||
writer.WriteValue (Value);
|
||||
}
|
||||
internal override void LoadValue (XmlReader reader)
|
||||
{
|
||||
while (reader.Read () & reader.NodeType != XmlNodeType.Text)
|
||||
;
|
||||
Value = reader.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
//
|
||||
// ProjectOnErrorElement.cs
|
||||
//
|
||||
// Author:
|
||||
// Leszek Ciesielski ([email protected])
|
||||
//
|
||||
// (C) 2011 Leszek Ciesielski
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System.Xml;
|
||||
namespace Microsoft.Build.Construction
|
||||
{
|
||||
[System.Diagnostics.DebuggerDisplayAttribute ("ExecuteTargets={ExecuteTargets}")]
|
||||
public class ProjectOnErrorElement : ProjectElement
|
||||
{
|
||||
internal ProjectOnErrorElement (string executeTargets, ProjectRootElement containingProject)
|
||||
: this(containingProject)
|
||||
{
|
||||
ExecuteTargetsAttribute = executeTargets;
|
||||
}
|
||||
internal ProjectOnErrorElement (ProjectRootElement containingProject)
|
||||
{
|
||||
ContainingProject = containingProject;
|
||||
}
|
||||
public string ExecuteTargetsAttribute { get; set; }
|
||||
internal override string XmlName {
|
||||
get { return "OnError"; }
|
||||
}
|
||||
internal override void SaveValue (XmlWriter writer)
|
||||
{
|
||||
base.SaveValue (writer);
|
||||
SaveAttribute (writer, "ExecuteTargets", ExecuteTargetsAttribute);
|
||||
}
|
||||
internal override void LoadAttribute (string name, string value)
|
||||
{
|
||||
switch (name) {
|
||||
case "ExecuteTargets":
|
||||
ExecuteTargetsAttribute = value;
|
||||
break;
|
||||
default:
|
||||
base.LoadAttribute (name, value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
//
|
||||
// ProjectOtherwiseElement.cs
|
||||
//
|
||||
// Author:
|
||||
// Leszek Ciesielski ([email protected])
|
||||
//
|
||||
// (C) 2011 Leszek Ciesielski
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Microsoft.Build.Exceptions;
|
||||
using Microsoft.Build.Internal;
|
||||
|
||||
namespace Microsoft.Build.Construction
|
||||
{
|
||||
[System.Diagnostics.DebuggerDisplayAttribute ("#Children={Count}")]
|
||||
public class ProjectOtherwiseElement : ProjectElementContainer
|
||||
{
|
||||
internal ProjectOtherwiseElement (ProjectRootElement containingProject)
|
||||
{
|
||||
ContainingProject = containingProject;
|
||||
}
|
||||
public ICollection<ProjectChooseElement> ChooseElements {
|
||||
get { return new CollectionFromEnumerable<ProjectChooseElement> (
|
||||
new FilteredEnumerable<ProjectChooseElement> (Children)); }
|
||||
}
|
||||
public override string Condition {
|
||||
get { return null; }
|
||||
set {
|
||||
throw new InvalidOperationException ("Can not set Condition.");
|
||||
}
|
||||
}
|
||||
public ICollection<ProjectItemGroupElement> ItemGroups {
|
||||
get { return new CollectionFromEnumerable<ProjectItemGroupElement> (
|
||||
new FilteredEnumerable<ProjectItemGroupElement> (Children)); }
|
||||
}
|
||||
public ICollection<ProjectPropertyGroupElement> PropertyGroups {
|
||||
get { return new CollectionFromEnumerable<ProjectPropertyGroupElement> (
|
||||
new FilteredEnumerable<ProjectPropertyGroupElement> (Children)); }
|
||||
}
|
||||
internal override string XmlName {
|
||||
get { return "Otherwise"; }
|
||||
}
|
||||
internal override ProjectElement LoadChildElement (string name)
|
||||
{
|
||||
switch (name) {
|
||||
case "PropertyGroup":
|
||||
var property = ContainingProject.CreatePropertyGroupElement ();
|
||||
AppendChild (property);
|
||||
return property;
|
||||
case "ItemGroup":
|
||||
var item = ContainingProject.CreateItemGroupElement ();
|
||||
AppendChild (item);
|
||||
return item;
|
||||
case "When":
|
||||
var when = ContainingProject.CreateWhenElement (null);
|
||||
AppendChild (when);
|
||||
return when;
|
||||
default:
|
||||
throw new InvalidProjectFileException (string.Format (
|
||||
"Child \"{0}\" is not a known node type.", name));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
//
|
||||
// ProjectOutputElement.cs
|
||||
//
|
||||
// Author:
|
||||
// Leszek Ciesielski ([email protected])
|
||||
//
|
||||
// (C) 2011 Leszek Ciesielski
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Xml;
|
||||
namespace Microsoft.Build.Construction
|
||||
{
|
||||
[System.Diagnostics.DebuggerDisplayAttribute ("Name={Name} TaskParameter={TaskParameter} ItemName={ItemName} "
|
||||
+ "PropertyName={PropertyName} Condition={Condition}")]
|
||||
public class ProjectOutputElement : ProjectElement
|
||||
{
|
||||
internal ProjectOutputElement (string taskParameter, string itemType, string propertyName,
|
||||
ProjectRootElement containintProject)
|
||||
{
|
||||
TaskParameter = taskParameter;
|
||||
ItemType = itemType;
|
||||
PropertyName = propertyName;
|
||||
ContainingProject = containintProject;
|
||||
}
|
||||
public bool IsOutputItem {
|
||||
get { return !String.IsNullOrWhiteSpace(itemType); }
|
||||
}
|
||||
public bool IsOutputProperty {
|
||||
get { return !String.IsNullOrWhiteSpace(propertyName); }
|
||||
}
|
||||
string itemType;
|
||||
public string ItemType { get { return itemType ?? String.Empty; } set { itemType = value; } }
|
||||
string propertyName;
|
||||
public string PropertyName { get { return propertyName ?? String.Empty; } set { propertyName = value; } }
|
||||
string taskParameter;
|
||||
public string TaskParameter {
|
||||
get { return taskParameter ?? String.Empty; }
|
||||
set { taskParameter = value; }
|
||||
}
|
||||
internal override string XmlName {
|
||||
get { return "Output"; }
|
||||
}
|
||||
internal override void SaveValue (XmlWriter writer)
|
||||
{
|
||||
base.SaveValue (writer);
|
||||
SaveAttribute (writer, "TaskParameter", TaskParameter);
|
||||
if (IsOutputProperty)
|
||||
SaveAttribute (writer, "PropertyName", PropertyName);
|
||||
else
|
||||
SaveAttribute (writer, "ItemName", ItemType);
|
||||
}
|
||||
internal override void LoadAttribute (string name, string value)
|
||||
{
|
||||
switch (name) {
|
||||
case "TaskParameter":
|
||||
TaskParameter = value;
|
||||
break;
|
||||
case "PropertyName":
|
||||
PropertyName = value;
|
||||
break;
|
||||
case "ItemName":
|
||||
ItemType = value;
|
||||
break;
|
||||
default:
|
||||
base.LoadAttribute (name, value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
//
|
||||
// ProjectPropertyElement.cs
|
||||
//
|
||||
// Author:
|
||||
// Leszek Ciesielski ([email protected])
|
||||
//
|
||||
// (C) 2011 Leszek Ciesielski
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Xml;
|
||||
namespace Microsoft.Build.Construction
|
||||
{
|
||||
[System.Diagnostics.DebuggerDisplayAttribute ("{Name} Value={Value} Condition={Condition}")]
|
||||
public class ProjectPropertyElement : ProjectElement
|
||||
{
|
||||
string name;
|
||||
public string Name { get { return name ?? String.Empty; } set { name = value; } }
|
||||
string internalValue;
|
||||
public string Value { get { return internalValue ?? String.Empty; } set { internalValue = value; } }
|
||||
internal ProjectPropertyElement (string name, ProjectRootElement containingProject)
|
||||
{
|
||||
Name = name;
|
||||
ContainingProject = containingProject;
|
||||
}
|
||||
internal override string XmlName {
|
||||
get { return Name; }
|
||||
}
|
||||
internal override void SaveValue (XmlWriter writer)
|
||||
{
|
||||
base.SaveValue (writer);
|
||||
if (!string.IsNullOrWhiteSpace (Value))
|
||||
writer.WriteValue (Value);
|
||||
}
|
||||
internal override void LoadValue (XmlReader reader)
|
||||
{
|
||||
while (reader.Read () & reader.NodeType != XmlNodeType.Text)
|
||||
;
|
||||
Value = reader.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
//
|
||||
// ProjectPropertyGroupElement.cs
|
||||
//
|
||||
// Author:
|
||||
// Leszek Ciesielski ([email protected])
|
||||
//
|
||||
// (C) 2011 Leszek Ciesielski
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.Build.Internal;
|
||||
using System.Xml;
|
||||
|
||||
namespace Microsoft.Build.Construction
|
||||
{
|
||||
[System.Diagnostics.DebuggerDisplayAttribute ("#Properties={Count} Condition={Condition} Label={Label}")]
|
||||
public class ProjectPropertyGroupElement : ProjectElementContainer
|
||||
{
|
||||
public ProjectPropertyElement AddProperty (string name, string unevaluatedValue)
|
||||
{
|
||||
var property = ContainingProject.CreatePropertyElement (name);
|
||||
property.Value = unevaluatedValue;
|
||||
AppendChild (property);
|
||||
return property;
|
||||
}
|
||||
|
||||
public ProjectPropertyElement SetProperty (string name, string unevaluatedValue)
|
||||
{
|
||||
var existing = Properties.Where (p => p.Name.Equals (name, StringComparison.OrdinalIgnoreCase)
|
||||
&& p.Condition.Length == 0).FirstOrDefault ();
|
||||
if (existing != null) {
|
||||
existing.Value = unevaluatedValue;
|
||||
return existing;
|
||||
}
|
||||
|
||||
return AddProperty (name, unevaluatedValue);
|
||||
}
|
||||
|
||||
internal ProjectPropertyGroupElement (ProjectRootElement containingProject)
|
||||
{
|
||||
ContainingProject = containingProject;
|
||||
}
|
||||
|
||||
public ICollection<ProjectPropertyElement> Properties {
|
||||
get { return new CollectionFromEnumerable<ProjectPropertyElement> (
|
||||
new FilteredEnumerable<ProjectPropertyElement> (Children)); }
|
||||
}
|
||||
|
||||
public ICollection<ProjectPropertyElement> PropertiesReversed {
|
||||
get { return new CollectionFromEnumerable<ProjectPropertyElement> (
|
||||
new FilteredEnumerable<ProjectPropertyElement> (ChildrenReversed)); }
|
||||
}
|
||||
|
||||
internal override string XmlName {
|
||||
get { return "PropertyGroup"; }
|
||||
}
|
||||
|
||||
internal override ProjectElement LoadChildElement (string name)
|
||||
{
|
||||
return AddProperty (name, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,593 @@
|
||||
//
|
||||
// ProjectRootElement.cs
|
||||
//
|
||||
// Author:
|
||||
// Leszek Ciesielski ([email protected])
|
||||
//
|
||||
// (C) 2011 Leszek Ciesielski
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
using Microsoft.Build.Evaluation;
|
||||
using Microsoft.Build.Internal;
|
||||
using System.Text;
|
||||
using System;
|
||||
using System.Xml;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Globalization;
|
||||
using Microsoft.Build.Exceptions;
|
||||
|
||||
namespace Microsoft.Build.Construction
|
||||
{
|
||||
[System.Diagnostics.DebuggerDisplayAttribute("{FullPath} #Children={Count} DefaultTargets={DefaultTargets} "
|
||||
+ "ToolsVersion={ToolsVersion} InitialTargets={InitialTargets}")]
|
||||
public class ProjectRootElement : ProjectElementContainer
|
||||
{
|
||||
public override string Condition { get { return null; } set { throw new InvalidOperationException (
|
||||
"Can not set Condition."); } }
|
||||
string defaultTargets;
|
||||
public string DefaultTargets {
|
||||
get { return defaultTargets ?? String.Empty; }
|
||||
set { defaultTargets = value; }
|
||||
}
|
||||
|
||||
string fullPath;
|
||||
public string FullPath {
|
||||
get { return fullPath; }
|
||||
set {
|
||||
fullPath = Path.GetFullPath (value);
|
||||
DirectoryPath = Path.GetDirectoryName (fullPath);
|
||||
}
|
||||
}
|
||||
|
||||
string directoryPath;
|
||||
public string DirectoryPath {
|
||||
get { return directoryPath ?? String.Empty; }
|
||||
internal set { directoryPath = value; }
|
||||
}
|
||||
|
||||
public ICollection<ProjectPropertyElement> Properties {
|
||||
get { return new CollectionFromEnumerable<ProjectPropertyElement> (
|
||||
new FilteredEnumerable<ProjectPropertyElement> (AllChildren)); }
|
||||
}
|
||||
|
||||
public ICollection<ProjectChooseElement> ChooseElements {
|
||||
get { return new CollectionFromEnumerable<ProjectChooseElement> (
|
||||
new FilteredEnumerable<ProjectChooseElement> (Children)); }
|
||||
}
|
||||
|
||||
public Encoding Encoding {
|
||||
get { return Encoding.UTF8; }
|
||||
}
|
||||
|
||||
public bool HasUnsavedChanges {
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public ICollection<ProjectImportGroupElement> ImportGroups {
|
||||
get { return new CollectionFromEnumerable<ProjectImportGroupElement> (
|
||||
new FilteredEnumerable<ProjectImportGroupElement> (Children)); }
|
||||
}
|
||||
|
||||
public ICollection<ProjectImportGroupElement> ImportGroupsReversed {
|
||||
get { return new CollectionFromEnumerable<ProjectImportGroupElement> (
|
||||
new FilteredEnumerable<ProjectImportGroupElement> (ChildrenReversed)); }
|
||||
}
|
||||
|
||||
public ICollection<ProjectImportElement> Imports {
|
||||
get { return new CollectionFromEnumerable<ProjectImportElement> (
|
||||
new FilteredEnumerable<ProjectImportElement> (AllChildren)); }
|
||||
}
|
||||
|
||||
string initialTargets;
|
||||
public string InitialTargets {
|
||||
get { return initialTargets ?? String.Empty; }
|
||||
set { initialTargets = value; }
|
||||
}
|
||||
|
||||
public ICollection<ProjectItemDefinitionGroupElement> ItemDefinitionGroups {
|
||||
get { return new CollectionFromEnumerable<ProjectItemDefinitionGroupElement> (
|
||||
new FilteredEnumerable<ProjectItemDefinitionGroupElement> (Children)); }
|
||||
}
|
||||
|
||||
public ICollection<ProjectItemDefinitionGroupElement> ItemDefinitionGroupsReversed {
|
||||
get { return new CollectionFromEnumerable<ProjectItemDefinitionGroupElement> (
|
||||
new FilteredEnumerable<ProjectItemDefinitionGroupElement> (ChildrenReversed)); }
|
||||
}
|
||||
|
||||
public ICollection<ProjectItemDefinitionElement> ItemDefinitions {
|
||||
get { return new CollectionFromEnumerable<ProjectItemDefinitionElement> (
|
||||
new FilteredEnumerable<ProjectItemDefinitionElement> (AllChildren)); }
|
||||
}
|
||||
|
||||
public ICollection<ProjectItemGroupElement> ItemGroups {
|
||||
get { return new CollectionFromEnumerable<ProjectItemGroupElement> (
|
||||
new FilteredEnumerable<ProjectItemGroupElement> (Children)); }
|
||||
}
|
||||
|
||||
public ICollection<ProjectItemGroupElement> ItemGroupsReversed {
|
||||
get { return new CollectionFromEnumerable<ProjectItemGroupElement> (
|
||||
new FilteredEnumerable<ProjectItemGroupElement> (ChildrenReversed)); }
|
||||
}
|
||||
|
||||
public ICollection<ProjectItemElement> Items {
|
||||
get { return new CollectionFromEnumerable<ProjectItemElement> (
|
||||
new FilteredEnumerable<ProjectItemElement> (AllChildren)); }
|
||||
}
|
||||
|
||||
public DateTime LastWriteTimeWhenRead {
|
||||
get { return DateTime.MinValue; }
|
||||
}
|
||||
|
||||
public ICollection<ProjectPropertyGroupElement> PropertyGroups {
|
||||
get { return new CollectionFromEnumerable<ProjectPropertyGroupElement> (
|
||||
new FilteredEnumerable<ProjectPropertyGroupElement> (Children)); }
|
||||
}
|
||||
|
||||
public ICollection<ProjectPropertyGroupElement> PropertyGroupsReversed {
|
||||
get { return new CollectionFromEnumerable<ProjectPropertyGroupElement> (
|
||||
new FilteredEnumerable<ProjectPropertyGroupElement> (ChildrenReversed)); }
|
||||
}
|
||||
|
||||
public string RawXml {
|
||||
get {
|
||||
using (var writer = new StringWriter (CultureInfo.InvariantCulture)) {
|
||||
Save (writer);
|
||||
return writer.ToString ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public ICollection<ProjectTargetElement> Targets {
|
||||
get { return new CollectionFromEnumerable<ProjectTargetElement> (
|
||||
new FilteredEnumerable<ProjectTargetElement> (Children)); }
|
||||
}
|
||||
|
||||
public DateTime TimeLastChanged {
|
||||
get { return DateTime.Now; }
|
||||
}
|
||||
|
||||
string toolsVersion;
|
||||
public string ToolsVersion {
|
||||
get { return toolsVersion ?? "4.0"; }
|
||||
set { toolsVersion = value; }
|
||||
}
|
||||
|
||||
public ICollection<ProjectUsingTaskElement> UsingTasks {
|
||||
get { return new CollectionFromEnumerable<ProjectUsingTaskElement> (
|
||||
new FilteredEnumerable<ProjectUsingTaskElement> (Children)); }
|
||||
}
|
||||
|
||||
public int Version {
|
||||
get { return 0; }
|
||||
}
|
||||
|
||||
ProjectRootElement (ProjectCollection projectCollection)
|
||||
{
|
||||
}
|
||||
|
||||
public static ProjectRootElement Create ()
|
||||
{
|
||||
return Create (ProjectCollection.GlobalProjectCollection);
|
||||
}
|
||||
|
||||
public static ProjectRootElement Create (ProjectCollection projectCollection)
|
||||
{
|
||||
return new ProjectRootElement (projectCollection);
|
||||
}
|
||||
|
||||
public static ProjectRootElement Create (string path)
|
||||
{
|
||||
return Create (path, ProjectCollection.GlobalProjectCollection);
|
||||
}
|
||||
|
||||
public static ProjectRootElement Create (XmlReader xmlReader)
|
||||
{
|
||||
return Create (xmlReader, ProjectCollection.GlobalProjectCollection);
|
||||
}
|
||||
|
||||
public static ProjectRootElement Create (string path, ProjectCollection projectCollection)
|
||||
{
|
||||
var result = Create (projectCollection);
|
||||
result.FullPath = path;
|
||||
return result;
|
||||
}
|
||||
|
||||
public static ProjectRootElement Create (XmlReader xmlReader, ProjectCollection projectCollection)
|
||||
{
|
||||
// yes, this should create en empty project
|
||||
var result = Create (projectCollection);
|
||||
return result;
|
||||
}
|
||||
|
||||
public ProjectImportElement AddImport (string project)
|
||||
{
|
||||
var import = CreateImportElement (project);
|
||||
AppendChild (import);
|
||||
return import;
|
||||
}
|
||||
|
||||
public ProjectImportGroupElement AddImportGroup ()
|
||||
{
|
||||
var importGroup = CreateImportGroupElement ();
|
||||
AppendChild (importGroup);
|
||||
return importGroup;
|
||||
}
|
||||
|
||||
public ProjectItemElement AddItem (string itemType, string include)
|
||||
{
|
||||
return AddItem (itemType, include, null);
|
||||
}
|
||||
|
||||
public ProjectItemElement AddItem (string itemType, string include,
|
||||
IEnumerable<KeyValuePair<string, string>> metadata)
|
||||
{
|
||||
var @group = ItemGroups.
|
||||
Where (p => string.IsNullOrEmpty (p.Condition)
|
||||
&& p.Items.Where (s => s.ItemType.Equals (itemType,
|
||||
StringComparison.OrdinalIgnoreCase)).FirstOrDefault () != null).
|
||||
FirstOrDefault ();
|
||||
if (@group == null)
|
||||
@group = AddItemGroup ();
|
||||
return @group.AddItem (itemType, include, metadata);
|
||||
}
|
||||
|
||||
public ProjectItemDefinitionElement AddItemDefinition (string itemType)
|
||||
{
|
||||
var @group = ItemDefinitionGroups.
|
||||
Where (p => string.IsNullOrEmpty (p.Condition)
|
||||
&& p.ItemDefinitions.Where (s => s.ItemType.Equals (itemType,
|
||||
StringComparison.OrdinalIgnoreCase)).FirstOrDefault () != null).
|
||||
FirstOrDefault ();
|
||||
if (@group == null)
|
||||
@group = AddItemDefinitionGroup ();
|
||||
return @group.AddItemDefinition (itemType);
|
||||
}
|
||||
|
||||
public ProjectItemDefinitionGroupElement AddItemDefinitionGroup ()
|
||||
{
|
||||
var @group = CreateItemDefinitionGroupElement ();
|
||||
ProjectElementContainer last = ItemDefinitionGroupsReversed.FirstOrDefault ();
|
||||
if (last == null)
|
||||
last = PropertyGroupsReversed.FirstOrDefault ();
|
||||
InsertAfterChild (@group, last);
|
||||
return @group;
|
||||
}
|
||||
|
||||
public ProjectItemGroupElement AddItemGroup ()
|
||||
{
|
||||
var @group = CreateItemGroupElement ();
|
||||
ProjectElementContainer last = ItemGroupsReversed.FirstOrDefault ();
|
||||
if (last == null)
|
||||
last = PropertyGroupsReversed.FirstOrDefault ();
|
||||
InsertAfterChild (@group, last);
|
||||
return @group;
|
||||
}
|
||||
|
||||
public ProjectPropertyElement AddProperty (string name, string value)
|
||||
{
|
||||
ProjectPropertyGroupElement parentGroup = null;
|
||||
foreach (var @group in PropertyGroups) {
|
||||
if (string.IsNullOrEmpty (@group.Condition)) {
|
||||
if (parentGroup == null)
|
||||
parentGroup = @group;
|
||||
var property = @group.Properties.
|
||||
Where (p => string.IsNullOrEmpty (p.Condition)
|
||||
&& p.Name.Equals (name, StringComparison.OrdinalIgnoreCase)).
|
||||
FirstOrDefault ();
|
||||
if (property != null) {
|
||||
property.Value = value;
|
||||
return property;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (parentGroup == null)
|
||||
parentGroup = AddPropertyGroup ();
|
||||
return parentGroup.AddProperty (name, value);
|
||||
}
|
||||
|
||||
public ProjectPropertyGroupElement AddPropertyGroup ()
|
||||
{
|
||||
var @group = CreatePropertyGroupElement ();
|
||||
var last = PropertyGroupsReversed.FirstOrDefault ();
|
||||
InsertAfterChild (@group, last);
|
||||
return @group;
|
||||
}
|
||||
|
||||
public ProjectTargetElement AddTarget (string name)
|
||||
{
|
||||
var target = CreateTargetElement (name);
|
||||
AppendChild (target);
|
||||
return target;
|
||||
}
|
||||
|
||||
public ProjectUsingTaskElement AddUsingTask (string name, string assemblyFile, string assemblyName)
|
||||
{
|
||||
var usingTask = CreateUsingTaskElement (name, assemblyFile, assemblyName);
|
||||
AppendChild (usingTask);
|
||||
return usingTask;
|
||||
}
|
||||
|
||||
public ProjectChooseElement CreateChooseElement ()
|
||||
{
|
||||
return new ProjectChooseElement (this);
|
||||
}
|
||||
|
||||
public ProjectImportElement CreateImportElement (string project)
|
||||
{
|
||||
return new ProjectImportElement (project, this);
|
||||
}
|
||||
|
||||
public ProjectImportGroupElement CreateImportGroupElement ()
|
||||
{
|
||||
return new ProjectImportGroupElement (this);
|
||||
}
|
||||
|
||||
public ProjectItemDefinitionElement CreateItemDefinitionElement (string itemType)
|
||||
{
|
||||
return new ProjectItemDefinitionElement (itemType, this);
|
||||
}
|
||||
|
||||
public ProjectItemDefinitionGroupElement CreateItemDefinitionGroupElement ()
|
||||
{
|
||||
return new ProjectItemDefinitionGroupElement (this);
|
||||
}
|
||||
|
||||
public ProjectItemElement CreateItemElement (string itemType)
|
||||
{
|
||||
return new ProjectItemElement (itemType, this);
|
||||
}
|
||||
|
||||
public ProjectItemElement CreateItemElement (string itemType, string include)
|
||||
{
|
||||
var item = CreateItemElement (itemType);
|
||||
item.Include = include;
|
||||
return item;
|
||||
}
|
||||
|
||||
public ProjectItemGroupElement CreateItemGroupElement ()
|
||||
{
|
||||
return new ProjectItemGroupElement (this);
|
||||
}
|
||||
|
||||
public ProjectMetadataElement CreateMetadataElement (string name)
|
||||
{
|
||||
return new ProjectMetadataElement (name, this);
|
||||
}
|
||||
|
||||
public ProjectMetadataElement CreateMetadataElement (string name, string unevaluatedValue)
|
||||
{
|
||||
var metadata = CreateMetadataElement (name);
|
||||
metadata.Value = unevaluatedValue;
|
||||
return metadata;
|
||||
}
|
||||
|
||||
public ProjectOnErrorElement CreateOnErrorElement (string executeTargets)
|
||||
{
|
||||
return new ProjectOnErrorElement (executeTargets, this);
|
||||
}
|
||||
|
||||
public ProjectOtherwiseElement CreateOtherwiseElement ()
|
||||
{
|
||||
return new ProjectOtherwiseElement (this);
|
||||
}
|
||||
|
||||
public ProjectOutputElement CreateOutputElement (string taskParameter, string itemType,
|
||||
string propertyName)
|
||||
{
|
||||
return new ProjectOutputElement (taskParameter, itemType, propertyName, this);
|
||||
}
|
||||
|
||||
public ProjectExtensionsElement CreateProjectExtensionsElement ()
|
||||
{
|
||||
return new ProjectExtensionsElement (this);
|
||||
}
|
||||
|
||||
public ProjectPropertyElement CreatePropertyElement (string name)
|
||||
{
|
||||
return new ProjectPropertyElement (name, this);
|
||||
}
|
||||
|
||||
public ProjectPropertyGroupElement CreatePropertyGroupElement ()
|
||||
{
|
||||
return new ProjectPropertyGroupElement (this);
|
||||
}
|
||||
|
||||
public ProjectTargetElement CreateTargetElement (string name)
|
||||
{
|
||||
return new ProjectTargetElement (name, this);
|
||||
}
|
||||
|
||||
public ProjectTaskElement CreateTaskElement (string name)
|
||||
{
|
||||
return new ProjectTaskElement (name, this);
|
||||
}
|
||||
|
||||
public ProjectUsingTaskBodyElement CreateUsingTaskBodyElement (string evaluate, string body)
|
||||
{
|
||||
return new ProjectUsingTaskBodyElement (evaluate, body, this);
|
||||
}
|
||||
|
||||
public ProjectUsingTaskElement CreateUsingTaskElement (string taskName, string assemblyFile,
|
||||
string assemblyName)
|
||||
{
|
||||
return new ProjectUsingTaskElement (taskName, assemblyFile, assemblyName, this);
|
||||
}
|
||||
|
||||
public ProjectUsingTaskParameterElement CreateUsingTaskParameterElement (string name, string output,
|
||||
string required,
|
||||
string parameterType)
|
||||
{
|
||||
return new ProjectUsingTaskParameterElement (name, output, required, parameterType, this);
|
||||
}
|
||||
|
||||
public UsingTaskParameterGroupElement CreateUsingTaskParameterGroupElement ()
|
||||
{
|
||||
return new UsingTaskParameterGroupElement (this);
|
||||
}
|
||||
|
||||
public ProjectWhenElement CreateWhenElement (string condition)
|
||||
{
|
||||
return new ProjectWhenElement (condition, this);
|
||||
}
|
||||
|
||||
public static ProjectRootElement Open (string path)
|
||||
{
|
||||
return Open (path, ProjectCollection.GlobalProjectCollection);
|
||||
}
|
||||
|
||||
public static ProjectRootElement Open (string path, ProjectCollection projectCollection)
|
||||
{
|
||||
var result = Create (path, projectCollection);
|
||||
using (var reader = XmlReader.Create (path))
|
||||
result.Load (reader);
|
||||
return result;
|
||||
}
|
||||
|
||||
public void Save ()
|
||||
{
|
||||
Save (Encoding);
|
||||
}
|
||||
|
||||
public void Save (Encoding saveEncoding)
|
||||
{
|
||||
using (var writer = new StreamWriter (File.Create (FullPath), saveEncoding)) {
|
||||
Save (writer);
|
||||
}
|
||||
}
|
||||
|
||||
public void Save (string path)
|
||||
{
|
||||
Save (path, Encoding);
|
||||
}
|
||||
|
||||
public void Save (TextWriter writer)
|
||||
{
|
||||
using (var xmlWriter = XmlWriter.Create (writer, new XmlWriterSettings { Indent = true,
|
||||
NewLineChars = "\r\n" })) {
|
||||
Save (xmlWriter);
|
||||
}
|
||||
}
|
||||
|
||||
public void Save (string path, Encoding encoding)
|
||||
{
|
||||
FullPath = path;
|
||||
Save (encoding);
|
||||
}
|
||||
|
||||
public static ProjectRootElement TryOpen (string path)
|
||||
{
|
||||
return TryOpen (path, ProjectCollection.GlobalProjectCollection);
|
||||
}
|
||||
|
||||
public static ProjectRootElement TryOpen (string path, ProjectCollection projectCollection)
|
||||
{
|
||||
// this should be non-null only if the project is already cached
|
||||
// and caching is not yet implemented
|
||||
return null;
|
||||
}
|
||||
|
||||
internal override void Load (XmlReader reader)
|
||||
{
|
||||
try {
|
||||
base.Load (reader);
|
||||
} catch (XmlException ex) {
|
||||
throw new InvalidProjectFileException (FullPath, ex.LineNumber, ex.LinePosition, 0, 0,
|
||||
ex.Message, null, null, null);
|
||||
}
|
||||
}
|
||||
|
||||
internal override ProjectElement LoadChildElement (string name)
|
||||
{
|
||||
switch (name) {
|
||||
case "PropertyGroup":
|
||||
var prop = CreatePropertyGroupElement ();
|
||||
AppendChild (prop);
|
||||
return prop;
|
||||
case "ItemGroup":
|
||||
var item = CreateItemGroupElement ();
|
||||
AppendChild (item);
|
||||
return item;
|
||||
case "Import":
|
||||
return AddImport (null);
|
||||
case "Target":
|
||||
return AddTarget (null);
|
||||
case "ItemDefinitionGroup":
|
||||
var def = CreateItemDefinitionGroupElement ();
|
||||
AppendChild (def);
|
||||
return def;
|
||||
case "UsingTask":
|
||||
return AddUsingTask (null, null, null);
|
||||
case "Choose":
|
||||
var choose = CreateChooseElement ();
|
||||
AppendChild (choose);
|
||||
return choose;
|
||||
case "ProjectExtensions":
|
||||
var ext = CreateProjectExtensionsElement ();
|
||||
AppendChild (ext);
|
||||
return ext;
|
||||
default:
|
||||
throw new InvalidProjectFileException (string.Format (
|
||||
"Child \"{0}\" is not a known node type.", name));
|
||||
}
|
||||
}
|
||||
|
||||
internal override void LoadAttribute (string name, string value)
|
||||
{
|
||||
switch (name) {
|
||||
case "ToolsVersion":
|
||||
ToolsVersion = value;
|
||||
break;
|
||||
case "DefaultTargets":
|
||||
DefaultTargets = value;
|
||||
break;
|
||||
case "InitialTargets":
|
||||
InitialTargets = value;
|
||||
break;
|
||||
default:
|
||||
base.LoadAttribute (name, value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
internal override void Save (XmlWriter writer)
|
||||
{
|
||||
writer.WriteStartElement (XmlName, "http://schemas.microsoft.com/developer/msbuild/2003");
|
||||
SaveValue (writer);
|
||||
writer.WriteEndElement ();
|
||||
}
|
||||
|
||||
internal override void SaveValue (XmlWriter writer)
|
||||
{
|
||||
SaveAttribute (writer, "ToolsVersion", ToolsVersion);
|
||||
SaveAttribute (writer, "DefaultTargets", DefaultTargets);
|
||||
SaveAttribute (writer, "InitialTargets", InitialTargets);
|
||||
base.SaveValue (writer);
|
||||
}
|
||||
|
||||
internal override string XmlName {
|
||||
get { return "Project"; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,174 @@
|
||||
//
|
||||
// ProjectTargetElement.cs
|
||||
//
|
||||
// Author:
|
||||
// Leszek Ciesielski ([email protected])
|
||||
//
|
||||
// (C) 2011 Leszek Ciesielski
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.Build.Internal;
|
||||
|
||||
namespace Microsoft.Build.Construction
|
||||
{
|
||||
[System.Diagnostics.DebuggerDisplayAttribute ("Name={Name} #Children={Count} Condition={Condition}")]
|
||||
public class ProjectTargetElement : ProjectElementContainer
|
||||
{
|
||||
internal ProjectTargetElement (string name, ProjectRootElement containingProject)
|
||||
: this(containingProject)
|
||||
{
|
||||
Name = name;
|
||||
}
|
||||
internal ProjectTargetElement (ProjectRootElement containingProject)
|
||||
{
|
||||
ContainingProject = containingProject;
|
||||
}
|
||||
string afterTargets;
|
||||
public string AfterTargets {
|
||||
get { return afterTargets ?? String.Empty; }
|
||||
set { afterTargets = value; }
|
||||
}
|
||||
string beforeTargets;
|
||||
public string BeforeTargets {
|
||||
get { return beforeTargets ?? String.Empty; }
|
||||
set { beforeTargets = value; }
|
||||
}
|
||||
string dependsOnTargets;
|
||||
public string DependsOnTargets {
|
||||
get { return dependsOnTargets ?? String.Empty; }
|
||||
set { dependsOnTargets = value; }
|
||||
}
|
||||
string inputs;
|
||||
public string Inputs { get { return inputs ?? String.Empty; } set { inputs = value; } }
|
||||
public ICollection<ProjectItemGroupElement> ItemGroups {
|
||||
get { return new CollectionFromEnumerable<ProjectItemGroupElement> (
|
||||
new FilteredEnumerable<ProjectItemGroupElement> (Children)); }
|
||||
}
|
||||
string keepDuplicateOutputs;
|
||||
public string KeepDuplicateOutputs {
|
||||
get { return keepDuplicateOutputs ?? String.Empty; }
|
||||
set { keepDuplicateOutputs = value; }
|
||||
}
|
||||
string name;
|
||||
public string Name { get { return name ?? String.Empty; } set { name = value; } }
|
||||
public ICollection<ProjectOnErrorElement> OnErrors {
|
||||
get { return new CollectionFromEnumerable<ProjectOnErrorElement> (
|
||||
new FilteredEnumerable<ProjectOnErrorElement> (Children)); }
|
||||
}
|
||||
string outputs;
|
||||
public string Outputs { get { return outputs ?? String.Empty; } set { outputs = value; } }
|
||||
public ICollection<ProjectPropertyGroupElement> PropertyGroups {
|
||||
get { return new CollectionFromEnumerable<ProjectPropertyGroupElement> (
|
||||
new FilteredEnumerable<ProjectPropertyGroupElement> (Children)); }
|
||||
}
|
||||
string returns;
|
||||
public string Returns { get { return returns ?? String.Empty; } set { returns = value; } }
|
||||
public ICollection<ProjectTaskElement> Tasks {
|
||||
get { return new CollectionFromEnumerable<ProjectTaskElement> (
|
||||
new FilteredEnumerable<ProjectTaskElement> (Children)); }
|
||||
}
|
||||
public ProjectItemGroupElement AddItemGroup ()
|
||||
{
|
||||
var item = ContainingProject.CreateItemGroupElement ();
|
||||
AppendChild (item);
|
||||
return item;
|
||||
}
|
||||
public ProjectPropertyGroupElement AddPropertyGroup ()
|
||||
{
|
||||
var property = ContainingProject.CreatePropertyGroupElement ();
|
||||
AppendChild (property);
|
||||
return property;
|
||||
}
|
||||
public ProjectTaskElement AddTask (string taskName)
|
||||
{
|
||||
var task = ContainingProject.CreateTaskElement (taskName);
|
||||
AppendChild (task);
|
||||
return task;
|
||||
}
|
||||
internal override string XmlName {
|
||||
get { return "Target"; }
|
||||
}
|
||||
|
||||
internal override ProjectElement LoadChildElement (string name)
|
||||
{
|
||||
switch (name) {
|
||||
case "OnError":
|
||||
var error = new ProjectOnErrorElement (ContainingProject);
|
||||
AppendChild (error);
|
||||
return error;
|
||||
case "PropertyGroup":
|
||||
return AddPropertyGroup ();
|
||||
case "ItemGroup":
|
||||
return AddItemGroup ();
|
||||
default:
|
||||
return AddTask (name);
|
||||
}
|
||||
}
|
||||
internal override void LoadAttribute (string name, string value)
|
||||
{
|
||||
switch (name) {
|
||||
case "Name":
|
||||
Name = value;
|
||||
break;
|
||||
case "DependsOnTargets":
|
||||
DependsOnTargets = value;
|
||||
break;
|
||||
case "Returns":
|
||||
Returns = value;
|
||||
break;
|
||||
case "Inputs":
|
||||
Inputs = value;
|
||||
break;
|
||||
case "Outputs":
|
||||
Outputs = value;
|
||||
break;
|
||||
case "BeforeTargets":
|
||||
BeforeTargets = value;
|
||||
break;
|
||||
case "AfterTargets":
|
||||
AfterTargets = value;
|
||||
break;
|
||||
case "KeepDuplicateOutputs":
|
||||
KeepDuplicateOutputs = value;
|
||||
break;
|
||||
default:
|
||||
base.LoadAttribute (name, value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
internal override void SaveValue (System.Xml.XmlWriter writer)
|
||||
{
|
||||
SaveAttribute (writer, "Name", Name);
|
||||
SaveAttribute (writer, "DependsOnTargets", DependsOnTargets);
|
||||
SaveAttribute (writer, "Returns", Returns);
|
||||
SaveAttribute (writer, "Inputs", Inputs);
|
||||
SaveAttribute (writer, "Outputs", Outputs);
|
||||
SaveAttribute (writer, "BeforeTargets", BeforeTargets);
|
||||
SaveAttribute (writer, "AfterTargets", AfterTargets);
|
||||
SaveAttribute (writer, "KeepDuplicateOutputs", KeepDuplicateOutputs);
|
||||
base.SaveValue (writer);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,153 @@
|
||||
//
|
||||
// ProjectTaskElement.cs
|
||||
//
|
||||
// Author:
|
||||
// Leszek Ciesielski ([email protected])
|
||||
//
|
||||
// (C) 2011 Leszek Ciesielski
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Xml;
|
||||
using Microsoft.Build.Exceptions;
|
||||
using Microsoft.Build.Internal;
|
||||
|
||||
namespace Microsoft.Build.Construction
|
||||
{
|
||||
[System.Diagnostics.DebuggerDisplayAttribute ("{Name} Condition={Condition} ContinueOnError={ContinueOnError} "
|
||||
+ "#Outputs={Count}")]
|
||||
public class ProjectTaskElement : ProjectElementContainer
|
||||
{
|
||||
internal ProjectTaskElement (string taskName, ProjectRootElement containingProject)
|
||||
: this(containingProject)
|
||||
{
|
||||
Name = taskName;
|
||||
}
|
||||
internal ProjectTaskElement (ProjectRootElement containingProject)
|
||||
{
|
||||
ContainingProject = containingProject;
|
||||
}
|
||||
string continueOnError;
|
||||
public string ContinueOnError {
|
||||
get { return continueOnError ?? String.Empty; }
|
||||
set { continueOnError = value; }
|
||||
}
|
||||
string name;
|
||||
public string Name { get { return name ?? String.Empty; } private set { name = value; } }
|
||||
public ICollection<ProjectOutputElement> Outputs {
|
||||
get { return new CollectionFromEnumerable<ProjectOutputElement> (
|
||||
new FilteredEnumerable<ProjectOutputElement> (AllChildren)); }
|
||||
}
|
||||
public IDictionary<string, string> Parameters {
|
||||
get { return parameters; }
|
||||
}
|
||||
public ProjectOutputElement AddOutputItem (string taskParameter, string itemType)
|
||||
{
|
||||
return AddOutputItem (taskParameter, itemType, null);
|
||||
}
|
||||
public ProjectOutputElement AddOutputItem (string taskParameter, string itemType, string condition)
|
||||
{
|
||||
var output = new ProjectOutputElement (taskParameter, itemType, null, ContainingProject);
|
||||
if( condition != null)
|
||||
output.Condition = condition;
|
||||
AppendChild (output);
|
||||
return output;
|
||||
}
|
||||
public ProjectOutputElement AddOutputProperty (string taskParameter, string propertyName)
|
||||
{
|
||||
return AddOutputProperty (taskParameter, propertyName, null);
|
||||
}
|
||||
public ProjectOutputElement AddOutputProperty (string taskParameter, string propertyName,
|
||||
string condition)
|
||||
{
|
||||
var output = new ProjectOutputElement (taskParameter, null, propertyName, ContainingProject);
|
||||
if( condition != null)
|
||||
output.Condition = condition;
|
||||
AppendChild (output);
|
||||
return output;
|
||||
}
|
||||
public string GetParameter (string name)
|
||||
{
|
||||
string value;
|
||||
if (parameters.TryGetValue (name, out value))
|
||||
return value;
|
||||
return string.Empty;
|
||||
}
|
||||
public void RemoveAllParameters ()
|
||||
{
|
||||
parameters.Clear ();
|
||||
}
|
||||
public void RemoveParameter (string name)
|
||||
{
|
||||
parameters.Remove (name);
|
||||
}
|
||||
public void SetParameter (string name, string unevaluatedValue)
|
||||
{
|
||||
parameters[name] = unevaluatedValue;
|
||||
}
|
||||
internal override string XmlName {
|
||||
get { return Name; }
|
||||
}
|
||||
internal override ProjectElement LoadChildElement (string name)
|
||||
{
|
||||
switch (name) {
|
||||
case "Output":
|
||||
var output = ContainingProject.CreateOutputElement (null, null, null);
|
||||
AppendChild (output);
|
||||
return output;
|
||||
default:
|
||||
throw new InvalidProjectFileException (string.Format (
|
||||
"Child \"{0}\" is not a known node type.", name));
|
||||
}
|
||||
}
|
||||
internal override void LoadAttribute (string name, string value)
|
||||
{
|
||||
switch (name) {
|
||||
case "ContinueOnError":
|
||||
ContinueOnError = value;
|
||||
break;
|
||||
case "xmlns":
|
||||
break;
|
||||
case "Label":
|
||||
Label = value;
|
||||
break;
|
||||
case "Condition":
|
||||
Condition = value;
|
||||
break;
|
||||
default:
|
||||
SetParameter (name, value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
internal override void SaveValue (XmlWriter writer)
|
||||
{
|
||||
SaveAttribute (writer, "ContinueOnError", ContinueOnError);
|
||||
foreach (var parameter in parameters) {
|
||||
SaveAttribute (writer, parameter.Key, parameter.Value);
|
||||
}
|
||||
base.SaveValue (writer);
|
||||
}
|
||||
private Dictionary<string, string> parameters = new Dictionary<string, string> ();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
//
|
||||
// ProjectUsingTaskBodyElement.cs
|
||||
//
|
||||
// Author:
|
||||
// Leszek Ciesielski ([email protected])
|
||||
//
|
||||
// (C) 2011 Leszek Ciesielski
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Xml;
|
||||
namespace Microsoft.Build.Construction
|
||||
{
|
||||
[System.Diagnostics.DebuggerDisplayAttribute ("Evaluate={Evaluate} TaskBody={TaskBody}")]
|
||||
public class ProjectUsingTaskBodyElement : ProjectElement
|
||||
{
|
||||
internal ProjectUsingTaskBodyElement (string evaluate, string body, ProjectRootElement containingProject)
|
||||
{
|
||||
Evaluate = evaluate;
|
||||
TaskBody = body;
|
||||
ContainingProject = containingProject;
|
||||
}
|
||||
string evaluate;
|
||||
public string Evaluate { get { return evaluate ?? String.Empty; } set { evaluate = value; } }
|
||||
public override string Condition { get { return null; } set { throw new InvalidOperationException (
|
||||
"Can not set Condition."); } }
|
||||
string taskBody;
|
||||
public string TaskBody { get { return taskBody ?? String.Empty; } set { taskBody = value; } }
|
||||
internal override string XmlName {
|
||||
get { return "Task"; }
|
||||
}
|
||||
internal override void SaveValue (XmlWriter writer)
|
||||
{
|
||||
base.SaveValue (writer);
|
||||
SaveAttribute (writer, "Evaluate", Evaluate);
|
||||
if (!string.IsNullOrWhiteSpace (TaskBody))
|
||||
writer.WriteRaw (TaskBody);
|
||||
}
|
||||
internal override void LoadAttribute (string name, string value)
|
||||
{
|
||||
switch (name) {
|
||||
case "Evaluate":
|
||||
Evaluate = value;
|
||||
break;
|
||||
default:
|
||||
base.LoadAttribute (name, value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
internal override void LoadValue (XmlReader reader)
|
||||
{
|
||||
reader.MoveToElement ();
|
||||
TaskBody = reader.ReadInnerXml ();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
//
|
||||
// ProjectUsingTaskElement.cs
|
||||
//
|
||||
// Author:
|
||||
// Leszek Ciesielski ([email protected])
|
||||
//
|
||||
// (C) 2011 Leszek Ciesielski
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using Microsoft.Build.Exceptions;
|
||||
|
||||
namespace Microsoft.Build.Construction
|
||||
{
|
||||
[System.Diagnostics.DebuggerDisplayAttribute ("TaskName={TaskName} AssemblyName={AssemblyName} "
|
||||
+ "AssemblyFile={AssemblyFile} Condition={Condition} "
|
||||
+ "Runtime={RequiredRuntime} Platform={RequiredPlatform}")]
|
||||
public class ProjectUsingTaskElement : ProjectElementContainer
|
||||
{
|
||||
internal ProjectUsingTaskElement (string taskName, string assemblyFile, string assemblyName,
|
||||
ProjectRootElement containingProject)
|
||||
{
|
||||
TaskName = taskName;
|
||||
AssemblyFile = assemblyFile;
|
||||
AssemblyName = assemblyName;
|
||||
ContainingProject = containingProject;
|
||||
}
|
||||
string assemblyFile;
|
||||
public string AssemblyFile {
|
||||
get { return assemblyFile ?? String.Empty; }
|
||||
set { assemblyFile = value; }
|
||||
}
|
||||
string assemblyName;
|
||||
public string AssemblyName {
|
||||
get { return assemblyName ?? String.Empty; }
|
||||
set { assemblyName = value; }
|
||||
}
|
||||
public UsingTaskParameterGroupElement ParameterGroup {
|
||||
get { return FirstChild as UsingTaskParameterGroupElement; }
|
||||
}
|
||||
public ProjectUsingTaskBodyElement TaskBody {
|
||||
get { return LastChild as ProjectUsingTaskBodyElement; }
|
||||
}
|
||||
string taskFactory;
|
||||
public string TaskFactory { get { return taskFactory ?? String.Empty; } set { taskFactory = value; } }
|
||||
string taskName;
|
||||
public string TaskName { get { return taskName ?? String.Empty; } set { taskName = value; } }
|
||||
public UsingTaskParameterGroupElement AddParameterGroup ()
|
||||
{
|
||||
var @group = ContainingProject.CreateUsingTaskParameterGroupElement ();
|
||||
PrependChild (@group);
|
||||
return @group;
|
||||
}
|
||||
public ProjectUsingTaskBodyElement AddUsingTaskBody (string evaluate, string taskBody)
|
||||
{
|
||||
var body = ContainingProject.CreateUsingTaskBodyElement (evaluate, taskBody);
|
||||
AppendChild (body);
|
||||
return body;
|
||||
}
|
||||
internal override void LoadAttribute (string name, string value)
|
||||
{
|
||||
switch (name) {
|
||||
case "AssemblyName":
|
||||
AssemblyName = value;
|
||||
break;
|
||||
case "AssemblyFile":
|
||||
AssemblyFile = value;
|
||||
break;
|
||||
case "TaskFactory":
|
||||
TaskFactory = value;
|
||||
break;
|
||||
case "TaskName":
|
||||
TaskName = value;
|
||||
break;
|
||||
default:
|
||||
base.LoadAttribute (name, value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
internal override void SaveValue (System.Xml.XmlWriter writer)
|
||||
{
|
||||
SaveAttribute (writer, "AssemblyName", AssemblyName);
|
||||
SaveAttribute (writer, "AssemblyFile", AssemblyFile);
|
||||
SaveAttribute (writer, "TaskFactory", TaskFactory);
|
||||
SaveAttribute (writer, "TaskName", TaskName);
|
||||
base.SaveValue (writer);
|
||||
}
|
||||
internal override string XmlName {
|
||||
get { return "UsingTask"; }
|
||||
}
|
||||
internal override ProjectElement LoadChildElement (string name)
|
||||
{
|
||||
switch (name) {
|
||||
case "ParameterGroup":
|
||||
return AddParameterGroup ();
|
||||
case "Task":
|
||||
return AddUsingTaskBody (null, null);
|
||||
default:
|
||||
throw new InvalidProjectFileException (string.Format (
|
||||
"Child \"{0}\" is not a known node type.", name));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+86
@@ -0,0 +1,86 @@
|
||||
//
|
||||
// ProjectUsingTaskParameterElement.cs
|
||||
//
|
||||
// Author:
|
||||
// Leszek Ciesielski ([email protected])
|
||||
//
|
||||
// (C) 2011 Leszek Ciesielski
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Xml;
|
||||
namespace Microsoft.Build.Construction
|
||||
{
|
||||
[System.Diagnostics.DebuggerDisplayAttribute ("Name={Name} ParameterType={ParameterType} Output={Output}")]
|
||||
public class ProjectUsingTaskParameterElement : ProjectElement
|
||||
{
|
||||
internal ProjectUsingTaskParameterElement (string name, string output, string required,
|
||||
string parameterType, ProjectRootElement containingProject)
|
||||
{
|
||||
Name = name;
|
||||
Output = output;
|
||||
Required = required;
|
||||
ParameterType = parameterType;
|
||||
ContainingProject = containingProject;
|
||||
}
|
||||
string name;
|
||||
public string Name { get { return name ?? String.Empty; } set { name = value; } }
|
||||
public override string Condition { get { return null; } set { throw new InvalidOperationException (
|
||||
"Can not set Condition."); } }
|
||||
string output;
|
||||
public string Output { get { return output ?? String.Empty; } set { output = value; } }
|
||||
string parameterType;
|
||||
public string ParameterType {
|
||||
get { return parameterType ?? String.Empty; }
|
||||
set { parameterType = value; }
|
||||
}
|
||||
string required;
|
||||
public string Required { get { return required ?? String.Empty; } set { required = value; } }
|
||||
internal override string XmlName {
|
||||
get { return Name; }
|
||||
}
|
||||
internal override void LoadAttribute (string name, string value)
|
||||
{
|
||||
switch (name) {
|
||||
case "ParameterType":
|
||||
ParameterType = value;
|
||||
break;
|
||||
case "Output":
|
||||
Output = value;
|
||||
break;
|
||||
case "Required":
|
||||
Required = value;
|
||||
break;
|
||||
default:
|
||||
base.LoadAttribute (name, value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
internal override void SaveValue (XmlWriter writer)
|
||||
{
|
||||
base.SaveValue (writer);
|
||||
SaveAttribute (writer, "ParameterType", ParameterType);
|
||||
SaveAttribute (writer, "Required", Required);
|
||||
SaveAttribute (writer, "Output", Output);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
//
|
||||
// ProjectWhenElement.cs
|
||||
//
|
||||
// Author:
|
||||
// Leszek Ciesielski ([email protected])
|
||||
//
|
||||
// (C) 2011 Leszek Ciesielski
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.Build.Exceptions;
|
||||
using Microsoft.Build.Internal;
|
||||
|
||||
namespace Microsoft.Build.Construction
|
||||
{
|
||||
[System.Diagnostics.DebuggerDisplayAttribute ("#Children={Count} Condition={Condition}")]
|
||||
public class ProjectWhenElement : ProjectElementContainer
|
||||
{
|
||||
internal ProjectWhenElement (string condition, ProjectRootElement containingProject)
|
||||
{
|
||||
Condition = condition;
|
||||
ContainingProject = containingProject;
|
||||
}
|
||||
public ICollection<ProjectPropertyGroupElement> PropertyGroups {
|
||||
get { return new CollectionFromEnumerable<ProjectPropertyGroupElement> (
|
||||
new FilteredEnumerable<ProjectPropertyGroupElement> (Children)); }
|
||||
}
|
||||
public ICollection<ProjectItemGroupElement> ItemGroups {
|
||||
get { return new CollectionFromEnumerable<ProjectItemGroupElement> (
|
||||
new FilteredEnumerable<ProjectItemGroupElement> (Children)); }
|
||||
}
|
||||
public ICollection<ProjectChooseElement> ChooseElements {
|
||||
get { return new CollectionFromEnumerable<ProjectChooseElement> (
|
||||
new FilteredEnumerable<ProjectChooseElement> (Children));}
|
||||
}
|
||||
internal override string XmlName {
|
||||
get { return "When"; }
|
||||
}
|
||||
internal override ProjectElement LoadChildElement (string name)
|
||||
{
|
||||
switch (name) {
|
||||
case "PropertyGroup":
|
||||
var property = ContainingProject.CreatePropertyGroupElement ();
|
||||
AppendChild (property);
|
||||
return property;
|
||||
case "ItemGroup":
|
||||
var item = ContainingProject.CreateItemGroupElement ();
|
||||
AppendChild (item);
|
||||
return item;
|
||||
case "When":
|
||||
var when = ContainingProject.CreateWhenElement (null);
|
||||
AppendChild (when);
|
||||
return when;
|
||||
default:
|
||||
throw new InvalidProjectFileException (string.Format (
|
||||
"Child \"{0}\" is not a known node type.", name));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
//
|
||||
// UsingTaskParameterGroupElement.cs
|
||||
//
|
||||
// Author:
|
||||
// Leszek Ciesielski ([email protected])
|
||||
//
|
||||
// (C) 2011 Leszek Ciesielski
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.Build.Internal;
|
||||
|
||||
namespace Microsoft.Build.Construction
|
||||
{
|
||||
[System.Diagnostics.DebuggerDisplayAttribute ("#Parameters={Count}")]
|
||||
public class UsingTaskParameterGroupElement : ProjectElementContainer
|
||||
{
|
||||
internal UsingTaskParameterGroupElement (ProjectRootElement containingProject)
|
||||
{
|
||||
ContainingProject = containingProject;
|
||||
}
|
||||
public override string Condition { get { return null; } set { throw new InvalidOperationException(
|
||||
"Can not set Condition."); } }
|
||||
public ICollection<ProjectUsingTaskParameterElement> Parameters {
|
||||
get { return new CollectionFromEnumerable<ProjectUsingTaskParameterElement> (
|
||||
new FilteredEnumerable<ProjectUsingTaskParameterElement> (Children)); }
|
||||
}
|
||||
public ProjectUsingTaskParameterElement AddParameter (string name)
|
||||
{
|
||||
return AddParameter (name, null, null, null);
|
||||
}
|
||||
public ProjectUsingTaskParameterElement AddParameter (string name, string output, string required,
|
||||
string parameterType)
|
||||
{
|
||||
var parameter = ContainingProject.CreateUsingTaskParameterElement (name, output, required,
|
||||
parameterType);
|
||||
AppendChild (parameter);
|
||||
return parameter;
|
||||
}
|
||||
internal override string XmlName {
|
||||
get { return "ParameterGroup"; }
|
||||
}
|
||||
internal override ProjectElement LoadChildElement (string name)
|
||||
{
|
||||
return AddParameter (name);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,396 @@
|
||||
//
|
||||
// Project.cs
|
||||
//
|
||||
// Author:
|
||||
// Leszek Ciesielski ([email protected])
|
||||
// Rolf Bjarne Kvinge ([email protected])
|
||||
//
|
||||
// (C) 2011 Leszek Ciesielski
|
||||
// Copyright (C) 2011 Xamarin Inc. (http://www.xamarin.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Microsoft.Build.Construction;
|
||||
using Microsoft.Build.Internal;
|
||||
using Microsoft.Build.Execution;
|
||||
using Microsoft.Build.Framework;
|
||||
using Microsoft.Build.Logging;
|
||||
|
||||
namespace Microsoft.Build.Evaluation
|
||||
{
|
||||
[DebuggerDisplay("{FullPath} EffectiveToolsVersion={ToolsVersion} #GlobalProperties="
|
||||
+"{data.globalProperties.Count} #Properties={data.Properties.Count} #ItemTypes="
|
||||
+"{data.ItemTypes.Count} #ItemDefinitions={data.ItemDefinitions.Count} #Items="
|
||||
+"{data.Items.Count} #Targets={data.Targets.Count}")]
|
||||
public class Project
|
||||
{
|
||||
public Project (ProjectRootElement xml) : this(xml, null, null)
|
||||
{
|
||||
}
|
||||
public Project (ProjectRootElement xml, IDictionary<string, string> globalProperties,
|
||||
string toolsVersion)
|
||||
: this(xml, globalProperties, toolsVersion, ProjectCollection.GlobalProjectCollection)
|
||||
{
|
||||
}
|
||||
public Project (ProjectRootElement xml, IDictionary<string, string> globalProperties,
|
||||
string toolsVersion, ProjectCollection projectCollection)
|
||||
: this(xml, globalProperties, toolsVersion, projectCollection, ProjectLoadSettings.Default)
|
||||
{
|
||||
}
|
||||
|
||||
public Project (ProjectRootElement xml, IDictionary<string, string> globalProperties,
|
||||
string toolsVersion, ProjectCollection projectCollection,
|
||||
ProjectLoadSettings loadSettings)
|
||||
{
|
||||
ProjectCollection = projectCollection;
|
||||
Xml = xml;
|
||||
GlobalProperties = globalProperties;
|
||||
ToolsVersion = toolsVersion;
|
||||
}
|
||||
|
||||
public Project (string projectFile) : this(projectFile, null, null)
|
||||
{
|
||||
}
|
||||
|
||||
public Project (string projectFile, IDictionary<string, string> globalProperties,
|
||||
string toolsVersion)
|
||||
: this(projectFile, globalProperties, toolsVersion, ProjectCollection.GlobalProjectCollection, ProjectLoadSettings.Default)
|
||||
{
|
||||
}
|
||||
|
||||
public Project (string projectFile, IDictionary<string, string> globalProperties,
|
||||
string toolsVersion, ProjectCollection projectCollection)
|
||||
: this(projectFile, globalProperties, toolsVersion, projectCollection, ProjectLoadSettings.Default)
|
||||
{
|
||||
}
|
||||
|
||||
public Project (string projectFile, IDictionary<string, string> globalProperties,
|
||||
string toolsVersion, ProjectCollection projectCollection,
|
||||
ProjectLoadSettings loadSettings)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public IDictionary<string, string> GlobalProperties { get; private set; }
|
||||
public ProjectCollection ProjectCollection { get; private set; }
|
||||
public string ToolsVersion { get; private set; }
|
||||
public ProjectRootElement Xml { get; private set; }
|
||||
|
||||
public ICollection<ProjectItem> GetItemsIgnoringCondition (string itemType)
|
||||
{
|
||||
return new CollectionFromEnumerable<ProjectItem> (
|
||||
new FilteredEnumerable<ProjectItemElement> (Xml.Items).
|
||||
Where (p => p.ItemType.Equals (itemType, StringComparison.OrdinalIgnoreCase)).
|
||||
Select (p => new ProjectItem(p)));
|
||||
}
|
||||
public void RemoveItems (IEnumerable<ProjectItem> items)
|
||||
{
|
||||
var removal = new List<ProjectItem> (items);
|
||||
foreach (var item in removal) {
|
||||
var parent = item.Xml.Parent;
|
||||
parent.RemoveChild (item.Xml);
|
||||
if (parent.Count == 0)
|
||||
parent.Parent.RemoveChild (parent);
|
||||
}
|
||||
}
|
||||
|
||||
public IList<ProjectItem> AddItem (string itemType, string unevaluatedInclude)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public IList<ProjectItem> AddItem (string itemType, string unevaluatedInclude,
|
||||
IEnumerable<KeyValuePair<string, string>> metadata)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public IList<ProjectItem> AddItemFast (string itemType, string unevaluatedInclude)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public IList<ProjectItem> AddItemFast (string itemType, string unevaluatedInclude,
|
||||
IEnumerable<KeyValuePair<string, string>> metadata)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public bool Build ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public bool Build (IEnumerable<ILogger> loggers)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public bool Build (string target)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public bool Build (string[] targets)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public bool Build (ILogger logger)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public bool Build (string[] targets, IEnumerable<ILogger> loggers)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public bool Build (IEnumerable<ILogger> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public bool Build (string target, IEnumerable<ILogger> loggers)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public bool Build (string[] targets, IEnumerable<ILogger> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public bool Build (string target, IEnumerable<ILogger> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public ProjectInstance CreateProjectInstance ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public string ExpandString (string unexpandedValue)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public static string GetEvaluatedItemIncludeEscaped (ProjectItem item)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public static string GetEvaluatedItemIncludeEscaped (ProjectItemDefinition item)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public ICollection<ProjectItem> GetItems (string itemType)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public ICollection<ProjectItem> GetItemsByEvaluatedInclude (string evaluatedInclude)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public IEnumerable<ProjectElement> GetLogicalProject ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public static string GetMetadataValueEscaped (ProjectMetadata metadatum)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public static string GetMetadataValueEscaped (ProjectItem item, string name)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public static string GetMetadataValueEscaped (ProjectItemDefinition item, string name)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public string GetPropertyValue (string name)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public static string GetPropertyValueEscaped (ProjectProperty property)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public ProjectProperty GetProperty (string name)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public void MarkDirty ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public void ReevaluateIfNecessary ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public bool RemoveGlobalProperty (string name)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public bool RemoveItem (ProjectItem item)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public bool RemoveProperty (ProjectProperty property)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public void Save ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public void Save (TextWriter writer)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public void Save (string path)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public void Save (Encoding encoding)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public void Save (string path, Encoding encoding)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public void SaveLogicalProject (TextWriter writer)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public bool SetGlobalProperty (string name, string escapedValue)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public ProjectProperty SetProperty (string name, string unevaluatedValue)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public ICollection<ProjectMetadata> AllEvaluatedItemDefinitionMetadata {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public ICollection<ProjectItem> AllEvaluatedItems {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public ICollection<ProjectProperty> AllEvaluatedProperties {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public IDictionary<string, List<string>> ConditionedProperties {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public string DirectoryPath {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public bool DisableMarkDirty { get; set; }
|
||||
|
||||
public int EvaluationCounter {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public string FullPath {
|
||||
get { throw new NotImplementedException (); }
|
||||
set { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public IList<ResolvedImport> Imports {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public IList<ResolvedImport> ImportsIncludingDuplicates {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public bool IsBuildEnabled {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public bool IsDirty {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public IDictionary<string, ProjectItemDefinition> ItemDefinitions {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public ICollection<ProjectItem> Items {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public ICollection<ProjectItem> ItemsIgnoringCondition {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public ICollection<string> ItemTypes {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public ICollection<ProjectProperty> Properties {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public bool SkipEvaluation { get; set; }
|
||||
|
||||
public IDictionary<string, ProjectTargetInstance> Targets {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
//
|
||||
// ProjectCollection.cs
|
||||
//
|
||||
// Author:
|
||||
// Leszek Ciesielski ([email protected])
|
||||
// Rolf Bjarne Kvinge ([email protected])
|
||||
//
|
||||
// (C) 2011 Leszek Ciesielski
|
||||
// Copyright (C) 2011 Xamarin Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using Microsoft.Build.Framework;
|
||||
using Microsoft.Build.Logging;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Microsoft.Build.Evaluation
|
||||
{
|
||||
public class ProjectCollection : IDisposable
|
||||
{
|
||||
public ProjectCollection ()
|
||||
{
|
||||
}
|
||||
|
||||
public ProjectCollection (IDictionary<string, string> globalProperties)
|
||||
: this (globalProperties, null, ToolsetDefinitionLocations.Registry | ToolsetDefinitionLocations.ConfigurationFile)
|
||||
{
|
||||
}
|
||||
|
||||
public ProjectCollection (ToolsetDefinitionLocations toolsetDefinitionLocations)
|
||||
: this (null, null, toolsetDefinitionLocations)
|
||||
{
|
||||
}
|
||||
|
||||
public ProjectCollection (IDictionary<string, string> globalProperties, IEnumerable<ILogger> loggers,
|
||||
ToolsetDefinitionLocations toolsetDefinitionLocations)
|
||||
: this (globalProperties, loggers, null, toolsetDefinitionLocations, 1, false)
|
||||
{
|
||||
}
|
||||
|
||||
public ProjectCollection (IDictionary<string, string> globalProperties,
|
||||
IEnumerable<ILogger> loggers, IEnumerable<ForwardingLoggerRecord> remoteLoggers,
|
||||
ToolsetDefinitionLocations toolsetDefinitionLocations,
|
||||
int maxNodeCount, bool onlyLogCriticalEvents)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public static string Escape (string unescapedString)
|
||||
{
|
||||
return unescapedString;
|
||||
}
|
||||
|
||||
public static ProjectCollection GlobalProjectCollection {
|
||||
get { return globalProjectCollection; }
|
||||
}
|
||||
|
||||
public void Dispose ()
|
||||
{
|
||||
Dispose (true);
|
||||
GC.SuppressFinalize (this);
|
||||
}
|
||||
|
||||
protected virtual void Dispose (bool disposing)
|
||||
{
|
||||
if (disposing) {
|
||||
}
|
||||
}
|
||||
|
||||
static ProjectCollection globalProjectCollection = new ProjectCollection ();
|
||||
|
||||
public ICollection<Project> GetLoadedProjects (string fullPath)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public ToolsetDefinitionLocations ToolsetLocations {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
//
|
||||
// ProjectItem.cs
|
||||
//
|
||||
// Author:
|
||||
// Leszek Ciesielski ([email protected])
|
||||
// Rolf Bjarne Kvinge ([email protected])
|
||||
//
|
||||
// (C) 2011 Leszek Ciesielski
|
||||
// Copyright (C) 2011 Xamarin Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
|
||||
using Microsoft.Build.Construction;
|
||||
|
||||
namespace Microsoft.Build.Evaluation
|
||||
{
|
||||
[DebuggerDisplay("{ItemType}={EvaluatedInclude} [{UnevaluatedInclude}] #DirectMetadata={DirectMetadataCount}")]
|
||||
public class ProjectItem
|
||||
{
|
||||
internal ProjectItem (ProjectItemElement xml)
|
||||
{
|
||||
Xml = xml;
|
||||
}
|
||||
|
||||
public ProjectMetadata GetMetadata (string name)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public string GetMetadataValue (string name)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public bool HasMetadata (string name)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public bool RemoveMetadata (string name)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public void Rename (string name)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public void SetMetadataValue (string name, string unevaluatedValue)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public IEnumerable<ProjectMetadata> DirectMetadata {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public int DirectMetadataCount {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public string EvaluatedInclude {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public bool IsImported {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public string ItemType {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public ICollection<ProjectMetadata> Metadata {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public int MetadataCount {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public Project Project {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public string UnevaluatedInclude {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public ProjectItemElement Xml { get; private set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
// ProjectItemDefinition.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge ([email protected])
|
||||
//
|
||||
// Copyright (C) 2011 Xamarin Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.Build.Evaluation
|
||||
{
|
||||
public class ProjectItemDefinition
|
||||
{
|
||||
private ProjectItemDefinition ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
//
|
||||
// ProjectLoadSettings.cs
|
||||
//
|
||||
// Author:
|
||||
// Leszek Ciesielski ([email protected])
|
||||
//
|
||||
// (C) 2011 Leszek Ciesielski
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.Build.Evaluation
|
||||
{
|
||||
[Flags]
|
||||
public enum ProjectLoadSettings
|
||||
{
|
||||
Default = 0,
|
||||
IgnoreMissingImports = 1,
|
||||
RecordDuplicateButNotCircularImports = 2,
|
||||
RejectCircularImports = 4
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
// Toolset.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge ([email protected])
|
||||
//
|
||||
// Copyright (C) 2011 Xamarin Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using Microsoft.Build.Construction;
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.Build.Evaluation
|
||||
{
|
||||
public class ProjectMetadata
|
||||
{
|
||||
private ProjectMetadata ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public string EvaluatedValue {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public bool IsImported {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public string ItemType {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public string Name {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public ProjectMetadata Predecessor {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public Project Project {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public string UnevaluatedValue {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public ProjectMetadataElement Xml {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
// ProjectProperty.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge ([email protected])
|
||||
//
|
||||
// Copyright (C) 2011 Xamarin Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.Build.Evaluation
|
||||
{
|
||||
public class ProjectProperty
|
||||
{
|
||||
public string EvaluatedValue {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
// ResolvedImport.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge ([email protected])
|
||||
//
|
||||
// Copyright (C) 2011 Xamarin Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using Microsoft.Build.Construction;
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.Build.Evaluation
|
||||
{
|
||||
[System.Runtime.InteropServices.StructLayout (System.Runtime.InteropServices.LayoutKind.Sequential)]
|
||||
public struct ResolvedImport
|
||||
{
|
||||
private ProjectImportElement import;
|
||||
private ProjectRootElement root;
|
||||
|
||||
public ProjectImportElement ImportingElement {
|
||||
get { return import; }
|
||||
}
|
||||
|
||||
public ProjectRootElement ImportedProject {
|
||||
get { return root; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
// Toolset.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge ([email protected])
|
||||
//
|
||||
// Copyright (C) 2011 Xamarin Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using Microsoft.Build.Execution;
|
||||
|
||||
namespace Microsoft.Build.Evaluation
|
||||
{
|
||||
public class Toolset
|
||||
{
|
||||
public Toolset (string toolsVersion, string toolsPath,
|
||||
ProjectCollection projectCollection, string msbuildOverrideTasksPath)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public Toolset (string toolsVersion, string toolsPath,
|
||||
IDictionary<string, string> buildProperties, ProjectCollection projectCollection,
|
||||
string msbuildOverrideTasksPath)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public IDictionary<string, ProjectPropertyInstance> Properties {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public string ToolsPath {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public string ToolsVersion {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
// ToolsetDefinitionLocations.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge ([email protected])
|
||||
//
|
||||
// Copyright (C) 2011 Xamarin Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.Build.Evaluation
|
||||
{
|
||||
[Flags ()]
|
||||
public enum ToolsetDefinitionLocations
|
||||
{
|
||||
None,
|
||||
ConfigurationFile,
|
||||
Registry,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
//
|
||||
// InvalidProjectFileException.cs
|
||||
//
|
||||
// Author:
|
||||
// Leszek Ciesielski ([email protected])
|
||||
//
|
||||
// (C) 2011 Leszek Ciesielski
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace Microsoft.Build.Exceptions
|
||||
{
|
||||
[Serializable]
|
||||
public sealed class InvalidProjectFileException : Exception
|
||||
{
|
||||
public InvalidProjectFileException ()
|
||||
{
|
||||
}
|
||||
public InvalidProjectFileException (string message) : base(message)
|
||||
{
|
||||
}
|
||||
private InvalidProjectFileException (SerializationInfo info, StreamingContext context)
|
||||
: base(info, context)
|
||||
{
|
||||
ProjectFile = info.GetString ("projectFile");
|
||||
LineNumber = info.GetInt32 ("lineNumber");
|
||||
ColumnNumber = info.GetInt32 ("columnNumber");
|
||||
EndLineNumber = info.GetInt32 ("endLineNumber");
|
||||
EndColumnNumber = info.GetInt32 ("endColumnNumber");
|
||||
ErrorSubcategory = info.GetString ("errorSubcategory");
|
||||
ErrorCode = info.GetString ("errorCode");
|
||||
HelpKeyword = info.GetString ("helpKeyword");
|
||||
HasBeenLogged = info.GetBoolean ("hasBeenLogged");
|
||||
}
|
||||
public InvalidProjectFileException (string message, Exception innerException)
|
||||
: base(message, innerException)
|
||||
{
|
||||
}
|
||||
public InvalidProjectFileException (string projectFile, int lineNumber, int columnNumber,
|
||||
int endLineNumber, int endColumnNumber, string message,
|
||||
string errorSubcategory, string errorCode, string helpKeyword)
|
||||
{
|
||||
}
|
||||
public override void GetObjectData (SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
base.GetObjectData (info, context);
|
||||
info.AddValue ("projectFile", ProjectFile);
|
||||
info.AddValue ("lineNumber", LineNumber);
|
||||
info.AddValue ("columnNumber", ColumnNumber);
|
||||
info.AddValue ("endLineNumber", EndLineNumber);
|
||||
info.AddValue ("endColumnNumber", EndColumnNumber);
|
||||
info.AddValue ("errorSubcategory", ErrorSubcategory);
|
||||
info.AddValue ("errorCode", ErrorCode);
|
||||
info.AddValue ("helpKeyword", HelpKeyword);
|
||||
info.AddValue ("hasBeenLogged", HasBeenLogged);
|
||||
}
|
||||
public string BaseMessage {
|
||||
get { return base.Message; }
|
||||
}
|
||||
public int ColumnNumber { get; private set; }
|
||||
public int EndColumnNumber { get; private set; }
|
||||
public int EndLineNumber { get; private set; }
|
||||
public string ErrorCode { get; private set; }
|
||||
public string ErrorSubcategory { get; private set; }
|
||||
public bool HasBeenLogged { get; private set; }
|
||||
public string HelpKeyword { get; private set; }
|
||||
public int LineNumber { get; private set; }
|
||||
public override string Message {
|
||||
get { return ProjectFile == null ? base.Message : base.Message + " " + ProjectFile; }
|
||||
}
|
||||
public string ProjectFile { get; private set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
// BuildManager.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge ([email protected])
|
||||
//
|
||||
// Copyright (C) 2011 Xamarin Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using Microsoft.Build.Evaluation;
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.Build.Execution
|
||||
{
|
||||
public class BuildManager
|
||||
{
|
||||
public BuildManager ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public BuildManager (string hostName)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public void BeginBuild (BuildParameters parameters)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public BuildResult Build (BuildParameters parameters, BuildRequestData requestData)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public BuildResult BuildRequest (BuildRequestData requestData)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public void CancelAllSubmissions ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public void EndBuild ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public ProjectInstance GetProjectInstanceForBuild (Project project)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public BuildSubmission PendBuildRequest (BuildRequestData requestData)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public void ResetCaches ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public static BuildManager DefaultBuildManager {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,159 @@
|
||||
// BuildParameters.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge ([email protected])
|
||||
//
|
||||
// Copyright (C) 2011 Xamarin Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using Microsoft.Build.Evaluation;
|
||||
using Microsoft.Build.Framework;
|
||||
using Microsoft.Build.Logging;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Threading;
|
||||
|
||||
namespace Microsoft.Build.Execution
|
||||
{
|
||||
public class BuildParameters
|
||||
{
|
||||
public BuildParameters ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public BuildParameters (ProjectCollection projectCollection)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public BuildParameters Clone ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public Toolset GetToolset (string toolsVersion)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public ThreadPriority BuildThreadPriority {
|
||||
get { throw new NotImplementedException (); }
|
||||
set { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public CultureInfo Culture {
|
||||
get { throw new NotImplementedException (); }
|
||||
set { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public string DefaultToolsVersion {
|
||||
get { throw new NotImplementedException (); }
|
||||
set { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public bool DetailedSummary {
|
||||
get { throw new NotImplementedException (); }
|
||||
set { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public bool EnableNodeReuse {
|
||||
get { throw new NotImplementedException (); }
|
||||
set { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public IDictionary<string, string> EnvironmentProperties {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public IEnumerable<ForwardingLoggerRecord> ForwardingLoggers {
|
||||
get { throw new NotImplementedException (); }
|
||||
set { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public IDictionary<string, string> GlobalProperties {
|
||||
get { throw new NotImplementedException (); }
|
||||
set { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public HostServices HostServices {
|
||||
get { throw new NotImplementedException (); }
|
||||
set { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public bool LegacyThreadingSemantics { get; set; }
|
||||
|
||||
public IEnumerable<ILogger> Loggers {
|
||||
get { throw new NotImplementedException (); }
|
||||
set { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public int MaxNodeCount {
|
||||
get { throw new NotImplementedException (); }
|
||||
set { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public int MemoryUseLimit {
|
||||
get { throw new NotImplementedException (); }
|
||||
set { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public string NodeExeLocation {
|
||||
get { throw new NotImplementedException (); }
|
||||
set { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public bool OnlyLogCriticalEvents {
|
||||
get { throw new NotImplementedException (); }
|
||||
set { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public bool ResetCaches { get; set; }
|
||||
|
||||
public bool SaveOperatingEnvironment {
|
||||
get { throw new NotImplementedException (); }
|
||||
set { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public ToolsetDefinitionLocations ToolsetDefinitionLocations {
|
||||
get { throw new NotImplementedException (); }
|
||||
set { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public ICollection<Toolset> Toolsets {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public CultureInfo UICulture {
|
||||
get { throw new NotImplementedException (); }
|
||||
set { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public bool UseSynchronousLogging {
|
||||
get { throw new NotImplementedException (); }
|
||||
set { throw new NotImplementedException (); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
//
|
||||
// BuildRequestData.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge ([email protected])
|
||||
//
|
||||
// Copyright (C) 2011 Xamarin Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Microsoft.Build.Execution
|
||||
{
|
||||
public class BuildRequestData
|
||||
{
|
||||
public BuildRequestData (ProjectInstance projectInstance, string[] targetsToBuild)
|
||||
: this (projectInstance, targetsToBuild, null, BuildRequestDataFlags.None)
|
||||
{
|
||||
}
|
||||
|
||||
public BuildRequestData (ProjectInstance projectInstance, string[] targetsToBuild, HostServices hostServices)
|
||||
: this (projectInstance, targetsToBuild, hostServices, BuildRequestDataFlags.None)
|
||||
{
|
||||
}
|
||||
|
||||
public BuildRequestData (ProjectInstance projectInstance, string[] targetsToBuild, HostServices hostServices,
|
||||
BuildRequestDataFlags flags)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public BuildRequestData (string projectFullPath, IDictionary<string, string> globalProperties,
|
||||
string toolsVersion, string[] targetsToBuild, HostServices hostServices)
|
||||
: this (projectFullPath, globalProperties, toolsVersion, targetsToBuild, hostServices, BuildRequestDataFlags.None)
|
||||
{
|
||||
}
|
||||
|
||||
public BuildRequestData (string projectFullPath, IDictionary<string, string> globalProperties,
|
||||
string toolsVersion, string[] targetsToBuild, HostServices hostServices, BuildRequestDataFlags flags)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public string ExplicitlySpecifiedToolsVersion { get; private set; }
|
||||
public BuildRequestDataFlags Flags { get; private set; }
|
||||
public HostServices HostServices { get; private set; }
|
||||
public string ProjectFullPath { get; private set; }
|
||||
public ProjectInstance ProjectInstance { get; private set; }
|
||||
public ICollection<string> TargetNames { get; private set; }
|
||||
|
||||
ICollection<ProjectPropertyInstance> GlobalProperties {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
//
|
||||
// BuildRequestDataFlags.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge ([email protected])
|
||||
//
|
||||
// Copyright (C) 2011 Xamarin Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.Build.Execution
|
||||
{
|
||||
[Flags]
|
||||
public enum BuildRequestDataFlags
|
||||
{
|
||||
None,
|
||||
ReplaceExistingProjectInstance,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
// BuildResult.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge ([email protected])
|
||||
//
|
||||
// Copyright (C) 2011 Xamarin Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Microsoft.Build.Execution
|
||||
{
|
||||
public class BuildResult
|
||||
{
|
||||
public void AddResultsForTarget (string target, TargetResult result)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public bool HasResultsForTarget (string target)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public void MergeResults (BuildResult results)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public bool CircularDependency {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public int ConfigurationId {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public Exception Exception {
|
||||
get { throw new NotImplementedException (); }
|
||||
set { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public int GlobalRequestId {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public ITargetResult this [string target] {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public int NodeRequestId {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public BuildResultCode OverallResult {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public int ParentGlobalRequestId {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public IDictionary<string, TargetResult> ResultsByTarget {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public int SubmissionId {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
// BuildResultCode.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge ([email protected])
|
||||
//
|
||||
// Copyright (C) 2011 Xamarin Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace Microsoft.Build.Execution
|
||||
{
|
||||
public enum BuildResultCode
|
||||
{
|
||||
Success,
|
||||
Failure
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
// BuildSubmission.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge ([email protected])
|
||||
//
|
||||
// Copyright (C) 2011 Xamarin Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.Build.Execution
|
||||
{
|
||||
public class BuildSubmission
|
||||
{
|
||||
private BuildSubmission ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
//
|
||||
// HostServices.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge ([email protected])
|
||||
//
|
||||
// Copyright (C) 2011 Xamarin Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using Microsoft.Build.Framework;
|
||||
using System;
|
||||
|
||||
namespace Microsoft.Build.Execution
|
||||
{
|
||||
public class HostServices
|
||||
{
|
||||
public ITaskHost GetHostObject (string projectFile, string targetName, string taskName)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public NodeAffinity GetNodeAffinity (string projectFile)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public void OnRenameProject (string oldFullPath, string newFullPath)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public void RegisterHostObject (string projectFile, string targetName, string taskName, ITaskHost hostObject)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public void SetNodeAffinity (string projectFile, NodeAffinity nodeAffinity)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public void UnregisterProject (string projectFullPath)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
// ITargetResult.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge ([email protected])
|
||||
//
|
||||
// Copyright (C) 2011 Xamarin Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using Microsoft.Build.Framework;
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.Build.Execution
|
||||
{
|
||||
public interface ITargetResult
|
||||
{
|
||||
Exception Exception { get; }
|
||||
ITaskItem[] Items { get; }
|
||||
TargetResultCode ResultCode { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
//
|
||||
// NodeAffinity.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge ([email protected])
|
||||
//
|
||||
// Copyright (C) 2011 Xamarin Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.Build.Execution
|
||||
{
|
||||
public enum NodeAffinity
|
||||
{
|
||||
InProc,
|
||||
OutOfProc,
|
||||
Any,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
//
|
||||
// ProjectInstance.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge ([email protected])
|
||||
//
|
||||
// Copyright (C) 2011 Xamarin Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using Microsoft.Build.Construction;
|
||||
using Microsoft.Build.Evaluation;
|
||||
|
||||
namespace Microsoft.Build.Execution
|
||||
{
|
||||
public class ProjectInstance
|
||||
{
|
||||
public ProjectInstance (ProjectRootElement xml)
|
||||
: this (xml, null, null, ProjectCollection.GlobalProjectCollection)
|
||||
{
|
||||
}
|
||||
|
||||
public ProjectInstance (string projectFile)
|
||||
: this (projectFile, null, null, ProjectCollection.GlobalProjectCollection)
|
||||
{
|
||||
}
|
||||
|
||||
public ProjectInstance (string projectFile, IDictionary<string, string> globalProperties,
|
||||
string toolsVersion)
|
||||
: this (projectFile, globalProperties, toolsVersion, ProjectCollection.GlobalProjectCollection)
|
||||
{
|
||||
}
|
||||
|
||||
public ProjectInstance (ProjectRootElement xml, IDictionary<string, string> globalProperties,
|
||||
string toolsVersion, ProjectCollection projectCollection)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public ProjectInstance (string projectFile, IDictionary<string, string> globalProperties,
|
||||
string toolsVersion, ProjectCollection projectCollection)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,177 @@
|
||||
//
|
||||
// ProjectItemInstance.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge ([email protected])
|
||||
//
|
||||
// Copyright (C) 2011 Xamarin Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using Microsoft.Build.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Microsoft.Build.Execution
|
||||
{
|
||||
public class ProjectItemInstance
|
||||
: ITaskItem2
|
||||
{
|
||||
private ProjectItemInstance ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public ProjectMetadataInstance GetMetadata (string name)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public string GetMetadataValue (string name)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public bool HasMetadata (string name)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public void RemoveMetadata (string metadataName)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public void SetMetadata (IEnumerable<KeyValuePair<string, string>> metadataDictionary)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public ProjectMetadataInstance SetMetadata (string name, string evaluatedValue)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public int DirectMetadataCount {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public string EvaluatedInclude {
|
||||
get { throw new NotImplementedException (); }
|
||||
set { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public string ItemType {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public IEnumerable<ProjectMetadataInstance> Metadata {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public int MetadataCount {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public ICollection<string> MetadataNames {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public ProjectInstance Project {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
#region ITaskItem2 implementation
|
||||
string ITaskItem2.GetMetadataValueEscaped (string metadataName)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
void ITaskItem2.SetMetadataValueLiteral (string metadataName, string metadataValue)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
System.Collections.IDictionary ITaskItem2.CloneCustomMetadataEscaped ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
string ITaskItem2.EvaluatedIncludeEscaped {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ITaskItem implementation
|
||||
System.Collections.IDictionary ITaskItem.CloneCustomMetadata ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
void ITaskItem.CopyMetadataTo (ITaskItem destinationItem)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
string ITaskItem.GetMetadata (string metadataName)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
void ITaskItem.RemoveMetadata (string metadataName)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
void ITaskItem.SetMetadata (string metadataName, string metadataValue)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
string ITaskItem.ItemSpec {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
int ITaskItem.MetadataCount {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
System.Collections.ICollection ITaskItem.MetadataNames {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
//
|
||||
// ProjectMetadataInstance.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge ([email protected])
|
||||
//
|
||||
// Copyright (C) 2011 Xamarin Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.Build.Execution
|
||||
{
|
||||
public class ProjectMetadataInstance
|
||||
{
|
||||
private ProjectMetadataInstance ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
//
|
||||
// ProjectPropertyInstance.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge ([email protected])
|
||||
//
|
||||
// Copyright (C) 2011 Xamarin Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.Build.Execution
|
||||
{
|
||||
public class ProjectPropertyInstance
|
||||
{
|
||||
private ProjectPropertyInstance ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
// ProjectTargetInstance.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge ([email protected])
|
||||
//
|
||||
// Copyright (C) 2011 Xamarin Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.Build.Execution
|
||||
{
|
||||
public sealed class ProjectTargetInstance
|
||||
{
|
||||
private ProjectTargetInstance ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
// TargetResult.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge ([email protected])
|
||||
//
|
||||
// Copyright (C) 2011 Xamarin Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using Microsoft.Build.Framework;
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.Build.Execution
|
||||
{
|
||||
public class TargetResult : ITargetResult
|
||||
{
|
||||
internal TargetResult ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public Exception Exception {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
public ITaskItem[] Items {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
|
||||
|
||||
public TargetResultCode ResultCode {
|
||||
get { throw new NotImplementedException (); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
// TargetResultCode.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge ([email protected])
|
||||
//
|
||||
// Copyright (C) 2011 Xamarin Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace Microsoft.Build.Execution
|
||||
{
|
||||
public enum TargetResultCode : byte
|
||||
{
|
||||
Skipped,
|
||||
Success,
|
||||
Failure,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
//
|
||||
// CollectionFromEnumerable.cs
|
||||
//
|
||||
// Author:
|
||||
// Leszek Ciesielski ([email protected])
|
||||
//
|
||||
// (C) 2011 Leszek Ciesielski
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Microsoft.Build.Internal
|
||||
{
|
||||
internal class CollectionFromEnumerable<T> : ICollection<T>
|
||||
{
|
||||
IEnumerable<T> backingEnumerable;
|
||||
|
||||
public CollectionFromEnumerable (IEnumerable<T> enumerable)
|
||||
{
|
||||
backingEnumerable = enumerable;
|
||||
}
|
||||
|
||||
public void Add (T item)
|
||||
{
|
||||
throw new InvalidOperationException ("This collection is read-only.");
|
||||
}
|
||||
|
||||
public void Clear ()
|
||||
{
|
||||
throw new InvalidOperationException ("This collection is read-only.");
|
||||
}
|
||||
|
||||
public bool Contains (T item)
|
||||
{
|
||||
List<T> backingList = backingEnumerable as List<T>;
|
||||
if (backingList != null)
|
||||
return backingList.Contains (item);
|
||||
return backingEnumerable.Contains (item);
|
||||
}
|
||||
|
||||
public void CopyTo (T[] array, int arrayIndex)
|
||||
{
|
||||
List<T> backingList = backingEnumerable as List<T>;
|
||||
if (backingList != null) {
|
||||
backingList.CopyTo (array, arrayIndex);
|
||||
return;
|
||||
}
|
||||
int i = arrayIndex;
|
||||
foreach (var item in backingEnumerable) {
|
||||
array[i++] = item;
|
||||
}
|
||||
}
|
||||
|
||||
public int Count {
|
||||
get {
|
||||
var backingList = backingEnumerable as List<T>;
|
||||
if(backingList == null)
|
||||
backingEnumerable = backingList = new List<T> (backingEnumerable);
|
||||
return backingList.Count;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsReadOnly {
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public bool Remove (T item)
|
||||
{
|
||||
throw new InvalidOperationException ("This collection is read-only.");
|
||||
}
|
||||
|
||||
public IEnumerator<T> GetEnumerator ()
|
||||
{
|
||||
return backingEnumerable.GetEnumerator ();
|
||||
}
|
||||
|
||||
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator ()
|
||||
{
|
||||
return backingEnumerable.GetEnumerator ();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
//
|
||||
// FilteredEnumerable.cs
|
||||
//
|
||||
// Author:
|
||||
// Leszek Ciesielski ([email protected])
|
||||
//
|
||||
// (C) 2011 Leszek Ciesielski
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Microsoft.Build.Internal
|
||||
{
|
||||
internal class FilteredEnumerable<T> : IEnumerable<T> where T : class
|
||||
{
|
||||
System.Collections.IEnumerable backingEnumerable;
|
||||
|
||||
public FilteredEnumerable (System.Collections.IEnumerable enumerable)
|
||||
{
|
||||
backingEnumerable = enumerable;
|
||||
}
|
||||
|
||||
public IEnumerator<T> GetEnumerator ()
|
||||
{
|
||||
foreach (var item in backingEnumerable) {
|
||||
var typedItem = item as T;
|
||||
if (typedItem != null)
|
||||
yield return typedItem;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator ()
|
||||
{
|
||||
return GetEnumerator ();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
//
|
||||
// ReverseEnumerable.cs
|
||||
//
|
||||
// Author:
|
||||
// Leszek Ciesielski ([email protected])
|
||||
//
|
||||
// (C) 2011 Leszek Ciesielski
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Microsoft.Build.Internal
|
||||
{
|
||||
internal class ReverseEnumerable<T> : IEnumerable<T>
|
||||
{
|
||||
LinkedList<T> backingList;
|
||||
|
||||
public ReverseEnumerable (LinkedList<T> list)
|
||||
{
|
||||
backingList = list;
|
||||
}
|
||||
|
||||
public IEnumerator<T> GetEnumerator ()
|
||||
{
|
||||
for (var node = backingList.Last; node != null; node = node.Previous)
|
||||
yield return node.Value;
|
||||
}
|
||||
|
||||
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator ()
|
||||
{
|
||||
return GetEnumerator ();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
// ColorResetter.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge ([email protected])
|
||||
//
|
||||
// Copyright (C) 2011 Xamarin Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace Microsoft.Build.Logging
|
||||
{
|
||||
public delegate void ColorResetter ();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
// ColorSetter.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge ([email protected])
|
||||
//
|
||||
// Copyright (C) 2011 Xamarin Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace Microsoft.Build.Logging
|
||||
{
|
||||
public delegate void ColorSetter (System.ConsoleColor color);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
// ConsoleLogger.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge ([email protected])
|
||||
//
|
||||
// Copyright (C) 2011 Xamarin Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using Microsoft.Build.Framework;
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.Build.Logging
|
||||
{
|
||||
public class ConsoleLogger : INodeLogger
|
||||
{
|
||||
public ConsoleLogger ()
|
||||
: this (LoggerVerbosity.Normal)
|
||||
{
|
||||
}
|
||||
|
||||
public ConsoleLogger (LoggerVerbosity verbosity)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public ConsoleLogger (LoggerVerbosity verbosity, WriteHandler write, ColorSetter colorSet, ColorResetter colorReset)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
#region INodeLogger implementation
|
||||
public void Initialize (IEventSource eventSource, int nodeCount)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ILogger implementation
|
||||
public void Initialize (IEventSource eventSource)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public void Shutdown ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public string Parameters {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public LoggerVerbosity Verbosity {
|
||||
get {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
set {
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
// FileLogger.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge ([email protected])
|
||||
//
|
||||
// Copyright (C) 2011 Xamarin Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.Build.Logging
|
||||
{
|
||||
public class FileLogger
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
// ForwardingLoggerRecord.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge ([email protected])
|
||||
//
|
||||
// Copyright (C) 2011 Xamarin Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using Microsoft.Build.Framework;
|
||||
|
||||
namespace Microsoft.Build.Logging
|
||||
{
|
||||
public class ForwardingLoggerRecord
|
||||
{
|
||||
public ForwardingLoggerRecord (ILogger centralLogger, LoggerDescription forwardingLoggerDescription)
|
||||
{
|
||||
this.CentralLogger = centralLogger;
|
||||
this.ForwardingLoggerDescription = forwardingLoggerDescription;
|
||||
}
|
||||
|
||||
public ILogger CentralLogger { get; private set; }
|
||||
public LoggerDescription ForwardingLoggerDescription { get; private set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
// LoggerDescription.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge ([email protected])
|
||||
//
|
||||
// Copyright (C) 2011 Xamarin Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using Microsoft.Build.Framework;
|
||||
|
||||
namespace Microsoft.Build.Logging
|
||||
{
|
||||
public class LoggerDescription
|
||||
{
|
||||
public LoggerDescription (string loggerClassName, string loggerAssemblyName,
|
||||
string loggerAssemblyFile, string loggerSwitchParameters,
|
||||
LoggerVerbosity verbosity)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
// WriteHandler.cs
|
||||
//
|
||||
// Author:
|
||||
// Rolf Bjarne Kvinge ([email protected])
|
||||
//
|
||||
// Copyright (C) 2011 Xamarin Inc.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace Microsoft.Build.Logging
|
||||
{
|
||||
public delegate void WriteHandler (string message);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,143 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.21022</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{B2012E7F-8F8D-4908-8045-413F2BD1022D}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>Microsoft.Build</RootNamespace>
|
||||
<AssemblyName>Microsoft.Build</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileUpgradeFlags />
|
||||
<OldToolsVersion>3.5</OldToolsVersion>
|
||||
<UpgradeBackupLocation />
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;NET_4_0</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>false</ConsolePause>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.Build.Engine" />
|
||||
<Reference Include="Microsoft.Build.Framework" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Microsoft.Build.Construction\ProjectExtensionsElement.cs" />
|
||||
<Compile Include="Microsoft.Build.Construction\ProjectWhenElement.cs" />
|
||||
<Compile Include="Microsoft.Build.Construction\ProjectOtherwiseElement.cs" />
|
||||
<Compile Include="Microsoft.Build.Construction\ProjectOutputElement.cs" />
|
||||
<Compile Include="Microsoft.Build.Construction\ProjectTaskElement.cs" />
|
||||
<Compile Include="Microsoft.Build.Construction\ProjectOnErrorElement.cs" />
|
||||
<Compile Include="Microsoft.Build.Construction\ProjectUsingTaskParameterElement.cs" />
|
||||
<Compile Include="Microsoft.Build.Construction\ProjectUsingTaskBodyElement.cs" />
|
||||
<Compile Include="Microsoft.Build.Construction\UsingTaskParameterGroupElement.cs" />
|
||||
<Compile Include="Microsoft.Build.Construction\ProjectUsingTaskElement.cs" />
|
||||
<Compile Include="Microsoft.Build.Construction\ProjectTargetElement.cs" />
|
||||
<Compile Include="Microsoft.Build.Construction\ProjectItemDefinitionElement.cs" />
|
||||
<Compile Include="Microsoft.Build.Construction\ProjectItemDefinitionGroupElement.cs" />
|
||||
<Compile Include="Microsoft.Build.Construction\ProjectChooseElement.cs" />
|
||||
<Compile Include="Microsoft.Build.Construction\ProjectElement.cs" />
|
||||
<Compile Include="Microsoft.Build.Construction\ProjectElementContainer.cs" />
|
||||
<Compile Include="Microsoft.Build.Construction\ProjectImportElement.cs" />
|
||||
<Compile Include="Microsoft.Build.Construction\ProjectImportGroupElement.cs" />
|
||||
<Compile Include="Microsoft.Build.Construction\ProjectItemElement.cs" />
|
||||
<Compile Include="Microsoft.Build.Construction\ProjectItemGroupElement.cs" />
|
||||
<Compile Include="Microsoft.Build.Construction\ProjectMetadataElement.cs" />
|
||||
<Compile Include="Microsoft.Build.Construction\ProjectPropertyElement.cs" />
|
||||
<Compile Include="Microsoft.Build.Construction\ProjectPropertyGroupElement.cs" />
|
||||
<Compile Include="Microsoft.Build.Construction\ProjectRootElement.cs" />
|
||||
<Compile Include="Microsoft.Build.Evaluation\ProjectCollection.cs" />
|
||||
<Compile Include="Microsoft.Build.Exceptions\InvalidProjectFileException.cs" />
|
||||
<Compile Include="Microsoft.Build.Internal\CollectionFromEnumerable.cs" />
|
||||
<Compile Include="Microsoft.Build.Evaluation\Project.cs" />
|
||||
<Compile Include="Microsoft.Build.Evaluation\ProjectLoadSettings.cs" />
|
||||
<Compile Include="Microsoft.Build.Evaluation\ProjectItem.cs" />
|
||||
<Compile Include="Microsoft.Build.Construction\ProjectCommentElement.cs" />
|
||||
<Compile Include="Microsoft.Build.Internal\ReverseEnumerable.cs" />
|
||||
<Compile Include="Microsoft.Build.Internal\FilteredEnumerable.cs" />
|
||||
<Compile Include="Microsoft.Build.Execution\BuildResult.cs" />
|
||||
<Compile Include="Microsoft.Build.Execution\ITargetResult.cs" />
|
||||
<Compile Include="Microsoft.Build.Execution\TargetResultCode.cs" />
|
||||
<Compile Include="Microsoft.Build.Execution\TargetResult.cs" />
|
||||
<Compile Include="Microsoft.Build.Execution\BuildResultCode.cs" />
|
||||
<Compile Include="Microsoft.Build.Logging\FileLogger.cs" />
|
||||
<Compile Include="Microsoft.Build.Evaluation\ProjectProperty.cs" />
|
||||
<Compile Include="Microsoft.Build.Evaluation\ToolsetDefinitionLocations.cs" />
|
||||
<Compile Include="Microsoft.Build.Logging\ForwardingLoggerRecord.cs" />
|
||||
<Compile Include="Microsoft.Build.Logging\LoggerDescription.cs" />
|
||||
<Compile Include="Microsoft.Build.Execution\BuildRequestData.cs" />
|
||||
<Compile Include="Microsoft.Build.Execution\BuildRequestDataFlags.cs" />
|
||||
<Compile Include="Microsoft.Build.Execution\HostServices.cs" />
|
||||
<Compile Include="Microsoft.Build.Execution\NodeAffinity.cs" />
|
||||
<Compile Include="Microsoft.Build.Execution\ProjectItemInstance.cs" />
|
||||
<Compile Include="Microsoft.Build.Execution\ProjectInstance.cs" />
|
||||
<Compile Include="Microsoft.Build.Execution\ProjectPropertyInstance.cs" />
|
||||
<Compile Include="Microsoft.Build.Execution\ProjectMetadataInstance.cs" />
|
||||
<Compile Include="Microsoft.Build.Execution\BuildParameters.cs" />
|
||||
<Compile Include="Microsoft.Build.Logging\ConsoleLogger.cs" />
|
||||
<Compile Include="Microsoft.Build.Logging\ColorResetter.cs" />
|
||||
<Compile Include="Microsoft.Build.Logging\ColorSetter.cs" />
|
||||
<Compile Include="Microsoft.Build.Logging\WriteHandler.cs" />
|
||||
<Compile Include="Microsoft.Build.Evaluation\Toolset.cs" />
|
||||
<Compile Include="Microsoft.Build.Evaluation\ProjectMetadata.cs" />
|
||||
<Compile Include="Microsoft.Build.Execution\ProjectTargetInstance.cs" />
|
||||
<Compile Include="Microsoft.Build.Evaluation\ProjectItemDefinition.cs" />
|
||||
<Compile Include="Microsoft.Build.Evaluation\ResolvedImport.cs" />
|
||||
<Compile Include="Microsoft.Build.Execution\BuildManager.cs" />
|
||||
<Compile Include="Microsoft.Build.Execution\BuildSubmission.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Windows Installer 3.1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@@ -0,0 +1,66 @@
|
||||
Assembly/AssemblyInfo.cs
|
||||
../../build/common/Consts.cs
|
||||
../../build/common/MonoTODOAttribute.cs
|
||||
Microsoft.Build.Construction/ProjectChooseElement.cs
|
||||
Microsoft.Build.Construction/ProjectCommentElement.cs
|
||||
Microsoft.Build.Construction/ProjectElementContainer.cs
|
||||
Microsoft.Build.Construction/ProjectElement.cs
|
||||
Microsoft.Build.Construction/ProjectExtensionsElement.cs
|
||||
Microsoft.Build.Construction/ProjectImportElement.cs
|
||||
Microsoft.Build.Construction/ProjectImportGroupElement.cs
|
||||
Microsoft.Build.Construction/ProjectItemDefinitionElement.cs
|
||||
Microsoft.Build.Construction/ProjectItemDefinitionGroupElement.cs
|
||||
Microsoft.Build.Construction/ProjectItemElement.cs
|
||||
Microsoft.Build.Construction/ProjectItemGroupElement.cs
|
||||
Microsoft.Build.Construction/ProjectMetadataElement.cs
|
||||
Microsoft.Build.Construction/ProjectOnErrorElement.cs
|
||||
Microsoft.Build.Construction/ProjectOtherwiseElement.cs
|
||||
Microsoft.Build.Construction/ProjectOutputElement.cs
|
||||
Microsoft.Build.Construction/ProjectPropertyElement.cs
|
||||
Microsoft.Build.Construction/ProjectPropertyGroupElement.cs
|
||||
Microsoft.Build.Construction/ProjectRootElement.cs
|
||||
Microsoft.Build.Construction/ProjectTargetElement.cs
|
||||
Microsoft.Build.Construction/ProjectTaskElement.cs
|
||||
Microsoft.Build.Construction/ProjectUsingTaskBodyElement.cs
|
||||
Microsoft.Build.Construction/ProjectUsingTaskElement.cs
|
||||
Microsoft.Build.Construction/ProjectUsingTaskParameterElement.cs
|
||||
Microsoft.Build.Construction/ProjectWhenElement.cs
|
||||
Microsoft.Build.Construction/UsingTaskParameterGroupElement.cs
|
||||
Microsoft.Build.Evaluation/Project.cs
|
||||
Microsoft.Build.Evaluation/ProjectCollection.cs
|
||||
Microsoft.Build.Evaluation/ProjectItem.cs
|
||||
Microsoft.Build.Evaluation/ProjectItemDefinition.cs
|
||||
Microsoft.Build.Evaluation/ProjectLoadSettings.cs
|
||||
Microsoft.Build.Evaluation/ProjectMetadata.cs
|
||||
Microsoft.Build.Evaluation/ProjectProperty.cs
|
||||
Microsoft.Build.Evaluation/ResolvedImport.cs
|
||||
Microsoft.Build.Evaluation/Toolset.cs
|
||||
Microsoft.Build.Evaluation/ToolsetDefinitionLocations.cs
|
||||
Microsoft.Build.Exceptions/InvalidProjectFileException.cs
|
||||
Microsoft.Build.Execution/BuildManager.cs
|
||||
Microsoft.Build.Execution/BuildParameters.cs
|
||||
Microsoft.Build.Execution/BuildRequestData.cs
|
||||
Microsoft.Build.Execution/BuildRequestDataFlags.cs
|
||||
Microsoft.Build.Execution/BuildResult.cs
|
||||
Microsoft.Build.Execution/BuildResultCode.cs
|
||||
Microsoft.Build.Execution/BuildSubmission.cs
|
||||
Microsoft.Build.Execution/HostServices.cs
|
||||
Microsoft.Build.Execution/ITargetResult.cs
|
||||
Microsoft.Build.Execution/NodeAffinity.cs
|
||||
Microsoft.Build.Execution/ProjectInstance.cs
|
||||
Microsoft.Build.Execution/ProjectItemInstance.cs
|
||||
Microsoft.Build.Execution/ProjectMetadataInstance.cs
|
||||
Microsoft.Build.Execution/ProjectPropertyInstance.cs
|
||||
Microsoft.Build.Execution/ProjectTargetInstance.cs
|
||||
Microsoft.Build.Execution/TargetResult.cs
|
||||
Microsoft.Build.Execution/TargetResultCode.cs
|
||||
Microsoft.Build.Internal/CollectionFromEnumerable.cs
|
||||
Microsoft.Build.Internal/FilteredEnumerable.cs
|
||||
Microsoft.Build.Internal/ReverseEnumerable.cs
|
||||
Microsoft.Build.Logging/ColorResetter.cs
|
||||
Microsoft.Build.Logging/ColorSetter.cs
|
||||
Microsoft.Build.Logging/ConsoleLogger.cs
|
||||
Microsoft.Build.Logging/FileLogger.cs
|
||||
Microsoft.Build.Logging/ForwardingLoggerRecord.cs
|
||||
Microsoft.Build.Logging/LoggerDescription.cs
|
||||
Microsoft.Build.Logging/WriteHandler.cs
|
||||
@@ -0,0 +1,54 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Build", "Microsoft.Build.csproj", "{B2012E7F-8F8D-4908-8045-413F2BD1022D}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Build.Test", "Test\Microsoft.Build.Test.csproj", "{5C1BA631-5120-4930-A112-80783328B72B}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{5C1BA631-5120-4930-A112-80783328B72B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5C1BA631-5120-4930-A112-80783328B72B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5C1BA631-5120-4930-A112-80783328B72B}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{5C1BA631-5120-4930-A112-80783328B72B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5C1BA631-5120-4930-A112-80783328B72B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{5C1BA631-5120-4930-A112-80783328B72B}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{B2012E7F-8F8D-4908-8045-413F2BD1022D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B2012E7F-8F8D-4908-8045-413F2BD1022D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B2012E7F-8F8D-4908-8045-413F2BD1022D}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{B2012E7F-8F8D-4908-8045-413F2BD1022D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B2012E7F-8F8D-4908-8045-413F2BD1022D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B2012E7F-8F8D-4908-8045-413F2BD1022D}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(MonoDevelopProperties) = preSolution
|
||||
StartupItem = Microsoft.Build.csproj
|
||||
Policies = $0
|
||||
$0.TextStylePolicy = $1
|
||||
$1.FileWidth = 120
|
||||
$1.TabWidth = 8
|
||||
$1.NoTabsAfterNonTabs = True
|
||||
$1.RemoveTrailingWhitespace = True
|
||||
$1.inheritsSet = VisualStudio
|
||||
$1.inheritsScope = text/plain
|
||||
$1.scope = text/plain
|
||||
$0.TextStylePolicy = $2
|
||||
$2.inheritsSet = null
|
||||
$2.scope = text/x-csharp
|
||||
$0.CSharpFormattingPolicy = $3
|
||||
$3.inheritsSet = Mono
|
||||
$3.inheritsScope = text/x-csharp
|
||||
$3.scope = text/x-csharp
|
||||
$0.StandardHeader = $4
|
||||
$4.Text =
|
||||
$4.inheritsSet = Apache2License
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,2 @@
|
||||
FunctionalTest.cs
|
||||
Microsoft.Build.Internal/CollectionFromEnumerableTest.cs
|
||||
@@ -0,0 +1,145 @@
|
||||
//
|
||||
// FunctionalTest.cs
|
||||
//
|
||||
// Author:
|
||||
// Leszek Ciesielski ([email protected])
|
||||
//
|
||||
// (C) 2011 Leszek Ciesielski
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using NUnit.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Microsoft.Build.Construction;
|
||||
using Microsoft.Build.Evaluation;
|
||||
using System.IO;
|
||||
using System.Globalization;
|
||||
|
||||
namespace MonoTests.Microsoft.Build
|
||||
{
|
||||
[TestFixture]
|
||||
public class FunctionalTest
|
||||
{
|
||||
[Test]
|
||||
public void TestFullProjectGeneration ()
|
||||
{
|
||||
var project = ProjectRootElement.Create ();
|
||||
var projectFileName = String.Format ("Test{0}FunctionalTestProject.csproj",
|
||||
Path.DirectorySeparatorChar);
|
||||
project.DefaultTargets = "Build";
|
||||
SetKnownProperties (project.AddPropertyGroup ());
|
||||
GenerateReferences (project.AddItemGroup ());
|
||||
GenerateCompileIncludes (project.AddItemGroup ());
|
||||
project.AddImport ("$(MSBuildToolsPath)\\Microsoft.CSharp.targets");
|
||||
|
||||
project.Save (projectFileName);
|
||||
Assert.AreEqual (projectGuid, GetProjectId (project), "#01");
|
||||
FileAssert.AreEqual (String.Format ("Test{0}FunctionalTestReferenceProject.csproj",
|
||||
Path.DirectorySeparatorChar), String.Format ("Test{0}FunctionalTestProject.csproj",
|
||||
Path.DirectorySeparatorChar), "#02");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestLoadAndSave ()
|
||||
{
|
||||
var project = ProjectRootElement.Open ("Microsoft.Build.csproj");
|
||||
var projectFileName = String.Format ("Test{0}FunctionalTestProject2.csproj",
|
||||
Path.DirectorySeparatorChar);
|
||||
project.Save (projectFileName);
|
||||
|
||||
Assert.AreEqual (new Guid ("{B2012E7F-8F8D-4908-8045-413F2BD1022D}"), GetProjectId (project),
|
||||
"#03");
|
||||
FileAssert.AreEqual ("Microsoft.Build.csproj", projectFileName, "#04");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestLoadAndSave3 ()
|
||||
{
|
||||
var referenceProject = String.Format (
|
||||
"Test{0}FunctionalTestReferenceProject3.csproj", Path.DirectorySeparatorChar);
|
||||
var project = ProjectRootElement.Open (referenceProject);
|
||||
var projectFileName = String.Format ("Test{0}FunctionalTestProject3.csproj",
|
||||
Path.DirectorySeparatorChar);
|
||||
project.Save (projectFileName);
|
||||
|
||||
Assert.AreEqual (new Guid ("{793B20A9-E263-4B54-BB31-305B602087CE}"), GetProjectId (project),
|
||||
"#05");
|
||||
FileAssert.AreEqual (referenceProject, projectFileName, "#06");
|
||||
}
|
||||
|
||||
public Guid GetProjectId (ProjectRootElement project)
|
||||
{
|
||||
var value = project.Properties.Where (p => p.Name == "ProjectGuid").First ().Value;
|
||||
return Guid.Parse (value);
|
||||
}
|
||||
|
||||
void GenerateCompileIncludes (ProjectItemGroupElement itemGroup)
|
||||
{
|
||||
foreach (var include in new[] { "Test.cs", "Test2.cs", "Test3.cs" }) {
|
||||
itemGroup.AddItem ("Compile", ProjectCollection.Escape (include),
|
||||
new[] { new KeyValuePair<string, string> ("SubType", "Code") });
|
||||
}
|
||||
foreach (var resource in new[] { "Test.resx", "Test2.resx", "Test3.resx" }) {
|
||||
itemGroup.AddItem ("EmbeddedResource", ProjectCollection.Escape (resource),
|
||||
new[] { new KeyValuePair<string, string> ("LogicalName", "Name.Space.Test") });
|
||||
}
|
||||
}
|
||||
|
||||
void GenerateReferences (ProjectItemGroupElement itemGroup)
|
||||
{
|
||||
foreach (var reference in new[] { "Test.dll", "Test2.dll", "Test3.dll" }) {
|
||||
var name = Path.GetFileNameWithoutExtension (reference);
|
||||
itemGroup.AddItem ("Reference", name, new[] {
|
||||
new KeyValuePair<string, string> ("Name", name),
|
||||
new KeyValuePair<string, string> ("HintPath",
|
||||
ProjectCollection.Escape (reference)) });
|
||||
}
|
||||
foreach (var reference in new[] { "mscorlib", "System", "System.Xml" }) {
|
||||
itemGroup.AddItem ("Reference", reference);
|
||||
}
|
||||
}
|
||||
|
||||
void SetKnownProperties (ProjectPropertyGroupElement properties)
|
||||
{
|
||||
properties.AddProperty ("AssemblyName", Path.GetFileNameWithoutExtension ("ZigZag.exe"));
|
||||
properties.AddProperty ("ProjectGuid", projectGuid.ToString ("B"));
|
||||
properties.AddProperty ("CheckForOverflowUnderflow", false.ToString ());
|
||||
properties.AddProperty ("CodePage", String.Empty);
|
||||
properties.AddProperty ("DebugSymbols", true.ToString ());
|
||||
properties.AddProperty ("DebugType", "Full");
|
||||
properties.AddProperty ("Optimize", false.ToString ());
|
||||
properties.AddProperty ("Platform", "AnyCPU");
|
||||
properties.AddProperty ("ProjectTypeGuids", projectTypeGuid.ToString ("B"));
|
||||
properties.AddProperty ("AllowUnsafeBlocks", false.ToString ());
|
||||
properties.AddProperty ("WarningLevel", "4");
|
||||
properties.AddProperty ("OutputPath", ProjectCollection.Escape ("bin\\Debug"));
|
||||
properties.AddProperty ("OutputType", "winexe");
|
||||
properties.AddProperty ("DefineConstants", "DEBUG,TRACE");
|
||||
properties.AddProperty ("TreatWarningsAsErrors", true.ToString ());
|
||||
}
|
||||
|
||||
static readonly Guid projectTypeGuid = Guid.Parse ("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}");
|
||||
static readonly Guid projectGuid = Guid.Parse ("{362F36B0-B26C-42DE-8586-20DF66BD05E8}");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<AssemblyName>ZigZag</AssemblyName>
|
||||
<ProjectGuid>{362f36b0-b26c-42de-8586-20df66bd05e8}</ProjectGuid>
|
||||
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
|
||||
<CodePage />
|
||||
<DebugSymbols>True</DebugSymbols>
|
||||
<DebugType>Full</DebugType>
|
||||
<Optimize>False</Optimize>
|
||||
<Platform>AnyCPU</Platform>
|
||||
<ProjectTypeGuids>{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
||||
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<OutputType>winexe</OutputType>
|
||||
<DefineConstants>DEBUG,TRACE</DefineConstants>
|
||||
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="mscorlib" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Test">
|
||||
<Name>Test</Name>
|
||||
<HintPath>Test.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Test2">
|
||||
<Name>Test2</Name>
|
||||
<HintPath>Test2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Test3">
|
||||
<Name>Test3</Name>
|
||||
<HintPath>Test3.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Test.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Test2.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Test3.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Test.resx">
|
||||
<LogicalName>Name.Space.Test</LogicalName>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Test2.resx">
|
||||
<LogicalName>Name.Space.Test</LogicalName>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Test3.resx">
|
||||
<LogicalName>Name.Space.Test</LogicalName>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@@ -0,0 +1,125 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\..\Build\NuGet.Settings.targets" />
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{793B20A9-E263-4B54-BB31-305B602087CE}</ProjectGuid>
|
||||
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>NuGet.Server</RootNamespace>
|
||||
<AssemblyName>NuGet.Server</AssemblyName>
|
||||
<OutputPath>bin</OutputPath>
|
||||
<UseIISExpress>true</UseIISExpress>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Elmah">
|
||||
<HintPath>..\..\packages\elmah.corelibrary.1.2\lib\Elmah.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="Ninject">
|
||||
<HintPath>..\..\packages\Ninject.2.2.1.4\lib\net40-Full\Ninject.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="RouteMagic">
|
||||
<HintPath>..\..\packages\RouteMagic.1.0\lib\net40\RouteMagic.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Data.Services" />
|
||||
<Reference Include="System.Data.Services.Client" />
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.ServiceModel.Activation" />
|
||||
<Reference Include="System.ServiceModel.Web" />
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Web.Services" />
|
||||
<Reference Include="WebActivator">
|
||||
<HintPath>..\..\packages\WebActivator.1.4.1\lib\net40\WebActivator.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\Common\CommonAssemblyInfo.cs">
|
||||
<Link>Properties\CommonAssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="DataServices\Package.cs" />
|
||||
<Compile Include="DataServices\PackageContext.cs" />
|
||||
<Compile Include="Publishing\PackageService.cs" />
|
||||
<Compile Include="Infrastructure\Bindings.cs" />
|
||||
<Compile Include="Infrastructure\Helpers.cs" />
|
||||
<Compile Include="Infrastructure\IPackageAuthenticationService.cs" />
|
||||
<Compile Include="Infrastructure\IServerPackageRepository.cs" />
|
||||
<Compile Include="Infrastructure\PackageAuthenticationService.cs" />
|
||||
<Compile Include="Infrastructure\ServerPackageRepository.cs" />
|
||||
<Compile Include="Infrastructure\NinjectBootstrapper.cs" />
|
||||
<Compile Include="Infrastructure\DerivedPackageData.cs" />
|
||||
<Compile Include="DataServices\Packages.svc.cs">
|
||||
<DependentUpon>Packages.svc</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Infrastructure\PackageUtility.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Default.aspx" />
|
||||
<Content Include="favicon.ico" />
|
||||
<Content Include="DataServices\Packages.svc" />
|
||||
<Content Include="license.txt" />
|
||||
<Content Include="Packages\Readme.txt" />
|
||||
<Content Include="Web.config">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<Content Include="Web.Debug.config">
|
||||
<DependentUpon>Web.config</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="Web.Release.config">
|
||||
<DependentUpon>Web.config</DependentUpon>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="DataServices\Routes.cs" />
|
||||
<None Include="Properties\NuGet.Server.nuspec" />
|
||||
<Content Include="DataServices\Routes.cs.pp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Core\Core.csproj">
|
||||
<Project>{F879F274-EFA0-4157-8404-33A19B4E6AEC}</Project>
|
||||
<Name>Core</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="packages.config">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target> -->
|
||||
<Target Name="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
|
||||
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(ProjectDir)" />
|
||||
</Target>
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
||||
<WebProjectProperties>
|
||||
<UseIIS>True</UseIIS>
|
||||
<AutoAssignPort>True</AutoAssignPort>
|
||||
<DevelopmentServerPort>18572</DevelopmentServerPort>
|
||||
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||
<IISUrl>http://localhost:18572/</IISUrl>
|
||||
<NTLMAuthentication>False</NTLMAuthentication>
|
||||
<UseCustomServer>False</UseCustomServer>
|
||||
<CustomServerUrl>
|
||||
</CustomServerUrl>
|
||||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
||||
</WebProjectProperties>
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
//
|
||||
// CollectionFromEnumerableTest.cs
|
||||
//
|
||||
// Author:
|
||||
// Leszek Ciesielski ([email protected])
|
||||
//
|
||||
// (C) 2011 Leszek Ciesielski
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using NUnit.Framework;
|
||||
using Microsoft.Build.Construction;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
|
||||
namespace MonoTests.Microsoft.Build.Internal
|
||||
{
|
||||
[TestFixture]
|
||||
public class CollectionFromEnumerableTest
|
||||
{
|
||||
ICollection<ProjectPropertyElement> subject;
|
||||
[SetUp]
|
||||
public void SetUp ()
|
||||
{
|
||||
subject = ProjectRootElement.Create ().Properties;
|
||||
}
|
||||
[Test]
|
||||
[ExpectedException(typeof(InvalidOperationException))]
|
||||
public void TestAdd ()
|
||||
{
|
||||
subject.Add (null);
|
||||
Assert.Fail ("CFE1");
|
||||
}
|
||||
[Test]
|
||||
[ExpectedException(typeof(InvalidOperationException))]
|
||||
public void TestClear ()
|
||||
{
|
||||
subject.Clear ();
|
||||
Assert.Fail ("CFE2");
|
||||
}
|
||||
[Test]
|
||||
[ExpectedException(typeof(InvalidOperationException))]
|
||||
public void TestRemove ()
|
||||
{
|
||||
subject.Remove (null);
|
||||
Assert.Fail ("CFE3");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{5C1BA631-5120-4930-A112-80783328B72B}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Microsoft.Build.Test</RootNamespace>
|
||||
<AssemblyName>Microsoft.Build.Test</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="nunit.framework">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="FunctionalTest.cs" />
|
||||
<Compile Include="Microsoft.Build.Internal\CollectionFromEnumerableTest.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Microsoft.Build.Construction\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Microsoft.Build.csproj">
|
||||
<Project>{B2012E7F-8F8D-4908-8045-413F2BD1022D}</Project>
|
||||
<Name>Microsoft.Build</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@@ -7,6 +7,8 @@ OTHER_RESOURCES = $(wildcard resources/*.bmp)
|
||||
|
||||
RESOURCES = $(RESX_RESOURCES) $(OTHER_RESOURCES)
|
||||
|
||||
PREBUILT = $(RESX_RESOURCES:=.prebuilt)
|
||||
|
||||
LIBRARY = Mono.Data.Sqlite.dll
|
||||
LIB_MCS_FLAGS = /unsafe /r:System.dll /r:System.Data.dll /r:System.Transactions.dll /r:System.Xml.dll \
|
||||
$(RESOURCES:%=-resource:%) -d:SQLITE_STANDARD
|
||||
@@ -19,8 +21,11 @@ EXTRA_DISTFILES = Test/SqliteTest.cs \
|
||||
resources/ChangeLog \
|
||||
resources/DataTypes.xml \
|
||||
resources/MetaDataCollections.xml \
|
||||
$(PREBUILT) \
|
||||
$(wildcard resources/*.bmp)
|
||||
|
||||
CLEAN_FILES = $(RESX_RESOURCES)
|
||||
|
||||
test-local: test.db
|
||||
|
||||
test.db: Test/test.sql
|
||||
@@ -31,5 +36,9 @@ include ../../build/library.make
|
||||
|
||||
$(the_lib): $(RESOURCES)
|
||||
|
||||
$(PREBUILT): %.prebuilt: %
|
||||
cp $* $@
|
||||
|
||||
$(RESX_RESOURCES): %.resources: %.resx
|
||||
$(RESGEN) $<
|
||||
$(RESGEN) $< || cp $@.prebuilt $@
|
||||
|
||||
@@ -2,6 +2,7 @@ Assembly/AssemblyInfo.cs
|
||||
../../build/common/Consts.cs
|
||||
../../build/common/Locale.cs
|
||||
../../build/common/MonoTODOAttribute.cs
|
||||
Mono.Data.Sqlite_2.0/MonoPInvokeCallbackAttribute.cs
|
||||
Mono.Data.Sqlite_2.0/SQLite3.cs
|
||||
Mono.Data.Sqlite_2.0/SQLite3_UTF16.cs
|
||||
Mono.Data.Sqlite_2.0/SQLiteBase.cs
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// MonoPInvokeCallbackAttribute.cs: necessary for AOT ports of Mono
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
#if MONOTOUCH
|
||||
|
||||
using System;
|
||||
|
||||
namespace MonoTouch {
|
||||
|
||||
[AttributeUsage (AttributeTargets.Method)]
|
||||
sealed class MonoPInvokeCallbackAttribute : Attribute {
|
||||
public MonoPInvokeCallbackAttribute (Type t) {}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -28,6 +28,9 @@ namespace Mono.Data.Sqlite
|
||||
|
||||
#if !PLATFORM_COMPACTFRAMEWORK
|
||||
private bool _buildingSchema = false;
|
||||
#endif
|
||||
#if MONOTOUCH
|
||||
GCHandle gch;
|
||||
#endif
|
||||
/// <summary>
|
||||
/// The user-defined functions registered on this connection
|
||||
@@ -37,12 +40,19 @@ namespace Mono.Data.Sqlite
|
||||
internal SQLite3(SQLiteDateFormats fmt)
|
||||
: base(fmt)
|
||||
{
|
||||
#if MONOTOUCH
|
||||
gch = GCHandle.Alloc (this);
|
||||
#endif
|
||||
}
|
||||
|
||||
protected override void Dispose(bool bDisposing)
|
||||
{
|
||||
if (bDisposing)
|
||||
Close();
|
||||
#if MONOTOUCH
|
||||
if (gch.IsAllocated)
|
||||
gch.Free ();
|
||||
#endif
|
||||
}
|
||||
|
||||
// It isn't necessary to cleanup any functions we've registered. If the connection
|
||||
@@ -866,7 +876,60 @@ namespace Mono.Data.Sqlite
|
||||
int n = UnsafeNativeMethods.sqlite3_rekey(_sql, newPasswordBytes, (newPasswordBytes == null) ? 0 : newPasswordBytes.Length);
|
||||
if (n > 0) throw new SqliteException(n, SQLiteLastError());
|
||||
}
|
||||
|
||||
#if MONOTOUCH
|
||||
SQLiteUpdateCallback update_callback;
|
||||
SQLiteCommitCallback commit_callback;
|
||||
SQLiteRollbackCallback rollback_callback;
|
||||
|
||||
[MonoTouch.MonoPInvokeCallback (typeof (SQLiteUpdateCallback))]
|
||||
static void update (IntPtr puser, int type, IntPtr database, IntPtr table, Int64 rowid)
|
||||
{
|
||||
SQLite3 instance = GCHandle.FromIntPtr (puser).Target as SQLite3;
|
||||
instance.update_callback (puser, type, database, table, rowid);
|
||||
}
|
||||
|
||||
internal override void SetUpdateHook (SQLiteUpdateCallback func)
|
||||
{
|
||||
update_callback = func;
|
||||
if (func == null)
|
||||
UnsafeNativeMethods.sqlite3_update_hook (_sql, null, IntPtr.Zero);
|
||||
else
|
||||
UnsafeNativeMethods.sqlite3_update_hook (_sql, update, GCHandle.ToIntPtr (gch));
|
||||
}
|
||||
|
||||
[MonoTouch.MonoPInvokeCallback (typeof (SQLiteCommitCallback))]
|
||||
static int commit (IntPtr puser)
|
||||
{
|
||||
SQLite3 instance = GCHandle.FromIntPtr (puser).Target as SQLite3;
|
||||
return instance.commit_callback (puser);
|
||||
}
|
||||
|
||||
internal override void SetCommitHook (SQLiteCommitCallback func)
|
||||
{
|
||||
commit_callback = func;
|
||||
if (func == null)
|
||||
UnsafeNativeMethods.sqlite3_commit_hook (_sql, null, IntPtr.Zero);
|
||||
else
|
||||
UnsafeNativeMethods.sqlite3_commit_hook (_sql, commit, GCHandle.ToIntPtr (gch));
|
||||
}
|
||||
|
||||
[MonoTouch.MonoPInvokeCallback (typeof (SQLiteRollbackCallback))]
|
||||
static void rollback (IntPtr puser)
|
||||
{
|
||||
SQLite3 instance = GCHandle.FromIntPtr (puser).Target as SQLite3;
|
||||
instance.rollback_callback (puser);
|
||||
}
|
||||
|
||||
internal override void SetRollbackHook (SQLiteRollbackCallback func)
|
||||
{
|
||||
rollback_callback = func;
|
||||
if (func == null)
|
||||
UnsafeNativeMethods.sqlite3_rollback_hook (_sql, null, IntPtr.Zero);
|
||||
else
|
||||
UnsafeNativeMethods.sqlite3_rollback_hook (_sql, rollback, GCHandle.ToIntPtr (gch));
|
||||
}
|
||||
#else
|
||||
internal override void SetUpdateHook(SQLiteUpdateCallback func)
|
||||
{
|
||||
UnsafeNativeMethods.sqlite3_update_hook(_sql, func, IntPtr.Zero);
|
||||
@@ -881,7 +944,7 @@ namespace Mono.Data.Sqlite
|
||||
{
|
||||
UnsafeNativeMethods.sqlite3_rollback_hook(_sql, func, IntPtr.Zero);
|
||||
}
|
||||
|
||||
#endif
|
||||
/// <summary>
|
||||
/// Helper function to retrieve a column of data from an active statement.
|
||||
/// </summary>
|
||||
|
||||
@@ -253,4 +253,11 @@ namespace Mono.Data.Sqlite
|
||||
SharedCache = 0x01000000,
|
||||
Default = 0x06,
|
||||
}
|
||||
|
||||
// subset of the options available in http://www.sqlite.org/c3ref/c_config_getmalloc.html
|
||||
public enum SQLiteConfig {
|
||||
SingleThread = 1,
|
||||
MultiThread = 2,
|
||||
Serialized = 3,
|
||||
}
|
||||
}
|
||||
@@ -2287,6 +2287,13 @@ namespace Mono.Data.Sqlite
|
||||
{
|
||||
_rollbackHandler(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
// http://www.sqlite.org/c3ref/config.html
|
||||
public static void SetConfig (SQLiteConfig config)
|
||||
{
|
||||
int n = UnsafeNativeMethods.sqlite3_config (config);
|
||||
if (n > 0) throw new SqliteException (n, null);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -686,6 +686,13 @@ namespace Mono.Data.Sqlite
|
||||
#endif
|
||||
internal static extern int sqlite3_exec(IntPtr db, byte[] strSql, IntPtr pvCallback, IntPtr pvParam, out IntPtr errMsg);
|
||||
|
||||
#if !PLATFORM_COMPACTFRAMEWORK
|
||||
[DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)]
|
||||
#else
|
||||
[DllImport(SQLITE_DLL)]
|
||||
#endif
|
||||
internal static extern int sqlite3_config (SQLiteConfig config);
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
@@ -391,28 +391,9 @@ namespace Mono.Data.Tds.Protocol {
|
||||
if (tdsVersion < TdsVersion.tds70) {
|
||||
Append (encoder.GetBytes (s));
|
||||
} else {
|
||||
int cindex = 0, index;
|
||||
int ssize = sizeof (short);
|
||||
int lenToWrite = s.Length * ssize;
|
||||
// if nextOutBufferLength points to the last buffer in outBuffer,
|
||||
// we would get a DivisionByZero while calculating remBufLen
|
||||
if (outBufferLength - nextOutBufferIndex < ssize)
|
||||
SendIfFull (ssize);
|
||||
|
||||
int remBufLen = outBufferLength - nextOutBufferIndex;
|
||||
int count = lenToWrite/remBufLen;
|
||||
|
||||
if (lenToWrite % remBufLen > 0)
|
||||
count++;
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
index = System.Math.Min (remBufLen/ssize, lenToWrite/ssize);
|
||||
for (int j = 0; j < index*ssize; j+=2, cindex++)
|
||||
AppendInternal ((short)s[cindex]);
|
||||
|
||||
lenToWrite -= index*ssize;
|
||||
// Just make sure to flush the buffer
|
||||
SendIfFull ((lenToWrite+1)*ssize);
|
||||
for (int i = 0; i < s.Length; i++) {
|
||||
SendIfFull (sizeof(short));
|
||||
AppendInternal ((short)s[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,9 @@ namespace Mono.Debugger.Soft
|
||||
internal ArrayMirror (VirtualMachine vm, long id) : base (vm, id) {
|
||||
}
|
||||
|
||||
internal ArrayMirror (VirtualMachine vm, long id, TypeMirror type, AppDomainMirror domain) : base (vm, id, type, domain) {
|
||||
}
|
||||
|
||||
public int Length {
|
||||
get {
|
||||
GetLengths ();
|
||||
|
||||
@@ -102,6 +102,11 @@ namespace Mono.Debugger.Soft
|
||||
public bool is_thread_pool;
|
||||
}
|
||||
|
||||
struct ObjectRefInfo {
|
||||
public long type_id;
|
||||
public long domain_id;
|
||||
}
|
||||
|
||||
enum ValueTypeId {
|
||||
VALUE_TYPE_ID_NULL = 0xf0,
|
||||
VALUE_TYPE_ID_TYPE = 0xf1
|
||||
@@ -317,8 +322,8 @@ namespace Mono.Debugger.Soft
|
||||
* features might not be available. This allows older clients to communicate
|
||||
* with newer runtimes, and vice versa.
|
||||
*/
|
||||
public const int MAJOR_VERSION = 2;
|
||||
public const int MINOR_VERSION = 3;
|
||||
internal const int MAJOR_VERSION = 2;
|
||||
internal const int MINOR_VERSION = 5;
|
||||
|
||||
enum WPSuspendPolicy {
|
||||
NONE = 0,
|
||||
@@ -478,7 +483,8 @@ namespace Mono.Debugger.Soft
|
||||
IS_COLLECTED = 3,
|
||||
GET_ADDRESS = 4,
|
||||
GET_DOMAIN = 5,
|
||||
SET_VALUES = 6
|
||||
SET_VALUES = 6,
|
||||
GET_INFO = 7,
|
||||
}
|
||||
|
||||
class Header {
|
||||
@@ -1902,6 +1908,15 @@ namespace Mono.Debugger.Soft
|
||||
return SendReceive (CommandSet.OBJECT_REF, (int)CmdObjectRef.GET_ADDRESS, new PacketWriter ().WriteId (id)).ReadLong ();
|
||||
}
|
||||
|
||||
internal ObjectRefInfo Object_GetInfo (long id) {
|
||||
ObjectRefInfo res = new ObjectRefInfo ();
|
||||
PacketReader r = SendReceive (CommandSet.OBJECT_REF, (int)CmdObjectRef.GET_INFO, new PacketWriter ().WriteId (id));
|
||||
|
||||
res.type_id = r.ReadId ();
|
||||
res.domain_id = r.ReadId ();
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* This is the interface exposed by the debugger towards the debugger agent */
|
||||
|
||||
@@ -133,7 +133,7 @@ namespace Mono.Debugger.Soft {
|
||||
if (named_args [j] == null)
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
res [i] = new CustomAttributeDataMirror (vm.GetMethod (attr.ctor_id), ctor_args, named_args);
|
||||
res [i] = new CustomAttributeDataMirror (ctor, ctor_args, named_args);
|
||||
}
|
||||
|
||||
return res;
|
||||
|
||||
@@ -6,19 +6,44 @@ using System.Threading;
|
||||
namespace Mono.Debugger.Soft
|
||||
{
|
||||
public class ObjectMirror : Value {
|
||||
TypeMirror type;
|
||||
AppDomainMirror domain;
|
||||
|
||||
internal ObjectMirror (VirtualMachine vm, long id) : base (vm, id) {
|
||||
}
|
||||
|
||||
internal ObjectMirror (VirtualMachine vm, long id, TypeMirror type, AppDomainMirror domain) : base (vm, id) {
|
||||
this.type = type;
|
||||
this.domain = domain;
|
||||
}
|
||||
|
||||
void GetInfo () {
|
||||
var info = vm.conn.Object_GetInfo (id);
|
||||
type = vm.GetType (info.type_id);
|
||||
domain = vm.GetDomain (info.domain_id);
|
||||
}
|
||||
|
||||
public TypeMirror Type {
|
||||
get {
|
||||
return vm.GetType (vm.conn.Object_GetType (id));
|
||||
if (type == null) {
|
||||
if (vm.conn.Version.AtLeast (2, 5))
|
||||
GetInfo ();
|
||||
else
|
||||
type = vm.GetType (vm.conn.Object_GetType (id));
|
||||
}
|
||||
return type;
|
||||
}
|
||||
}
|
||||
|
||||
public AppDomainMirror Domain {
|
||||
get {
|
||||
return vm.GetDomain (vm.conn.Object_GetDomain (id));
|
||||
if (domain == null) {
|
||||
if (vm.conn.Version.AtLeast (2, 5))
|
||||
GetInfo ();
|
||||
else
|
||||
domain = vm.GetDomain (vm.conn.Object_GetDomain (id));
|
||||
}
|
||||
return domain;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,9 @@ namespace Mono.Debugger.Soft
|
||||
internal StringMirror (VirtualMachine vm, long id) : base (vm, id) {
|
||||
}
|
||||
|
||||
internal StringMirror (VirtualMachine vm, long id, TypeMirror type, AppDomainMirror domain) : base (vm, id, type, domain) {
|
||||
}
|
||||
|
||||
public string Value {
|
||||
get {
|
||||
return vm.conn.String_GetValue (id);
|
||||
|
||||
Loaded 100 of 374 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user